/* CivilTrace website
   Layout: a drafting-sheet hero with a live Follow Line demo, a title-block fact strip,
   then left-aligned sections that read like plan notes. Colours come from the app's
   appearance-tokens.css, and the scope colours match the app exactly.
   Fonts: Barlow Semi Condensed (display) and IBM Plex Mono (labels), loaded from
   Google Fonts in index.html; body text uses the app's own Segoe UI stack. */


:root {
  /* Colour: the app's light theme */
  --bg: #f4f7fb;
  --bg-alt: #edf2f8;
  --surface: #ffffff;
  --ink: #203149;
  --ink-muted: #5b6d82;
  --rule: #30496921;
  --rule-strong: #3049693b;
  --accent: #0868d9;
  --accent-soft: #dceafe;
  --warn: #8a560c;
  --warn-bg: #fff4e0;
  --grid: #0868d914;
  --header-bg: #f4f7fbd9;
  --shadow: 0 12px 36px #243e621a, 0 1px 3px #243e6212;

  /* Fixed in both themes, as in the app */
  --btn: #0868d9;
  --btn-hover: #0757b8;
  --on-btn: #ffffff;
  --paper: #ffffff;
  --paper-grid: #e9eef5;
  --paper-line: #8f9cad;
  --paper-ink: #55657a;
  --paper-text: #22344b;
  --paper-muted: #5b6d82;
  --paper-glass: #f8fbffed;
  --paper-rule: #30496929;
  --start: #2fae7a;
  --start-ink: #1d6e48;
  --stop: #f2b01e;
  --stop-ink: #85520b;
  --storm: #ed7818;
  --sanitary: #208447;
  --water: #176bd6;
  --fire: #db3444;
  --irrigation: #65852a;
  --reclaimed: #8754c4;
  --gas: #b88b09;
  --electric: #cc621e;
  --telecom: #a04498;
  --erosion: #9c6935;
  --paving: #53647a;
  --demolition: #b34f37;
  --structural: #7a6f66;

  /* Type */
  --font-display: 'Barlow Semi Condensed', 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Segoe UI Variable Text', 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, ui-monospace, monospace;

  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b2533;
    --bg-alt: #202b3b;
    --surface: #263346;
    --ink: #e8eff9;
    --ink-muted: #acbdd2;
    --rule: #b7d2f024;
    --rule-strong: #b7d2f03d;
    --accent: #85baff;
    --accent-soft: #294969;
    --warn: #edc071;
    --warn-bg: #362d20;
    --grid: #85baff12;
    --header-bg: #1b2533d9;
    --shadow: 0 12px 36px #030c205c, 0 1px 3px #00000040;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1b2533;
  --bg-alt: #202b3b;
  --surface: #263346;
  --ink: #e8eff9;
  --ink-muted: #acbdd2;
  --rule: #b7d2f024;
  --rule-strong: #b7d2f03d;
  --accent: #85baff;
  --accent-soft: #294969;
  --warn: #edc071;
  --warn-bg: #362d20;
  --grid: #85baff12;
  --header-bg: #1b2533d9;
  --shadow: 0 12px 36px #030c205c, 0 1px 3px #00000040;
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 6.6vw, 4.9rem); line-height: .97; letter-spacing: -.012em; }
h2 { font-size: clamp(2.05rem, 4.2vw, 3.1rem); letter-spacing: -.008em; }
h3 { font-size: 1.4rem; font-weight: 600; line-height: 1.15; }
p { margin: 0 0 1em; }
b, strong { font-weight: 650; }
kbd {
  font: 500 .8em/1 var(--font-mono);
  padding: .22em .48em;
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
}
.mono { font-family: var(--font-mono); font-size: .92em; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; border-radius: 8px; background: var(--surface); color: var(--ink); }
.skip:focus { left: 16px; }

