/* ==========================================================================
   GENUINE — styles.css — full page (hero, problem, how it works, how it's built, footer)
   Order: 1 tokens · 2 helpers · 3 base · 4 components · 5 breakpoints
   DRY RULES
   - Raw values (hex, rgb, rem, ms) live ONLY in section 1. Below it = var() only.
   - A layout pattern used twice becomes a helper class (section 2), applied in HTML.
   - Breakpoints override TOKENS where possible, not whole rules.
   ========================================================================== */

/* ---------- 1. TOKENS ---------- */
:root {
  --color-ember-night: #161009;
  --color-espresso: #2a2118;
  --color-bark: #3b2a1e;
  /* --color-taupe: #8a7b66; */
  --color-taupe: #white;
  --color-sand: #c4b49a;
  --color-ember-glow: green;
  --color-deep-ember: #b53f00;
  --color-ember-wash: #fdebdd;
  --color-pure-white: #fff;
  --color-warm-bone: #f6f1e7;
  --color-line: #ece6da;
  --color-on-accent: var(--color-ember-night);
  /* text/icons sitting ON the accent colour: one place to change */

  /* translucent + shadows */
  --line-soft: rgb(196 180 154 / .2);
  --line-mid: rgb(196 180 154 / .45);
  --glass: rgb(42 33 24 / .6);
  --glass-solid: rgb(42 33 24 / .94);
  --hover-wash: rgb(255 255 255 / .08);
  --stripe: rgb(138 123 102 / .12);
  --shadow-nav: 0 .5rem 2rem rgb(0 0 0 / .35);
  --shadow-card: 0 1.5rem 3rem rgb(0 0 0 / .45);

  /* fonts */
  --font-ozik: "Boldonse", ui-sans-serif, system-ui, sans-serif;
  --font-aeonik: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tracking: -.01em;
  --tracking-wide: .05em;                                       /* card labels */
  --font-instrument-serif: "Instrument Serif", Georgia, serif;  /* eyebrow */
  --h2-size: clamp(1.5rem, .9rem + 3vw, 3.5rem);                /* section titles (reuse --h1-leading) */
  --section-y: calc(var(--s16) * 1.5);                          /* vertical padding of every section */

  /* type sizes */
  --fs-xs: .8125rem;
  --fs-sm: .875rem;
  --fs-md: .9375rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.5rem;
  --h1-size: clamp(1.75rem, 1rem + 3.6vw, 4.25rem);
  --h1-leading: .9;
  /* overlap is intentional: lower = more overlap */

  /* spacing: 4px soft grid. Every gap/padding is a step of --space. */
  --space: .25rem;
  --s1: var(--space);
  --s2: calc(var(--space) * 2);
  --s3: calc(var(--space) * 3);
  --s4: calc(var(--space) * 4);
  --s5: calc(var(--space) * 5);
  --s6: calc(var(--space) * 6);
  --s8: calc(var(--space) * 8);
  --s12: calc(var(--space) * 12);
  --s16: calc(var(--space) * 16);
  --margin: var(--s5);
  /* side margin: 20px on phones */

  /* sizes */
  --tap: 3rem;
  --tap-sm: 2.5rem;
  --avatar: 2.5rem;
  --qr: 6rem;
  --card-w: 22rem;
  --tuck: -2.5rem;
  --nav-max: 72rem;
  --nav-offset: 6rem;
  --nav-gap: var(--s4);
  --hero-top: 8.5rem;

  /* shape + motion */
  --radius-lg: .5rem;
  --radius-xl: 1rem;
  --radius-card: 1.5rem;
  --radius-pill: 999px;
  --border: 1px solid var(--line-soft);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --tr-fast: .15s var(--ease);
}

/* ---------- 2. HELPERS (applied as classes in HTML) ---------- */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--s2);
}

.gap-3 {
  gap: var(--s3);
}

.gap-4 {
  gap: var(--s4);
}

.center {
  text-align: center;
}

.pill {
  border-radius: var(--radius-pill);
}

.fill {
  position: absolute;
  inset: 0;
}

.rel {
  position: relative;
}

.grid { display: grid; }
.cols { grid-template-columns: repeat(var(--cols, 1), 1fr); }   /* column count comes from --cols (see G) */
.split { display: grid; gap: var(--s8); align-items: start; }   /* 1 column on phones, two from 62em (see G) */
.split--wide { --split: 1.2fr 1fr; }
.split--note { --split: 1fr 2fr; }
.mt-8 { margin-top: var(--s8); }
.label { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--color-taupe); }
.title { font-size: var(--fs-xl); font-weight: 600; line-height: 1.25; }
.note { font-size: var(--fs-sm); line-height: 1.55; color: var(--color-sand); }

/* display font treatment: single-weight face, so never fake-bold it */
.display {
  font-family: var(--font-ozik);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: var(--tracking);
}

