/* Vokel — Paper transcript. Tokens, type scale and components: site/DESIGN.md */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #F1ECE1;
  --ink: #17150F;
  --mute: #6F6A5E;
  --line: rgba(23, 21, 15, 0.18);
  --gold: #F5C542;
  --w: min(100vw, 1680px);
  --pad: clamp(20px, 4vw, 48px);
  --gutter: 112px;
  --gap: min(72px, 5vw);
  --figure: min(328px, 24vw);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  max-width: 1680px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  font: 17px/1.5 "Helvetica Neue", Inter, Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
img { display: block; width: 100%; height: auto; }
mark { white-space: nowrap; background: var(--gold); color: inherit; padding: 0 0.14em; margin: 0 -0.06em; border-radius: 0.08em; }
time, .tc { font-size: 14px; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
h1, h2 { font-weight: 700; letter-spacing: -0.045em; line-height: 1; text-wrap: balance; }
p { text-wrap: pretty; }
.link { padding: 12px 0; font-weight: 700; text-decoration: underline 2px var(--gold); text-underline-offset: 6px; }

/* Nav */
.nav {
  height: 64px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { align-self: stretch; display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.brand img { width: 26px; height: 26px; border-radius: 6px; }
.nav nav { display: flex; gap: 32px; font-size: 15px; }
.nav nav a { padding: 12px 0; color: var(--mute); }
.nav nav a:hover, .nav nav .link { color: var(--ink); }
.nav nav .link { padding: 11px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); text-decoration: none; }
.nav nav .link:hover { color: var(--paper); opacity: 0.85; }

/* Caption cues: the h1 */
.hero { padding: 44px var(--pad) 0; }
.hero.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--figure);
  column-gap: var(--gap);
  align-items: start;
}
.crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--mute); }
.crumbs a { padding: 12px 6px; margin: -12px -6px; }
.cues { display: grid; }
.cue {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  align-items: start;
  padding: 22px 0 26px;
  border-bottom: 1px solid var(--line);
  /* 5.5vw, held to one line beside the phone: the longest cue is 10.3em in Inter */
  font-size: min(calc(var(--w) * 0.055), calc((var(--w) - 2 * var(--pad) - var(--gutter) - var(--gap) - var(--figure)) / 10.5));
  letter-spacing: -0.019em;
}
.cue > span { white-space: nowrap; }
.cue time, .tc { padding-top: 0.9em; line-height: 1; }
.page .cue { font-size: clamp(40px, 4.4vw, 68px); }
.after { margin: 36px 0 0 var(--gutter); }
.after p { font-size: 20px; line-height: 1.42; max-width: 31em; color: var(--mute); }
.after .store { margin-top: 26px; }
.after small { display: block; margin-top: 14px; font-size: 14px; color: var(--mute); }

/* Phone frame */
.phone { border-radius: 50px; padding: 9px; background: var(--ink); }
.phone img { border-radius: 41px; aspect-ratio: 1320 / 2868; }

