/* ============================================================
   Flash Reader — landing page
   Type: Newsreader (serif, upright), Geist (UI), JetBrains Mono (labels)
   Themes: Slate (dark, primary) · Lab (light)
   Accent: cobalt #2746D6 — the only color
   Fonts are self-hosted (same TTFs the iOS app bundles) — no
   third-party requests; the page practices the privacy it sells.
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg:          #000000;
  --surface-1:   #0E0E10;
  --surface-2:   #16161A;
  --text:        #F5F5F7;
  --text-dim:    rgba(245, 245, 247, 0.56);
  --text-faint:  rgba(245, 245, 247, 0.30);
  --hair:        rgba(255, 255, 255, 0.09);
  --hair-strong: rgba(255, 255, 255, 0.18);
  --accent:      #2746D6;
  --accent-text: #6E83F0;            /* cobalt lifted for legibility on black */
  --accent-soft: rgba(39, 70, 214, 0.16);
  --blur-fade:   rgba(245, 245, 247, 0.22);

  --maxw: 1080px;
  --gutter: clamp(20px, 5vw, 56px);

  --ff-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --ff-ui:    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ff-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="lab"] {
  --bg:          #F4F1E9;          /* paper-warm */
  --surface-1:   #ECE7DB;
  --surface-2:   #E3DCCC;
  --text:        #1B1A16;
  --text-dim:    rgba(27, 26, 22, 0.58);
  --text-faint:  rgba(27, 26, 22, 0.34);
  --hair:        rgba(27, 26, 22, 0.12);
  --hair-strong: rgba(27, 26, 22, 0.22);
  --accent:      #2746D6;
  --accent-text: #2746D6;
  --accent-soft: rgba(39, 70, 214, 0.10);
  --blur-fade:   rgba(27, 26, 22, 0.28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 240ms ease, color 240ms ease;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }

/* ---- shared layout ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.kicker {
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}
.kicker .dot { color: var(--accent-text); }

.serif { font-family: var(--ff-serif); font-weight: 400; }

section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 150px); }
.rule { height: 1px; background: var(--hair); border: 0; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hair);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--ff-serif);
  font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
}
/* App mark: a word sliding in, two ghosts fading behind (matches the iOS icon) */
.wordmark .glyph {
  width: 28px; height: 8px; flex: none;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 12"><rect x="0" y="0" width="15" height="12" rx="6" fill="%231B2566"/><rect x="19" y="0" width="23" height="12" rx="6" fill="%232335A0"/><rect x="46" y="0" width="30" height="12" rx="6" fill="%232D4BDC"/></svg>') no-repeat center / contain;
}
[data-theme="lab"] .wordmark .glyph {
  /* on paper the ghosts read as lighter cobalt, not navy */
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 12"><rect x="0" y="0" width="15" height="12" rx="6" fill="%232746D6" fill-opacity="0.25"/><rect x="19" y="0" width="23" height="12" rx="6" fill="%232746D6" fill-opacity="0.55"/><rect x="46" y="0" width="30" height="12" rx="6" fill="%232746D6"/></svg>') no-repeat center / contain;
}

.theme-toggle {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--hair); border-radius: 999px;
  padding: 3px; background: var(--surface-1);
}
.theme-toggle button {
  font-family: var(--ff-mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-faint);
  background: transparent; border: 0; cursor: pointer;
  padding: 5px 11px; border-radius: 999px;
  transition: color 200ms ease, background 200ms ease;
}
.theme-toggle button[aria-pressed="true"] {
  color: var(--text); background: var(--surface-2);
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(64px, 9vw, 120px); }
.hero .wrap { text-align: center; }

