/* ─── Onword website — shared styles ───────────────────────────
   Palette mirrors the app's DesignTokens.swift:
   warm cream paper, warm ink, terracotta ORP mark.            */

:root {
  --paper:      #f4ecd8;
  --paper-soft: #faf3e0;
  --paper-deep: #ead9b8;
  --card:       #fbf5e3;

  --ink:        #2b231c;
  --ink-soft:   #5a4a3a;
  --ink-mute:   #8a7a66;
  --ink-faint:  #c5b59a;

  --orp:        #c83b2a;

  --rule:        rgba(43, 35, 28, 0.10);
  --rule-strong: rgba(43, 35, 28, 0.18);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --maxw: 760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: 'Lexend', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--orp); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout ─────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Header / nav ───────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .pivot { color: var(--orp); }

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}
.nav a { color: var(--ink-soft); }
.nav a:hover { color: var(--ink); text-decoration: none; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 72px 0 48px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  font-weight: 700;
}
.hero h1 .pivot { color: var(--orp); }
.hero p.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto 32px;
}

/* RSVP demo card */
.rsvp-demo {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  padding: 48px 24px 40px;
  max-width: 460px;
  margin: 0 auto 36px;
  box-shadow: 0 18px 40px -24px rgba(43, 35, 28, 0.35);
}
.rsvp-word {
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 600;
  letter-spacing: 0.01em;
  height: 1.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-ligatures: none;
}
.rsvp-word .pre  { color: var(--ink); }
.rsvp-word .pivot { color: var(--orp); }
.rsvp-word .post { color: var(--ink); }
.rsvp-guides {
  width: 3px;
  height: 14px;
  background: var(--orp);
  margin: 10px auto 0;
  border-radius: 2px;
}
.rsvp-caption {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 22px;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orp);
  color: var(--paper-soft);
  font-weight: 600;
  font-size: 16px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid var(--orp);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; opacity: 0.92; transform: translateY(-1px); }
.btn.secondary {
  background: transparent;
  color: var(--orp);
  border: 1px solid var(--orp);
}
.btn.secondary:hover { background: rgba(200, 59, 42, 0.07); opacity: 1; }
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Feature flashcards ─────────────────────────────────── */
.section { padding: 56px 0; }
.section.band {
  background: var(--paper-soft);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.section.band .sub { margin-bottom: 28px; }
.section h2 {
  font-size: clamp(24px, 4vw, 32px);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  text-align: center;
}
/* terracotta accent rule under every section title */
.section h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--orp);
  border-radius: 2px;
  margin: 14px auto 0;
}
.section .sub {
  text-align: center;
  color: var(--ink-mute);
  margin: 0 auto 40px;
  max-width: 480px;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

/* Each feature is a reader-style flashcard: a keyword shown with its
   Optimal Recognition Point letter in terracotta, like the app's reader. */
.flashcard {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 30px 24px 26px;
  text-align: center;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.flashcard:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -22px rgba(43, 35, 28, 0.42);
  border-color: rgba(200, 59, 42, 0.4);
}
.flashcard .word {
  font-family: 'Atkinson Hyperlegible', 'Lexend', sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 10px;
  font-variant-ligatures: none;
}
.flashcard .word .pivot { color: var(--orp); }
.flashcard .tick {
  width: 26px;
  height: 3px;
  background: var(--orp);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.flashcard h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}
.flashcard p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.55;
}

/* ─── Content pages (privacy / support) ──────────────────── */
.doc { padding: 56px 0 72px; }
.doc h1 {
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.doc h1::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--orp);
  border-radius: 2px;
  margin: 16px 0 0;
}
.doc .updated {
  color: var(--ink-mute);
  font-size: 15px;
  margin: 0 0 36px;
}
.doc h2 {
  font-size: 22px;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
/* FAQ question — terracotta, with a small red marker. */
.doc h3.faq-q {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 30px 0 8px;
  padding-left: 16px;
  position: relative;
}
.doc h3.faq-q::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orp);
}
.doc p, .doc li { color: var(--ink-soft); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.callout {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--orp);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin: 24px 0;
}
.callout p { margin: 0; color: var(--ink); }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0;
  margin-top: 48px;
  color: var(--ink-mute);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.site-footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }

@media (max-width: 520px) {
  .nav { gap: 16px; font-size: 14px; }
  .site-header .wrap { height: 56px; }
}
