/* ============================================================
   Meld Club — marketing site
   Design language: "a private card parlour"
   Deep-green felt, walnut trim, cream cards, aged-gold accents.
   Palette mirrors the app's Parlour tokens (lib/ui/theme.dart).
   ============================================================ */

:root {
  /* Felt + wood */
  --felt: #175641;
  --felt-deep: #0B3324;
  --felt-edge: #072318;
  --wood: #4E351F;

  /* Metals + paper */
  --gold: #D4AF63;
  --gold-bright: #F0D48A;
  --gold-deep: #A9863F;
  --cream: #F7F2E6;
  --cream-dim: #E9E1CE;
  --ink: #262119;

  /* Accents */
  --crimson: #B0393E;
  --crimson-deep: #7E2226;
  --silver: #B9BDC4;

  /* Semantic */
  --page-bg: #0A2A1E;
  --text: #EFE7D6;
  --text-dim: #C4CBB9;
  --text-mute: #8FA090;
  --hairline: rgba(212, 175, 99, 0.22);
  --card-panel: rgba(9, 40, 29, 0.62);

  --serif: Georgia, "Times New Roman", "Playfair Display", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1140px;
  --radius: 18px;
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
  --shadow-card: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background-color: var(--page-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Fixed felt backdrop as a composited layer (smoother than background-attachment:fixed,
   which janks and is unreliable on iOS Safari). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--page-bg);
  background-image:
    radial-gradient(120% 80% at 50% 0%, rgba(23, 86, 65, 0.9) 0%, rgba(11, 51, 36, 0.92) 48%, var(--felt-edge) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: rgba(212, 175, 99, 0.3); color: #fff; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }

p { text-wrap: pretty; }

/* Sticky header offset for in-page anchors */
section[id], h2[id] { scroll-margin-top: 88px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

/* Single kicker, used once in the hero. Section headings use .ornament instead. */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

/* Parlour ornament — a gold suit glyph between hairlines, like a club menu divider. */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 0 24px;
  color: var(--gold);
}
.ornament::before,
.ornament::after {
  content: "";
  height: 1px;
  width: min(92px, 22vw);
  background: linear-gradient(90deg, transparent, var(--hairline) 60%, rgba(212, 175, 99, 0.45));
}
.ornament::after { transform: scaleX(-1); }
.ornament .suit { font-size: 1.05rem; line-height: 1; letter-spacing: 0.55em; margin-right: -0.55em; }

/* Serif-italic lead-in for showcase rows (replaces tracked eyebrow grammar). */
.showcase-label {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08rem;
  color: var(--gold-bright);
  margin: 0 0 12px;
}

.gold-text { color: var(--gold); }

.lede { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text-dim); max-width: 46ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 15px 26px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  will-change: transform;
}
.btn-gold {
  color: #2b220f;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold) 60%, var(--gold-deep));
  box-shadow: 0 12px 30px -10px rgba(212, 175, 99, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-gold:hover { transform: translateY(-2px); color: #2b220f; box-shadow: 0 18px 40px -12px rgba(212, 175, 99, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-ghost {
  color: var(--text); background: rgba(247, 242, 230, 0.04);
  border-color: var(--hairline);
}
.btn-ghost:hover { color: var(--text); border-color: var(--gold); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); }

/* App Store badge link */
.appstore { display: inline-block; transition: transform 0.16s ease, filter 0.16s ease; }
.appstore img { height: 54px; width: auto; }
.appstore:hover { transform: translateY(-2px); filter: brightness(1.06); }
.appstore.pending:hover { transform: none; filter: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: linear-gradient(180deg, rgba(7, 35, 24, 0.86), rgba(7, 35, 24, 0.5));
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 38px; height: 38px; border-radius: 9px; box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.brand b { font-family: var(--serif); font-size: 1.18rem; letter-spacing: 0.04em; color: var(--cream); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.9rem; font-weight: 600; color: var(--text-dim); letter-spacing: 0.02em; }
.nav-links a:hover { color: var(--gold-bright); }
.nav-cta { padding: 10px 20px; font-size: 0.85rem; }
/* .nav-links a would otherwise override the gold button's ink color */
.nav-links a.nav-cta, .nav-links a.nav-cta:hover { color: #2b220f; }
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* ---------- Sections ---------- */
section { position: relative; }
.section-pad { padding-block: clamp(64px, 10vw, 120px); }
.center { text-align: center; }
.section-head { max-width: 640px; margin-inline: auto; }
.section-head h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin-bottom: 16px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--hairline), transparent); border: 0; margin: 0; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 84px); padding-bottom: clamp(40px, 7vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.4rem); letter-spacing: 0.01em; margin-bottom: 22px; }
.hero .lede { margin-bottom: 34px; }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-meta { margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap; color: var(--text-mute); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero-cta, .hero-meta { justify-content: center; }
  .phone-stage { order: -1; }
}

