/* ==========================================================================
   QRcms.AI — the landing page.

   Loaded only by index.html, on top of the shared tokens in styles.css. The
   app pages don't need any of this, and a restaurant on a phone in a car park
   shouldn't download a marketing page's worth of CSS to read a menu.

   The page is deliberately picture-led: every section carries an inline SVG
   that shows the product doing its job, and the prose exists to caption it.
   ========================================================================== */

/* ------------------------------------------------------------------ nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.nav[data-stuck="yes"] {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav-actions { display: flex; align-items: center; gap: .5rem; }

/* --------------------------------------------------------------- layout --- */
.section {
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem);
}
.section--tint { background: var(--surface-alt); }
.section--ink {
  background:
    radial-gradient(120% 100% at 15% 0%, var(--red-700) 0%, transparent 60%),
    linear-gradient(160deg, var(--red-900) 0%, #3D060C 100%);
  color: #fff;
}
.section-inner { max-width: 1120px; margin: 0 auto; }

.eyebrow {
  margin: 0 0 .7rem;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--red-600);
}
.section--ink .eyebrow { color: var(--amber-400); }

.section-title {
  margin: 0 0 .6rem;
  font-size: clamp(1.65rem, 3.6vw, 2.5rem);
  font-weight: 800;
}
.section-lede {
  margin: 0 auto;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.03rem;
}
.section--ink .section-lede { color: rgba(255, 255, 255, .78); }
.section-head { text-align: center; margin-bottom: clamp(2rem, 5vw, 3.25rem); }

/* ----------------------------------------------------------------- hero --- */
.home-hero {
  position: relative;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 8vw, 6rem);
  overflow: hidden;
  /* Light and quiet — the dark drama belongs to the closing section and the
     sign-in page. Two soft warm washes, no animation, no competition with
     the illustration. */
  background:
    radial-gradient(52rem 30rem at 85% 8%, var(--amber-050) 0%, transparent 62%),
    radial-gradient(46rem 30rem at 4% 92%, var(--red-050) 0%, transparent 60%),
    var(--bg);
}
.home-hero-grid {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.home-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 5.6vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -.035em;
}
.home-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--red-600) 0%, var(--amber-500) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-hero p.lede {
  margin: 0 0 1.6rem;
  max-width: 42ch;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  color: var(--ink-soft);
}
.cta-row { display: flex; flex-wrap: wrap; gap: .65rem; }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 1.9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--muted);
}
.badge-row b { display: block; font-size: 1.35rem; color: var(--ink); letter-spacing: -.02em; }

/* Art sits in its own box so the SVG can bleed without stretching the grid. */
.art { width: 100%; height: auto; display: block; }
.art-frame { position: relative; }

/* ---------------------------------------------------------------- steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step .art { border-radius: var(--radius-sm); margin-bottom: 1.1rem; }
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem; height: 1.6rem;
  border-radius: 50%;
  background: var(--red-050);
  color: var(--red-700);
  font-size: .8rem;
  font-weight: 700;
}
.step h3 { margin: .6rem 0 .3rem; font-size: 1.08rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* --------------------------------------------------------------- split ---- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: center;
}
.split--flip .split-copy { order: 2; }
.split-copy h2 { margin: 0 0 .7rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.split-copy p { margin: 0 0 1rem; color: var(--ink-soft); max-width: 44ch; }
.section--ink .split-copy p { color: rgba(255, 255, 255, .8); }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ticks li { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.ticks svg { flex: none; margin-top: .18rem; }

/* -------------------------------------------------------------- gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: clamp(.85rem, 2vw, 1.4rem);
}
.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform .35s ease, box-shadow .35s ease;
}
.gallery figure:hover { transform: translateY(-6px) scale(1.015); box-shadow: var(--shadow-md); }
.gallery figcaption {
  padding: .7rem .85rem .85rem;
  font-size: .85rem;
  font-weight: 600;
  border-top: 1px solid var(--line);
}
.gallery figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }

/* ----------------------------------------------------------- closing cta --- */
.closer { text-align: center; }
.closer h2 { margin: 0 0 .6rem; font-size: clamp(1.8rem, 4.2vw, 2.8rem); font-weight: 800; }
.closer .cta-row { justify-content: center; margin-top: 1.6rem; }
.section--ink .primary {
  background: #fff; color: var(--red-700); border-color: #fff;
}
.section--ink .primary:hover { background: var(--amber-050); }
.section--ink .ghost { color: #fff; border-color: rgba(255, 255, 255, .45); background: transparent; }
.section--ink .ghost:hover { background: rgba(255, 255, 255, .12); }

/* --------------------------------------------------------------- footer --- */
.home-foot {
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .85rem;
  color: var(--muted);
}

/* --------------------------------------------------------------- motion --- */
/* Sections lift in as they arrive. Anything not yet observed stays visible, so
   the page is fully readable if the script never runs. */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.22,.7,.3,1); }
.reveal[style*="--d"] { transition-delay: var(--d); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-in { opacity: 1; transform: none; transition: none; }
  .step:hover, .gallery figure:hover { transform: none; }
  .art [data-anim] { animation: none !important; }
}

@media (max-width: 860px) {
  .home-hero-grid { grid-template-columns: 1fr; }
  .split--flip .split-copy { order: 0; }
  .badge-row { gap: 1.1rem; }
}

/* ------------------------------------------------- illustration motion --- */
/* Tiny, slow, transform-only. The art should feel alive, not busy. */
.art [data-anim] { transform-box: fill-box; transform-origin: center; }
.art [data-anim="float"]      { animation: art-float 5.5s ease-in-out infinite; }
.art [data-anim="float-late"] { animation: art-float 6.5s ease-in-out 1.2s infinite; }
.art [data-anim="drift"]      { animation: art-drift 3.2s ease-in-out infinite; }
.art [data-anim="pulse"]      { animation: art-pulse 2.6s ease-in-out infinite; }
.art [data-anim="pop"]        { animation: art-pop 4.5s ease-in-out infinite; }
.art [data-anim="scan"]       { animation: art-scan 2.8s ease-in-out infinite; }

@keyframes art-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes art-drift { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes art-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes art-pop   { 0%, 12% { transform: scale(.97); opacity: .5; } 22%, 100% { transform: scale(1); opacity: 1; } }
@keyframes art-scan  { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(40px); } }

/* ---------------------------------------------------------- CTA anchors --- */
/* The landing page's calls to action are links, not buttons — they navigate.
   Dressed to match button.primary / button.ghost in styles.css. */
a.primary, a.ghost {
  font: inherit;
  font-weight: 600;
  padding: .6rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  transition: border-color .15s, background .15s, filter .15s, transform .06s;
}
a.primary {
  background: linear-gradient(180deg, var(--red-500), var(--red-600));
  border-color: var(--red-700);
  color: #fff;
  box-shadow: 0 1px 2px rgba(110, 11, 20, .3), inset 0 1px 0 rgba(255, 255, 255, .18);
}
a.primary:hover { filter: brightness(1.06); }
a.primary:active { transform: translateY(1px); }
a.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
a.ghost:hover { border-color: var(--muted); background: var(--surface); }
a.primary:focus-visible, a.ghost:focus-visible {
  outline: 3px solid var(--amber-400);
  outline-offset: 1px;
}