.hero-tagline {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(34px, 6.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin-top: 26px;
  text-wrap: balance;
}
.hero-tagline em { font-style: normal; color: var(--text); }
.hero-sub {
  margin: 22px auto 0;
  max-width: 46ch;
  color: var(--text-dim);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---- live RSVP slot ---- */
.slot-stage { margin-top: clamp(40px, 6vw, 64px); }
.slot {
  position: relative;
  max-width: 720px; margin: 0 auto;
  height: clamp(190px, 30vw, 260px);
  border-top: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair-strong);
  display: grid;
  grid-template-rows: 1fr 1.35fr 1fr;
  align-items: center;
  overflow: hidden;
  user-select: none;
}
/* center pin ticks */
.slot::before, .slot::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  width: 1px; height: 9px; background: var(--accent-text); opacity: 0.85;
}
.slot::before { top: 0; }
.slot::after  { bottom: 0; }

.slot-row { text-align: center; line-height: 1; }
.slot-row.ghost {
  font-family: var(--ff-serif);
  font-size: clamp(20px, 3.4vw, 30px);
  color: var(--blur-fade);
  filter: blur(3.5px);
  opacity: 0.9;
}
.slot-row.ghost.next { filter: blur(4px); }

/* current word — ORP pinned via 3-col grid */
.slot-word {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: clamp(40px, 7.4vw, 76px);
  letter-spacing: -0.01em;
}
.slot-word .pre  { text-align: right; }
.slot-word .post { text-align: left; }
.slot-word .focus { color: var(--accent-text); }

/* controls */
.slot-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 22px; margin-top: 26px;
  flex-wrap: wrap;
}
.icon-btn {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--hair); border-radius: 999px;
  background: var(--surface-1); color: var(--text);
  cursor: pointer; transition: border-color 200ms ease, background 200ms ease;
}
.icon-btn:hover { border-color: var(--hair-strong); }
.icon-btn svg { width: 15px; height: 15px; display: block; }

.wpm-control { display: flex; align-items: center; gap: 13px; }
.wpm-control label {
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint);
}
.wpm-value {
  font-family: var(--ff-mono); font-size: 12px; color: var(--text);
  min-width: 58px; text-align: left;
}
.wpm-value b { font-weight: 600; }
input[type="range"].wpm {
  -webkit-appearance: none; appearance: none;
  width: 150px; height: 1px; background: var(--hair-strong);
  cursor: pointer; outline: none;
}
input[type="range"].wpm::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}
input[type="range"].wpm::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}

/* ---- App Store CTA ---- */
.cta-row {
  margin-top: clamp(40px, 6vw, 60px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 22px 13px 18px;
  border: 1px solid var(--hair-strong); border-radius: 13px;
  background: var(--text); color: var(--bg);
  transition: transform 200ms ease, opacity 200ms ease;
}
.appstore:hover { transform: translateY(-1px); }
.appstore .mark {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent);
  border-radius: 7px;
}
.appstore .mark span {
  width: 7px; height: 7px; background: var(--bg); border-radius: 1.5px;
}
.appstore .label small {
  display: block; font-family: var(--ff-mono); font-size: 8.5px;
  letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.6;
  line-height: 1.2;
}
.appstore .label strong {
  display: block; font-family: var(--ff-ui); font-weight: 600;
  font-size: 16px; letter-spacing: -0.01em; line-height: 1.25;
}
.cta-meta {
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint);
}

/* ============================================================
   The idea — saccades
   ============================================================ */
.idea .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 92px); align-items: center; }
.idea-copy h2 {
  font-family: var(--ff-serif); font-weight: 400;
  font-size: clamp(28px, 4vw, 44px); line-height: 1.12;
  letter-spacing: -0.015em; margin-top: 18px; text-wrap: balance;
}
.idea-copy p {
  color: var(--text-dim); margin-top: 20px; max-width: 42ch;
  font-size: 16.5px; line-height: 1.62; text-wrap: pretty;
}
.idea-copy p strong { color: var(--text); font-weight: 600; }

