/* The landing page's stylesheet. Tokens follow docs/public/brand.md and the
   desktop app's renderer/src/styles/index.css: white canvas, warm near-black
   ink, hairlines, the orange to amber heat gradient on the mark, the primary
   button and the demo's edge. Dark follows the OS. */

@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-display: swap; src: url(/fonts/hanken-grotesk-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-display: swap; src: url(/fonts/hanken-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; font-display: swap; src: url(/fonts/hanken-grotesk-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 700; font-display: swap; src: url(/fonts/hanken-grotesk-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 800; font-display: swap; src: url(/fonts/hanken-grotesk-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  color-scheme: light dark;
  --canvas: #ffffff;
  --ink: #17150f;
  --muted: #67655b;
  --hairline: #e6e4df;
  --surface: #f6f5f2;
  --bubble: #fdeee4;
  --slate: #12242e;
  --slate-ink: #f7f7f7;
  --orange: #f5641e;
  --amber: #ffb03a;
  --link: #c8460c;
  --ok: #0e7490;
  --wait: #8a5200;
  --heat: linear-gradient(96deg, #f5641e, #ff8a3d 55%, #ffb03a);
  --on-heat: #17150f;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 0.75rem;
  --radius-card: 1rem;
  --wrap: 78rem;
  --section-space: clamp(4rem, 8vw, 8rem);
  --shadow-window: 0 28px 70px -28px rgb(23 21 15 / 30%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0c1a24;
    --ink: #f7f7f7;
    --muted: #a9b1b6;
    --hairline: #1e3a45;
    --surface: #12242e;
    --bubble: #2a2320;
    --slate: #08141c;
    --orange: #ff7a3d;
    --link: #ff9a5c;
    --ok: #54d6e6;
    --wait: #ffb454;
    --heat: linear-gradient(96deg, #ff7a3d, #ff9a5c 55%, #ffb03a);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv05";
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 600; line-height: 1.05; font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.top-nav { display: flex; align-items: center; gap: 1.5rem; font-size: 0.9375rem; font-weight: 500; height: 4.75rem; }
.top-nav a { color: var(--ink); }
.top-nav .button { color: var(--on-heat); }
.top-links, .top-right { display: flex; gap: 1.25rem; align-items: center; }
.top-right { margin-left: auto; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.025em; }
.mark { background: var(--heat); -webkit-mask: url(/mark.svg) center / contain no-repeat; mask: url(/mark.svg) center / contain no-repeat; width: 2rem; height: 2rem; }

/* Buttons */
.button { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.05rem; padding: 0.8rem 1.25rem; border-radius: var(--radius); background: var(--heat); color: var(--on-heat); font-weight: 700; line-height: 1.2; transition: transform 180ms ease, box-shadow 180ms ease; }
.button:hover { text-decoration: none; filter: brightness(1.04); transform: translateY(-2px); box-shadow: 0 8px 18px -12px var(--ink); }
.button-detail { font-family: var(--mono); font-weight: 400; font-size: 0.75rem; opacity: 0.8; }
.button-quiet { background: transparent; color: var(--ink); border: 1px solid var(--hairline); }
.button-quiet:hover { border-color: var(--ink); filter: none; }
.button-small { padding: 0.4rem 0.85rem; font-size: 0.875rem; border-radius: 0.5rem; }

/* Hero */
.hero { padding: 5.5rem 0 6rem; overflow: clip; }
.hero-text { text-align: left; max-width: none; }
h1 { font-size: clamp(3.5rem, 5.6vw, 5.5rem); line-height: 0.99; letter-spacing: -0.04em; max-width: 10ch; text-wrap: balance; }
.lede { color: var(--muted); margin: 1.75rem 0 0; max-width: 35ch; font-size: 1.125rem; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; margin-top: 1.75rem; gap: 0.75rem; }
.hero-actions .button { min-height: 3.5rem; font-size: 0.9375rem; }
.hero-note { margin-top: 1.25rem; color: var(--muted); max-width: 40ch; font-size: 0.8125rem; line-height: 1.6; }

/* The demo pairs a captured document with the turn it started. */
.demo { margin-top: 3.5rem; border-radius: var(--radius-card); background: var(--canvas); overflow: hidden; position: relative; margin: 0; box-shadow: var(--shadow-window); border: 0; }
.demo::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--heat); }
.demo-chrome { display: flex; align-items: center; gap: 0.4rem; border-bottom: 1px solid var(--hairline); font-size: 0.8125rem; color: var(--muted); padding: 1rem 1.25rem; }
.demo-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--hairline); }
.demo-title { margin-left: 0.5rem; font-weight: 600; color: var(--ink); }
.demo-key { margin-left: auto; font-family: var(--mono); font-size: 0.75rem; padding: 0.15rem 0.5rem; border: 1px solid var(--hairline); border-radius: 0.4rem; }
.demo-body { display: grid; min-height: 19rem; grid-template-columns: 1fr; }
.demo-screen { position: relative; background: var(--surface); border-right: 1px solid var(--hairline); display: grid; place-items: center; border: 0; border-bottom: 1px solid var(--hairline); min-height: 17rem; padding: 1.5rem 2rem; }
.shot { grid-area: 1 / 1; width: 100%; transition: opacity 0.4s ease; max-width: 23rem; }
.shot[hidden] { display: block; opacity: 0; pointer-events: none; }
.capture-frame { position: absolute; inset: 1rem; border: 2px solid var(--orange); border-radius: 0.5rem; opacity: 0; pointer-events: none; }
.demo.capturing .capture-frame { animation: capture 0.9s ease-out; }
@keyframes capture { 0% { opacity: 0; transform: scale(1.03); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }

.slide { background: #fff; color: #17150f; border-radius: 0.4rem; box-shadow: 0 8px 24px -12px rgba(23, 21, 15, 0.4); font-size: 0.8125rem; padding: 1.125rem 1.5rem; transform: rotate(-3deg); }
.slide-title { font-weight: 700; font-size: 0.9375rem; margin-bottom: 0.6rem; }
.slide-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.slide-table th, .slide-table td { text-align: right; padding: 0.2rem 0.3rem; border-bottom: 1px solid #ece9e3; }
.slide-table th:first-child, .slide-table td:first-child { text-align: left; }
.slide-table th { font-weight: 600; color: #67655b; }
.slide-foot { margin-top: 0.6rem; font-family: var(--mono); font-size: 0.6875rem; color: #67655b; }

.finder { background: #fff; color: #17150f; border-radius: 0.4rem; padding: 0.8rem 1rem; box-shadow: 0 8px 24px -12px rgba(23, 21, 15, 0.4); font-size: 0.75rem; transform: rotate(-3deg); }
.finder-title { font-weight: 700; font-size: 0.875rem; margin-bottom: 0.5rem; }
.finder-list li { padding: 0.25rem 0; border-bottom: 1px solid #ece9e3; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder-list li:last-child { border-bottom: 0; }
.finder-more { color: #67655b; font-family: var(--sans) !important; }

.demo-turn { display: grid; padding: 1.5rem; min-height: 12.5rem; }
.scene { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; transition: opacity 0.35s ease; }
.scene[hidden] { display: flex; opacity: 0; pointer-events: none; }
.demo-dots { display: flex; border-top: 1px solid var(--hairline); justify-content: stretch; gap: 0; padding: 0.35rem 0.5rem; }
.demo-dots button { border: 0; padding: 0; cursor: pointer; flex: 1; width: auto; height: auto; min-height: 2.75rem; border-radius: 0.5rem; background: transparent; color: var(--muted); font: 500 0.8125rem var(--sans); }
.demo-dots button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 -2px var(--orange); }

/* A turn, as the app draws it: the ask in a tinted bubble on the reader's
   side, a step line for each tool that ran, an approval card where a write
   stopped, and the reply plain underneath. */
.ask { align-self: flex-end; max-width: 100%; border-radius: 0.9rem 0.9rem 0.25rem 0.9rem; background: var(--bubble); line-height: 1.45; font-family: var(--sans); font-size: 1rem; padding: 0.75rem 1rem; }
.typed { white-space: pre-wrap; }
.typing .typed::after { content: ""; display: inline-block; width: 0.5ch; height: 1em; margin-left: 1px; vertical-align: -0.15em; background: var(--ink); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.step { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: baseline; font-size: 0.875rem; color: var(--muted); }
.step-name { font-weight: 600; color: var(--ink); }
.step-arg { font-family: var(--mono); font-size: 0.8125rem; }
.step-done, .step-wait { font-size: 0.75rem; font-weight: 600; }
.step-done { color: var(--ok); }
.step-wait { color: var(--wait); }
.answer { font-size: 1.0625rem; line-height: 1.5; max-width: 30rem; }
.approval { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; width: 100%; padding: 0.65rem 0.85rem; border: 1px solid var(--orange); border-radius: 0.6rem; font-size: 0.9rem; }
.decision { font-size: 0.75rem; font-weight: 700; color: var(--link); }
.choices { display: flex; gap: 0.4rem; }
.choice { padding: 0.2rem 0.6rem; border-radius: 0.4rem; border: 1px solid var(--hairline); font-size: 0.8125rem; font-weight: 600; }
.choice-yes { background: var(--heat); color: var(--on-heat); border-color: transparent; }

/* Feature rows */
.row { padding: 5rem 0; border-top: 1px solid var(--hairline); padding-block: var(--section-space); scroll-margin-top: 4.75rem; }
.row-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 3rem 7rem; }
h2 { max-width: 22ch; font-size: clamp(2.25rem, 4vw, 3.75rem); line-height: 1.06; letter-spacing: -0.035em; text-wrap: balance; }
.row-text p { margin-top: 1.1rem; max-width: 34rem; }
.row-text p:first-of-type { margin-top: 1.5rem; }
.row-link { display: flex; flex-wrap: wrap; gap: 1.5rem; font-weight: 600; }
.row-text .row-link { margin-top: 1.5rem; }

.asks li { border-bottom: 1px solid var(--hairline); font-family: var(--mono); font-size: 0.9375rem; font: 500 clamp(1rem, 1.6vw, 1.25rem)/1.45 var(--sans); padding: 1.125rem 0; display: flex; gap: 1rem; }
.asks li:first-child { border-top: 0; }
.asks li::before { content: "\203A"; margin-right: 0.75rem; color: var(--orange); margin: 0; }

.phone { margin-inline: auto; background: var(--canvas); display: flex; flex-direction: column; align-items: flex-start; grid-column: 1; grid-row: 1; width: min(22rem, 100%); min-height: 29rem; padding: 2.75rem 1.25rem 1.5rem; border: 7px solid #35464f; border-radius: 2.75rem; color: var(--ink); position: relative; gap: 1.5rem; box-shadow: 0 35px 70px -20px rgb(0 0 0 / 45%); transform: rotate(-4deg); }
.phone-bar { display: flex; justify-content: space-between; width: 100%; font-size: 0.8125rem; font-weight: 600; padding-bottom: 0.6rem; border-bottom: 1px solid var(--hairline); }
.phone-paired { color: var(--muted); font-weight: 500; }
.phone-paired::before { content: ""; display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--ok); margin-right: 0.35rem; }
.phone .answer { font-size: 0.9375rem; }
.phone-where { font-size: 0.75rem; color: var(--muted); margin-top: auto; }

.dictation { display: flex; flex-direction: column; padding-top: 0.5rem; gap: 1rem; }
.spoken { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 0; border-bottom: 1px solid var(--hairline); border-radius: 0; padding: 1.125rem 0; font-size: 1.25rem; }
.spoken-live { border-color: var(--orange); background: var(--bubble); border: 0; border-radius: var(--radius); padding: 1.25rem; margin-left: -1.25rem; }
.listening { display: inline-flex; align-items: flex-end; height: 1.75rem; gap: 4px; flex-shrink: 0; }
.listening i { height: 40%; background: var(--orange); border-radius: 2px; animation: bar 0.9s ease-in-out infinite; width: 4px; }
.listening i:nth-child(2) { animation-delay: 0.15s; } .listening i:nth-child(3) { animation-delay: 0.3s; } .listening i:nth-child(4) { animation-delay: 0.45s; }
@keyframes bar { 50% { height: 100%; } }

.control { display: flex; flex-direction: column; gap: 1rem; background: var(--canvas); padding: 1.5rem; border-radius: var(--radius-card); }
.history li { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: baseline; padding: 0.55rem 0; border-bottom: 1px solid var(--hairline); font-size: 0.875rem; color: var(--muted); padding-block: 0.875rem; }

.row-speed h2 { max-width: 12ch; }
.speed-text { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem 3rem; margin-top: 1.5rem; max-width: 62rem; display: block; margin: 0; color: var(--muted); }

/* Install. One block per platform is rendered; landing.js shows the visitor's
   own, and the build leaves macOS showing for a page without scripts. */
.install-lede { margin-top: 1.5rem; max-width: 38rem; }
.install-for { margin-top: 2rem; max-width: 40rem; display: grid; gap: 1.25rem; }
.install-for[hidden] { display: none; }
.install-for .button { justify-self: start; min-height: 3.5rem; }
.install-others { font-size: 0.9375rem; color: var(--muted); }
.hero-note[hidden] { display: none; }
#install .row-link { margin-top: 2rem; }
#docs .row-link { margin-top: 1.5rem; }

/* Footer */
.foot { background: var(--slate); color: var(--slate-ink); padding: 3.5rem 0 2.5rem; margin-top: 0; padding-block: 4rem 2rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 2rem; }
.foot h3 { font-size: 0.9375rem; margin-bottom: 0.8rem; }
.foot a { display: block; color: var(--slate-ink); opacity: 0.8; font-size: 0.9375rem; padding: 0.2rem 0; }
.foot a:hover { opacity: 1; }
.foot-note { margin-top: 2.5rem; font-size: 0.8125rem; opacity: 0.6; border-top: 1px solid #35464f; padding-top: 1.5rem; }

@media (prefers-reduced-motion: reduce) {
  .shot, .scene { transition: none; }
  .listening i { animation: none; height: 70%; }
  .typing .typed::after { animation: none; }
  .demo.capturing .capture-frame { animation: none; }
}


/* Landing presentation: the public brand's warm canvas, heat and slate.
   The demo is the hero artwork; each feature has its own reading rhythm. */
.top-links { gap: 1rem; }
.top-right .button-small { padding: 0.7rem 1rem; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 3.5rem; align-items: center; }
.hero-done { display: inline-block; position: relative; isolation: isolate; }
.hero-done::after { content: ""; position: absolute; z-index: -1; inset: auto -0.025em 0.015em; height: 0.13em; background: var(--heat); border-radius: 2px; }
.hero-actions .button-quiet { padding-inline: 0; border: 0; border-radius: 0; border-bottom: 1px solid var(--hairline); }
.hero-preview { min-width: 0; position: relative; padding: 2.5rem 0; }
.hero-preview::before { content: ""; position: absolute; inset: 0 -3rem 0 2rem; border-radius: 50% 0 0 50%; background: var(--surface); z-index: -1; }
.demo-dots button:hover { color: var(--ink); }
.row-text > p:not(.row-link) { color: var(--muted); line-height: 1.7; }
.row-link a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 0.3em; }
.row-link a:hover { text-decoration-color: currentColor; }
#screen { background: var(--surface); border: 0; }
.asks { padding-left: 1rem; }
.asks li:last-child { border-bottom: 0; }
#phone { background: #12242e; color: #f7f7f7; border: 0; }
#phone .row-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
#phone .row-text { grid-column: 2; grid-row: 1; }
#phone .row-text > p:not(.row-link) { color: #bac4c9; }
#phone .row-link a { color: #ff9a5c; text-decoration-color: #79553f; }
.phone::before { content: ""; position: absolute; top: 0.75rem; left: calc(50% - 2.5rem); width: 5rem; height: 0.65rem; border-radius: 1rem; background: #35464f; }
.phone .ask { font-size: 0.9375rem; }
#voice .row-grid { align-items: start; }
#control { padding-top: 0; border: 0; }
#control .row-grid { background: var(--surface); padding: 3.5rem; border-radius: 1rem; gap: 4rem; }
#control h2 { max-width: 10ch; }
.approval-open { padding: 1rem; gap: 1rem; }
.row-speed { border: 0; padding-top: 1rem; }
.row-speed .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 7rem; }
.speed-text p + p { margin-top: 1.25rem; }
#install { background: var(--surface); }
#install > .wrap { display: grid; grid-template-columns: 1fr 1fr; column-gap: 7rem; align-items: start; }
#install h2 { font-size: clamp(3.5rem, 6vw, 5.5rem); }
#install .install-for { margin-top: 0; max-width: 100%; padding: 2rem; background: var(--canvas); border-radius: var(--radius-card); }
#docs { padding-block: 4rem; }
#docs h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); max-width: none; }
@media (min-width: 100rem) { .hero-preview::before { right: -6rem; } }
@media (max-width: 68rem) {
  .top-links { display: none; }
  .hero-layout { gap: 2rem; }
  h1 { font-size: clamp(3rem, 6vw, 4.5rem); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .row-grid, .row-speed .wrap, #install > .wrap { column-gap: 3rem; }
  #control .row-grid { padding: 2rem; gap: 2rem; }
}
@media (max-width: 52rem) {
  .hero { padding-block: 3rem; }
  .hero-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  h1 { max-width: 13ch; font-size: clamp(3.25rem, 10vw, 5rem); }
  .lede { max-width: 45ch; }
  .hero-actions { flex-direction: row; align-items: stretch; }
  .hero-preview { padding-block: 1rem; }
  .hero-preview::before { display: none; }
  .demo-screen { min-height: 16rem; }
  .demo-turn { min-height: 13rem; }
  .row-grid, #phone .row-grid, .row-speed .wrap, #install > .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  #phone .row-text, .phone { grid-column: auto; grid-row: auto; }
  .phone { transform: none; }
  #control .row-grid { padding: 2rem 1.25rem; }
  #control h2 { max-width: none; }
  #install .install-for { grid-column: auto; grid-row: auto; padding: 1.5rem; }
  .speed-text { margin: 0; }
  .asks { padding-left: 0; }
  .spoken-live { margin-left: 0; }
}
@media (max-width: 30rem) {
  .wrap { width: calc(100% - 2rem); }
  .top-nav { height: 4rem; gap: 0.75rem; }
  .top-right { gap: 0.75rem; }
  .top-right > a:not(.button) { display: none; }
  .brand { font-size: 1rem; }
  .demo-turn { padding: 1.25rem; min-height: 15rem; }
  .demo-screen { padding: 1.5rem; }
  .demo-dots button { font-size: 0.75rem; }
  .control { padding: 1rem; }
  .row { scroll-margin-top: 4rem; }
}
@media (prefers-color-scheme: dark) {
  :root { --shadow-window: 0 28px 70px -28px rgb(0 0 0 / 65%); }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .button:hover { transform: none; }
}