/* ---------- 3. BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--nav-offset);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-ember-night);
  color: var(--color-pure-white);
  font: var(--fs-base) / 1.5 var(--font-aeonik);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

p, h1, h2, h3, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

/* ---------- 4. COMPONENTS ---------- */
.skip-link {
  position: absolute;
  left: var(--margin);
  top: -4rem;
  z-index: 100;
  padding: var(--s2) var(--s4);
  border-radius: var(--radius-lg);
  background: var(--color-pure-white);
  color: var(--color-ember-night);
  transition: top var(--tr-fast);
}

.skip-link:focus {
  top: var(--s4);
}

/* buttons: primary = filled, outline = secondary */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: var(--tap);
  padding: var(--s3) var(--s6);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font: 600 var(--fs-base) / 1 var(--font-aeonik);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: filter var(--tr-fast), background-color var(--tr-fast), transform var(--tr-fast);
}

.btn--sm {
  min-height: var(--tap-sm);
  padding: var(--s2) var(--s5);
  font-size: var(--fs-md);
}

.btn--primary {
  background: var(--color-ember-glow);
  color: var(--color-on-accent);
}

.btn--primary:hover {
  filter: brightness(1.1);
}

.btn--outline {
  border-color: var(--color-pure-white);
  color: var(--color-pure-white);
}

.btn--outline:hover {
  background: var(--hover-wash);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--color-sand);
  outline-offset: 3px;
}

[data-wa-link][aria-disabled="true"] {
  cursor: not-allowed;
}

/* number not configured yet: see main.js */

/* nav: ALWAYS a glass pill, fixed, floating --nav-gap below the browser top (not touching it). No JS involved. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: var(--nav-gap) var(--margin);
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  max-width: var(--nav-max);
  margin-inline: auto;
  gap: var(--s6);
  padding: var(--s3) var(--s3) var(--s3) var(--s6);
  background: var(--glass);
  border: var(--border);
  box-shadow: var(--shadow-nav);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav {
    background: var(--glass-solid);
  }

  /* no blur support: stay readable */
}

.nav__logo {
  font-size: var(--fs-xl);
  line-height: 1;
  color: var(--color-ember-glow);
  text-decoration: none;
}

.nav__links {
  display: none;
  gap: var(--s8);
}

/* phones: hidden, like the reference */
.nav__links a {
  color: var(--color-taupe);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--tr-fast);
}

.nav__links a:hover {
  color: var(--color-sand);
}

/* hero */
.hero, .section--pattern { position: relative; isolation: isolate; overflow: hidden; }

.hero {
  padding: var(--hero-top) 0 calc(var(--s16) + var(--s4));
}

.hero::before, .section--pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* icon wallpaper, fades out downward */
  background: url("assets/pattern.svg") center top / 10rem 10rem repeat;
  -webkit-mask-image: linear-gradient(#000 40%, transparent 95%);
  mask-image: linear-gradient(#000 40%, transparent 95%);
}

.hero__inner {
  padding-inline: var(--margin);
  max-width: 62rem;
  margin-inline: auto;
}

.badge {
  padding: var(--s2) var(--s4);
  border: 1px solid var(--line-mid);
  font-size: var(--fs-md);
}

.hero__title {
  margin-top: var(--s6);
  font-size: var(--h1-size);
  line-height: var(--h1-leading);
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* wide display font must never cause sideways scroll */
.hero__sub, .lead {
  margin-top: var(--s8);
  max-width: 38rem;
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--color-sand);
}

.accent {
  color: var(--color-ember-glow);
}

.hero__ctas {
  align-items: stretch;
  width: 100%;
  max-width: 20rem;
  margin-top: var(--s8);
}

.hero__note {
  margin-top: var(--s4);
  font-size: var(--fs-sm);
  color: var(--color-taupe);
}

/* QR + image slots share one slot pattern: label comes from data-label in HTML */
.qr {
  display: none;
  align-items: center;
  gap: var(--s4);
  margin-top: var(--s8);
  max-width: 22rem;
  padding: var(--s3) var(--s4) var(--s3) var(--s3);
  border: var(--border);
  border-radius: var(--radius-xl);
  text-align: left;
}

.qr__media {
  flex: none;
  width: var(--qr);
  height: var(--qr);
  border-radius: var(--radius-lg);
}

.qr__text {
  font-size: var(--fs-sm);
  color: var(--color-sand);
}

[data-img-slot] {
  position: relative;
  overflow: hidden;
  background: var(--color-warm-bone);
}

[data-img-slot]::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-taupe);
  text-align: center;
}

[data-img-slot].has-img::after,
[data-img-slot].is-missing img {
  display: none;
}

[data-img-slot] img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  object-fit: cover;
  object-position: top center;
}

/* crop to fill, never stretch */

