/* Dicto website
   Palette: neutral off-white / off-black with one accent (burnt orange).
   Shape rule: interactive controls are full pills; surfaces 24px; nested blocks 14px.
   Type: Geist (display + body), Geist Mono (commands). */

@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #F5F5F3;
  --bg-2: #ECECE9;
  --surface: #FCFCFB;
  --ink: #111113;
  --ink-2: #4B4B52;
  --ink-3: #6A6A72;
  --line: #E2E2DE;
  --line-2: #CFCFCA;
  --accent: #DD5521;
  --accent-ink: #B03E11;
  --accent-soft: #FAE2D6;
  --btn-bg: #111113;
  --btn-ink: #F5F5F3;
  --screen: #111113;
  --screen-edge: rgb(255 255 255 / .06);
  --shadow: 0 1px 1px rgb(17 17 19 / .04), 0 14px 30px -18px rgb(17 17 19 / .22);
  --shadow-lg: 0 50px 90px -50px rgb(17 17 19 / .55);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C0C0E; --bg-2: #141417; --surface: #131316;
    --ink: #F1F1EF; --ink-2: #ABABB2; --ink-3: #8A8A92;
    --line: #232327; --line-2: #33333A;
    --accent: #F06A3A; --accent-ink: #FF8C62; --accent-soft: #2F1B12;
    --btn-bg: #F1F1EF; --btn-ink: #0C0C0E;
    --screen: #151518; --screen-edge: rgb(255 255 255 / .09);
    --shadow: 0 1px 1px rgb(0 0 0 / .3), 0 14px 30px -18px rgb(0 0 0 / .7);
    --shadow-lg: 0 50px 90px -50px rgb(0 0 0 / .9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C0C0E; --bg-2: #141417; --surface: #131316;
  --ink: #F1F1EF; --ink-2: #ABABB2; --ink-3: #8A8A92;
  --line: #232327; --line-2: #33333A;
  --accent: #F06A3A; --accent-ink: #FF8C62; --accent-soft: #2F1B12;
  --btn-bg: #F1F1EF; --btn-ink: #0C0C0E;
  --screen: #151518; --screen-edge: rgb(255 255 255 / .09);
  --shadow: 0 1px 1px rgb(0 0 0 / .3), 0 14px 30px -18px rgb(0 0 0 / .7);
  --shadow-lg: 0 50px 90px -50px rgb(0 0 0 / .9);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6; letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg { display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 5.1vw, 4.75rem); line-height: .98; letter-spacing: -0.052em; }
h2 { font-size: clamp(2.25rem, 4.6vw, 3.9rem); line-height: 1.02; letter-spacing: -0.048em; max-width: 18ch; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .9em; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 1.2em; height: 1.2em; flex: none; fill: currentColor; }
.soft { color: var(--ink-3); }
.stack { display: grid; }
.stack > * { grid-area: 1 / 1; min-width: 0; }
.sub { margin-top: 22px; font-size: 1.15rem; line-height: 1.55; color: var(--ink-2); max-width: 40ch; }
.section { padding: clamp(88px, 11vw, 160px) 0; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--btn-bg); color: var(--btn-ink); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
  border-radius: 999px; text-decoration: none; font-weight: 500; letter-spacing: -0.01em; cursor: pointer;
  border: 0; transition: transform .25s var(--ease), background-color .25s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--accent)); }
