/* ==========================================================================
   IntelliScribe AI — scroll-scrubbed landing
   Each "act" is a tall scroll track with a pinned full-viewport stage.
   Scroll position inside the track is the playhead: it drives typing,
   underlines, fixes, waveforms and the privacy boundary. Nothing autoplays.
   ========================================================================== */

:root {
  color-scheme: light;

  --paper:      #fbfaf8;
  --paper-2:    #f2f0ea;
  --card:       #ffffff;
  --ink:        #14131a;
  --ink-2:      #4a4854;
  --ink-3:      #7c7a88;
  --line:       #e5e2db;
  --line-2:     #d3cfc5;

  --accent:     #5b47e0;
  --accent-ink: #ffffff;
  --accent-soft:#eeebff;
  --accent-line:#c9c0ff;

  --ok:         #2f7d5c;

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans:    Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --r:    10px;
  --r-lg: 18px;

  --shadow-1: 0 1px 2px rgba(20,19,26,.05), 0 1px 1px rgba(20,19,26,.04);
  --shadow-2: 0 2px 4px rgba(20,19,26,.04), 0 12px 28px -12px rgba(20,19,26,.16);
  --shadow-3: 0 4px 10px rgba(20,19,26,.06), 0 34px 80px -26px rgba(20,19,26,.30);

  --wrap: 1180px;
  --gut: 26px;
}

[data-theme="dark"] {
  color-scheme: dark;

  --paper:      #0f0f17;
  --paper-2:    #16161f;
  --card:       #191925;
  --ink:        #f3f2f7;
  --ink-2:      #b0aec0;
  --ink-3:      #7d7b92;
  --line:       #272736;
  --line-2:     #383850;

  --accent:     #9c8dff;
  --accent-ink: #12111c;
  --accent-soft:#241f52;
  --accent-line:#4b3fa0;

  --ok:         #56b98d;

  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 2px 4px rgba(0,0,0,.3), 0 12px 28px -12px rgba(0,0,0,.6);
  --shadow-3: 0 4px 10px rgba(0,0,0,.4), 0 34px 80px -26px rgba(0,0,0,.8);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
:where(a, button, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.03; letter-spacing: -0.016em; }
h1 { font-size: clamp(38px, 5.6vw, 72px); }
h2 { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-family: var(--sans); font-weight: 620; font-size: 17px; line-height: 1.35; letter-spacing: -0.011em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.lede { font-size: clamp(16px, 1.5vw, 18.5px); line-height: 1.62; color: var(--ink-2); text-wrap: pretty; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: var(--r);
  font-size: 14.5px; font-weight: 560; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .16s cubic-bezier(.22,1,.36,1), background-color .16s, border-color .16s, box-shadow .16s;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-solid { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-1); }
.btn-solid:hover { background: color-mix(in oklab, var(--accent) 88%, var(--ink)); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-line { border-color: var(--line-2); color: var(--ink); background: var(--card); }
.btn-line:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn-bare { color: var(--ink-2); padding-inline: 10px; }
.btn-bare:hover { color: var(--ink); }
.btn-sm { padding: 8.5px 15px; font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------- header ---------- */
header.top {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
header.top.stuck { border-bottom-color: var(--line); }
.hdr { display: flex; align-items: center; gap: 10px; height: 62px; }
.brandmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 640; font-size: 15.5px; letter-spacing: -0.02em; }
.brandmark svg { width: 25px; height: 25px; border-radius: 7px; }
.hdr nav { display: flex; gap: 3px; margin-left: 20px; }
.hdr nav a { padding: 7px 11px; border-radius: 7px; font-size: 13.5px; color: var(--ink-2); text-decoration: none; transition: color .15s, background-color .15s; }
.hdr nav a:hover, .hdr nav a[aria-current="true"] { color: var(--ink); background: var(--paper-2); }
.spacer { margin-left: auto; }
.iconbtn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-2); border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s; }
.iconbtn:hover { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.iconbtn svg { width: 17px; height: 17px; }

/* ---------- the scroll machinery ---------- */
.act { position: relative; }
.stage {
  position: sticky; top: 0;
  height: 100svh; min-height: 560px;
  display: grid; place-items: center;
  overflow: hidden;
}
.stage > .wrap { width: 100%; }

/* Scroll track lengths. Longer track = slower, more readable scrub. */
.act-hero    { height: 420svh; }
.act-dictate { height: 330svh; }
.act-privacy { height: 360svh; }

/* progress rail — the playhead for the current act */
.rail {
  position: fixed; left: 0; right: 0; top: 62px; height: 2px; z-index: 79;
  background: transparent; pointer-events: none;
}
.rail i { display: block; height: 100%; width: 0%; background: var(--accent); transition: opacity .3s; }

/* headline stacks: lines occupy the same cell and cross-fade */
.lines { display: grid; }
.lines > * { grid-area: 1 / 1; }
/* Inactive lines are `visibility: hidden` as well as transparent, so a screen
   reader is not handed all three variants of the same headline at once. The
   0.5s visibility delay lets the fade finish before it is pulled from the tree. */
.line {
  opacity: 0; transform: translateY(18px); visibility: hidden;
  transition: opacity .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1), visibility 0s linear .5s;
  will-change: opacity, transform;
}
.line.on { opacity: 1; transform: none; visibility: visible; transition-delay: 0s, 0s, 0s; }
.line.past { opacity: 0; transform: translateY(-18px); }

/* scroll hint */
.hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3);
  transition: opacity .4s;
}
.hint svg { width: 15px; height: 15px; animation: nudge 1.9s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); opacity: .6 } 50% { transform: translateY(4px); opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .hint svg { animation: none; } }

