/* unisonreader.com — one stylesheet for every page.
   The palette is sampled from the shipped app icon (website/PRODUCT.md):
   the page descends through the icon's own gradient, emerald at the top,
   near-black green at the foot, with the icon's cream for type.
   The faces are the app's: Iowan Old Style is the reader's default chapter
   face (ChapterTypography.defaults) and ships on every Apple device; the
   interface face is the system's, as in the app. Nothing is downloaded. */

:root {
  --deep: #061d12;
  --abyss: #03140c;
  --cream: #f8eed6;
  --cream-2: rgb(248 238 214 / 0.78);
  --cream-3: rgb(248 238 214 / 0.6);
  --hair: rgb(248 238 214 / 0.16);
  --screen: #1c1b1a;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --gutter: clamp(1rem, 6.4vw, 6.2rem);
  --measure: 34rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--deep);
  /* Sampled from the approved comp at x=30: #085f3e at 300px, #034229 at
     600px, #012e1e at 880px, #002318 below the fold. */
  background-image: linear-gradient(in oklch 180deg, #0e7851 0, #085f3e 18.75rem, #034229 37.5rem, #012e1e 55rem, #002318 64rem, var(--abyss) 100%);
  color: var(--cream);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--cream); color: var(--deep); }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 0.06em; text-underline-offset: 0.2em; text-decoration-color: var(--cream-3); }
a:hover { text-decoration-color: var(--cream); }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--gutter); top: 0.75rem; background: var(--cream); color: var(--deep); padding: 0.5rem 0.9rem; border-radius: 6px; z-index: 10; }

.wrap { width: min(100% - 2 * var(--gutter), 84rem); margin-inline: auto; }

/* ── header ─────────────────────────────────────────────────────── */

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.1rem;
}
.lockup { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.lockup img { width: 2.4rem; height: 2.4rem; border-radius: 22.5%; box-shadow: 0 2px 6px rgb(0 0 0 / 0.28); }
.lockup span { font: 500 1.45rem/1 var(--serif); letter-spacing: -0.005em; }
.top nav { display: flex; align-items: center; gap: clamp(0.9rem, 2.5vw, 2.2rem); font-size: 0.98rem; }
.top nav a { text-decoration: none; color: var(--cream); }
.top nav a:hover { color: var(--cream); }
@media (max-width: 46rem) {
  .top nav { display: none; }
  .lockup span { font-size: 1.25rem; }
}

/* ── type ───────────────────────────────────────────────────────── */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.7rem, 4.6vw, 4.6rem); line-height: 1.0; letter-spacing: -0.024em; }
h1 .keep { white-space: nowrap; }
h2 { font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.06; letter-spacing: -0.018em; }
h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
.lede { font: 400 clamp(1.15rem, 1.7vw, 1.35rem)/1.5 var(--serif); color: var(--cream-2); max-width: var(--measure); }

/* ── the badge ──────────────────────────────────────────────────── */

.get { display: grid; justify-items: start; gap: 0.9rem; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.badge img { width: 11.5rem; height: auto; }
.badge:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(0 0 0 / 0.3); }
.fine { font-size: 0.92rem; color: var(--cream-2); }

/* ── hero: the switch ───────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
  grid-template-areas: "title pair" "lede pair" "get pair";
  grid-template-rows: 1fr auto 1fr;
  column-gap: clamp(2rem, 4vw, 4rem);
  row-gap: 1.6rem;
  padding-block: 0.6rem clamp(2.5rem, 6vh, 4rem);
}
.hero h1 { grid-area: title; align-self: end; }
.hero .lede { grid-area: lede; }
.hero .get { grid-area: get; align-self: start; }
.hero .pair { grid-area: pair; }
/* On a phone the switch comes straight after the headline, so Listen, the
   thread and the lit word all land in the first screen. */
@media (max-width: 60rem) {
  .hero { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "title" "pair" "lede" "get"; row-gap: 1.4rem; padding-top: 0.4rem; }
  .hero h1 { font-size: clamp(2.3rem, 9vw, 3.4rem); }
}

/* Two real screens and the one line between them. The pair's geometry is
   fixed (each screen 44.5% of the pair, an 11% gutter), so the thread's ends
   are percentages: the Listen button on the reading screen, the word being
   spoken on the listening one. */