/* chat cards. Phones: swipe row (scroll-snap, zero JS). Desktop: fan (section 5). */
.hero__cards {
  margin-top: calc(var(--s12) + var(--s2));
  padding: 0 var(--margin) var(--s4);
  text-align: left;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--margin);
}

.chat-card {
  flex: 0 0 min(82vw, var(--card-w));
  scroll-snap-align: center;
  overflow: hidden;
  background: var(--color-pure-white);
  color: var(--color-ember-night);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.chat-card__head {
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--color-line);
}

.chat-card__who {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

.chat-card__name {
  font-weight: 600;
}

.status {
  font-size: var(--fs-xs);
  color: var(--color-deep-ember);
}

.status__dot,
.avatar,
.send {
  border-radius: 50%;
}

.status__dot {
  width: var(--s2);
  height: var(--s2);
  background: currentColor;
}

.avatar,
.send {
  flex: none;
  display: grid;
  place-items: center;
  background: var(--color-ember-glow);
  color: var(--color-on-accent);
}

.avatar {
  width: var(--avatar);
  height: var(--avatar);
  font: 700 var(--fs-lg) / 1 var(--font-aeonik);
}

.send {
  width: var(--avatar);
  height: var(--avatar);
  margin-left: var(--s2);
}

.chip {
  flex: none;
  padding: var(--s2) var(--s3);
  background: var(--color-ember-wash);
  color: var(--color-bark);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.chat-card__media {
  aspect-ratio: 3 / 4;
  /* fixed box = no layout jump while the image loads */
  background: repeating-linear-gradient(135deg, transparent 0 var(--s3), var(--stripe) var(--s3) var(--s6)), var(--color-warm-bone);
}

.chat-card__input {
  padding: var(--s2) var(--s3);
  background: var(--color-warm-bone);
  border-top: 1px solid var(--color-line);
}

.chat-card__input span {
  flex: 1;
  padding: var(--s3) var(--s4);
  background: var(--color-pure-white);
  color: var(--color-taupe);
  font-size: var(--fs-sm);
}

/* sections below the hero */
.section { padding: var(--section-y) var(--margin); }
.section__inner { max-width: var(--nav-max); margin-inline: auto; }   /* same width as the nav pill */
.section--alt { background: var(--color-espresso); }
.section--light { background: var(--color-pure-white); color: var(--color-espresso); }
.section--light .lead { color: inherit; }
.eyebrow { font: italic 400 var(--fs-lg) / 1.2 var(--font-instrument-serif); color: var(--color-taupe); }
.section__title { margin-top: var(--s2); font-size: var(--h2-size); line-height: var(--h1-leading); }
.accent-deep { color: var(--color-deep-ember); }   /* accent that stays readable on light backgrounds */

/* cards: one base, two skins (light = steps + aside, outline = under the hood) */
.card { padding: var(--s8); border-radius: var(--radius-card); }
.card--light { background: var(--color-warm-bone); color: var(--color-espresso); border: 1px solid var(--color-espresso); }
.card--outline { border: var(--border); }
.card--outline p { color: var(--color-sand); }

/* problem: hairline rows */
.rows > * { padding-block: var(--s6); border-top: var(--border); }
.rows > :last-child { border-bottom: var(--border); }
.rows p { margin-top: var(--s2); color: var(--color-sand); }

/* footer */
.footer { padding: var(--s12) var(--margin); border-top: var(--border); }

/* ---------- 5. BREAKPOINTS (override tokens first, rules second) ---------- */
@media (min-width: 48em) {

  /* >= 768px */
  :root {
    --margin: var(--s8);
  }

  .cols-2 { --cols: 2; }

  .nav__links {
    display: flex;
  }

  .hero__ctas {
    flex-direction: row;
    max-width: none;
    width: auto;
  }
}

@media (min-width: 62em) {

  /* >= 992px: swipe row becomes a fan */
  :root {
    --hero-top: 10rem;
    --section-y: calc(var(--s16) * 2);
  }

  .cols-3 { --cols: 3; }
  .split { grid-template-columns: var(--split, 1fr 1fr); }


  .qr {
    display: flex;
  }

  .hero__cards {
    justify-content: center;
    align-items: flex-start;
    overflow: visible;
    scroll-snap-type: none;
    margin-top: 4.5rem;
  }

  .chat-card {
    flex-basis: var(--card-w);
    scroll-snap-align: none;
    transform: translateY(var(--drop, 0)) rotate(var(--tilt, 0deg));
  }

  .chat-card--left,
  .chat-card--right {
    --drop: var(--s12);
    z-index: 1;
  }

  .chat-card--left {
    --tilt: -5deg;
    margin-right: var(--tuck);
  }

  .chat-card--right {
    --tilt: 5deg;
    margin-left: var(--tuck);
  }

  .chat-card--center {
    z-index: 2;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}