/*
 * Landing site for Rival Monarchs. Static: no build step, no cookies,
 * no trackers, no external requests (system fonts only). Palette from
 * ios/App/Sources/Menu/Theme.swift; --night matches the background of the art renders.
 */

:root {
  --night: #1c1e1a;
  --night-2: #23261f;
  --oak-900: #1f150c;
  --oak-800: #261a0f; /* Theme.oakDark */
  --oak-700: #452e1c; /* Theme.oak */
  --oak-600: #5d4027;
  --parchment: #eddbb3; /* Theme.parchment */
  --parchment-2: #e5d0a2;
  --parchment-dim: #c7b38c; /* Theme.parchmentDim */
  --ink: #291c12; /* Theme.ink */
  --ink-soft: #5b4733;
  --gold: #f2c254; /* Theme.gold */
  --gold-deep: #b9862a;
  --iron: #73706b;
  --team-blue: #4080ff;
  --team-red: #f24033;
  --food: #ee7352;
  --wood: #8ccc66;

  /* Light ("parchment") sections. Redefined for dark mode below. */
  --surface-light: var(--parchment);
  --surface-light-2: var(--parchment-2);
  --text-on-light: var(--ink);
  --muted-on-light: var(--ink-soft);
  --rule-on-light: rgba(41, 28, 18, 0.18);
  --accent-on-light: #7a4b16;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", ui-serif, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --gutter: 16px;
  --maxw: 1120px;
  --radius: 14px;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-light: #2a2017;
    --surface-light-2: #33271b;
    --text-on-light: var(--parchment);
    --muted-on-light: var(--parchment-dim);
    --rule-on-light: rgba(237, 219, 179, 0.16);
    --accent-on-light: var(--gold);
  }
}
:root[data-theme="dark"] {
  --surface-light: #2a2017;
  --surface-light-2: #33271b;
  --text-on-light: var(--parchment);
  --muted-on-light: var(--parchment-dim);
  --rule-on-light: rgba(237, 219, 179, 0.16);
  --accent-on-light: var(--gold);
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 18px; } }

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

a { color: var(--gold); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -60px; z-index: 10;
  background: var(--gold); color: var(--ink); padding: 10px 14px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 22px;
  border-radius: 12px; border: 1.5px solid transparent;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  transition: transform 0.08s ease-out, background-color 0.15s, border-color 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(#f6cf6e, var(--gold) 55%, #e2ac3c);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 6px 18px rgba(0, 0, 0, 0.35);
}
.btn-primary:hover { background: linear-gradient(#f8d77f, #f4c962 55%, #e6b24a); text-decoration: none; }
.btn-ghost {
  background: rgba(69, 46, 28, 0.55);
  border-color: rgba(242, 194, 84, 0.55);
  color: var(--parchment);
}
.btn-ghost:hover { background: rgba(69, 46, 28, 0.85); text-decoration: none; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.95rem; border-radius: 10px; }

/* ---------- header ---------- */

.site-header {
  position: relative; z-index: 2;
  background: var(--night);
  border-bottom: 1px solid rgba(237, 219, 179, 0.08);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
}
.wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.2rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--parchment); text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.wordmark svg { width: 22px; height: 22px; flex: none; }
.site-nav { display: none; gap: 22px; }
.site-nav a { color: var(--parchment-dim); text-decoration: none; font-size: 0.95rem; }
.site-nav a:hover { color: var(--parchment); }
@media (min-width: 760px) { .site-nav { display: flex; } }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 40px 0 8px;
  background:
    radial-gradient(60% 50% at 75% 45%, rgba(242, 194, 84, 0.10), transparent 70%),
    radial-gradient(80% 60% at 10% 0%, rgba(69, 46, 28, 0.45), transparent 70%),
    var(--night);
  overflow: hidden;
}
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 24px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; }
}
.eyebrow {
  font-family: var(--font-num); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.35rem, 10vw, 3.9rem);
  color: var(--parchment);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
  margin-bottom: 18px;
}
.hero h1 span { display: block; }
.hero h1 span:nth-child(2) { color: var(--gold); }
.lede { font-size: 1.12rem; color: var(--parchment-dim); max-width: 34em; }
@media (min-width: 720px) { .lede { font-size: 1.2rem; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.hero-facts {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-family: var(--font-num); font-size: 0.9rem; color: var(--parchment-dim);
}
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 194, 84, 0.18);
}