/* ---------- Phone frame ---------- */
.phone-stage { display: flex; justify-content: center; perspective: 1600px; }
.phone {
  position: relative;
  width: 300px; aspect-ratio: 300 / 620;
  border-radius: 46px;
  padding: 13px;
  background: linear-gradient(145deg, #2a2118 0%, #0c0a07 60%, #1a1510 100%);
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 2px rgba(212, 175, 99, 0.28),
    inset 0 2px 3px rgba(255, 255, 255, 0.06);
}
.phone.tilt { transform: rotateY(-14deg) rotateX(4deg) rotate(1deg); }
.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 34px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 32%, var(--felt) 0%, var(--felt-deep) 68%, var(--felt-edge) 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.55);
}
.phone-island {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; background: #000; border-radius: 14px; z-index: 6;
}
@media (max-width: 400px) { .phone { width: 264px; } }

/* ---------- In-app screen mock (shared) ---------- */
.screen-pad { position: absolute; inset: 0; padding: 46px 16px 18px; display: flex; flex-direction: column; }
.screen-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.screen-title { font-family: var(--serif); font-size: 0.9rem; letter-spacing: 0.14em; color: var(--cream); text-transform: uppercase; }
.chip {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; color: var(--gold-bright);
  border: 1px solid var(--hairline); background: rgba(0,0,0,0.25);
  white-space: nowrap; flex: none;
}

/* Score strip */
.score-strip { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 10px; }
.score-cell { flex: 1; background: rgba(0,0,0,0.28); border: 1px solid rgba(212,175,99,0.16); border-radius: 10px; padding: 6px 8px; text-align: center; }
.score-cell .lbl { font-size: 0.5rem; letter-spacing: 0.12em; color: var(--text-mute); text-transform: uppercase; }
.score-cell .val { font-family: var(--serif); font-size: 1rem; color: var(--cream); }
.score-cell.us .val { color: var(--gold-bright); }

/* Opponent row (face-down fan) */
.opp-row { display: flex; justify-content: center; margin: 2px 0 8px; }
.opp-fan { display: flex; }
.opp-fan .pc { margin-left: -18px; box-shadow: 0 6px 12px -6px rgba(0,0,0,0.6); }
.opp-fan .pc:first-child { margin-left: 0; }