/* ---------- hero act ---------- */
.hero-stage .wrap { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 4.5vw, 64px); align-items: center; }
@media (max-width: 1000px) { .hero-stage .wrap { grid-template-columns: 1fr; gap: 28px; } }
.hero-copy .eyebrow { margin-bottom: 14px; }
.hero-copy h1 { max-width: 13ch; }
.hero-copy .lede { max-width: 46ch; margin-top: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.hero-note { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.hero-note svg { width: 14px; height: 14px; flex: none; color: var(--accent); }

/* ---------- the compose frame ---------- */
.frame {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  will-change: transform, opacity;
}
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 11px 15px; border-bottom: 1px solid var(--line); background: var(--paper-2); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); flex: none; }
.frame-bar span { margin-left: 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.compose-meta { display: flex; align-items: baseline; gap: 12px; padding: 10px 22px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.compose-meta .lab { width: 52px; flex: none; font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }

.field {
  position: relative; padding: 22px 22px 60px;
  min-height: clamp(190px, 26svh, 250px);
  font-size: clamp(16px, 1.5vw, 18.5px); line-height: 1.78; color: var(--ink);
}
.caret { display: inline-block; width: 1.6px; height: 1.05em; margin-left: 1px; background: var(--accent); vertical-align: text-bottom; }
.caret.blink { animation: blink 1.15s steps(1) infinite; }
@keyframes blink { 0%,49% { opacity: 1 } 50%,100% { opacity: 0 } }

/* the wavy underline — the product's actual signal */
.u {
  padding-bottom: 2px; border-radius: 2px;
  background-repeat: repeat-x; background-position: 0 100%; background-size: 8px 5px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5'><path d='M0 3.4 Q2 0.7 4 3.4 T8 3.4' fill='none' stroke='%235b47e0' stroke-width='1.5'/></svg>");
  transition: background-color .25s, opacity .3s;
}
[data-theme="dark"] .u {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5'><path d='M0 3.4 Q2 0.7 4 3.4 T8 3.4' fill='none' stroke='%239c8dff' stroke-width='1.5'/></svg>");
}
.u.lit { background-color: var(--accent-soft); }
.u.fixed {
  background-image: none;
  background-color: color-mix(in srgb, var(--ok) 15%, transparent);
  animation: settle .55s cubic-bezier(.22,1,.36,1);
}
@keyframes settle { from { background-color: color-mix(in srgb, var(--ok) 38%, transparent); } }
@media (prefers-reduced-motion: reduce) { .u.fixed { animation: none; } }

.pill {
  position: absolute; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 7px;
  height: 33px; padding: 0 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow-2);
  opacity: 0; transform: scale(.8);
  transition: opacity .3s cubic-bezier(.22,1,.36,1), transform .3s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
.pill svg { width: 14px; height: 14px; }
.pill.on { opacity: 1; transform: none; }

.clean-note {
  position: absolute; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ok); font-weight: 560;
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s, transform .35s;
}
.clean-note.on { opacity: 1; transform: none; }
.clean-note svg { width: 15px; height: 15px; }

.frame-cap { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.frame-cap b { color: var(--ink); font-weight: 600; }

/* ---------- dictation act ---------- */
.dict-stage .wrap { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: clamp(28px,4.5vw,64px); align-items: center; }
@media (max-width: 1000px) { .dict-stage .wrap { grid-template-columns: 1fr; gap: 28px; } }

.dictbar { display: flex; align-items: center; gap: 15px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--paper-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.dictbar .txt { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-2); }
.dictbar .txt b { color: var(--ink); font-weight: 560; }
.kbd { font-family: var(--mono); font-size: 11px; color: var(--ink-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 3px 7px; white-space: nowrap; }

.wave { display: flex; align-items: center; gap: 3px; height: 32px; width: 84px; flex: none; }
.wave i { flex: 1; border-radius: 2px; background: var(--accent); height: 12%; will-change: height; }

/* ---------- privacy act ---------- */
.priv-stage .wrap { max-width: 1080px; }
.priv-head { text-align: center; margin-bottom: clamp(24px, 4svh, 44px); }
.priv-head h2 { margin-bottom: 12px; }

.gate { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 46svh; }
.gate-col { padding: 0 clamp(12px, 2.4vw, 30px); }
.gate-col .cap {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.gate-col .cap svg { width: 14px; height: 14px; }

.gate-line {
  position: absolute; left: 50%; top: -8px; bottom: -8px; width: 1px;
  background: repeating-linear-gradient(180deg, var(--line-2) 0 6px, transparent 6px 13px);
}
.gate-line span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(90deg);
  white-space: nowrap; background: var(--paper); padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}

.chips { display: flex; flex-direction: column; gap: 8px; }
.chip {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2); box-shadow: var(--shadow-1);
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s cubic-bezier(.22,1,.36,1), transform .55s cubic-bezier(.22,1,.36,1), border-color .4s, background-color .4s, color .4s;
  will-change: opacity, transform;
}
.chip.on { opacity: 1; transform: none; }
.chip svg { width: 14px; height: 14px; flex: none; color: var(--ink-3); }
.chip b { color: var(--ink); font-weight: 560; }
.chip.crosser { border-color: var(--accent-line); background: var(--accent-soft); }
.chip.crosser svg { color: var(--accent); }
.chip.gone-over { transform: translateX(var(--cross-x, 105%)); border-color: var(--accent-line); }

.gate-tally {
  margin-top: clamp(20px, 3.5svh, 38px); text-align: center;
  font-size: 15px; color: var(--ink-2);
}
.gate-tally b { color: var(--ink); font-weight: 620; }
.gate-tally .num { font-family: var(--display); font-size: 1.5em; color: var(--accent); }

@media (max-width: 760px) {
  .gate { grid-template-columns: 1fr; gap: 26px; min-height: 0; }
  .gate-line { display: none; }
  .chip.gone-over { transform: none; }
}

/* ---------- normal flow sections ---------- */
section.flow { padding-block: clamp(72px, 9vw, 124px); position: relative; }
.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head .eyebrow { margin-bottom: 14px; }
.sec-head h2 { margin-bottom: 16px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-1); }
.card h3 { margin-bottom: 9px; }
.card p { font-size: 14.5px; color: var(--ink-2); }
.card .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 16px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.card .ic svg { width: 17px; height: 17px; }
.tag { display: inline-block; margin-bottom: 12px; padding: 3.5px 9px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; background: var(--paper-2); color: var(--ink-3); border: 1px solid var(--line); }

ul.ticks { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 11px; }
ul.ticks li { display: grid; grid-template-columns: 17px 1fr; gap: 11px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
ul.ticks li svg { width: 15px; height: 15px; margin-top: 4px; color: var(--accent); }
ul.ticks li b { color: var(--ink); font-weight: 600; }

.ledger { border-top: 1px solid var(--line); }
.ledger .row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 17px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
@media (max-width: 720px) { .ledger .row { grid-template-columns: 1fr; gap: 5px; } }
.ledger .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ledger .v { font-size: 15px; color: var(--ink-2); }
.ledger .v b { color: var(--ink); font-weight: 600; }

.split { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(30px,5vw,64px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.close { text-align: center; }
.close h2 { max-width: 19ch; margin-inline: auto; margin-bottom: 16px; }
.close .lede { max-width: 50ch; margin-inline: auto; }
.close .hero-cta { justify-content: center; }
.meta { margin-top: 22px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .07em; color: var(--ink-3); }

footer.site { border-top: 1px solid var(--line); padding-block: 32px; background: var(--paper-2); }
.foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 13.5px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot .copy { color: var(--ink-3); font-family: var(--mono); font-size: 11.5px; }

/* ---------- reveal for the non-pinned sections ---------- */
.rise { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1); }
.rise.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) { .hdr nav { display: none; } }
@media (max-width: 560px) { :root { --gut: 18px; } .hdr .hide-sm { display: none; } }

/* A pinned stage clips its overflow, so on a phone the hero has to actually
   fit inside one viewport rather than merely look close. */
@media (max-width: 1000px) {
  .hero-stage h1 { font-size: clamp(29px, 7.4vw, 44px); }
  .hero-stage .lede, .dict-stage .lede { font-size: 15px; line-height: 1.55; }
  .hero-copy .eyebrow { margin-bottom: 10px; }
  .hero-copy .lede { margin-top: 12px; }
  .hero-cta { margin-top: 18px; gap: 9px; }
  .hero-note { margin-top: 10px; font-size: 12px; }
  .btn { padding: 10px 16px; font-size: 13.5px; }
  .field { min-height: 132px; padding: 16px 16px 50px; font-size: 15px; line-height: 1.65; }
  .compose-meta { padding: 8px 16px; font-size: 13px; }
  .frame-cap { margin-top: 10px; font-size: 12px; }
  .hint { display: none; }
  .stage { padding-block: 74px 20px; }
  .priv-head { margin-bottom: 20px; }
  .gate-tally { margin-top: 18px; font-size: 14px; }
  .chip { padding: 7px 11px; font-size: 12.5px; }
}

/* --------------------------------------------------------------------------
   Reduced motion / no-JS: unpin everything. The acts become ordinary stacked
   sections at their finished state, so the page still reads top to bottom.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .act-hero, .act-dictate, .act-privacy { height: auto !important; }
  .stage { position: static; height: auto; min-height: 0; padding-block: clamp(72px,9vw,120px); overflow: visible; }
  .lines > * { grid-area: auto; }
  .line { opacity: 1; transform: none; transition: none; }
  .line.secondary { display: none; }
  .chip, .pill, .clean-note { opacity: 1; transform: none; transition: none; }
  .chip.gone-over { transform: none; }
  .rise { opacity: 1; transform: none; transition: none; }
  .hint { display: none; }
  .rail { display: none; }
  .caret { display: none; }
}
html.no-js .act-hero, html.no-js .act-dictate, html.no-js .act-privacy { height: auto; }
html.no-js .stage { position: static; height: auto; min-height: 0; padding-block: 96px; overflow: visible; }
html.no-js .line, html.no-js .chip, html.no-js .pill, html.no-js .rise { opacity: 1; transform: none; }
html.no-js .line.secondary { display: none; }
html.no-js .hint, html.no-js .rail, html.no-js .caret { display: none; }
