/* ============================================================================
   SoberDeck — Marketing site
   Design system: TasteKit — flat, editorial, warm-graphite.
   No shadows. No gradients. No blur. No glass. Structure from tone + edges.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Raw palette — light */
  --canvas:   #F2F0E7;
  --surface:  #DFDDD1;
  --graphite: #3C4042;
  --hairline: #C2C2C2;
  --slate:    #6A6F72;
  --ink:      #1A1916;
  --ember:    #F55C3D;
  --grass:    #2D7E42;
  --cobalt:   #2D6FE8;

  /* Semantic — light (default) */
  --bg:            var(--canvas);
  --bg-elevated:   #EAE7DD;     /* a recessed warm tone for banded sections */
  --surface-card:  var(--surface);
  --tonal:         #E7E4D9;     /* muted recessed fill */
  --text-primary:  var(--ink);
  --text-secondary: var(--slate);
  --text-tertiary: #8B8E8C;
  --border:        var(--hairline);
  --border-strong: #A9A89E;
  --rule:          var(--ink);
  --accent:        var(--grass);
  --accent-text:   var(--grass);
  --accent-soft:   #E2EAE0;     /* faint green wash for tinted blocks (flat) */
  --on-accent:     #FFFFFF;
  --ink-fill:      var(--ink);
  --on-ink:        var(--canvas);
  --caution:       var(--ember);
  --caution-soft:  #FAE6E0;
  --within:        var(--cobalt);

  /* Fonts — two faces only: system sans + system mono (authentic to the app) */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Helvetica Neue", system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo",
               "Cascadia Mono", "Roboto Mono", "Consolas", monospace;

  /* Fluid type scale */
  --t-hero:    clamp(4.5rem, 2rem + 11vw, 9rem);
  --t-display: clamp(2.5rem, 1.1rem + 5.6vw, 4.75rem);
  --t-h2:      clamp(2rem, 1.25rem + 3vw, 3.25rem);
  --t-h3:      clamp(1.35rem, 1.05rem + 1.3vw, 1.85rem);
  --t-lead:    clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  --t-body:    1.0625rem;
  --t-small:   0.9375rem;
  --t-label:   0.75rem;

  /* Radii */
  --r-card:    22px;
  --r-block:   12px;
  --r-cell:    6px;
  --r-capsule: 999px;

  /* Structure */
  --hair: 1px;
  --heavy: 2px;
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(5rem, 9vw, 9rem);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

[data-theme="dark"] {
  /* Raw palette — dark */
  --void:     #0B0C0C;
  --surface:  #17191A;
  --elevated: #2C3032;
  --mist:     #C2C2C2;
  --cream:    #DFDDD1;
  --grass-bright: #35924E;

  --bg:            var(--void);
  --bg-elevated:   #101213;
  --surface-card:  #17191A;
  --tonal:         #202325;
  --text-primary:  var(--cream);
  --text-secondary: var(--mist);
  --text-tertiary: var(--slate);
  --border:        var(--elevated);
  --border-strong: #3C4145;
  --rule:          var(--cream);
  --accent:        var(--grass);
  --accent-text:   var(--grass-bright);
  --accent-soft:   #15231A;
  --on-accent:     #FFFFFF;
  --ink-fill:      var(--cream);   /* "ink" forms invert to cream on dark */
  --on-ink:        var(--void);
  --caution-soft:  #2A1712;
  --within:        #3D78F0;

  color-scheme: dark;
}

/* ----------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease-soft), color 0.5s var(--ease-soft);
}

/* Warm-paper grain — texture only, no depth (stays true to flat ethos) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::before { opacity: 0.05; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: var(--heavy) solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----------------------------------------------------------------------------
   3. Type utilities
   -------------------------------------------------------------------------- */
.mono { font-family: var(--font-mono); }