/* abstract motif */
.motif {
  border: 1px solid var(--hair); border-radius: 14px;
  background: var(--surface-1);
  padding: clamp(28px, 4vw, 40px);
  display: flex; flex-direction: column; gap: 30px;
}
.motif-block .motif-label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px;
}
.motif-track {
  position: relative; height: 56px;
  border-bottom: 1px solid var(--hair);
}
.motif-track .baseline-word {
  position: absolute; bottom: 9px;
  font-family: var(--ff-mono); font-size: 11px; color: var(--text-faint);
  transform: translateX(-50%);
}
.saccade-dot {
  position: absolute; bottom: 5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent-text);
  transform: translateX(-50%);
  transition: left 220ms cubic-bezier(.6,0,.2,1);
}
.saccade-arc {
  position: absolute; bottom: 9px; height: 22px;
  border-top: 1px solid var(--hair-strong); border-radius: 60% 60% 0 0 / 100% 100% 0 0;
}
.fixed-track { display: grid; place-items: center; height: 56px; }
.fixed-dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--accent-text);
  animation: fixed-pulse 2.4s ease-in-out infinite;
}
@keyframes fixed-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.55); opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .fixed-dot { animation: none; }
}

/* ============================================================
   Feels human — micro demos
   ============================================================ */
.human .lead { max-width: 56ch; }
.human .lead h2 {
  font-family: var(--ff-serif); font-weight: 400;
  font-size: clamp(28px, 4vw, 44px); line-height: 1.12;
  letter-spacing: -0.015em; margin-top: 18px; text-wrap: balance;
}
.human .lead p {
  color: var(--text-dim); margin-top: 18px; font-size: 16.5px; line-height: 1.62;
  max-width: 48ch; text-wrap: pretty;
}
.demo-grid {
  margin-top: clamp(44px, 6vw, 64px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.demo-card {
  border: 1px solid var(--hair); border-radius: 14px;
  background: var(--surface-1);
  padding: 26px 24px 24px;
  display: flex; flex-direction: column;
}
.demo-card .demo-tag {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 20px;
}
.demo-stage {
  flex: 1; min-height: 132px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
}
.demo-card h3 {
  font-family: var(--ff-serif); font-weight: 500; font-size: 19px;
  letter-spacing: -0.01em; margin-top: 22px;
}
.demo-card p {
  color: var(--text-dim); font-size: 14px; line-height: 1.55; margin-top: 8px;
  text-wrap: pretty;
}

/* ORP still */
.orp-still {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline;
  font-family: var(--ff-serif); font-weight: 500; font-size: 40px;
  width: 100%; position: relative;
}
.orp-still .pre { text-align: right; }
.orp-still .post { text-align: left; }
.orp-still .focus { color: var(--accent-text); }
.orp-pin {
  position: relative; width: 100%; height: 1px; background: var(--hair); margin-top: 4px;
}
.orp-pin::before {
  content: ""; position: absolute; left: 50%; top: -5px; transform: translateX(-50%);
  width: 1px; height: 10px; background: var(--accent-text);
}

/* dwell bars */
.dwell-row { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.dwell-row .dw-top {
  display: flex; align-items: baseline; justify-content: space-between;
}
.dwell-row .dw-word { font-family: var(--ff-serif); font-size: 22px; font-weight: 500; }
.dwell-row .dw-ms {
  font-family: var(--ff-mono); font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.08em;
}
.dwell-bar { height: 4px; background: var(--hair); border-radius: 999px; overflow: hidden; }
.dwell-bar i {
  display: block; height: 100%; width: 0; background: var(--accent);
  border-radius: 999px; transition: width 700ms cubic-bezier(.6,0,.2,1);
}
.in .dwell-bar i.fill { width: var(--w, 50%); }

/* punctuation breathing */
.breath { display: flex; align-items: center; gap: 0; flex-wrap: wrap; justify-content: center; }
.breath .tick {
  width: 16px; height: 2px; background: var(--text-faint); border-radius: 2px; margin: 0 3px;
}
.breath .pause {
  width: 2px; height: 16px; background: var(--accent-text); border-radius: 2px; margin: 0 7px;
  position: relative;
}
.breath .pause.long { margin: 0 12px; }

/* ============================================================
   Library / import
   ============================================================ */
.library .lead { max-width: 56ch; }
.library .lead h2 {
  font-family: var(--ff-serif); font-weight: 400;
  font-size: clamp(28px, 4vw, 44px); line-height: 1.12;
  letter-spacing: -0.015em; margin-top: 18px; text-wrap: balance;
}
.library .lead p {
  color: var(--text-dim); margin-top: 18px; font-size: 16.5px; line-height: 1.62;
  max-width: 48ch; text-wrap: pretty;
}
.import-row {
  margin-top: clamp(40px, 6vw, 56px);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.import-tile {
  border: 1px solid var(--hair); border-radius: 12px; background: var(--surface-1);
  padding: 24px 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: border-color 220ms ease, transform 220ms ease;
}
.import-tile:hover { border-color: var(--hair-strong); transform: translateY(-2px); }
.import-tile .ext {
  font-family: var(--ff-mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--text);
}
.import-tile .desc {
  font-family: var(--ff-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-faint);
}
.import-tile .ic {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--hair-strong); border-radius: 8px; color: var(--text-dim);
}
.import-tile .ic svg { width: 15px; height: 15px; }

.highlight-note {
  margin-top: 30px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--ff-serif); font-size: 18px; color: var(--text-dim);
}
.highlight-note .swatch {
  width: 26px; height: 18px; flex: none; border-radius: 3px;
  background: var(--accent-soft); border-left: 2px solid var(--accent);
}

/* ============================================================
   The deal
   ============================================================ */
.deal { text-align: center; }
.deal .price {
  font-family: var(--ff-serif); font-weight: 400;
  font-size: clamp(56px, 11vw, 128px); line-height: 1; letter-spacing: -0.03em;
}
.deal .price sup { font-size: 0.34em; vertical-align: super; top: -0.2em; position: relative; }
.deal .price-sub {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-faint); margin-top: 18px;
}
.deal-tiles {
  margin-top: clamp(44px, 6vw, 60px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.deal-tile {
  border: 1px solid var(--hair); border-radius: 13px; background: var(--surface-1);
  padding: 30px 22px; text-align: left;
}
.deal-tile .n {
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.16em;
  color: var(--text-faint); display: block; margin-bottom: 16px;
}
.deal-tile strong {
  font-family: var(--ff-serif); font-weight: 500; font-size: 20px;
  letter-spacing: -0.01em; display: block;
}
.deal-tile span.sub { color: var(--text-dim); font-size: 14px; display: block; margin-top: 6px; }
.deal-line {
  margin-top: clamp(44px, 6vw, 60px);
  font-family: var(--ff-serif); font-size: clamp(20px, 2.6vw, 26px);
  color: var(--text); letter-spacing: -0.01em;
}
.deal-line .em { color: var(--text); }
.deal .cta-row { margin-top: 38px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--hair); padding-block: 48px; }
.site-footer .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-links { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
  transition: color 200ms ease;
}
.footer-links a:hover { color: var(--text); }
.footer-meta {
  font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--text-faint); text-transform: uppercase;
}

/* ============================================================
   Scroll reveals
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 70ms; }
.reveal.d2 { transition-delay: 140ms; }
.reveal.d3 { transition-delay: 210ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .idea .wrap { grid-template-columns: 1fr; gap: 40px; }
  .demo-grid { grid-template-columns: 1fr; }
  .import-row { grid-template-columns: repeat(3, 1fr); }
  .deal-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .import-row { grid-template-columns: repeat(2, 1fr); }
  .slot-controls { gap: 16px; }
  input[type="range"].wpm { width: 120px; }
  .footer-links { gap: 18px; }
}
