/* wordblip guide pages: shared styles (rsvp-reader-app, epub-speed-reading-app, reading-focus-app, index Guides row).
   Tokens mirror constants/theme.ts and index.html. Dark only. */
:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --panel: #111114;
  --panel2: #1b1b1e;
  --text: #ffffff;
  --muted: #b9b9c2;
  --subtle: #9a9aa4;
  --link: #4aa3ff;
  --accent: #ffd60a;
  --on-accent: #111114;
  --pivot: #e54848;
  --border: #232329;
  --border2: #2a2a2f;
  --radius-card: 20px;
  --radius-md: 12px;
  --gutter: 20px;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@font-face {
  font-family: "Plex Mono";
  src: url("./plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Skip link: first tab stop, visible only on focus */
.skip {
  position: absolute;
  left: 12px;
  top: 0;
  transform: translateY(-120%);
  padding: 10px 14px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  z-index: 2;
}
.skip:focus { transform: translateY(12px); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Top bar ---------- */
.topbar .wrap {
  display: flex;
  align-items: center;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
  border-radius: 10px;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }

/* ---------- Type ---------- */
h1 {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.4px;
  font-weight: 800;
  text-wrap: balance;
}
h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.3px;
  font-weight: 800;
  text-wrap: balance;
}
h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
}
p { margin: 0 0 16px; color: var(--muted); max-width: 40em; }
p strong, li strong { color: var(--text); font-weight: 700; }
main a:not(.store):not(.related-card) {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
main a:not(.store):not(.related-card):hover { text-decoration-thickness: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 24px 0 8px; }
.hero-grid { display: grid; gap: 8px; }
.lede { font-size: 1em; }
.hero .shot { margin: 16px auto 0; }

/* Apple badge: official artwork, 48px tall at every size, >= 12px clear space (index.html rule) */
.store {
  display: inline-block;
  margin: 4px 0 0;
  padding: 12px 0;
  line-height: 0;
  border-radius: 9px;
}
.store img { display: block; width: 144px; height: 48px; }
.store:focus-visible { outline-offset: -4px; }

/* EPUB page: calm, visible Pro callout (panel + accent left border) */
.callout {
  margin: 4px 0 12px;
  padding: 14px 16px 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  max-width: 40em;
}
.callout p { margin: 0; }

/* ---------- Screenshots ---------- */
.shot {
  margin: 28px auto;
  width: 100%;
  max-width: 300px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 28px;
  padding: 6px;
}
.shot picture, .shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}
/* image fail: alt text shows in place, readable, on the dark frame */
.shot img { color: var(--subtle); font-size: 15px; line-height: 1.4; background: var(--panel); }
.shot--sm { max-width: 260px; }

/* ---------- Sections ---------- */
.section { padding: 40px 0 8px; border-top: 1px solid var(--border); margin-top: 32px; }
.section:first-of-type { border-top: 0; }

ul, ol { margin: 0 0 16px; padding: 0; max-width: 40em; }
ul { list-style: none; }
ul li { position: relative; padding-left: 22px; margin: 0 0 10px; color: var(--muted); }
ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--subtle);
}

/* Numbered steps: large mono numerals, one column */
ol.steps { list-style: none; counter-reset: step; }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 2px 0 0 52px;
  margin: 0 0 18px;
  color: var(--muted);
  min-height: 40px;
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: 10px;
}
/* The reading-focus routine is the centrepiece: a bit more air, one line per step */
ol.steps--feature li { padding-top: 4px; margin-bottom: 22px; }
ol.steps--feature li::before { width: 40px; height: 40px; font-size: 22px; color: var(--accent); }
ol.steps--feature { padding-left: 0; }

/* Deliberately low-key list ("without an app" tips) */
.quiet ul li { color: var(--muted); }
.quiet ul li strong { font-weight: 600; color: #dcdce2; }
.quiet h2 { font-size: 22px; }
/* closing line after the routine: no streak, nothing resets */
.coda { margin-top: 4px; padding-left: 52px; color: var(--subtle); font-size: 16px; }

/* ---------- Free and Pro ---------- */
.plans { display: grid; gap: 12px; margin: 8px 0 20px; }
.plan {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 20px 6px;
}
.plan-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 17px; }
.plan ul { margin-bottom: 12px; }
.plan p { font-size: 16px; }
.pill {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.2px;
}
.pill--free { background: var(--panel2); color: var(--text); border: 1px solid var(--border2); padding: 0 8px; }
.invite {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 20px 8px;
}

/* ---------- CTA ---------- */
.cta {
  margin: 28px 0 0;
  padding: 22px 20px 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-align: center;
}
.cta p { margin: 0 auto 2px; color: var(--text); font-weight: 700; font-size: 19px; line-height: 1.35; }