/* ---------- phone mockup (concept of the portrait battle screen, PLAN §4.1) ---------- */

.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.phone {
  container-type: inline-size;
  position: relative;
  width: min(72vw, 300px);
  aspect-ratio: 9 / 19.5;
  border-radius: 46px;
  padding: 10px;
  background: linear-gradient(145deg, #3a3631, #121210 40%, #26231f);
  box-shadow:
    0 0 0 1.5px #4b4640 inset,
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(242, 194, 84, 0.08);
}
@media (min-width: 900px) { .phone { width: 320px; } }
.screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 37px; overflow: hidden;
  background: #11120f;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  font-family: var(--font-num);
  color: var(--parchment);
}
.island {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 31%; height: 6.2cqw; min-height: 18px; border-radius: 99px; background: #000; z-index: 3;
}
.hud-top {
  position: relative; z-index: 2;
  padding: 12.5cqw 4.5cqw 2.4cqw;
  background: linear-gradient(rgba(31, 21, 12, 0.98), rgba(38, 26, 15, 0.92));
  border-bottom: 1px solid rgba(242, 194, 84, 0.35);
  font-size: 11px; font-size: 3.85cqw; font-weight: 700; font-variant-numeric: tabular-nums;
}
.res-row, .age-row { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
.age-row { margin-top: 1.6cqw; font-size: 0.86em; color: var(--parchment-dim); }
.res { display: inline-flex; align-items: center; gap: 1.2cqw; white-space: nowrap; }
.dot { width: 2.6cqw; height: 2.6cqw; min-width: 7px; min-height: 7px; border-radius: 50%; }
.dot.food { background: var(--food); }
.dot.wood { background: var(--wood); }
.dot.gold { background: var(--gold); }
.dot.pop { background: var(--parchment-dim); border-radius: 30%; }
.clock { color: var(--gold); }
.pips { display: inline-flex; gap: 0.9cqw; margin-left: 1.5cqw; vertical-align: middle; }
.pips i { width: 3cqw; height: 1.6cqw; border-radius: 2px; background: var(--gold); }
.pips i.off { background: rgba(242, 194, 84, 0.25); }

.map { position: relative; overflow: hidden; }
.map picture, .map img { width: 100%; height: 100%; }
.map img { object-fit: cover; object-position: 50% 42%; }
.map .order { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.order .path { stroke: var(--parchment); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; fill: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
.order .ring { fill: none; stroke: var(--gold); stroke-width: 3.5; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
.order .ring-pulse { fill: none; stroke: var(--gold); stroke-width: 2; opacity: 0.6; transform-box: fill-box; transform-origin: center; animation: pulse 1.8s ease-out infinite; }
.order .ghost { fill: rgba(237, 219, 179, 0.85); stroke: rgba(41, 28, 18, 0.7); stroke-width: 1; }
.order .verb { fill: var(--oak-800); stroke: var(--gold); stroke-width: 2; }
.order .verb-icon { stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; fill: none; }
@keyframes pulse { from { transform: scale(0.7); opacity: 0.8; } to { transform: scale(1.5); opacity: 0; } }
.minimap {
  position: absolute; top: 3cqw; right: 2.5cqw; bottom: 3cqw; width: 5.5cqw;
  border-radius: 3px; border: 1px solid rgba(242, 194, 84, 0.5);
  background: linear-gradient(#5a2a20 0 12%, #3d4a22 12% 44%, #6e6a55 44% 52%, #3d4a22 52% 86%, #26406e 86%);
  opacity: 0.92;
}
.minimap::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 9%; height: 26%;
  border: 2px solid var(--parchment); border-radius: 2px;
}
.cards {
  position: relative; z-index: 2;
  display: flex; gap: 2cqw; align-items: center;
  padding: 2.4cqw 3.5cqw;
  background: rgba(31, 21, 12, 0.96);
  border-top: 1px solid rgba(242, 194, 84, 0.3);
  font-size: 3.4cqw; font-weight: 700;
}
.card {
  display: inline-flex; align-items: center; gap: 1.4cqw;
  padding: 1.6cqw 2.4cqw; border-radius: 2.2cqw;
  background: var(--oak-700); border: 1px solid rgba(242, 194, 84, 0.45);
  white-space: nowrap;
}
.card.selected { border-color: var(--parchment); box-shadow: 0 0 0 1px var(--parchment); }
.bars { display: inline-flex; gap: 0.5cqw; }
.bars i { width: 1.1cqw; height: 2.6cqw; border-radius: 1px; background: var(--wood); }
.bars i.off { background: rgba(140, 204, 102, 0.25); }
.cycle { margin-left: auto; color: var(--parchment-dim); font-size: 1.15em; }
.panel {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.25fr repeat(4, 1fr); gap: 1.8cqw;
  padding: 2.4cqw 3.5cqw 7.5cqw;
  background: linear-gradient(var(--oak-800), #1a1109);
}
.portrait {
  grid-row: span 2;
  border-radius: 2.4cqw; border: 1px solid rgba(242, 194, 84, 0.45);
  background: radial-gradient(circle at 50% 38%, #8a6a45 0 18%, #5d4027 19% 34%, var(--oak-700) 35%);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 1.4cqw; font-size: 3.4cqw; font-weight: 800;
}
.key {
  aspect-ratio: 1; border-radius: 2.4cqw;
  background: linear-gradient(#5a3d25, var(--oak-700));
  border: 1px solid rgba(242, 194, 84, 0.35);
  display: grid; place-items: center;
}
.key svg { width: 58%; height: 58%; stroke: var(--parchment); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.key.alert svg { stroke: var(--gold); }
.phone-caption { font-size: 0.8rem; color: var(--parchment-dim); opacity: 0.85; text-align: center; max-width: 300px; margin: 0; }

/* ---------- palisade stakes divider (mirrors PalisadeSilhouette in the app menu) ---------- */

/* The wrapper paints the section above; the stakes take the colour of the section below. */
.stakes-wrap { line-height: 0; }
.stakes { width: 100%; height: 44px; margin-bottom: -1px; }
@media (min-width: 720px) { .stakes { height: 64px; } }
.stakes-wrap.dark-to-light { background: var(--night); color: var(--surface-light); }
.stakes-wrap.light-to-oak { background: var(--surface-light); color: var(--oak-800); }
.stakes-wrap.light-to-dark { background: var(--surface-light); color: var(--night); }

/* ---------- art band ---------- */

.art-band { background: var(--night); padding: 8px 0 28px; }
.art-band figure { margin: 0 auto; max-width: var(--maxw); padding: 0 var(--gutter); }
.art-band img { width: 100%; }
figcaption, .caption {
  margin-top: 10px; font-size: 0.85rem; color: var(--parchment-dim); text-align: center;
  font-style: italic; font-family: var(--font-display);
}

/* ---------- sections ---------- */

.light figcaption, .light .caption { color: var(--muted-on-light); }

.section { padding: 56px 0; }
@media (min-width: 720px) { .section { padding: 88px 0; } }
.light { background: var(--surface-light); color: var(--text-on-light); }
.light a { color: var(--accent-on-light); }
.dark { background: var(--night); }
.oak { background: var(--oak-800); }
.section-title { font-size: clamp(1.9rem, 6vw, 2.8rem); }
.kicker {
  font-family: var(--font-num); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
}
.light .kicker { color: var(--accent-on-light); }

/* pitch + promise */
.pitch h2 { font-size: clamp(1.9rem, 6.4vw, 2.9rem); }
.pitch p.big { font-size: 1.15rem; color: var(--muted-on-light); }
.promise-title {
  margin-top: 40px; font-size: 1.15rem; letter-spacing: 0.22em; text-transform: uppercase;
  display: flex; align-items: center; gap: 14px;
}
.promise-title::after { content: ""; flex: 1; height: 1px; background: var(--rule-on-light); }
.promise { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .promise { grid-template-columns: 1fr 1fr; } }
.promise li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px;
  background: var(--surface-light-2); border: 1px solid var(--rule-on-light);
  line-height: 1.4;
}
.promise li strong { font-family: var(--font-display); font-size: 1.05rem; }
.promise .mark { flex: none; width: 26px; height: 26px; margin-top: 1px; }
.promise .mark circle { fill: var(--oak-700); }
.promise .mark path { stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.promise li.offline .mark circle { fill: #3d5a26; }
.promise li.offline .mark path { stroke: var(--parchment); }
.fine { font-size: 0.85rem; color: var(--muted-on-light); margin-top: 16px; }

/* features */
.feature { display: grid; gap: 26px; align-items: center; margin-top: 56px; }
.feature:first-of-type { margin-top: 36px; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 96px; }
  .feature.flip .feature-media { order: 2; }
}
.feature h3 { font-size: clamp(1.55rem, 5vw, 2.15rem); }
.feature-copy > p { color: var(--parchment-dim); }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; line-height: 1.45; }
.ticks li::before {
  content: ""; position: absolute; left: 3px; top: 0.42em; width: 9px; height: 9px;
  background: var(--gold); transform: rotate(45deg); border-radius: 1px;
}
.media-frame img { width: 100%; }
.media-frame {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(242, 194, 84, 0.25);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  background: var(--night-2);
}

/* ages row */
.ages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.ages figure { margin: 0; }
.ages img { width: 100%; border-radius: 10px; border: 1px solid rgba(242, 194, 84, 0.22); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); }
.ages figcaption { font-style: normal; font-family: var(--font-display); font-weight: 700; color: var(--parchment); margin-top: 8px; font-size: 0.95rem; letter-spacing: 0.06em; }
.ages figcaption small { display: block; font-family: var(--font-num); font-weight: 600; color: var(--parchment-dim); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* gesture tiles */
.gestures { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gesture {
  padding: 16px 14px; border-radius: var(--radius);
  background: linear-gradient(var(--oak-700), var(--oak-800));
  border: 1px solid rgba(242, 194, 84, 0.3);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.gesture svg { width: 46px; height: 46px; margin-bottom: 10px; }
.gesture svg .g-stroke { stroke: var(--parchment); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gesture svg .g-gold { stroke: var(--gold); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gesture svg .g-fill { fill: var(--gold); }
.gesture h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.05rem; }
.gesture p { margin: 0; font-size: 0.88rem; color: var(--parchment-dim); line-height: 1.4; }

/* classic band */
.classic { text-align: center; }
.classic h2 { font-size: clamp(1.7rem, 5.6vw, 2.5rem); }
.classic p.big { color: var(--muted-on-light); max-width: 40em; margin: 0 auto 26px; }
.classic .media-frame { background: #768060; border-color: var(--rule-on-light); }

/* beta form */
.beta h2 { font-size: clamp(1.9rem, 6vw, 2.7rem); }
.beta > .wrap > p { color: var(--parchment-dim); }
.signup {
  margin-top: 24px; display: grid; gap: 16px;
  padding: 22px 18px; border-radius: 18px;
  background: rgba(20, 13, 7, 0.55); border: 1px solid rgba(242, 194, 84, 0.3);
}
@media (min-width: 640px) { .signup { padding: 28px; grid-template-columns: 1fr 1fr; } .signup .full { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select {
  font: inherit; font-size: 16px; /* 16px stops iOS zooming on focus */
  color: var(--ink); background: var(--parchment);
  border: 2px solid transparent; border-radius: 10px;
  min-height: 48px; padding: 0 12px; width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(242, 194, 84, 0.35); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--gold); flex: none; }
.form-note { font-size: 0.85rem; color: var(--parchment-dim); margin: 0; }
.tag {
  display: inline-block; padding: 1px 8px; margin-right: 6px; border-radius: 99px;
  background: rgba(242, 194, 84, 0.16); color: var(--gold); border: 1px solid rgba(242, 194, 84, 0.45);
  font-family: var(--font-num); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  vertical-align: 1px;
}
.signup .btn { width: 100%; }
@media (min-width: 640px) { .signup .btn { width: auto; justify-self: start; } }

/* FAQ */
.faq h2 { font-size: clamp(1.9rem, 6vw, 2.7rem); }
.faq details {
  border-top: 1px solid var(--rule-on-light);
}
.faq details:last-of-type { border-bottom: 1px solid var(--rule-on-light); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 18px 2px; min-height: 48px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.12rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translate(-3px, -3px); transition: transform 0.2s;
  opacity: 0.7;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details > div { padding: 0 2px 18px; color: var(--muted-on-light); }
.faq details > div p:last-child { margin-bottom: 0; }

/* support */
.support h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.contact-grid { display: grid; gap: 12px; margin-top: 18px; }
@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact {
  padding: 16px; border-radius: 12px; background: rgba(69, 46, 28, 0.45);
  border: 1px solid rgba(242, 194, 84, 0.22);
}
.contact h3 { font-size: 1rem; margin-bottom: 4px; }
.contact p { margin: 0; font-size: 0.92rem; color: var(--parchment-dim); }
.contact a { word-break: break-word; }

/* footer */
.site-footer { background: var(--night); padding: 36px 0 44px; font-size: 0.9rem; color: var(--parchment-dim); }
.footer-row { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--parchment); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-meta { width: 100%; margin: 14px 0 0; font-size: 0.8rem; opacity: 0.8; }

/* ---------- document pages (privacy, terms, press) ---------- */

.doc-page { background: var(--surface-light); color: var(--text-on-light); }
.doc-page .site-header { background: var(--night); }
.doc { padding: 40px 0 72px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(2rem, 7vw, 3rem); }
.doc h2 { font-size: 1.45rem; margin-top: 2em; }
.doc h3 { font-size: 1.15rem; margin-top: 1.6em; }
.doc a { color: var(--accent-on-light); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 0.35em; }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 1em 0 1.4em; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule-on-light); }
.doc th { font-family: var(--font-display); }
.doc .meta { color: var(--muted-on-light); font-style: italic; }
.draft-banner {
  margin: 0 0 28px; padding: 14px 16px; border-radius: 12px;
  background: #fff3cd; color: #4a3500; border: 1px solid #e0b84f;
  font-size: 0.95rem; line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .draft-banner { background: #3a2c0c; color: #ffe39a; border-color: #8a6a1c; }
}
.doc .grid-2 { display: grid; gap: 14px; }
@media (min-width: 720px) { .doc .grid-2 { grid-template-columns: 1fr 1fr; } }
.doc figure { margin: 0; }
.doc figure img { border-radius: 10px; border: 1px solid var(--rule-on-light); }
.doc figcaption { color: var(--muted-on-light); text-align: left; font-style: normal; font-family: var(--font-body); font-size: 0.85rem; }
.factsheet { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 1em 0 1.5em; }
.factsheet dt { font-weight: 700; font-family: var(--font-display); }
.factsheet dd { margin: 0; }

/* Stacked tables on phones: each row becomes a card, each cell shows its column label. */
@media (max-width: 639px) {
  .doc table.stack { display: block; overflow: visible; }
  .doc table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .doc table.stack tbody, .doc table.stack tr, .doc table.stack td { display: block; }
  .doc table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--rule-on-light); }
  .doc table.stack td { border: 0; padding: 4px 0; }
  .doc table.stack td::before {
    content: attr(data-label); display: block;
    font-family: var(--font-num); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted-on-light);
  }
  .doc table.stack td:first-child { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
  .doc table.stack td:first-child::before { display: none; }
}