/* The signature technical strip: uppercase mono, wide tracking (1.6 → ~0.16em) */
.strip {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.strip--accent { color: var(--accent-text); }

.display {
  font-size: var(--t-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
.h2 {
  font-size: var(--t-h2);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.h3 {
  font-size: var(--t-h3);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.lead {
  font-size: var(--t-lead);
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 400;
}
.num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  font-feature-settings: "tnum" 1;
}

.text-secondary { color: var(--text-secondary); }
.accent-text { color: var(--accent-text); }

/* ----------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--band { background: var(--bg-elevated); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .display { max-width: 16ch; }

.rule {
  height: var(--hair);
  background: var(--border);
  border: 0;
  width: 100%;
}
.rule--heavy { height: var(--heavy); background: var(--rule); }

/* numbered section marker, e.g. 01 / FEATURES */
.section-index {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.section-index::after {
  content: "";
  width: clamp(2rem, 8vw, 4rem);
  height: var(--hair);
  background: var(--border-strong);
}

/* ----------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  --pad-y: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: var(--pad-y) 1.5rem;
  border-radius: var(--r-block);
  border: var(--hair) solid transparent;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: #266B38; }

.btn--ink { background: var(--ink-fill); color: var(--on-ink); }
.btn--ink:hover { background: var(--graphite); color: #fff; }
[data-theme="dark"] .btn--ink:hover { background: #fff; color: var(--void); }

.btn--outline { border-color: var(--border-strong); color: var(--text-primary); }
.btn--outline:hover { border-color: var(--text-primary); background: var(--tonal); }

.btn--capsule { border-radius: var(--r-capsule); }
.btn--lg { --pad-y: 1.15rem; padding-inline: 2rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* App Store download button — custom, in-brand */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.4rem 0.75rem;
  border-radius: var(--r-block);
  background: var(--ink-fill);
  color: var(--on-ink);
  transition: background-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.btn-store:hover { background: var(--graphite); }
[data-theme="dark"] .btn-store { background: var(--cream); color: var(--void); }
[data-theme="dark"] .btn-store:hover { background: #fff; }
.btn-store:active { transform: translateY(1px); }
.btn-store svg { width: 22px; height: 22px; flex: none; }
.btn-store .bs-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.btn-store .bs-text small {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}
.btn-store .bs-text span { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }

/* ----------------------------------------------------------------------------
   6. Cards / surfaces (tasteBlock)
   -------------------------------------------------------------------------- */
.block {
  background: var(--surface-card);
  border: var(--hair) solid var(--border);
  border-radius: var(--r-card);
  padding: clamp(1.5rem, 3vw, 2rem);
}
.block--tonal { background: var(--tonal); border-color: transparent; }
.block--ink { background: var(--ink-fill); color: var(--on-ink); border-color: transparent; }
.block--accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.block--bare { background: transparent; border-color: var(--border); }

/* ----------------------------------------------------------------------------
   7. Nav
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: var(--hair) solid var(--border);
  transition: background-color 0.5s var(--ease-soft);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 68px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.brand__glyph {
  width: 30px; height: 30px;
  border-radius: var(--r-cell);
  /* dark site → paper-tile icon (pops on void); light site → midnight tile (pops on paper) */
  background: url("app-icon-180.png") center / cover no-repeat;
  flex: none;
}
[data-theme="light"] .brand__glyph { background-image: url("app-icon-midnight-180.png"); }
.brand__glyph svg { display: none; }
.brand__name { font-size: 1.0625rem; letter-spacing: -0.02em; }
.brand__name b { font-weight: 800; }

.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
  position: relative;
  padding-block: 0.25rem;
}
.nav__links a:hover { color: var(--text-primary); }
.nav__right { display: flex; align-items: center; gap: 1rem; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--r-block);
  border: var(--hair) solid var(--border);
  display: grid; place-items: center;
  color: var(--text-secondary);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.theme-toggle:hover { border-color: var(--text-primary); color: var(--text-primary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

.nav__burger { display: none; width: 38px; height: 38px; border-radius: var(--r-block);
  border: var(--hair) solid var(--border); place-items: center; color: var(--text-primary); }
.nav__burger svg { width: 20px; height: 20px; }

/* ----------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(3rem, 7vw, 6rem); padding-bottom: var(--section-y); overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero__eyebrow { margin-bottom: 1.75rem; }
.hero h1 {
  font-size: var(--t-display);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero__sub { max-width: 34ch; margin-bottom: 2.25rem; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.hero__meta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: center;
  padding-top: 1.75rem;
  border-top: var(--hair) solid var(--border);
}
.hero__meta-item { display: flex; flex-direction: column; gap: 0.15rem; }
.hero__meta-item b { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }

.hero__stage { display: flex; justify-content: center; position: relative; }

/* floating mono coordinate marks in hero bg */
.hero__mark { position: absolute; color: var(--text-tertiary); opacity: 0.6; user-select: none; }

/* ----------------------------------------------------------------------------
   9. Device mockup (CSS recreation of the app)
   -------------------------------------------------------------------------- */
.phone {
  --pw: 300px;
  width: var(--pw);
  aspect-ratio: 300 / 620;
  border-radius: 44px;
  background: var(--bg);
  border: 2px solid var(--text-primary);
  padding: 10px;
  position: relative;
  flex: none;
}
[data-theme="dark"] .phone { border-color: var(--elevated); background: #000; }
.phone__screen {
  width: 100%; height: 100%;
  border-radius: 34px;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  border: var(--hair) solid var(--border);
}
.phone__notch {
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 22px;
  background: var(--text-primary);
  border-radius: var(--r-capsule);
  z-index: 5;
}
[data-theme="dark"] .phone__notch { background: #000; }

/* screen content */
.scr { padding: 30px 16px 16px; height: 100%; display: flex; flex-direction: column; gap: 12px; }
.scr__bar { display: flex; align-items: center; justify-content: space-between; }
.scr__title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }

.scr-meta {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hero-counter { text-align: left; padding: 6px 0 2px; }
.hero-counter b {
  display: block;
  font-family: var(--font-mono);
  font-size: 4.75rem;
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.hero-counter span {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* week strip of day cells */
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.daycell {
  aspect-ratio: 1;
  border-radius: var(--r-cell);
  display: grid; place-items: center;
  position: relative;
  background: var(--tonal);
  color: var(--text-secondary);
}
.daycell svg { width: 13px; height: 13px; }
.daycell--sober { background: var(--grass); color: #fff; }
.daycell--within { background: var(--within); color: #fff; }
.daycell--over { background: var(--ember); color: #fff; }
.daycell--today { outline: 2px solid var(--text-primary); outline-offset: 1px; }
.daycell--future { background: transparent; border: var(--hair) dashed var(--border); }
.daycell__dow {
  position: absolute; top: -14px; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: 0.45rem; letter-spacing: 0.08em;
  color: var(--text-tertiary); text-transform: uppercase;
}

/* mini stat blocks inside the phone */
.scr-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scr-stat {
  border-radius: var(--r-block);
  padding: 9px 10px;
  border: var(--hair) solid var(--border);
  background: var(--surface-card);
}
.scr-stat--accent { background: var(--grass); border-color: transparent; }
.scr-stat--ink { background: var(--ink-fill); border-color: transparent; }
.scr-stat b { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; display: block; }
.scr-stat small { font-family: var(--font-mono); font-size: 0.45rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.scr-stat--accent b, .scr-stat--accent small { color: #fff; }
.scr-stat--ink b, .scr-stat--ink small { color: var(--on-ink); }

.scr-cta {
  margin-top: auto;
  border-radius: var(--r-block);
  background: var(--grass);
  color: #fff;
  text-align: center;
  padding: 11px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scr-cta--ghost { background: transparent; border: var(--hair) solid var(--border); color: var(--text-primary); }

/* journal shortcut row inside Today screen */
.scr-jshort { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: var(--hair) solid var(--border); border-radius: var(--r-block); margin-top: 12px; }
.scr-jshort .scr-meta { display: block; margin-bottom: 3px; }
.scr-jshort p { font-size: 0.62rem; color: var(--text-secondary); line-height: 1.3; }
.scr-jshort svg { width: 14px; height: 14px; color: var(--text-tertiary); flex: none; }

/* month calendar inside phone */
.scr-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.scr-cal .daycell svg { width: 9px; height: 9px; }
.scr-cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 2px; }
.scr-cal-head span { text-align: center; font-family: var(--font-mono); font-size: 0.4rem; letter-spacing: 0.1em; color: var(--text-tertiary); text-transform: uppercase; }

/* bar chart inside phone */
.scr-bars { display: flex; align-items: flex-end; gap: 7px; height: 96px; padding-top: 6px; }
.scr-bars .bar { flex: 1; background: var(--grass); border-radius: 3px 3px 0 0; position: relative; }
.scr-bars .bar i { position: absolute; bottom: -13px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 0.4rem; color: var(--text-tertiary); font-style: normal; }
.scr-bars .bar--muted { background: var(--tonal); }

/* milestone grid inside phone */
.scr-miles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.scr-mile {
  aspect-ratio: 1; border-radius: var(--r-block);
  display: grid; place-content: center; text-align: center;
  background: var(--tonal); color: var(--text-secondary);
}
.scr-mile b { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 800; letter-spacing: -0.03em; }
.scr-mile small { font-family: var(--font-mono); font-size: 0.4rem; letter-spacing: 0.08em; text-transform: uppercase; }
.scr-mile--earned { background: var(--ink-fill); color: var(--on-ink); }
.scr-mile--current { background: var(--grass); color: #fff; }

/* relapse card inside phone */
.scr-relapse { border: var(--hair) solid var(--border); border-radius: var(--r-card); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.scr-relapse h4 { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.scr-relapse p { font-size: 0.7rem; color: var(--text-secondary); line-height: 1.45; }
.scr-relapse .rrow { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; border-top: var(--hair) solid var(--border); }
.scr-relapse .rrow span { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); }
.scr-relapse .rrow b { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 800; }
.scr-relapse .rrow b.keep { color: var(--accent-text); }

/* journal rows inside phone */
.scr-journal { display: flex; flex-direction: column; gap: 7px; }
.jrow { display: flex; gap: 9px; align-items: flex-start; padding: 9px; border: var(--hair) solid var(--border); border-radius: var(--r-block); }
.jrow .jdot { width: 9px; height: 9px; border-radius: 3px; flex: none; margin-top: 3px; }
.jrow .jdot--sober { background: var(--grass); }
.jrow .jdot--over { background: var(--ember); }
.jrow .jdot--within { background: var(--within); }
.jrow b { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); display: block; margin-bottom: 2px; }
.jrow p { font-size: 0.68rem; color: var(--text-primary); line-height: 1.4; }

/* ----------------------------------------------------------------------------
   10. Principle ticker
   -------------------------------------------------------------------------- */
.ticker { border-block: var(--hair) solid var(--border); overflow: hidden; padding-block: 1.1rem; }
.ticker__track { display: flex; gap: 3rem; width: max-content; animation: marquee 38s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex; align-items: center; gap: 0.85rem;
  font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-secondary); white-space: nowrap;
}
.ticker__item::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ----------------------------------------------------------------------------
   11. Feature grid
   -------------------------------------------------------------------------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: var(--hair) solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.feat {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-right: var(--hair) solid var(--border);
  border-bottom: var(--hair) solid var(--border);
  display: flex; flex-direction: column; gap: 1rem;
  background: var(--surface-card);
  transition: background-color 0.3s var(--ease);
  position: relative;
}
.feat:hover { background: var(--tonal); }
.feat__icon {
  width: 44px; height: 44px; border-radius: var(--r-block);
  border: var(--hair) solid var(--border-strong);
  display: grid; place-items: center; color: var(--text-primary);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.feat:hover .feat__icon { background: var(--accent); border-color: var(--accent); color: #fff; }
.feat__icon svg { width: 22px; height: 22px; }
.feat__num { position: absolute; top: 1.25rem; right: 1.5rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--text-tertiary); }
.feat h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.015em; }
.feat p { font-size: var(--t-small); color: var(--text-secondary); line-height: 1.55; }

/* tidy the outer border doubling */
.feat-grid .feat:nth-child(3n) { border-right: 0; }
.feat-grid .feat:nth-last-child(-n+3) { border-bottom: 0; }

/* ----------------------------------------------------------------------------
   12. Split feature rows
   -------------------------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split--rev .split__media { order: -1; }
.split__media { display: flex; justify-content: center; }
.split__body { display: flex; flex-direction: column; gap: 1.25rem; }
.split__body .h2 { max-width: 14ch; }
.split__body p { max-width: 44ch; }
.feature-list { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 0.5rem; }
.feature-list li { display: flex; gap: 0.75rem; align-items: flex-start; font-size: var(--t-small); color: var(--text-secondary); }
.feature-list li svg { width: 18px; height: 18px; flex: none; color: var(--accent-text); margin-top: 2px; }
.feature-list li b { color: var(--text-primary); font-weight: 600; }

/* ----------------------------------------------------------------------------
   13. Stat row
   -------------------------------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: var(--hair) solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.stat-cell { padding: clamp(1.5rem, 3vw, 2.25rem); border-right: var(--hair) solid var(--border); display: flex; flex-direction: column; gap: 0.5rem; }
.stat-cell:last-child { border-right: 0; }
.stat-cell .num { font-size: clamp(2.25rem, 4vw, 3.25rem); color: var(--text-primary); line-height: 1; }
.stat-cell .strip { margin-top: 0.25rem; }
.stat-cell p { font-size: var(--t-small); color: var(--text-secondary); }

/* ----------------------------------------------------------------------------
   14. Benefits
   -------------------------------------------------------------------------- */
.benefit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.benefit { padding: clamp(1.75rem, 3vw, 2.5rem); display: flex; flex-direction: column; gap: 1rem; }
.benefit__top { display: flex; align-items: center; gap: 1rem; }
.benefit__num { font-family: var(--font-mono); font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; color: var(--accent-text); line-height: 1; }
.benefit h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.015em; }
.benefit p { color: var(--text-secondary); font-size: var(--t-small); line-height: 1.6; }

/* ----------------------------------------------------------------------------
   15. Privacy section
   -------------------------------------------------------------------------- */
.privacy-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.privacy-points { display: flex; flex-direction: column; }
.privacy-point { display: flex; gap: 1.1rem; padding: 1.35rem 0; border-top: var(--hair) solid var(--border); }
.privacy-point:last-child { border-bottom: var(--hair) solid var(--border); }
.privacy-point__icon { width: 40px; height: 40px; border-radius: var(--r-block); background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.privacy-point__icon svg { width: 20px; height: 20px; }
.privacy-point h4 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.25rem; }
.privacy-point p { font-size: var(--t-small); color: var(--text-secondary); line-height: 1.5; }

.privacy-seal {
  border: var(--heavy) solid var(--rule);
  border-radius: var(--r-card);
  padding: clamp(2rem, 4vw, 3rem);
  display: flex; flex-direction: column; gap: 1.5rem;
}
.privacy-seal__big { font-family: var(--font-mono); font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; }
.privacy-seal ul { display: flex; flex-direction: column; gap: 0.75rem; }
.privacy-seal li { display: flex; gap: 0.6rem; align-items: center; font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.04em; }
.privacy-seal li svg { width: 16px; height: 16px; color: var(--accent-text); flex: none; }

/* ----------------------------------------------------------------------------
   16. Screenshot gallery
   -------------------------------------------------------------------------- */
.gallery { display: flex; gap: clamp(1.25rem, 3vw, 2.25rem); overflow-x: auto; padding-block: 1rem 2rem; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery__item { scroll-snap-align: center; display: flex; flex-direction: column; gap: 1rem; flex: none; }
.gallery__cap { display: flex; flex-direction: column; gap: 0.2rem; max-width: 300px; }
.gallery__cap b { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; }
.gallery__cap span { font-size: var(--t-small); color: var(--text-secondary); }

/* ----------------------------------------------------------------------------
   17. Testimonials
   -------------------------------------------------------------------------- */
.rating-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; padding: clamp(1.5rem, 3vw, 2rem) 0; }
.rating-strip__score { display: flex; align-items: baseline; gap: 0.6rem; }
.rating-strip__score b { font-family: var(--font-mono); font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; }
.stars { display: inline-flex; gap: 2px; color: var(--accent); }
.stars svg { width: 18px; height: 18px; }

.tmonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.tmonial { padding: clamp(1.5rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 1.25rem; }
.tmonial__stars { display: inline-flex; gap: 2px; color: var(--accent); }
.tmonial__stars svg { width: 15px; height: 15px; }
.tmonial blockquote { font-size: 1.0625rem; line-height: 1.55; letter-spacing: -0.01em; }
.tmonial__by { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; }
.tmonial__av { width: 38px; height: 38px; border-radius: var(--r-capsule); background: var(--tonal); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: 0.8125rem; color: var(--text-secondary); flex: none; }
.tmonial__by b { font-size: 0.9375rem; font-weight: 600; }
.tmonial__by span { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }

/* ----------------------------------------------------------------------------
   18. Pricing
   -------------------------------------------------------------------------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.plan { padding: clamp(1.75rem, 3.5vw, 2.5rem); display: flex; flex-direction: column; gap: 1.5rem; }
.plan__head { display: flex; flex-direction: column; gap: 0.5rem; }
.plan__name { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.plan__name h3 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.plan__price { display: flex; align-items: baseline; gap: 0.4rem; }
.plan__price b { font-family: var(--font-mono); font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.plan__price span { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--text-secondary); }
.plan ul { display: flex; flex-direction: column; gap: 0.75rem; }
.plan li { display: flex; gap: 0.65rem; align-items: flex-start; font-size: var(--t-small); }
.plan li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.plan li.no { color: var(--text-tertiary); }
.plan li .ic-yes { color: var(--accent-text); }
.plan li .ic-no { color: var(--text-tertiary); }
.plan--premium { background: var(--ink-fill); color: var(--on-ink); border-color: transparent; }
.plan--premium .plan__price span, .plan--premium .text-secondary { color: rgba(242,240,231,0.65); }
[data-theme="dark"] .plan--premium .plan__price span { color: rgba(11,12,12,0.6); }
.plan--premium .plan__badge { background: var(--accent); color: #fff; }
.plan--premium li .ic-yes { color: #fff; }
.plan__badge { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.35rem 0.7rem; border-radius: var(--r-capsule); background: var(--tonal); color: var(--text-secondary); }
.plan__note { font-size: 0.8125rem; color: var(--text-secondary); }
.plan--premium .plan__note { color: rgba(242,240,231,0.6); }
[data-theme="dark"] .plan--premium .plan__note { color: rgba(11,12,12,0.55); }

.price-foot { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; padding-top: 1.75rem; border-top: var(--hair) solid var(--border); }

/* ----------------------------------------------------------------------------
   19. FAQ
   -------------------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; border-top: var(--hair) solid var(--border); }
.faq__item { border-bottom: var(--hair) solid var(--border); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem 0; text-align: left; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); font-weight: 600; letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}
.faq__q:hover { color: var(--accent-text); }
.faq__sign { position: relative; width: 18px; height: 18px; flex: none; }
.faq__sign::before, .faq__sign::after { content: ""; position: absolute; background: currentColor; transition: transform 0.3s var(--ease); }
.faq__sign::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.faq__sign::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); }
.faq__item[open] .faq__sign::after { transform: translateX(-50%) scaleY(0); }
.faq__a { overflow: hidden; }
.faq__a-inner { padding-bottom: 1.6rem; color: var(--text-secondary); max-width: 62ch; font-size: var(--t-body); line-height: 1.6; }
.faq__a-inner a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* native details fallback animation */
details.faq__item summary { list-style: none; }
details.faq__item summary::-webkit-details-marker { display: none; }

/* ----------------------------------------------------------------------------
   20. CTA band
   -------------------------------------------------------------------------- */
.cta-band { background: var(--ink-fill); color: var(--on-ink); border-radius: var(--r-card); padding: clamp(2.5rem, 6vw, 5rem); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.cta-band .display { color: var(--on-ink); max-width: 18ch; }
.cta-band p { color: rgba(242,240,231,0.7); max-width: 46ch; }
[data-theme="dark"] .cta-band p { color: rgba(11,12,12,0.65); }
.cta-band .btn-store { background: var(--accent); color: #fff; }
.cta-band .btn-store:hover { background: #266B38; }
.cta-band__row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ----------------------------------------------------------------------------
   21. Footer
   -------------------------------------------------------------------------- */
.footer { border-top: var(--hair) solid var(--border); padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem; }
.footer__top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.5rem; margin-bottom: 3rem; }
.footer__brand { display: flex; flex-direction: column; gap: 1rem; max-width: 30ch; }
.footer__brand p { font-size: var(--t-small); color: var(--text-secondary); }
.footer__col h5 { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 1.1rem; }
.footer__col a { display: block; font-size: var(--t-small); color: var(--text-secondary); padding-block: 0.4rem; transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--text-primary); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding-top: 2rem; border-top: var(--hair) solid var(--border); }
.footer__bottom .strip { font-size: 0.6875rem; }
.footer__legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__legal a { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); }
.footer__legal a:hover { color: var(--text-primary); }
.footer__disclaimer { margin-top: 1.5rem; font-size: 0.8125rem; color: var(--text-tertiary); line-height: 1.6; max-width: 70ch; }

/* ----------------------------------------------------------------------------
   22. Legal page (privacy / terms)
   -------------------------------------------------------------------------- */
.legal { padding-block: clamp(3rem, 6vw, 5rem); }
.legal__head { max-width: 50rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.legal__head h1 { font-size: var(--t-h2); font-weight: 800; letter-spacing: -0.02em; margin-block: 1.25rem 1rem; }
.legal__body { display: grid; grid-template-columns: 220px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.legal__toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 0.5rem; }
.legal__toc a { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; color: var(--text-secondary); padding: 0.35rem 0; border-left: var(--heavy) solid transparent; padding-left: 0.85rem; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.legal__toc a:hover, .legal__toc a.active { color: var(--text-primary); border-color: var(--accent); }
.legal__content { max-width: 70ch; }
.legal__content section { padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: var(--hair) solid var(--border); }
.legal__content section:last-child { border-bottom: 0; }
.legal__content h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 1rem; display: flex; align-items: baseline; gap: 0.75rem; }
.legal__content h2 .strip { font-size: 0.75rem; }
.legal__content h3 { font-size: 1.125rem; font-weight: 700; margin: 1.5rem 0 0.6rem; }
.legal__content p { color: var(--text-secondary); margin-bottom: 1rem; }
.legal__content ul { display: flex; flex-direction: column; gap: 0.6rem; margin: 0 0 1rem 0; }
.legal__content ul li { position: relative; padding-left: 1.5rem; color: var(--text-secondary); }
.legal__content ul li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.legal__content a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.legal__content strong { color: var(--text-primary); font-weight: 600; }
.legal-callout { background: var(--tonal); border-radius: var(--r-block); padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; }
.legal-callout p { margin: 0; font-size: var(--t-small); }

/* ----------------------------------------------------------------------------
   22b. Support page
   -------------------------------------------------------------------------- */
.support-head { max-width: 52rem; }
.support-head .display { margin-block: 1.25rem 1.25rem; }
.support-head .support-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

.support-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.support-card { display: flex; flex-direction: column; gap: 0.9rem; }
.support-card__icon { width: 46px; height: 46px; border-radius: var(--r-block); background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.support-card__icon svg { width: 22px; height: 22px; }
.support-card h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; }
.support-card p { font-size: var(--t-small); color: var(--text-secondary); line-height: 1.55; }
.support-card a.mail { font-family: var(--font-mono); font-size: 0.9375rem; color: var(--accent-text); letter-spacing: -0.01em; word-break: break-word; text-underline-offset: 3px; }
.support-card a.mail:hover { text-decoration: underline; }

.crisis { border: var(--heavy) solid var(--rule); border-radius: var(--r-card); padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; gap: 1.1rem; }
.crisis h2 { max-width: 22ch; }
.crisis p { color: var(--text-secondary); max-width: 60ch; }
.crisis__lines { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.75rem; }
.crisis__line { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.3rem 1.4rem; border: var(--hair) solid var(--border); border-radius: var(--r-block); transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease); }
.crisis__line:hover { border-color: var(--text-primary); background: var(--tonal); }
.crisis__line .strip { color: var(--accent-text); }
.crisis__line b { font-family: var(--font-mono); font-size: clamp(1.4rem, 3vw, 1.85rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.crisis__line span { font-size: var(--t-small); color: var(--text-secondary); }

@media (max-width: 860px) {
  .support-cards { grid-template-columns: 1fr; }
  .crisis__lines { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------------------
   23. Reveal animation
   -------------------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ----------------------------------------------------------------------------
   24. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero__stage { order: -1; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-grid .feat:nth-child(3n) { border-right: var(--hair) solid var(--border); }
  .feat-grid .feat:nth-child(2n) { border-right: 0; }
  .feat-grid .feat:nth-last-child(-n+3) { border-bottom: var(--hair) solid var(--border); }
  .feat-grid .feat:nth-last-child(-n+2) { border-bottom: 0; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(2) { border-right: 0; }
  .stat-cell:nth-child(-n+2) { border-bottom: var(--hair) solid var(--border); }
  .tmonials { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .legal__body { grid-template-columns: 1fr; }
  .legal__toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-bottom: 1rem; }
  .legal__toc a { border-left: 0; border-bottom: var(--heavy) solid transparent; padding: 0.3rem 0.6rem; background: var(--tonal); border-radius: var(--r-cell); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  /* hide the Download CTA on mobile only where a burger drawer replaces it (homepage);
     secondary pages without a drawer keep the CTA reachable */
  .nav__right:has(.nav__burger) .btn { display: none; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split--rev .split__media { order: 0; }
  .pricing { grid-template-columns: 1fr; }
  .benefit-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat-grid .feat { border-right: 0 !important; border-bottom: var(--hair) solid var(--border) !important; }
  .feat-grid .feat:last-child { border-bottom: 0 !important; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-cell { border-right: 0; border-bottom: var(--hair) solid var(--border); }
  .stat-cell:last-child { border-bottom: 0; }
  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .hero__meta { gap: 1rem 1.5rem; }
}

/* mobile nav drawer */
.mnav { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: flex; flex-direction: column; padding: var(--gutter); transform: translateX(100%); transition: transform 0.4s var(--ease); visibility: hidden; }
.mnav.open { transform: none; visibility: visible; }
.mnav__top { display: flex; align-items: center; justify-content: space-between; height: 68px; margin-bottom: 2rem; }
.mnav__close { width: 38px; height: 38px; border-radius: var(--r-block); border: var(--hair) solid var(--border); display: grid; place-items: center; }
.mnav__close svg { width: 20px; height: 20px; }
.mnav__links { display: flex; flex-direction: column; gap: 0.5rem; }
.mnav__links a { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; padding: 0.6rem 0; border-bottom: var(--hair) solid var(--border); }
.mnav__links a span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-tertiary); letter-spacing: 0.1em; margin-right: 0.75rem; }
.mnav__cta { margin-top: auto; }