.label { font: 500 .78rem/1.35 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.label.muted { color: var(--ink-muted); }
.fine { font-size: .9rem; color: var(--ink-muted); }
.note { font-size: .95rem; color: var(--ink-muted); max-width: 70ch; }
.note.after { margin-top: 22px; }
.email { font-weight: 600; overflow-wrap: anywhere; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 10px;
  background: var(--btn); color: var(--on-btn);
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--btn-hover); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .94rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--rule);
}
.nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--btn); }
.mark svg { width: 22px; height: 22px; fill: none; stroke: var(--on-btn); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font: 700 1.45rem/1 var(--font-display); letter-spacing: -.005em; }
.brand-name small { font: 500 .95rem/1 var(--font-display); color: var(--ink-muted); margin-left: 2px; }
.links { display: flex; align-items: center; gap: 2px; }
.links a:not(.btn) { padding: 8px 12px; border-radius: 8px; color: var(--ink-muted); font-weight: 550; font-size: .97rem; text-decoration: none; }
.links a:not(.btn):hover { color: var(--ink); background: var(--bg-alt); }
.links .btn { margin-left: 10px; }
.menu-toggle, .menu-button { display: none; }

@media (max-width: 880px) {
  .menu-button { display: grid; gap: 5px; padding: 12px 10px; border-radius: 8px; cursor: pointer; }
  .menu-button span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .menu-toggle { display: block; position: absolute; right: 0; top: 12px; width: 44px; height: 40px; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
  .links {
    display: none; position: absolute; left: -16px; right: -16px; top: 64px;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 16px 18px;
    background: var(--bg); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow);
  }
  .links a:not(.btn) { padding: 12px; }
  .links .btn { margin: 8px 0 0; }
  .menu-toggle:checked ~ .links { display: flex; }
  .menu-toggle:checked + .menu-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle:checked + .menu-button span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked + .menu-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hero */
.hero { position: relative; isolation: isolate; padding-top: clamp(40px, 7vw, 88px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000 25%, transparent 80%);
  mask-image: linear-gradient(to bottom, #000 25%, transparent 80%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.lede { max-width: 34em; font-size: clamp(1.08rem, 1.5vw, 1.22rem); color: var(--ink-muted); }
.hero-shot {
  margin: clamp(48px, 6vw, 76px) 0 0;
  border: 1px solid var(--rule-strong); border-bottom: 0; border-radius: 14px 14px 0 0;
  overflow: hidden; box-shadow: var(--shadow); background: var(--surface);
}

/* Hero demo: the plan sheet always stays white, as in the app */
.demo { margin: 0; }
.sheet {
  position: relative; overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--rule-strong); border-radius: 12px;
  box-shadow: var(--shadow);
}
.sheet-svg { display: block; width: 100%; height: auto; }
.sheet-grid { fill: none; stroke: var(--paper-grid); stroke-width: 1; }
.edge { fill: none; stroke: var(--paper-line); stroke-width: 1.6; }
.edge.thin { stroke-width: .8; }
.ink { fill: none; stroke: var(--paper-line); stroke-width: 1.4; }
.ink.dash { stroke-dasharray: 10 6; stroke-width: 1; }
.storm-drawn { fill: none; stroke: var(--paper-ink); stroke-width: 2.2; }
.struct { fill: var(--paper); stroke: var(--paper-ink); stroke-width: 1.6; }
.leader { fill: none; stroke: var(--paper-line); stroke-width: 1; }
.lbl { font: 500 11px/1 var(--font-mono); fill: var(--paper-ink); }
.lbl.small { font-size: 9px; fill: var(--paper-line); }
.lbl.callout { font-size: 12px; fill: var(--paper-text); }
.run {
  fill: none; stroke: var(--storm); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .92;
}
.marker circle { stroke: var(--paper); stroke-width: 2.5; }
.marker text { font: 700 12px/1 var(--font-display); letter-spacing: .06em; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
.m-start circle { fill: var(--start); }
.m-start text { fill: var(--start-ink); }
.m-stop circle { fill: var(--stop); }
.m-stop text { fill: var(--stop-ink); }
.cursor path { fill: var(--paper-text); stroke: var(--paper); stroke-width: 1.2; }

.demo-card {
  position: absolute; left: 14px; top: 12px;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 10px;
  background: var(--paper-glass); border: 1px solid var(--paper-rule);
  box-shadow: 0 6px 18px #243e621f; color: var(--paper-text);
}
.demo-item { display: grid; line-height: 1.2; }
.demo-item small { font-size: .74rem; color: var(--paper-muted); }
.demo-item strong { font-size: .95rem; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--storm); }
.qty { margin-left: 6px; font: 700 1.5rem/1 var(--font-display); color: var(--btn); font-variant-numeric: tabular-nums; }
.qty em { font: 500 .78rem var(--font-body); color: var(--paper-muted); font-style: normal; }
.demo-keys {
  position: absolute; right: 12px; bottom: 10px;
  padding: 6px 10px; border-radius: 9px;
  background: var(--paper-glass); border: 1px solid var(--paper-rule);
  font-size: .8rem; color: var(--paper-muted);
}
.demo-keys kbd { background: var(--paper); color: var(--paper-text); border-color: var(--paper-rule); }
.demo-keys span { margin: 0 4px; }
.demo figcaption { margin-top: 12px; font: 400 .82rem/1.5 var(--font-mono); color: var(--ink-muted); }

/* One 7-second loop. The negative delay starts it on the finished takeoff,
   so the first frame shows the result before it replays. */
.run, .m-start, .m-stop, .lbl.callout, .demo-card, .cursor { animation-duration: 7s; animation-iteration-count: infinite; animation-delay: -4.3s; }
.run { animation-name: run; animation-timing-function: ease-in-out; }
.m-start { animation-name: start; }
.m-stop { animation-name: stop; }
.lbl.callout { animation-name: callout; }
.demo-card { animation-name: card; }
.cursor { animation-name: cursor; animation-timing-function: ease-in-out; }

@keyframes cursor {
  0% { transform: translate(380px, 330px); }
  14% { transform: translate(162px, 162px); }
  18% { transform: translate(162px, 162px) scale(.88); }
  22%, 60% { transform: translate(162px, 162px); }
  78% { transform: translate(250px, 214px); }
  100% { transform: translate(380px, 330px); }
}
@keyframes run { 0%, 18% { stroke-dashoffset: 1; opacity: .92; } 40%, 92% { stroke-dashoffset: 0; opacity: .92; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes start { 0%, 18% { opacity: 0; } 22%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes stop { 0%, 38% { opacity: 0; } 42%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes callout { 0%, 44% { fill: var(--paper-text); } 50%, 62% { fill: var(--btn); } 72%, 100% { fill: var(--paper-text); } }
@keyframes card { 0%, 50% { opacity: 0; transform: translateY(-6px); } 56%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .run, .m-start, .m-stop, .lbl.callout, .demo-card, .cursor { animation: none; }
  .run { stroke-dashoffset: 0; }
  .cursor { transform: translate(162px, 162px); }
  .btn { transition: none; }
}

/* Hero keyword line lives inside the h1 but keeps the label look */
h1 .label { display: block; }

/* ---------- Motion ----------
   Lightweight CSS motion, switched on by script.js (html.motion) and only when the
   visitor hasn't asked for reduced motion. Without it the page is complete and static. */
.site-header { transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px #243e6214; }
.links a:not(.btn) { position: relative; transition: color .15s ease, background-color .15s ease; }
.links a.active { color: var(--ink); }
.links a:not(.btn)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.links a.active::after { transform: scaleX(1); }

/* Scroll progress, drawn like a measured run across the top (scroll-driven, where supported) */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .site-header::after {
      content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
      background: linear-gradient(90deg, var(--start), var(--accent));
      transform-origin: left; transform: scaleX(0);
      animation: progress linear both; animation-timeline: scroll(root);
    }
    @keyframes progress { to { transform: scaleX(1); } }
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance */
  .js .hero-copy > *, .js .demo, .js .hero-shot { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .js .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .js .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .js .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .js .demo { animation-name: rise-in; animation-delay: .2s; }
  .js .hero-shot { animation-duration: 1.1s; animation-delay: .35s; }
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } }
  @keyframes rise-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }

  /* Drafting grid drifts slowly behind the hero */
  .hero::before { animation: grid-drift 40s linear infinite; }
  @keyframes grid-drift { to { background-position: 28px 28px, 28px 28px; } }

  /* Scroll reveals */
  .motion .rv {
    opacity: 0; transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1),
                translate .25s ease, box-shadow .25s ease, border-color .25s ease;
    transition-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 80ms), 0s, 0s, 0s;
  }
  .motion .rv.in { opacity: 1; transform: none; }
  .motion .split > figure.rv, .motion .feature-lead > figure.rv { transform: translateY(24px) scale(.97); }
  .motion .split > figure.rv.in, .motion .feature-lead > figure.rv.in { transform: none; }

  /* Step numbers pop as their step arrives */
  .motion .steps .rv .n { transform: scale(.6); opacity: 0; transition: transform .6s cubic-bezier(.3, 1.6, .5, 1), opacity .4s; transition-delay: calc(var(--i, 0) * 80ms + .15s); }
  .motion .steps .rv.in .n { transform: none; opacity: 1; }

  /* Legend samples draw on like a line being traced */
  .motion .legend-row.rv .sample { clip-path: inset(0 100% 0 0); transition: clip-path .9s cubic-bezier(.6, 0, .2, 1) calc(var(--i, 0) * 80ms + .2s); }
  .motion .legend-row.rv.in .sample { clip-path: inset(0 0 0 0); }

  /* Pipe system swatches extend one after another */
  .motion .systems-block.rv .systems li::before { transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
  .motion .systems-block.rv.in .systems li::before { transform: none; }
  .motion .systems li:nth-child(2)::before { transition-delay: .06s; }
  .motion .systems li:nth-child(3)::before { transition-delay: .12s; }
  .motion .systems li:nth-child(4)::before { transition-delay: .18s; }
  .motion .systems li:nth-child(5)::before { transition-delay: .24s; }
  .motion .systems li:nth-child(6)::before { transition-delay: .30s; }
  .motion .systems li:nth-child(7)::before { transition-delay: .36s; }
  .motion .systems li:nth-child(8)::before { transition-delay: .42s; }
  .motion .systems li:nth-child(9)::before { transition-delay: .48s; }

  /* Export rows slide in once the table arrives */
  .motion .table-wrap.rv tbody tr { opacity: 0; transform: translateX(-10px); transition: opacity .45s ease, transform .45s ease; }
  .motion .table-wrap.rv.in tbody tr { opacity: 1; transform: none; }
  .motion .table-wrap tbody tr:nth-child(2) { transition-delay: .04s; }
  .motion .table-wrap tbody tr:nth-child(3) { transition-delay: .08s; }
  .motion .table-wrap tbody tr:nth-child(4) { transition-delay: .12s; }
  .motion .table-wrap tbody tr:nth-child(5) { transition-delay: .16s; }
  .motion .table-wrap tbody tr:nth-child(6) { transition-delay: .20s; }
  .motion .table-wrap tbody tr:nth-child(7) { transition-delay: .24s; }
  .motion .table-wrap tbody tr:nth-child(8) { transition-delay: .28s; }
  .motion .table-wrap tbody tr:nth-child(9) { transition-delay: .32s; }
  .motion .table-wrap tbody tr:nth-child(10) { transition-delay: .36s; }
  .motion .table-wrap tbody tr:nth-child(11) { transition-delay: .40s; }

  /* Hover: cards lift, screenshots lean in, accent rules extend */
  .plan, .dl-card, .warn { transition: translate .25s ease, box-shadow .25s ease, border-color .25s ease; }
  .plan:hover { translate: 0 -5px; box-shadow: var(--shadow); border-color: var(--accent); }
  .shot img, .hero-shot img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
  .shot:hover img { transform: scale(1.025); }
  .points article, .facts article, .steps li { position: relative; }
  .points article::before, .facts article::before, .steps li::before {
    content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 40px; border-radius: 2px;
    background: var(--accent); transform: scaleX(0); transform-origin: left;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1), width .35s ease;
  }
  .js .in.rv::before, .points article:hover::before, .facts article:hover::before, .steps li:hover::before { transform: none; }
  .points article:hover::before, .facts article:hover::before, .steps li:hover::before { width: 100%; }
  .legend-row:not(.legend-head) { transition: background-color .2s ease; }
  .legend-row:not(.legend-head):hover { background: var(--bg-alt); }

  /* Buttons: a quick sheen on hover */
  .btn { position: relative; overflow: hidden; }
  .btn:not(.btn-ghost)::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, #ffffff40 50%, transparent 70%);
    transform: translateX(-120%);
  }
  .btn:not(.btn-ghost):hover::after { transform: translateX(120%); transition: transform .7s ease; }

  /* Best value tag breathes gently */
  .tag { animation: tag-glow 3.2s ease-in-out infinite; }
  @keyframes tag-glow { 0%, 100% { box-shadow: 0 0 0 0 #0868d955; } 50% { box-shadow: 0 0 0 6px #0868d900; } }

  /* App icon floats */
  .app-icon { animation: float 5s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-6px); } }

  /* FAQ answers slide open */
  .faq details[open] p { animation: faq-open .35s ease both; }
  @keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } }
  .faq summary { transition: color .15s ease; }
  .faq summary:hover { color: var(--accent); }
}