/* Table center: books / melds */
.table-center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 4px 2px; }
.meld-row { display: flex; gap: 10px; justify-content: center; }
.meld {
  background: rgba(0,0,0,0.22); border: 1px solid rgba(212,175,99,0.18);
  border-radius: 12px; padding: 8px 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.meld .stack { display: flex; }
.meld .stack .pc { margin-left: -26px; }
.meld .stack .pc:first-child { margin-left: 0; }
.meld .cap { font-size: 0.52rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.book-badge { color: #2b220f; background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); padding: 1px 7px; border-radius: 999px; font-size: 0.5rem; }

/* Coach banner */
.coach {
  display: flex; align-items: center; gap: 9px; margin: 8px 2px 10px;
  background: linear-gradient(180deg, rgba(212,175,99,0.16), rgba(212,175,99,0.06));
  border: 1px solid rgba(212,175,99,0.34); border-radius: 12px; padding: 9px 11px;
}
.coach .ic { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); color: #2b220f; font-family: var(--serif); font-weight: 700; font-size: 0.8rem; }
.coach p { margin: 0; font-size: 0.66rem; line-height: 1.35; color: var(--cream); }

/* Player hand fan — flex row of overlapping cards, each rotated in HTML */
.hand { display: flex; justify-content: center; align-items: flex-end; height: 78px; margin-top: 6px; padding-bottom: 2px; }
.hand .pc {
  margin-left: -14px;
  transform-origin: bottom center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 10px 20px -8px rgba(0,0,0,0.7);
}
.hand .pc:first-child { margin-left: 0; }
.hand .pc.sel { z-index: 3; }

/* Action bar */
.action-bar { display: flex; gap: 8px; margin-top: 8px; }
.action-bar .ab {
  flex: 1; text-align: center; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 4px; border-radius: 10px; border: 1px solid var(--hairline); color: var(--text-dim); background: rgba(0,0,0,0.24);
}
.action-bar .ab.primary { color: #2b220f; border-color: transparent; background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); }

/* ---------- Playing card component ---------- */
.pc {
  --w: 40px;
  width: var(--w); height: calc(var(--w) * 1.42);
  border-radius: calc(var(--w) * 0.12);
  position: relative; flex: none;
  background: linear-gradient(135deg, #ffffff 0%, var(--cream) 100%);
  border: 1px solid rgba(0,0,0,0.12);
  color: var(--ink);
  font-family: var(--serif);
  box-shadow: var(--shadow-card);
}
.pc .r { position: absolute; top: calc(var(--w) * 0.08); left: calc(var(--w) * 0.1); font-size: calc(var(--w) * 0.34); font-weight: 800; line-height: 0.9; }
.pc .s { position: absolute; top: calc(var(--w) * 0.44); left: calc(var(--w) * 0.11); font-size: calc(var(--w) * 0.28); line-height: 0.9; }
.pc .big { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--w) * 0.66); opacity: 0.9; }
.pc.red { color: var(--crimson); }
.pc.black { color: var(--ink); }
.pc.wild { border: calc(var(--w) * 0.03) solid var(--gold); }
.pc.wild .r, .pc.wild .s { color: var(--gold-deep); }
.pc.sel { box-shadow: var(--shadow-card), 0 0 0 2px var(--gold-bright), 0 0 22px rgba(240, 212, 138, 0.55); }
/* Card back */
.pc.back {
  background:
    repeating-linear-gradient(45deg, rgba(212,175,99,0.22) 0 3px, transparent 3px 8px),
    linear-gradient(160deg, var(--felt) 0%, var(--felt-deep) 100%);
  border: 1px solid rgba(212,175,99,0.4);
}
.pc.back::after {
  content: ""; position: absolute; inset: 14%; border-radius: 4px;
  border: 1px solid rgba(212,175,99,0.5);
}

/* ---------- Features — parlour house notes (hairline list, no cards) ---------- */
.parlour-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  column-gap: clamp(32px, 6vw, 72px);
  margin-top: 44px;
}
.note-item {
  padding: 26px 0 30px;
  border-top: 1px solid var(--hairline);
}
.note-item h3 {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 1.24rem;
  color: var(--cream);
  margin-bottom: 10px;
  transition: color 0.2s ease;
}
.note-item h3 svg { width: 21px; height: 21px; flex: none; color: var(--gold); transition: color 0.2s ease; }
.note-item:hover h3 { color: var(--gold-bright); }
.note-item:hover h3 svg { color: var(--gold-bright); }
.note-item p { margin: 0; font-size: 0.95rem; color: var(--text-dim); max-width: 52ch; }

/* ---------- Showcase (alternating rows) ---------- */
.showcase-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.showcase-row + .showcase-row { margin-top: clamp(56px, 9vw, 110px); }
.showcase-row.reverse .showcase-text { order: 2; }
.showcase-text h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-bottom: 16px; }
.showcase-text p { color: var(--text-dim); font-size: 1.02rem; max-width: 44ch; }
.showcase-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.showcase-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.96rem; color: var(--text-dim); }
.showcase-list .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(212,175,99,0.14); border: 1px solid var(--hairline); color: var(--gold-bright); font-size: 0.72rem; margin-top: 1px; }
@media (max-width: 820px) {
  .showcase-row { grid-template-columns: 1fr; }
  .showcase-row.reverse .showcase-text { order: 0; }
  .showcase-text { text-align: center; }
  .showcase-text p { margin-inline: auto; }
  .showcase-list { max-width: 420px; margin-inline: auto; text-align: left; }
}

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 760px; margin: 40px auto 0; }
@media (max-width: 620px) { .price-grid { grid-template-columns: 1fr; } }
.price {
  background: var(--card-panel); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 30px 28px; position: relative;
}
.price.free { }
.price.plus { border-color: rgba(212,175,99,0.5); box-shadow: 0 0 0 1px rgba(212,175,99,0.2), var(--shadow-card); }
.price .tag { position: absolute; top: -12px; right: 22px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #2b220f; background: linear-gradient(180deg, var(--gold-bright), var(--gold-deep)); padding: 5px 12px; border-radius: 999px; }
.price h3 { font-size: 1.4rem; color: var(--cream); margin-bottom: 6px; }
.price .cost { font-family: var(--serif); font-size: 2.4rem; color: var(--gold-bright); margin: 6px 0 2px; }
.price .cost small { font-size: 0.9rem; color: var(--text-mute); font-family: var(--sans); font-weight: 600; }
.price .sub { font-size: 0.84rem; color: var(--text-mute); margin-bottom: 18px; }
.price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.price li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--text-dim); }
.price li .tick { color: var(--gold); flex: none; }
.price .fineprint { font-size: 0.72rem; color: var(--text-mute); margin-top: 18px; line-height: 1.5; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-inline: auto; }
.faq details {
  border-bottom: 1px solid var(--hairline); padding: 6px 0;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 4px; position: relative;
  font-family: var(--serif); font-size: 1.12rem; color: var(--cream);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--gold-bright); }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--gold); font-family: var(--sans); transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0 4px 20px; color: var(--text-dim); font-size: 0.98rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-card {
  background: linear-gradient(160deg, rgba(23,86,65,0.7), rgba(11,51,36,0.85));
  border: 1px solid rgba(212,175,99,0.4);
  border-radius: 28px; padding: clamp(40px, 7vw, 72px) clamp(24px, 5vw, 60px);
  box-shadow: var(--shadow-lg);
}
.cta-card h2 { font-size: clamp(1.8rem, 4.4vw, 2.8rem); margin-bottom: 14px; }
.cta-card p { color: var(--text-dim); max-width: 48ch; margin: 0 auto 30px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding-block: 48px 40px; margin-top: 20px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--text-mute); font-size: 0.88rem; margin: 0; }
.footer-cols { display: flex; gap: clamp(30px, 6vw, 72px); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(212,175,99,0.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-mute); font-size: 0.8rem; }
.footer-legal .placeholder { color: var(--crimson); }

