:root {
  --bg: #f6f4ef;
  --bg-deep: #efece4;
  --surface: #ffffff;
  --ink: #14142a;
  --ink-900: #0d0d1a;
  --ink-soft: #54545f;
  --ink-mute: #9a9aa5;
  --accent: #7bc8a4;
  --accent-deep: #0f6e56;
  --accent-tint: #e3f5ec;
  --line: rgba(20, 20, 42, 0.09);
  --line-strong: rgba(20, 20, 42, 0.14);
  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;
  --maxw: 1140px;
  --section-pad: clamp(88px, 12vw, 160px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow-sm: 0 1px 2px rgba(20,20,42,.04), 0 4px 12px -6px rgba(20,20,42,.10);
  --shadow-md: 0 2px 4px rgba(20,20,42,.04), 0 12px 28px -12px rgba(20,20,42,.18);
  --shadow-lg: 0 4px 8px rgba(20,20,42,.05), 0 30px 60px -28px rgba(20,20,42,.40);
  --shadow-xl: 0 8px 16px rgba(20,20,42,.06), 0 50px 90px -40px rgba(20,20,42,.50);
  --ease-out: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Paper grain overlay ─────────────────────────────── */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Progressive-enhancement reveal states ───────────── */
.js [data-reveal],
.js [data-hero] { opacity: 0; will-change: transform, opacity; }
.motion-failed [data-reveal],
.motion-failed [data-hero] { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-hero] { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font); font-size: 15px; font-weight: 500; line-height: 1;
  padding: 15px 26px; border-radius: 100px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .2s;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #222243, var(--ink));
  color: #fff; box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.10);
}
.btn-primary:hover { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-lg { padding: 17px 32px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ── Header ──────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246,244,239,.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.nav.is-stuck { border-bottom-color: var(--line); background: rgba(246,244,239,.85); box-shadow: 0 10px 30px -24px rgba(20,20,42,.5); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand b { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.wordmark span { color: var(--accent-deep); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 14.5px; color: var(--ink-soft); transition: color .15s; white-space: nowrap; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.mobile-cta { display: none; }

/* ── Hero ────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(56px, 9vw, 104px) 0 clamp(64px, 9vw, 112px); overflow: hidden; }
.hero-glow {
  position: absolute; top: -22%; right: -8%; width: min(760px, 78vw); height: min(760px, 78vw);
  background: radial-gradient(circle at 60% 40%, rgba(123,200,164,.42), rgba(123,200,164,.10) 42%, transparent 66%);
  filter: blur(8px); z-index: 0; pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; align-items: center; gap: clamp(28px, 5vw, 64px);
  grid-template-columns: 1.04fr 0.96fr;
}
/* Grid items default to min-width:auto, which lets the 1024px hero image
   refuse to shrink and push the whole grid wider than the viewport. */
.hero-grid > * { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent-tint); color: var(--accent-deep);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .03em; text-transform: uppercase;
  padding: 8px 15px; border-radius: 100px; margin-bottom: 24px; border: 1px solid rgba(15,110,86,.12);
}
h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 6.6vw, 78px); line-height: 1.04; letter-spacing: -.02em;
  margin: 0 0 22px; color: var(--ink);
}
h1 .hl { position: relative; color: var(--accent-deep); white-space: nowrap; }
h1 .hl::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: .06em; height: .34em; z-index: -1;
  background: linear-gradient(180deg, transparent 40%, rgba(123,200,164,.45) 40%);
  border-radius: 2px;
}
.hero .lede { font-size: clamp(16px, 1.5vw, 19px); color: var(--ink-soft); max-width: 36rem; margin: 0 0 30px; }
.hero-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-alt { font-size: 14.5px; color: var(--ink-soft); transition: color .15s; }
.hero-alt:hover { color: var(--ink); }

.routebar { margin-top: 36px; display: flex; align-items: center; gap: 12px; color: var(--ink-mute); font-size: 13.5px; max-width: 380px; }
.route-node { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.route-node i { font-size: 18px; }
.route-shield { width: 34px; height: 34px; justify-content: center; border-radius: 50%; background: var(--accent-tint); color: var(--accent-deep); box-shadow: var(--shadow-sm); }
.route-shield i { font-size: 18px; }
.route-line { flex: 1; height: 8px; min-width: 28px; }
.route-path { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 6 7; }

/* Hero art composition */
.hero-art { position: relative; justify-self: center; width: 100%; max-width: 460px; }
.hero-card {
  position: relative; z-index: 2; border-radius: var(--radius-lg); background: linear-gradient(160deg, #ffffff, #f3f6f4);
  border: 1px solid var(--line); box-shadow: var(--shadow-xl); padding: 14px; overflow: hidden;
}
.hero-card::before {
  content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 80% 0%, rgba(123,200,164,.16), transparent 60%); pointer-events: none;
}
.hero-photo { width: 100%; max-width: 100%; height: auto; display: block; border-radius: 16px; }
.float-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); border-radius: 14px; padding: 11px 14px; box-shadow: var(--shadow-lg);
}
.float-chip b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.float-chip small { font-size: 11.5px; color: var(--ink-mute); font-family: var(--font-mono); letter-spacing: .01em; }
.float-chip i { font-size: 22px; color: var(--accent-deep); }
.chip-status { top: 16px; left: -26px; }
.chip-handoff { bottom: 22px; right: -22px; }
.pulse { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); position: relative; flex-shrink: 0; }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ── Stats (dark) ────────────────────────────────────── */
.stats { background: var(--ink-900); color: #fff; position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: clamp(44px, 6vw, 72px) 0; text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 52px); font-weight: 600; line-height: 1.02; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat .num.accent { color: var(--accent); }
.stat .cap { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .02em; color: #b3b3c6; max-width: 220px; margin: 14px auto 0; line-height: 1.5; }

/* ── Sections ────────────────────────────────────────── */
.section { padding: var(--section-pad) 0; position: relative; z-index: 2; }
.section-alt { background: var(--surface); }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto clamp(40px, 6vw, 64px); }
.kicker { font-family: var(--font-mono); color: var(--accent-deep); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
h2 { font-family: var(--font-display); font-size: clamp(28px, 3.9vw, 46px); font-weight: 600; letter-spacing: -.015em; line-height: 1.1; margin: 14px 0 0; }
.section-head p { color: var(--ink-soft); font-size: 16.5px; margin: 16px 0 0; }

/* Cards */
.grid { display: grid; gap: 20px; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.section-alt .card { background: var(--bg); }
.card .ic { display: inline-flex; font-size: 24px; color: var(--accent-deep); background: var(--accent-tint); width: 50px; height: 50px; align-items: center; justify-content: center; border-radius: 14px; }
.card h3 { font-size: 18px; font-weight: 600; margin: 18px 0 8px; letter-spacing: -.01em; }
.card p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.lead-out { text-align: center; font-size: clamp(17px, 1.8vw, 21px); font-family: var(--font-display); max-width: 36rem; margin: clamp(36px, 5vw, 52px) auto 0; line-height: 1.4; }
.lead-out b { color: var(--accent-deep); font-weight: 600; }

/* Steps */
.steps { max-width: 40rem; margin: 0 auto; position: relative; }
.steps::before { content: ""; position: absolute; left: 19px; top: 30px; bottom: 30px; width: 2px; background: linear-gradient(var(--accent), rgba(123,200,164,.2)); }
.step { display: flex; gap: 22px; padding: 22px 0; position: relative; }
.step .n {
  position: relative; z-index: 2; flex: 0 0 40px; height: 40px; border-radius: 50%;
  background: var(--surface); color: var(--accent-deep); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-sm);
}
.section-alt .step .n { background: var(--bg); }
.step h3 { font-size: 17.5px; font-weight: 600; margin: 7px 0 6px; letter-spacing: -.01em; }
.step p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* Phone screenshots */
.shots { display: flex; gap: clamp(28px, 5vw, 56px); justify-content: center; flex-wrap: wrap; }
.shot { margin: 0; max-width: 280px; text-align: center; }
.phone { border-radius: 30px; overflow: hidden; border: 6px solid #1c1c30; box-shadow: var(--shadow-xl); background: #1c1c30; transition: transform .4s var(--ease-out); }
.shot[data-tilt] .phone { transform: perspective(1000px) rotateY(0deg); }
.phone img { display: block; width: 100%; border-radius: 24px; }
.shot figcaption { margin-top: 20px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; }

/* ── Safety (dark, sticky storytelling) ──────────────── */
.safety { background: var(--ink-900); color: #fff; padding: var(--section-pad) 0; position: relative; z-index: 2; }
.safety-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.safety-aside { position: sticky; top: 120px; align-self: start; }
.safety .kicker { color: var(--accent); }
.safety h2 { color: #fff; }
.safety-head p { color: #b3b3c6; font-size: 16px; margin: 16px 0 0; max-width: 22rem; }
.safety-rail { margin-top: 32px; width: 3px; height: 120px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.safety-rail-fill { display: block; width: 100%; height: 0%; background: linear-gradient(var(--accent), var(--accent-deep)); border-radius: 3px; }
.layers { display: flex; flex-direction: column; gap: 14px; }
.layer {
  display: grid; grid-template-columns: auto auto 1fr; gap: 16px; align-items: start;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius);
  padding: 22px 24px; transition: border-color .4s, background .4s, transform .4s var(--ease-out);
}
.layer.is-active { border-color: rgba(123,200,164,.5); background: rgba(123,200,164,.08); }
.layer-no { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.layer .ic { color: var(--accent); font-size: 24px; }
.layer b { font-weight: 600; }
.layer span { color: #c0c0d0; }

/* ── FAQ ─────────────────────────────────────────────── */
.faq { max-width: 44rem; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
#faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 22px; box-shadow: var(--shadow-sm); transition: box-shadow .25s; }
#faq details[open] { box-shadow: var(--shadow-md); }
#faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after { content: "\eb0b"; font-family: "tabler-icons" !important; color: var(--accent-deep); font-size: 19px; transition: transform .3s var(--ease-out); }
#faq details[open] summary::after { transform: rotate(45deg); }
#faq details p { margin: 0; padding: 0 0 22px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; }

/* ── CTA + footer ────────────────────────────────────── */
.cta { background: var(--bg-deep); text-align: center; padding: var(--section-pad) 0 0; position: relative; z-index: 2; overflow: hidden; }
.cta-glow { position: absolute; top: -30%; left: 50%; transform: translateX(-50%); width: min(900px, 90vw); height: 520px; background: radial-gradient(circle at 50% 30%, rgba(123,200,164,.30), transparent 62%); pointer-events: none; }
.cta .wrap { position: relative; z-index: 2; }
.cta h2 { margin-bottom: 16px; }
.cta p { color: var(--ink-soft); font-size: 17px; max-width: 30rem; margin: 0 auto 30px; }
footer { margin-top: clamp(64px, 9vw, 96px); border-top: 1px solid var(--line); padding: 30px 0 44px; position: relative; z-index: 2; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; color: var(--ink-mute); font-size: 13.5px; }
.foot .brand b { font-size: 14px; font-weight: 500; color: var(--ink-mute); }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--ink); }

/* ── Cookie / data-consent notice ────────────────────── */
.cookie {
  position: fixed; z-index: 200; left: 18px; bottom: 18px; max-width: 320px;
  display: none; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 14px 16px;
}
.cookie.is-shown { display: flex; animation: cookie-in .4s var(--ease-out); }
.cookie-text { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ink-soft); }
.cookie-text a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.cookie .btn { align-self: center; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cookie.is-shown { animation: none; } }
@media (max-width: 720px) {
  .cookie { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: none; }
  /* First visit shows the consent notice instead of the sticky CTA to avoid overlap. */
  body.cookie-open .mobile-cta { display: none; }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 920px) {
  .cols-3 { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; }
  .safety-aside { position: static; }
  .safety-rail { display: none; }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { align-items: center; }
  .eyebrow { margin-left: auto; margin-right: auto; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .routebar { margin-left: auto; margin-right: auto; }
  .hero { padding-top: 30px; }
  /* text-first on mobile: lead with the headline, illustration follows */
  .hero-art { margin: 40px auto 8px; max-width: 340px; }
  .chip-status { left: -8px; }
  .chip-handoff { right: -6px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .stats-grid { grid-template-columns: 1fr; gap: 0; }
  .stat { padding: 24px 0; border-top: 1px solid rgba(255,255,255,.1); }
  .stat:first-child { border-top: none; }
  body { padding-bottom: 88px; }
  .mobile-cta {
    position: fixed; z-index: 100; left: 14px; right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; justify-content: center;
    background: var(--ink); color: #fff; font-weight: 500; font-size: 16px;
    padding: 16px 20px; border-radius: 100px; box-shadow: var(--shadow-lg);
    transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
  }
  .mobile-cta.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
}
@media (max-width: 520px) {
  h1 { font-size: clamp(30px, 8.2vw, 38px); }
  .eyebrow { font-size: 10.5px; letter-spacing: .02em; padding: 7px 12px; }
  .hero-art { max-width: 300px; margin-top: 46px; }
  /* Both chips bracket the card from outside (top + bottom) so they never
     overlap the characters' faces inside a small square illustration. */
  .chip-status { top: -22px; left: 2px; right: auto; bottom: auto; transform: scale(.92); transform-origin: left top; }
  .chip-handoff { display: flex; top: auto; bottom: -22px; right: 2px; left: auto; transform: scale(.92); transform-origin: right bottom; }
}