/* Front / Behind: two real exports of the same moment, one shown at a time */
.duo { position: relative; display: grid; border-radius: 14px; overflow: hidden; background: var(--ink); }
.duo img { grid-area: 1 / 1; aspect-ratio: 9 / 16; transition: opacity 0.2s ease; }
.duo[data-mode="behind"] .front, .duo[data-mode="front"] .behind { opacity: 0; }
.duo .switch {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; padding: 4px; border-radius: 999px;
  background: rgb(23 21 15 / 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.duo button {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 15px/1 inherit; color: rgb(255 255 255 / 0.86); background: none; white-space: nowrap;
}
.duo button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.duo button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* App Store button */
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 24px 0 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.store svg { width: 30px; height: 30px; fill: currentColor; flex: none; margin-top: -3px; }
.store small { display: block; margin: 0; font-size: 11px; font-weight: 500; letter-spacing: 0; color: inherit; }

/* Blocks: a section opened by a cue */
.block { margin-top: 88px; padding: 0 var(--pad); scroll-margin-top: 24px; }
.block-head {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  align-items: start;
  padding: 22px 0 0;
  border-top: 1px solid var(--ink);
}
.block-head time, .tc { padding-top: 16px; line-height: 1; }
.block-head h2 { font-size: clamp(40px, 4.4vw, 68px); }
.block-head p { margin-top: 18px; font-size: 20px; line-height: 1.42; color: var(--mute); max-width: 31em; }
.block-body { margin: 44px 0 0 var(--gutter); }

/* Figures: frames of the app's exports */
.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; row-gap: 28px; }
.figs img { aspect-ratio: 800 / 870; border-radius: 4px; }
.figs figcaption {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.figs figcaption span { font-size: 14px; font-weight: 500; color: var(--mute); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* Rows: label left, statement right */

.spec .store { margin-top: 36px; }
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.row > :first-child { font-size: 15px; color: var(--mute); padding-top: 5px; }
.row > :last-child { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; text-wrap: balance; }
.row small { display: block; margin-top: 6px; font-size: 17px; font-weight: 400; letter-spacing: 0; line-height: 1.5; color: var(--mute); max-width: 36em; text-wrap: pretty; }
a.row:hover b { text-decoration: underline 2px var(--gold); text-underline-offset: 6px; }
a.row b::after { content: "\00a0→"; color: var(--mute); font-weight: 400; }

/* Notes: the sections of an article page */
.notes { margin-top: 44px; border-top: 1px solid var(--line); }
.note {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  align-items: start;
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
}
.note time, .tc { padding-top: 9px; line-height: 1; }
.note h2 { font-size: 28px; letter-spacing: -0.03em; line-height: 1.15; }
.note p { margin-top: 10px; max-width: 36em; }
/* Without a phone beside it, a note runs across the sheet: time, heading, line */
.hero:not(.split) .note > div { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--gap); }
.hero:not(.split) .note p { margin-top: 4px; }
.note p a { display: inline-block; padding: 12px 0; margin: -12px 0; text-decoration: underline 2px var(--gold); text-underline-offset: 4px; }
.cta { margin: 36px 0 0 var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }

footer {
  margin-top: 96px;
  padding: 14px var(--pad);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  font-size: 14px;
  color: var(--mute);
}
footer nav { display: flex; gap: 24px; }
footer a { display: inline-block; padding: 12px 0; }
footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  :root { --gutter: 0px; }
  .hero { padding-top: 12px; }
  .hero.split { grid-template-columns: minmax(0, 1fr); }
  .crumbs { padding-top: 14px; }
  .cue, .page .cue { grid-template-columns: minmax(0, 1fr); padding: 14px 0 18px; font-size: min(10.5vw, 64px); line-height: 1.18; letter-spacing: -0.037em; }
  .cue > span { white-space: normal; }
  .cue time, .tc { padding: 0 0 8px; }
  .after { margin-top: 24px; }
  .after p { font-size: 18px; }
  .after .store { margin-top: 22px; }
  .phone { width: min(76%, 328px); margin: 44px auto 0; border-radius: 46px; padding: 8px; }
  .phone img { border-radius: 38px; }
  .duo { margin-top: 36px; }
  .duo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; }
  .block { margin-top: 64px; }
  .block-head { grid-template-columns: minmax(0, 1fr); }
  .block-head time, .tc { padding: 0 0 10px; }
  .block-head h2 { font-size: min(10.4vw, 56px); line-height: 1.18; }
  .block-head p { font-size: 18px; }
  .block-body { margin-top: 32px; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 16px 0; }
  .row > :first-child { padding-top: 0; }
  .row > :last-child { font-size: 22px; }
  .notes { margin-top: 32px; }
  .note { grid-template-columns: minmax(0, 1fr); padding: 18px 0 22px; }
  .note time, .tc { padding: 0 0 8px; }
  .hero:not(.split) .note > div { display: block; }
  .hero:not(.split) .note p { margin-top: 10px; }
  .note h2 { font-size: 24px; }
  footer { margin-top: 64px; }
}

@media (max-width: 600px) {
  .nav { height: 56px; }
  .nav nav a:not(.link) { display: none; }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 22px; }
  footer { flex-direction: column; align-items: flex-start; padding: 20px var(--pad); }
}