.btn-lg { padding: 16px 26px; font-size: 16.5px; }
.btn-lg .i { width: 18px; height: 18px; margin-top: -2px; }
.btn-sm { padding: 8px 16px; font-size: 14.5px; }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500;
  padding: 8px 4px; transition: color .2s;
}
.text-link .i { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.text-link:hover { color: var(--ink); }
.text-link:hover .i { transform: translateY(2px); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .i { width: 18px; height: 18px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; color: var(--ink); border-radius: 8px; }
.logo { height: 28px; width: auto; aspect-ratio: 189 / 48; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 14.5px; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
[data-theme-toggle] .i-moon { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .i-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .i-sun { display: none; }
  :root:not([data-theme="light"]) [data-theme-toggle] .i-moon { display: block; }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(72px, 9vw, 128px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.eyebrow { font-size: 15px; font-weight: 500; color: var(--accent-ink); margin-bottom: 22px; }
.lede { margin-top: 28px; font-size: clamp(1.1rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 32ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 40px; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .lede { max-width: 40ch; }
}

/* The hero demo: a small Mac desktop. Windows follow the site theme; the pill is always dark, like the app's. */
.demo { min-width: 0; }
.desk {
  --wall:
    radial-gradient(90% 70% at 10% 0%, #FCE6D4 0%, transparent 60%),
    radial-gradient(70% 60% at 90% 8%, #F5BC97 0%, transparent 62%),
    radial-gradient(85% 90% at 100% 100%, #E2703F 0%, transparent 66%),
    linear-gradient(165deg, #F7DCC7, #E79A71);
  --win: #FBFBFA; --win-bar: #F0F0ED; --win-ink: #1C1C1F; --win-ink-2: #717178; --win-line: #E4E4E0; --bub: #E9E9EB;
  --bar-bg: rgb(255 255 255 / .38); --bar-ink: #1C1C1F; --cap: rgb(52 24 10 / .8);
  --dock-bg: rgb(255 255 255 / .38); --dock-edge: rgb(255 255 255 / .5); --dock-dot: rgb(28 28 31 / .6);
  position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  border-radius: 22px; overflow: hidden; background: var(--wall); color: var(--win-ink); font-size: 14px; line-height: 1.45;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06), var(--shadow-lg);
}
:root[data-theme="dark"] .desk {
  --wall:
    radial-gradient(90% 70% at 10% 0%, #4B271A 0%, transparent 60%),
    radial-gradient(85% 90% at 100% 100%, #7E3416 0%, transparent 66%),
    linear-gradient(165deg, #20130E, #3A1C10);
  --win: #1C1C1F; --win-bar: #232327; --win-ink: #EDEDEA; --win-ink-2: #8E8E96; --win-line: #2E2E33; --bub: #2E2E33;
  --bar-bg: rgb(0 0 0 / .28); --bar-ink: #F1F1EF; --cap: rgb(255 238 228 / .82);
  --dock-bg: rgb(28 28 31 / .5); --dock-edge: rgb(255 255 255 / .12); --dock-dot: rgb(255 255 255 / .7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .desk {
    --wall:
      radial-gradient(90% 70% at 10% 0%, #4B271A 0%, transparent 60%),
      radial-gradient(85% 90% at 100% 100%, #7E3416 0%, transparent 66%),
      linear-gradient(165deg, #20130E, #3A1C10);
    --win: #1C1C1F; --win-bar: #232327; --win-ink: #EDEDEA; --win-ink-2: #8E8E96; --win-line: #2E2E33; --bub: #2E2E33;
    --bar-bg: rgb(0 0 0 / .28); --bar-ink: #F1F1EF; --cap: rgb(255 238 228 / .82);
    --dock-bg: rgb(28 28 31 / .5); --dock-edge: rgb(255 255 255 / .12); --dock-dot: rgb(255 255 255 / .7);
  }
}

.menubar {
  display: flex; align-items: center; gap: 14px; height: 26px; padding: 0 14px; font-size: 12.5px; color: var(--bar-ink);
  background: var(--bar-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.menubar .i { width: 13px; height: 13px; margin-top: -2px; }
.menubar b { font-weight: 600; }
.menubar-menus { opacity: .72; white-space: nowrap; }
.menubar-clock { margin-left: auto; white-space: nowrap; }

.desk-stage { padding: 22px 8% 0; }
.win {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 12px; background: var(--win);
  box-shadow: 0 0 0 1px rgb(0 0 0 / .1), 0 24px 50px -22px rgb(40 14 0 / .55);
  visibility: hidden; opacity: 0; transform: translateY(10px) scale(.985);
  transition: opacity .45s var(--ease), transform .6s var(--ease), visibility 0s .45s;
}
.win.is-active { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
html:not(.js) .win:first-child { visibility: visible; opacity: 1; transform: none; }
.win-bar {
  position: relative; display: flex; align-items: center; justify-content: center; height: 32px; flex: none; padding: 0 64px;
  font-size: 12.5px; font-weight: 600; color: var(--win-ink-2); background: var(--win-bar); border-bottom: 1px solid var(--win-line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lights { position: absolute; left: 12px; top: 50%; translate: 0 -50%; display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; }
.lights i:nth-child(2) { background: #FEBC2E; }
.lights i:nth-child(3) { background: #28C840; }
.win-body { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 16px 18px 18px; }
.dim { color: var(--win-ink-2); }

/* Where the text lands. The output always takes its space, so the desktop never changes height. */
.field { --cx: 0px; position: relative; margin-top: auto; }
.field::before {
  content: ""; position: absolute; left: var(--cx); top: calc(var(--cy, 0px) + .2em); width: 1.5px; height: 1.1em;
  background: var(--accent); animation: blink 1.05s steps(1) infinite; transition: opacity .2s;
}
.ph { position: absolute; left: calc(var(--cx) + 6px); top: var(--cy, 0px); color: var(--win-ink-2); white-space: nowrap; transition: opacity .2s; }
.out { opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .45s var(--ease); }
.out p + p { margin-top: .6em; }
.out ul { padding-left: 1em; list-style-type: "-  "; }
.out li::marker { color: var(--win-ink-2); }
.win.is-out .out { opacity: 1; transform: none; }
.win.is-out .ph, .win.is-out .field::before { opacity: 0; }
.field-pill { --cx: 14px; --cy: 7px; border: 1px solid var(--win-line); border-radius: 18px; padding: 7px 14px; }
.field-box { --cx: 12px; --cy: 10px; border: 1px solid var(--win-line); border-radius: 10px; padding: 10px 12px; background: var(--win); box-shadow: 0 2px 8px -4px rgb(0 0 0 / .12); }
.field-doc { margin-top: 4px; }
.field-term { --cx: 1.4em; padding-left: 1.4em; margin-top: 0; }
.field-term .prompt { position: absolute; left: 0; top: 0; }

.chat { justify-content: flex-end; }
.bub { align-self: flex-start; max-width: 78%; background: var(--bub); padding: 7px 12px; border-radius: 16px; }
.post b { display: block; font-weight: 700; }
.chat-ai { justify-content: center; padding-inline: 12%; }
.chat-ai .field { margin-top: 0; }
.mail .hdr { display: flex; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--win-line); }
.mail .hdr span { color: var(--win-ink-2); min-width: 4.4em; }
.notes .dim { text-align: center; font-size: 12px; }
.notes .field { margin-top: 0; }
.win-dark { --win: #19191C; --win-bar: #222226; --win-ink: #E8E8E5; --win-ink-2: #8C8C94; --win-line: #2C2C31; color: var(--win-ink); }
.term { font-family: var(--mono); font-size: 13px; gap: 4px; }
.term .prompt { color: var(--accent); margin-right: .55em; }
.field-term .prompt { margin: 0; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; }
.code { display: grid; gap: 10px; align-content: start; padding-top: 4px; }
.code i { display: block; height: 7px; width: var(--w); margin-left: calc(var(--x, 0) * 14px); border-radius: 4px; background: var(--win-line); }
.agent { display: flex; flex-direction: column; justify-content: flex-end; padding-left: 16px; border-left: 1px solid var(--win-line); }

/* What you said, word by word, above the pill */
.desk-foot { display: grid; justify-items: center; gap: 10px; padding: 14px 20px 8px; }
.captions { max-width: 44ch; text-align: center; }
.said { font-size: 15px; font-style: italic; color: var(--cap); opacity: 0; transition: opacity .4s var(--ease); }
.said::before { content: "\201C"; }
.said::after { content: "\201D"; }
.desk[data-phase="listen"] .said.is-active { opacity: 1; }
.desk[data-phase="think"] .said.is-active { opacity: .35; }
.desk-foot .pill { --u: 1.1px; }

.dock {
  justify-self: center; display: flex; gap: 8px; margin: 6px 0 12px; padding: 6px 8px 10px; border-radius: 16px;
  background: var(--dock-bg); box-shadow: inset 0 0 0 1px var(--dock-edge);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.dock .app {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #fff;
  background: linear-gradient(180deg, rgb(255 255 255 / .18), transparent 60%), var(--c);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), 0 2px 4px rgb(0 0 0 / .18);
  transition: transform .45s var(--spring);
}
.dock .app .i { width: 18px; height: 18px; }
.dock .app::after {
  content: ""; position: absolute; bottom: -7px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--dock-dot); opacity: 0; transition: opacity .3s;
}
.dock .app.is-active { transform: translateY(-3px) scale(1.08); }
.dock .app.is-active::after { opacity: 1; }

.w { opacity: 0; transition: opacity .16s; }
.w.on { opacity: 1; }
html:not(.js) .w { opacity: 1; }

@media (max-width: 560px) {
  .desk { border-radius: 18px; font-size: 13.5px; }
  .menubar-menus { display: none; }
  .desk-stage { padding: 16px 4% 0; }
  .win-body { padding: 14px; }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .code { display: none; }
  .agent { padding-left: 0; border-left: 0; }
  .chat-ai { padding-inline: 0; }
  .said { font-size: 14px; }
  .dock { gap: 6px; padding: 5px 6px 9px; }
  .dock .app { width: 28px; height: 28px; border-radius: 8px; }
  .dock .app .i { width: 15px; height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .desk .said.is-active { opacity: .7; }
}

/* Struck filler words: a line draws across, then the word fades */
.lay-said del {
  text-decoration: none; color: inherit;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 58% / 0% 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size .45s var(--ease), opacity .45s var(--ease);
}
.is-clean del { background-size: 100% 2px; opacity: .45; }

/* The indicator pill, matching the app: 96x30, nine 3pt bars, dark fill. */
.pill {
  --u: 1.3px;
  width: calc(96 * var(--u)); height: calc(30 * var(--u)); border-radius: 999px; background: #141414;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15), 0 2px 6px rgb(0 0 0 / .3);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(8px) scale(.6);
  transition: opacity .25s var(--ease), transform .45s var(--spring);
}
.pill.is-on { opacity: 1; transform: none; }
.bars { display: flex; align-items: center; gap: calc(3 * var(--u)); height: calc(16 * var(--u)); }
.bars i { display: block; width: calc(3 * var(--u)); height: calc(16 * var(--u)); border-radius: 999px; background: #fff; transform: scaleY(.1875); }
.pill.is-thinking .bars i { opacity: .6; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- How it works: press, speak, done ---------- */
.how { padding: clamp(80px, 10vw, 140px) 0 clamp(24px, 4vw, 56px); }
.how-title { font-size: clamp(2rem, 3.8vw, 3.2rem); }
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 36px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden;
}
.step { position: relative; padding: 22px 24px 26px; }
.step + .step { border-left: 1px solid var(--line); }
.step::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent);
  transform: scaleX(var(--prog, 0)); transform-origin: left;
}
.step-art { display: grid; place-items: center; height: 76px; margin-bottom: 20px; border-radius: 14px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.step-art > * { transition: opacity .4s var(--ease); }
.step-n { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }
.step h3 { margin-top: 2px; }
.step h3 + p { margin-top: 4px; color: var(--ink-2); font-size: 15.5px; }
.key {
  display: grid; place-items: center; width: 46px; height: 40px; border-radius: 10px; color: var(--accent);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 3px 0 var(--line-2);
  transition: transform .12s ease-out, box-shadow .12s ease-out, opacity .4s var(--ease);
}
.key svg { width: 24px; height: 24px; }
.key.is-down { transform: translateY(2px); box-shadow: 0 1px 0 var(--line-2); }
.step .pill { --u: 1px; opacity: 1; transform: none; }
.mini-field {
  display: flex; align-items: center; min-width: 9.5em; padding: 7px 12px; border-radius: 10px; font-size: 15px;
  background: var(--surface); border: 1px solid var(--line);
}
.mini-text { transition: opacity .3s var(--ease); }
.mini-caret { width: 1.5px; height: 1.1em; margin-left: 2px; background: var(--accent); animation: blink 1.05s steps(1) infinite; }
.steps.is-playing .step:not(.is-active) .step-art > * { opacity: .4; }
.steps.is-playing .mini-text { opacity: 0; }
.steps.is-playing .step.is-typed .mini-text { opacity: 1; }
@media (max-width: 760px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { display: grid; grid-template-columns: 116px minmax(0, 1fr); column-gap: 18px; align-content: center; padding: 16px 18px; }
  .step + .step { border-left: 0; border-top: 1px solid var(--line); }
  .step-art { grid-row: 1 / span 3; height: 72px; margin: 0; }
  .mini-field { min-width: 0; padding: 6px 8px; font-size: 13px; }
}

/* ---------- Layouts ---------- */
.layouts { padding-top: clamp(56px, 8vw, 112px); }
.layouts-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 112px); align-items: start; }
.index { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 44px; }
.index button {
  position: relative; border: 0; background: none; cursor: pointer; padding: 4px 0 8px; text-align: left;
  font-size: clamp(1.4rem, 2.3vw, 1.95rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.2;
  color: var(--ink-3); transition: color .3s;
}
.index button:hover { color: var(--ink-2); }
.index button[aria-selected="true"] { color: var(--ink); }
.index .prog {
  position: absolute; left: 0; right: 0; bottom: 3px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
}
.sheet {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: clamp(24px, 3.6vw, 44px); box-shadow: var(--shadow);
}
.sheet-pill { --u: 1.05px; position: absolute; top: clamp(22px, 3.4vw, 42px); right: clamp(22px, 3.4vw, 42px); }
.lay { display: flex; flex-direction: column; justify-content: center; gap: 22px; visibility: hidden; }
.lay.is-active { visibility: visible; }
html:not(.js) .lay:first-child { visibility: visible; }
.lay-app { font-size: 14.5px; font-weight: 500; color: var(--ink); min-height: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding-right: 150px; }
.lay-app span { color: var(--ink-3); font-weight: 400; }
.lay-said { font-style: italic; font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.5; color: var(--ink-3); letter-spacing: -0.012em; }
.lay-out {
  font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.5; letter-spacing: -0.012em;
  background: var(--bg); border-radius: 14px; padding: 18px 22px;
  opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .6s var(--ease);
}
.lay.is-out .lay-out { opacity: 1; transform: none; }
html:not(.js) .lay-out { opacity: 1; transform: none; }
.lay-out p + p { margin-top: .55em; }
.lay-out ul { padding-left: 1.1em; margin-top: .2em; }
.lay-out li::marker { color: var(--ink-3); }
.lay-mono { background: #111113; color: #EDEDEA; font-family: var(--mono); font-size: 16px; letter-spacing: 0; }
mark { background: var(--accent-soft); color: inherit; border-radius: 4px; padding: 0 .15em; }

@media (max-width: 900px) {
  .layouts-grid { grid-template-columns: minmax(0, 1fr); }
  .index {
    flex-direction: row; gap: 4px 22px; overflow-x: auto; scrollbar-width: none; margin-top: 32px;
    margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter);
  }
  .index::-webkit-scrollbar { display: none; }
  .index button { font-size: 1.2rem; flex: none; }
  .lay { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .lay-app { padding-right: 116px; }
  .sheet-pill { --u: .95px; }
}

/* ---------- Privacy ---------- */
.statement { font-size: clamp(2.25rem, 5vw, 4.3rem); max-width: 19ch; }
.privacy-stt { display: flex; align-items: center; gap: 10px; margin-top: 32px; color: var(--ink-2); font-size: 1.05rem; }
.privacy-stt .i { width: 22px; height: 22px; color: var(--accent-ink); }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.mode { padding: 32px 36px 8px 0; }
.mode + .mode { padding-left: 36px; border-left: 1px solid var(--line); }
.mode .i { width: 24px; height: 24px; color: var(--ink-2); margin-bottom: 22px; }
.mode-local .i { color: var(--accent-ink); }
.mode p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; max-width: 32ch; }
@media (max-width: 820px) {
  .modes { grid-template-columns: minmax(0, 1fr); border-top: 0; }
  .mode, .mode + .mode { padding: 26px 0; border-left: 0; border-top: 1px solid var(--line); }
}

.privacy-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
/* The voice ripples out from the pill but never crosses the edge of the "Mac". */
.vault {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 420px; justify-self: end;
  border-radius: 24px; background: var(--screen); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--screen-edge), var(--shadow-lg);
  display: grid; place-items: center;
}
.vault .pill { --u: 1.5px; position: relative; }
.vault-rings { position: absolute; inset: 0; display: grid; place-items: center; }
.vault-rings i {
  grid-area: 1 / 1; width: 34%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid var(--accent); opacity: 0;
  animation: ripple 3.6s cubic-bezier(.2, .6, .3, 1) infinite;
}
.vault-rings i:nth-child(2) { animation-delay: 1.2s; }
.vault-rings i:nth-child(3) { animation-delay: 2.4s; }
@keyframes ripple {
  0% { transform: scale(.5); opacity: 0; }
  15% { opacity: .7; }
  100% { transform: scale(2.45); opacity: 0; }
}
.vault-tag {
  position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 8px;
  font-size: 14px; color: rgb(255 255 255 / .62);
}
.vault-tag .i { width: 16px; height: 16px; color: var(--accent); }
@media (max-width: 900px) {
  .privacy-grid { grid-template-columns: minmax(0, 1fr); }
  .vault { justify-self: start; max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .vault-rings i { animation: none; opacity: .35; transform: scale(1); }
  .vault-rings i:nth-child(2) { transform: scale(1.6); opacity: .22; }
  .vault-rings i:nth-child(3) { transform: scale(2.2); opacity: .12; }
}

/* ---------- Details (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.tile-pill, .tile-history { grid-column: span 7; }
.tile-fallback, .tile-vocab { grid-column: span 5; }
.tile-art { height: 216px; display: grid; place-items: center; background: var(--bg-2); padding: 24px; }
.tile-copy { padding: 24px 28px 30px; }
.tile-copy p { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; max-width: 48ch; }
.art-screen { background: var(--screen); align-items: end; padding-bottom: 30px; box-shadow: inset 0 -1px 0 var(--screen-edge); }
.art-screen .pill { --u: 1.6px; }
.art-accent { background: var(--accent-soft); }
.fb { display: grid; justify-items: center; gap: 12px; font-size: 15px; }
.fb-off { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; }
.fb-on { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); padding: 9px 16px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 500; }
.fb-on .i { width: 16px; height: 16px; color: var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 300px; }
.chips span { background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500; }
.chips span:nth-child(2) { border-color: var(--accent); color: var(--accent-ink); }
.hist { list-style: none; width: 100%; max-width: 560px; display: grid; gap: 8px; }
.hist li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 14px; padding: 10px 14px; font-size: 14.5px; min-width: 0; box-shadow: var(--shadow); }
.hist-play { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.hist-play .i { width: 12px; height: 12px; }
.hist-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-text.mono { font-family: var(--mono); font-size: 13.5px; }
.hist-app { color: var(--ink-3); font-size: 13px; flex: none; }
@media (max-width: 900px) {
  .tile-pill, .tile-history, .tile-fallback, .tile-vocab { grid-column: span 12; }
  .tile-art { height: 200px; }
}

/* ---------- Download ---------- */
.get { border-top: 1px solid var(--line); }
.get-grid { display: grid; }
.get h2 { font-size: clamp(2.75rem, 7vw, 6rem); max-width: 12ch; }
.req { margin-top: 18px; color: var(--ink-3); font-size: 14.5px; }
.install { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 3vw, 36px); }
.install p { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; }
.cmd { margin-top: 20px; display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 13.5px; padding: 6px 0; scrollbar-width: thin; }
.cmd .i-check { display: none; }
.cmd.is-copied .i-check { display: block; color: var(--accent-ink); }
.cmd.is-copied .i-copy { display: none; }
@media (max-width: 900px) { .get-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- FAQ ---------- */
.faq { padding-top: 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; font-size: 1.15rem; font-weight: 500; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { width: 18px; height: 18px; color: var(--ink-3); transition: transform .35s var(--ease); }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq-a { padding: 0 0 24px; color: var(--ink-2); max-width: 62ch; }
.faq-a p + p { margin-top: 12px; }
.faq-a a { color: var(--accent-ink); text-underline-offset: 3px; }
.faq-a code { background: var(--bg-2); padding: 3px 8px; border-radius: 8px; font-size: 13.5px; word-break: break-all; }
.faq details[open] .faq-a { animation: rise .4s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (min-width: 861px) { .faq-grid h2 { position: sticky; top: calc(var(--nav-h) + 32px); } }
@media (max-width: 860px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 48px; font-size: 14.5px; color: var(--ink-3); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: start; }
.footer-brand .logo { height: 26px; color: var(--ink); }
.footer-brand p { margin-top: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.footer-copy a { color: var(--ink-2); text-underline-offset: 3px; }
.footer-copy a:hover { color: var(--ink); }
@media (max-width: 640px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Entrances ---------- */
.hero-copy > * { animation: rise .9s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; }
.hero-copy > :nth-child(3) { animation-delay: .12s; }
.hero-copy > :nth-child(4) { animation-delay: .18s; }
.demo { animation: rise 1s .2s var(--ease) both; }
.reveal-ready .reveal:not(.in) { opacity: 0; transform: translateY(16px); }
.reveal-ready .reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-ready .tile.reveal:nth-child(even) { transition-delay: .08s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal-ready .reveal:not(.in) { opacity: 1; transform: none; }
  .caret { animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