/* Title block */
.titleblock-band { background: var(--surface); border-block: 1px solid var(--rule-strong); }
.titleblock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-block: 0; }
.titleblock > div { padding: 22px 24px 24px; border-left: 1px solid var(--rule-strong); }
.titleblock > div:first-child { border-left: 0; padding-left: 0; }
.titleblock dt { font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.titleblock dd { margin: 6px 0 0; font-size: .92rem; line-height: 1.5; color: var(--ink-muted); }
.titleblock strong { display: block; margin-bottom: 4px; font: 700 2.2rem/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section.alt { background: var(--bg-alt); }
.head { max-width: 780px; margin-bottom: clamp(30px, 4.5vw, 52px); }
.head > p:last-child:not(.label) { margin: 0; max-width: 62ch; font-size: 1.15rem; color: var(--ink-muted); }

/* Steps: a real sequence, so they carry numbers */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 36px; }
.steps li { padding-top: 16px; border-top: 1px solid var(--rule-strong); }
.steps .n { display: block; margin-bottom: 10px; font: 700 2.5rem/1 var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.steps h3 { margin-bottom: .35em; }
.steps p { margin: 0; font-size: 1rem; color: var(--ink-muted); }

/* Features */
.feature-lead { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(30px, 5vw, 64px); align-items: center; margin-bottom: clamp(52px, 7vw, 84px); }
.h-lead { font-size: clamp(1.7rem, 2.8vw, 2.2rem); font-weight: 700; }
.feature-lead p { color: var(--ink-muted); }
.ticks { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 18px; height: 18px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.5l3 3L14 5.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4 9.5l3 3L14 5.5' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.points article { padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.points h3 { font-size: 1.3rem; }
.points p { margin: 0; font-size: 1rem; color: var(--ink-muted); }

.shot { margin: 0; overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.shot.narrow { justify-self: center; width: 100%; max-width: 360px; }

/* Scopes, drawn as a plan legend */
.legend { overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--surface); }
.legend-row {
  display: grid; grid-template-columns: 76px minmax(0, 12rem) minmax(0, 1fr) minmax(0, 15rem);
  gap: 6px 24px; align-items: start;
  padding: 18px 22px; border-top: 1px solid var(--rule);
}
.legend-row:first-child { border-top: 0; }
.legend-head { padding-block: 10px; background: var(--bg-alt); font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.legend-row h3 { margin: 0; font-size: 1.3rem; }
.legend-row p { margin: 0; font-size: .98rem; color: var(--ink-muted); }
.legend-row .measure { font: 400 .84rem/1.5 var(--font-mono); color: var(--ink); }
.sample { display: block; width: 72px; height: 22px; margin-top: 3px; overflow: visible; }
.sample .ln { fill: none; stroke: var(--c); stroke-linecap: butt; }
.sample .box { fill: var(--surface); stroke: var(--c); stroke-width: 2.4; }
.sample .fl { fill: var(--c); }

.systems-block { margin-top: 40px; }
.systems { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.systems li { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .98rem; }
.systems li::before { content: ""; width: 30px; height: 4px; border-radius: 2px; background: var(--c); }

/* Split sections */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(30px, 5vw, 72px); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
.split > div > p:not(.label):not(.note) { color: var(--ink-muted); }

/* Exports table */
.table-wrap { overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--surface); }
.exports { width: 100%; border-collapse: collapse; }
.exports th {
  padding: 10px 22px; text-align: left; background: var(--bg-alt);
  font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted);
}
.exports td { padding: 14px 22px; border-top: 1px solid var(--rule); vertical-align: top; font-size: .98rem; }
.exports td:first-child { font-weight: 650; white-space: nowrap; }
.exports td:nth-child(2) { color: var(--ink-muted); }
.exports td:last-child { font: 400 .84rem/1.6 var(--font-mono); white-space: nowrap; }

/* Privacy */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.facts article { padding-top: 18px; border-top: 1px solid var(--rule-strong); }
.facts h3 { font-size: 1.3rem; }
.facts p { margin: 0; font-size: 1rem; color: var(--ink-muted); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 26px 22px 22px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--surface);
}
.plan h3 { margin: 0; font-size: 1.3rem; }
.price { margin: 8px 0 8px; font: 700 2.7rem/1.05 var(--font-display); font-variant-numeric: tabular-nums; }
.price small { font: 400 1rem var(--font-body); color: var(--ink-muted); }
.includes { flex: 1; margin: 0 0 20px; font-size: .98rem; color: var(--ink-muted); }
.plan .btn { width: 100%; }
.plan.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.tag {
  position: absolute; top: -12px; left: 20px; margin: 0;
  padding: 4px 10px; border-radius: 99px; background: var(--btn); color: var(--on-btn);
  font: 500 .7rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}

/* Download */
.download { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); gap: 20px; align-items: stretch; }
.dl-card {
  display: flex; gap: 28px; align-items: flex-start;
  padding: clamp(24px, 4vw, 40px); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--surface);
}
.dl-card > div { min-width: 0; }
.dl-card h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
.dl-card > div > p:not(.label):not(.fine) { color: var(--ink-muted); }
.app-icon { flex: none; width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.warn { padding: 26px 28px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--warn-bg); }
.warn h3 { color: var(--warn); font-size: 1.35rem; }
.warn p { margin: 0; font-size: .98rem; }