/* ---------- Legal / long-form document pages ---------- */
.doc { padding-block: clamp(48px, 8vw, 96px); }
.doc-inner { max-width: 780px; margin-inline: auto; }
.doc .backlink { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 20px 0 8px; }
.doc .updated { color: var(--text-mute); font-size: 0.85rem; margin-bottom: 8px; }
.doc-body {
  background: var(--card-panel); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: clamp(26px, 5vw, 52px); margin-top: 28px;
}
.doc-body h2 { font-size: 1.35rem; color: var(--gold-bright); margin: 34px 0 12px; padding-top: 8px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: 1.05rem; color: var(--cream); margin: 22px 0 8px; }
.doc-body p, .doc-body li { color: var(--text-dim); font-size: 0.98rem; line-height: 1.7; max-width: 72ch; }
.doc-body ul { padding-left: 22px; margin: 12px 0; }
.doc-body li { margin-bottom: 8px; }
.doc-body a { text-decoration: underline; text-underline-offset: 3px; }
.doc-body strong { color: var(--cream); }
.doc-body .note {
  background: rgba(176, 57, 62, 0.14); border: 1px solid rgba(176,57,62,0.4);
  border-radius: 12px; padding: 16px 18px; margin: 20px 0; font-size: 0.9rem; color: #f0d9d9;
}
.doc-body .note strong { color: #ffd9d9; }
.doc-toc { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 24px 0 6px; }
.doc-toc a { font-size: 0.82rem; color: var(--text-mute); }
.doc-toc a:hover { color: var(--gold-bright); }
.placeholder {
  color: var(--crimson); background: rgba(176,57,62,0.12); border-radius: 4px; padding: 0 4px;
  font-style: normal; font-weight: 600; white-space: nowrap;
}

/* ---------- Motion ----------
   Content is visible by default. Hidden reveal states apply ONLY when the
   script has confirmed JS + IntersectionObserver + no reduced-motion
   (html.motion-ok), so no-JS visitors and crawlers always see the page. */
html.motion-ok .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
html.motion-ok .reveal.in { opacity: 1; transform: none; }

/* Staggered children: mark a revealed container with .stagger */
html.motion-ok .stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
html.motion-ok .stagger.in > * { opacity: 1; transform: none; }
html.motion-ok .stagger > *:nth-child(2) { transition-delay: 70ms; }
html.motion-ok .stagger > *:nth-child(3) { transition-delay: 140ms; }
html.motion-ok .stagger > *:nth-child(4) { transition-delay: 210ms; }
html.motion-ok .stagger > *:nth-child(5) { transition-delay: 280ms; }
html.motion-ok .stagger > *:nth-child(6) { transition-delay: 350ms; }

/* Hero phone: slow parlour drift + a breathing glow on the selected Kings */
@keyframes phone-drift {
  0%, 100% { transform: rotateY(-14deg) rotateX(4deg) rotate(1deg) translateY(0); }
  50%      { transform: rotateY(-14deg) rotateX(4deg) rotate(1deg) translateY(-9px); }
}
@keyframes sel-breathe {
  0%, 100% { box-shadow: var(--shadow-card), 0 0 0 2px var(--gold-bright), 0 0 18px rgba(240, 212, 138, 0.4); }
  50%      { box-shadow: var(--shadow-card), 0 0 0 2px var(--gold-bright), 0 0 30px rgba(240, 212, 138, 0.75); }
}
html.motion-ok .phone.tilt { animation: phone-drift 9s ease-in-out infinite; }
html.motion-ok .phone.tilt .pc.sel { animation: sel-breathe 3.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .phone.tilt { transform: none; animation: none !important; }
  .phone.tilt .pc.sel { animation: none !important; }
  .hand .pc { transition: none; }
}