/* ---------- FAQ (open by default) ---------- */
.faq-item { padding: 18px 0 4px; border-top: 1px solid var(--border); }
.faq-item:first-of-type { border-top: 0; padding-top: 4px; }
.faq-item p { margin-bottom: 14px; }

/* ---------- Related / Guides ---------- */
.related { padding: 40px 0 8px; margin-top: 32px; border-top: 1px solid var(--border); }
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--subtle);
}
.related-grid { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; max-width: none; }
.related-grid li { padding: 0; margin: 0; }
.related-grid li::before { display: none; }
.related-card {
  display: block;
  height: 100%;
  min-height: 44px;
  padding: 18px 44px 18px 20px;
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--text);
  text-decoration: none;
}
.related-card:hover { border-color: #3a3a42; }
.related-card .t { display: block; font-weight: 700; line-height: 1.35; margin-bottom: 4px; }
.related-card .d { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; }
.related-card .go {
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 17px;
}

/* ---------- Live one-word demo (page 1) ---------- */
.demo {
  margin: 8px 0 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 14px 12px;
}
.demo-stage {
  position: relative;
  height: 128px;
  background: var(--bg);
  border-radius: 14px;
  overflow: hidden;
}
.demo-stage::before, .demo-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: var(--border2);
}
.demo-stage::before { top: 14px; }
.demo-stage::after { bottom: 14px; }
.word {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  white-space: nowrap;
}
.word .b { position: absolute; right: 100%; text-align: right; }
.word .p { color: var(--pivot); }
.word .a { position: absolute; left: 100%; }
.demo-bar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.demo-note { margin: 0; font-size: 15px; color: var(--subtle); }
.btn {
  min-height: 44px;
  min-width: 88px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border2);
  background: var(--panel2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.btn:hover { border-color: #3a3a42; }
.btn[hidden] { display: none; }

/* ---------- Footer ---------- */
footer { margin-top: 48px; border-top: 1px solid var(--border); }
footer .wrap { padding-top: 24px; padding-bottom: 56px; color: var(--subtle); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; column-gap: 20px; margin-bottom: 4px; }
footer nav a {
  display: inline-block;
  padding: 11px 0;
  color: var(--text);
  text-decoration: none;
  line-height: 22px;
}
footer nav a:hover { text-decoration: underline; }
footer nav a[aria-current="page"] { color: var(--subtle); }
.foot-label { margin: 12px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--subtle); }
.legal { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--subtle); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Desktop ---------- */
@media (min-width: 640px) {
  .plans { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .related-grid--3 { grid-template-columns: 1fr; }
}
@media (min-width: 880px) {
  .quiet h2 { font-size: 24px; }
  :root { --gutter: 24px; }
  .topbar .wrap { min-height: 76px; }
  .hero { padding-top: 40px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
  .hero .shot { margin: 4px 0 0; max-width: 280px; }
  h1 { font-size: 40px; letter-spacing: -0.6px; }
  h2 { font-size: 28px; }
  .section, .related { padding-top: 48px; margin-top: 40px; }
  .section .shot { margin: 32px 0; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; }
  .split .shot { margin-top: 4px; }
  .related-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Unexpected direction B: "One spot" (opt-in: <body class="dir-b">) ---------- */
.dir-b h2 { font-family: var(--mono); font-weight: 500; letter-spacing: -0.5px; font-size: 23px; }
.dir-b h2 .p { color: var(--pivot); }
/* every heading's focus letter lands on one axis (4.5ch in), marked by the reader's tick */
.dir-b h2 { position: relative; padding-top: 24px; }
.dir-b h2::before { content: ""; position: absolute; top: 0; left: 4.5ch; width: 2px; height: 14px; margin-left: -1px; background: var(--border2); }
.dir-b .hero-b .demo { margin: 4px 0 24px; padding: 0; border: 0; background: none; }
.dir-b .hero-b .demo-stage { height: 220px; border: 1px solid var(--border); border-radius: 24px; background: var(--panel); }
.dir-b .hero-b .word { font-size: 54px; }
.dir-b .hero-b .demo-bar { padding: 12px 2px 0; }

/* ---------- Hero visual (phone scene) ---------- */
/* The scene carries its own phone, so the hero drops the screenshot frame. */
.shot--hero { max-width: 340px; padding: 0; border: 0; border-radius: 0; background: none; }
.shot--hero picture, .shot--hero img { border-radius: 0; }
@media (min-width: 880px) {
  .hero .shot--hero { max-width: 280px; }
}