/* FAQ */
.faq { max-width: 860px; border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule-strong); }
.faq summary { position: relative; padding: 18px 44px 18px 0; list-style: none; cursor: pointer; font-weight: 600; font-size: 1.06rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font: 400 1.6rem/1 var(--font-display); color: var(--ink-muted); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { max-width: 70ch; margin: 0 0 20px; color: var(--ink-muted); }

/* Footer */
.site-footer { padding-block: 56px 32px; border-top: 1px solid var(--rule); }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.tagline { margin: 18px 0 4px; font: 600 1.45rem/1.2 var(--font-display); }
.foot-links { display: grid; align-content: start; gap: 8px; }
.foot-links a { color: var(--ink-muted); font-weight: 550; text-decoration: none; }
.foot-links a:hover { color: var(--ink); }
.foot-contact .label { margin-bottom: .6rem; }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); }
.legal p { margin: 0; font-size: .8rem; color: var(--ink-muted); }

/* Responsive */
@media (max-width: 1080px) {
  .plans, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { gap: 24px 16px; }
}
@media (max-width: 900px) {
  .hero-grid, .feature-lead, .split, .split.flip, .download { grid-template-columns: minmax(0, 1fr); }
  .split.flip .shot { order: 2; }
  .steps, .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .titleblock > div:nth-child(n + 3) { border-top: 1px solid var(--rule-strong); }
  .legend-head { display: none; }
  .legend-row { grid-template-columns: 76px minmax(0, 1fr); gap: 6px 16px; }
  .legend-row:nth-child(2) { border-top: 0; }
  .legend-row p { grid-column: 2; }
  .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .exports thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .exports tr { display: block; padding: 14px 18px; border-top: 1px solid var(--rule); }
  .exports tbody tr:first-child { border-top: 0; }
  .exports td { display: block; padding: 0; border: 0; white-space: normal !important; }
  .exports td + td { margin-top: 4px; }
}
@media (max-width: 620px) {
  .steps, .points, .plans, .facts { grid-template-columns: minmax(0, 1fr); }
  .titleblock > div { padding: 18px 14px 20px; }
  .titleblock > div:nth-child(odd) { padding-left: 0; }
  .titleblock strong { font-size: 1.8rem; }
  .cta-row .btn { width: 100%; }
  .dl-card { flex-direction: column; gap: 18px; }
  .app-icon { width: 72px; height: 72px; border-radius: 18px; }
  .legend-row { padding: 16px; grid-template-columns: minmax(0, 1fr); }
  .legend-row p { grid-column: auto; }
  .demo-keys { display: none; }
  .demo-card { left: 8px; top: 8px; padding: 6px 10px; gap: 8px; }
  .demo-item strong { font-size: .85rem; }
  .qty { font-size: 1.2rem; }
  .foot { grid-template-columns: minmax(0, 1fr); }
}