.pair {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 11%;
  width: 100%; max-width: 52rem; margin-inline: auto; align-self: center;
}
.screen { margin: 0; display: grid; gap: 0.7rem; justify-items: center; }
.screen figcaption {
  font: 600 0.74rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-2);
}
.screen img {
  width: 100%;
  border-radius: 9% / 4.2%;
  outline: 1px solid rgb(248 238 214 / 0.14);
  outline-offset: -1px;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.55), 0 4px 10px rgb(0 0 0 / 0.25);
  background: var(--screen);
}
/* Spans the screens only, below their captions, so every end is a
   percentage of the screens themselves. */
.overlay { position: absolute; left: 0; right: 0; top: 1.44rem; bottom: 0; pointer-events: none; }
.thread { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.thread path {
  fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.dot {
  position: absolute; width: 0.5rem; height: 0.5rem; margin: -0.25rem 0 0 -0.25rem;
  border-radius: 50%; background: var(--cream);
  box-shadow: 0 0 0 3px rgb(248 238 214 / 0.18);
}
/* Plain cream text in the gutter, touching neither screen. */
.same {
  position: absolute; transform: translate(-50%, -50%); width: 9%;
  font: 500 clamp(0.62rem, 1vw, 0.8rem)/1.2 var(--sans); color: var(--cream); text-align: center;
}

/* The one authored moment: the thread wipes in from Listen towards the word.
   Everything is visible by default; only the wipe is motion, so a renderer
   that never runs the animation still shows the whole thread. */
@media (prefers-reduced-motion: no-preference) {
  .thread { animation: draw 1.4s var(--ease-out) 0.4s both; }
  .dot--to { animation: land 0.7s var(--ease-out) 1.5s both; }
  @keyframes draw { from { clip-path: inset(0 72% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes land { from { box-shadow: 0 0 0 0 rgb(248 238 214 / 0.5); } to { box-shadow: 0 0 0 3px rgb(248 238 214 / 0.18); } }
}

/* ── sections ───────────────────────────────────────────────────── */

section { padding-block: clamp(4rem, 11vh, 8rem); }
.rule { border: 0; border-top: 1px solid var(--hair); margin: 0; }
.head { display: grid; gap: 1.1rem; max-width: 46rem; margin-bottom: clamp(2.5rem, 6vh, 4rem); }
#how { padding-top: clamp(1.6rem, 4vh, 3rem); }
#how .head { justify-items: center; text-align: center; margin-inline: auto; max-width: 52rem; }
#how .head .lede { margin-inline: auto; }

/* How it works: four moments on one continuous thread — the reader's place,
   never broken. */
.moments { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: clamp(2.8rem, 7vh, 4.5rem); }
.moments::before {
  content: ""; position: absolute; left: 0.45rem; top: 0.6rem; bottom: 0.6rem; width: 1px; background: var(--hair);
}
.moment { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-left: 2.4rem; }
.moment::before {
  content: ""; position: absolute; left: 0; top: 0.55rem; width: 0.9rem; height: 0.9rem; border-radius: 50%;
  background: var(--deep); border: 1px solid var(--cream);
}
.moment.is-now::before { background: var(--cream); box-shadow: 0 0 0 5px rgb(248 238 214 / 0.16); }
.moment-copy { display: grid; gap: 0.8rem; align-self: start; }
.moment-copy p, .half p, .statement p, .faq details > div, .library li span { font: 400 1.16rem/1.55 var(--serif); }
.moment-copy p { color: var(--cream-2); max-width: var(--measure); }
.moment:not(:has(.moment-art)) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 52rem) {
  .moment { grid-template-columns: 1fr; }
}

/* A close-up of a real screen: the ink stopping mid-word. */
.closeup {
  margin: 0; overflow: hidden; border-radius: 18px; aspect-ratio: 16 / 9;
  outline: 1px solid var(--hair); outline-offset: -1px; background: var(--screen);
  box-shadow: 0 14px 34px -14px rgb(0 0 0 / 0.6);
}
.closeup img { width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%); }
.closeup--ink img { object-position: 50% 31%; }
/* The same crop as Tap Listen, in reading mode: the sentence the voice
   stopped on, back in full ink. */
.closeup--read img { object-position: 50% 31%; }

.files { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.file {
  display: inline-flex; align-items: baseline; gap: 0.5rem;
  padding: 0.75rem 1rem; border-radius: 12px; background: rgb(3 20 12 / 0.45); border: 1px solid var(--hair);
  font-size: 0.92rem;
}
.file b { font: 600 0.72rem/1 var(--sans); letter-spacing: 0.1em; color: var(--deep); background: var(--cream); padding: 0.28rem 0.4rem; border-radius: 4px; }

/* Only have one of them: two columns, each its own small claim. */
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); }
.half { display: grid; gap: 0.8rem; align-content: start; padding-top: 1.4rem; border-top: 1px solid var(--cream); }
.half p { color: var(--cream-2); max-width: var(--measure); }
@media (max-width: 46rem) { .halves { grid-template-columns: 1fr; } }

/* Library: copy beside the real catalog screen. */
.library { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.library ul { margin: 1.6rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; max-width: var(--measure); }
.library li { display: grid; gap: 0.2rem; }
.library li strong { font: 600 1.15rem/1.3 var(--serif); }
.library li span { color: var(--cream-2); }
.library .screen { max-width: 19rem; justify-self: center; }
@media (max-width: 52rem) { .library { grid-template-columns: 1fr; } }

/* Privacy: one large statement. */
.statement { display: grid; gap: 1.4rem; justify-items: center; text-align: center; max-width: 54rem; margin-inline: auto; }
.statement h2 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
.statement p { color: var(--cream-2); max-width: 40rem; }

/* Pricing: a ledger, read top to bottom like a receipt. */
.ledger { margin: 0; display: grid; max-width: 44rem; border-top: 1px solid var(--cream); }
.ledger div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.ledger dt { color: var(--cream-2); }
.ledger dd { margin: 0; font: 600 1.35rem/1.2 var(--serif); font-variant-numeric: lining-nums tabular-nums; text-align: right; }
.ledger .total dd { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

/* FAQ: native disclosure, no script. */
.faq { max-width: 50rem; border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font: 600 1.2rem/1.35 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 50%; width: 0.6rem; height: 0.6rem;
  border-right: 1.5px solid var(--cream-2); border-bottom: 1.5px solid var(--cream-2);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 0 1.4rem; color: var(--cream-2); max-width: var(--measure); display: grid; gap: 0.8rem; }

/* Close: the icon at the size it lives at on a home screen, twice over. */
.close { display: grid; justify-items: center; text-align: center; gap: 1.4rem; padding-block: clamp(5rem, 14vh, 9rem); }
.close img.mark { width: 7.5rem; height: 7.5rem; border-radius: 22.5%; box-shadow: 0 14px 34px -10px rgb(0 0 0 / 0.6); }
.close .lede { margin-inline: auto; }

/* ── footer ─────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--hair); padding-block: 2rem 2.6rem; font-size: 0.92rem; color: var(--cream-2); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--cream); }

/* ── prose pages: news, support, privacy, 404 ───────────────────── */

.page { padding-block: clamp(2.5rem, 8vh, 5rem) clamp(4rem, 12vh, 7rem); }
.prose { max-width: 40rem; display: grid; gap: 1.2rem; }
.prose h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.4rem; }
.prose p, .prose li { color: var(--cream-2); font: 400 1.18rem/1.65 var(--serif); }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; }
.prose .meta { font: 400 0.92rem/1.4 var(--sans); color: var(--cream); }
.prose strong { color: var(--cream); }
.prose figure { margin: 1rem 0; }
.prose figure img { border-radius: 18px; outline: 1px solid var(--hair); outline-offset: -1px; }
.prose figcaption { font-size: 0.92rem; color: var(--cream-3); margin-top: 0.6rem; }
.posts { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--hair); max-width: 46rem; }
.posts li a { display: grid; gap: 0.4rem; padding: 1.5rem 0; border-bottom: 1px solid var(--hair); text-decoration: none; }
.posts li a strong { font: 600 1.55rem/1.2 var(--serif); }
.posts li a span { color: var(--cream-2); }
.posts li a:hover strong { text-decoration: underline; text-decoration-color: var(--cream-3); text-underline-offset: 0.2em; }

/* Pricing and FAQ: the heading holds the left column, the content the right. */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.split .head { margin-bottom: 0; position: sticky; top: 2rem; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } .split .head { position: static; } }

/* A phone's gutter is too narrow for the words; the thread says it alone. */
@media (max-width: 40rem) {
  .same { display: none; }
  /* Below the spoken line, small enough to leave the word legible. */
  .dot--to { width: 0.3rem; height: 0.3rem; margin: 0.2rem 0 0 -0.15rem; box-shadow: none; }
}
