@font-face { font-family: "iikb Sans"; font-weight: 400; font-display: swap; src: local("Helvetica Neue"), local("HelveticaNeue"), url("fonts/texgyreheros-regular.woff2") format("woff2"); }
@font-face { font-family: "iikb Sans"; font-weight: 500; font-display: swap; src: local("Helvetica Neue Medium"), local("HelveticaNeue-Medium"), url("fonts/texgyreheros-regular.woff2") format("woff2"); }
@font-face { font-family: "iikb Sans"; font-weight: 700; font-display: swap; src: local("Helvetica Neue Bold"), local("HelveticaNeue-Bold"), url("fonts/texgyreheros-bold.woff2") format("woff2"); }

:root {
  --page: #f2f2f5;
  --card: #ffffff;
  --ink: #000000;
  --ink-2: #6c6c70;
  --rule: #e3e3e8;
  --edge: rgb(0 0 0 / 0.06);
  --red: #ff3b30;
  --blue: #007aff;
  --display: "iikb Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --margin: clamp(20px, 5vw, 64px);
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --card: #1c1c1e;
    --ink: #ffffff;
    --ink-2: #8e8e93;
    --rule: #2c2c2e;
    --edge: rgb(255 255 255 / 0.07);
    --red: #ff453a;
    --blue: #0a84ff;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { background: var(--page); color: var(--ink); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 17px/1.45 var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--blue); }
img, picture { display: block; max-width: 100%; height: auto; }
figure { margin: 0; min-width: 0; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.wrap { max-width: calc(1200px + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
}

.grid > * { grid-column: 1 / -1; min-width: 0; }

/* Type */

.big, .head {
  margin: 0;
  font-weight: 700;
  line-height: 0.98;
  text-wrap: balance;
}

.head { font-size: clamp(40px, 6vw, 80px); letter-spacing: -0.03em; }

.line { margin: 0; max-width: 34em; text-wrap: pretty; }

.note, .credit, .caption, figcaption, .label {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-2);
  text-wrap: pretty;
}

.note code { font-size: 13px; }

/* Top */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  font-size: 14px;
  font-weight: 500;
}

.top a { text-decoration: none; }
.top .mark { display: block; color: var(--ink); }
.top .mark svg { display: block; width: 37px; height: 18px; fill: currentColor; }

/* 1. Hero */

.hero { padding-top: clamp(24px, 6vw, 72px); padding-bottom: clamp(64px, 10vw, 128px); row-gap: 48px; }

.hero-text { grid-column: 1 / 7; display: flex; flex-direction: column; min-height: 100%; }
.hero h1 { margin: 0; }
.wordmark { display: block; width: 100%; height: auto; fill: var(--ink); }

.lede {
  margin: 32px 0 0;
  max-width: 13em;
  font-size: clamp(28px, 3.3vw, 40px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.caption { margin-top: auto; padding-top: 32px; max-width: 26em; }

.demo { grid-column: 7 / -1; justify-self: end; width: 100%; display: flex; justify-content: flex-end; }
.stage { position: relative; flex: none; padding: 10px; }

@media (max-width: 860px) {
  .number .line, .number .note, .looks .line, .looks .head { grid-column: 1 / -1; }
  .hero-text, .demo { grid-column: 1 / -1; }
  .demo { justify-content: flex-start; }
  .caption { margin-top: 24px; padding-top: 0; }
}

@media (max-width: 500px), (max-height: 500px) and (pointer: coarse) {
  .hero { row-gap: 32px; }
  .demo { justify-self: stretch; margin: 0 calc(-1 * var(--margin)); width: auto; height: min(760px, 100svh); border-block: 1px solid var(--rule); }
  .stage { width: 100%; height: 100%; padding: 0; }
}

/* Sections share a rule on top and the same rhythm. */

main > section + section { border-top: 1px solid var(--rule); }
main > section:not(.hero) { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }

/* 2. The number: one figure as big as the page allows, the run under it. */

.number { row-gap: 24px; }
.number .big { grid-column: 1 / -1; font-size: clamp(36px, 5.2vw, 64px); letter-spacing: -0.03em; }
.number .figure {
  display: block;
  font-size: clamp(120px, 24vw, 300px);
  line-height: 0.84;
  letter-spacing: -0.055em;
  margin: 0 0 0.12em -0.04em;
  font-variant-numeric: tabular-nums;
}
.number .rest { display: block; max-width: 14em; }
.number .line { grid-column: 1 / 7; color: var(--ink-2); }
.chart { grid-column: 1 / -1; margin-top: 40px; }
.number .note { grid-column: 1 / 7; }

.chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--display); }
.chart .grid-line { stroke: var(--rule); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--ink-2); font-size: 12px; font-weight: 500; }
.chart .series { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .ours { stroke: var(--red); }
.chart .theirs { stroke: var(--ink-2); }
.chart .dot-ours { fill: var(--red); }
.chart .dot-theirs { fill: var(--ink-2); }
.chart .end { font-size: 14px; font-weight: 700; }
.chart .end-ours { fill: var(--ink); }
.chart .end-theirs { fill: var(--ink-2); font-weight: 500; }
.chart .draw { stroke-dasharray: var(--length); stroke-dashoffset: var(--length); transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.chart.seen .draw { stroke-dashoffset: 0; }
.chart .fade { opacity: 0; transition: opacity 0.4s 1s; }
.chart.seen .fade { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .chart .draw, .chart .fade { transition: none; }
}

/* 3. Your aim: the words in a narrow column, two screens beside them. */

.aim { row-gap: 40px; }
.aim-text { grid-column: 1 / 5; position: sticky; top: 32px; display: grid; gap: 20px; }
.aim .head { font-size: clamp(40px, 5vw, 72px); }
.aim .heat { grid-column: 5 / 9; }
.aim .aimview { grid-column: 9 / -1; margin-top: 96px; }

.phone img, .duo img {
  border-radius: 28px;
  box-shadow: 0 0 0 1px var(--edge);
}

.phone figcaption, .duo figcaption, .step figcaption { margin-top: 12px; font-weight: 500; color: var(--ink); }

@media (max-width: 860px) {
  .aim-text { grid-column: 1 / -1; position: static; }
  .aim .heat { grid-column: 1 / 7; }
  .aim .aimview { grid-column: 7 / -1; margin-top: 48px; }
}

/* 4. Voice: the headline across, then the bar as it listens and the text it typed, in order. */

.voice { row-gap: 24px; }
.voice .head { grid-column: 1 / 10; }
.voice .line { grid-column: 1 / 7; }
.voice .step { margin-top: 32px; }
.voice .listening { grid-column: 1 / 7; }
.voice .typed { grid-column: 7 / -1; }
.voice .credit { grid-column: 1 / -1; }
.step img { border-radius: 22px; box-shadow: 0 0 0 1px var(--edge); }
.live { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--red); vertical-align: 1px; }

@media (max-width: 860px) {
  .voice .head, .voice .line { grid-column: 1 / -1; }
  .voice .listening, .voice .typed { grid-column: 1 / -1; }
  .voice .typed { margin-top: 8px; }
}

/* 5. Sources: the request and the answer, then what the keyboard does with it. */

.sources { row-gap: 24px; }
.sources .head { grid-column: 1 / 9; }
.sources .line { grid-column: 1 / 7; }
.exchange { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; margin-top: 32px; }
.exchange .code { grid-column: 1 / 7; display: grid; gap: 12px; min-width: 0; }
.exchange pre {
  margin: 0 0 16px;
  padding: 20px 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--edge);
  font-size: 13px;
  line-height: 1.55;
}
.exchange .label { font-weight: 500; color: var(--ink); }
.exchange .hint { grid-column: 7 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.hint img { border-radius: 22px; box-shadow: 0 0 0 1px var(--edge); }
.sources .note { grid-column: 1 / -1; }

@media (max-width: 860px) {
  .sources .head, .sources .line { grid-column: 1 / -1; }
  .exchange { grid-template-columns: minmax(0, 1fr); }
  .exchange .code, .exchange .hint { grid-column: 1 / -1; }
}

/* 6. Looks: five themes on one row, then the Duo's screens on one baseline. */

.looks { row-gap: 24px; }
.looks .head { grid-column: 1 / 11; }
.looks .line { grid-column: 1 / 7; }
.themes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gutter);
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.themes img { border-radius: 16px; box-shadow: 0 0 0 1px var(--edge); }
.themes span { display: block; margin-top: 12px; font-size: 14px; font-weight: 500; }

.duo { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: end; margin-top: 48px; }
.duo .cover { grid-column: 1 / 4; }
.duo .open { grid-column: 4 / -1; }
.looks .credit { grid-column: 1 / -1; }

@media (max-width: 860px) {
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duo { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .duo .cover { grid-column: 1 / 5; }
  .duo .open { grid-column: 5 / -1; }
}

/* Footer: the wordmark flush left on the bottom margin. */

.foot { border-top: 1px solid var(--rule); padding-top: 48px; padding-bottom: var(--margin); row-gap: 24px; }
.foot .line { grid-column: 1 / 7; }
.foot .links { grid-column: 7 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; font-size: 14px; font-weight: 500; }
.foot .wordmark { grid-column: 1 / -1; margin-top: clamp(48px, 10vw, 128px); }

@media (max-width: 860px) {
  .foot .line, .foot .links { grid-column: 1 / -1; justify-content: flex-start; }
}
