/* games.syncpodcast.com: the hub, privacy and support pages. Tokens and type match
   syncpodcast.com (styles.css); layout follows Apple's HIG (44pt targets, 17pt body,
   safe areas, reduced motion, visible focus). */
@font-face { font-family: "Basteleur"; src: url("fonts/basteleur-bold.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("fonts/spectral-600.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("fonts/im-fell-english-italic.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("fonts/martian-mono-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #2b0d1e;
  --card: #3a1529;
  --card-hover: #461a31;
  --line: #5b2c42;
  --text: #fbf1d0;
  --text-soft: #ecdcc3;
  --muted: #d4b3ad;
  --coral: #ff5a5f;
  --butter: #fff393;
  --on-coral: #2b0d1e;
  --display: "Basteleur", Georgia, serif;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --quote: "IM Fell English", "Spectral", Georgia, serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1080px;
  --gutter: clamp(16px, 5vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 1.0625rem/1.6 var(--serif);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--coral); text-underline-offset: 0.18em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; text-wrap: balance; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--butter); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 12px 16px; border-radius: 8px;
  background: var(--coral); color: var(--on-coral); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Side padding never runs under a notch or rounded corner. */
.pad { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.inner { max-width: var(--maxw); margin: 0 auto; }

/* ---------- Header (same bar as syncpodcast.com) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line);
  padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 12px;
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: none; }
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { width: 150px; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
  color: var(--text); font-weight: 600; font-size: 0.96875rem; text-decoration: none; white-space: nowrap;
}
.nav-link[aria-current="page"] { color: var(--coral); }
.nav-cta { margin-left: 10px; }

/* ---------- Buttons (Martian Mono, like the main site's) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px;
  border-radius: 8px; border: 1px solid transparent; font: 700 0.875rem/1 var(--mono); letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}
.btn-primary { background: var(--coral); color: var(--on-coral); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--line); }
.btn:active { transform: scale(0.97); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding-top: clamp(40px, 8vw, 88px); padding-bottom: clamp(36px, 6vw, 64px); }
/* Pointillist seed of life from the cover, as on the main site's hero. */
.hero .geo {
  position: absolute; right: clamp(-180px, -8vw, -60px); top: -90px; width: clamp(300px, 46vw, 560px); height: auto;
  color: var(--coral); opacity: 0.3; pointer-events: none;
}
.hero .geo g { stroke-width: 1.3; stroke-dasharray: 0 3.2; stroke-linecap: round; }
.hero .inner { position: relative; }
.eyebrow { margin: 0 0 10px; color: var(--coral); font: italic 1.0625rem/1.4 var(--quote); }
.hero h1 { margin: 0 0 16px; font-size: clamp(2.5rem, 9vw, 4.5rem); line-height: 1.02; }
.lead { margin: 0; max-width: 40ch; color: var(--text-soft); font-size: clamp(1.0625rem, 2.2vw, 1.25rem); }

/* ---------- Game cards ---------- */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: clamp(32px, 6vw, 56px); padding-bottom: 20px; }
.game {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 148px; gap: 22px;
  padding: clamp(20px, 2.6vw, 28px); background: var(--card); border: 1px solid transparent; border-radius: 16px;
  transition: background-color 0.15s, border-color 0.15s;
}
/* Play sits at the bottom of every card, so the two buttons line up side by side. */
.game-body { display: flex; flex-direction: column; align-items: flex-start; }
.game-body .btn { margin-top: auto; }
.game-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.game-icon { flex: none; width: 60px; height: 60px; border-radius: 14px; }
.kicker { margin: 0 0 2px; color: var(--coral); font: italic 0.9375rem/1.3 var(--quote); }
.game h2 { margin: 0; font-size: 1.625rem; }
.blurb { margin: 0 0 16px; color: var(--text-soft); }
.terms { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 20px; font-size: 0.9375rem; line-height: 1.5; }
.terms dt { padding-top: 3px; color: var(--muted); font: 700 0.75rem/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.terms dd { margin: 0; color: var(--text-soft); }
/* The Play button's hit area covers the whole card, so one tap anywhere starts the game. */
.game .btn::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.shot { width: 148px; aspect-ratio: 390 / 760; object-fit: cover; object-position: top; border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }

/* ---------- More games ---------- */
.more { padding-top: 20px; padding-bottom: clamp(48px, 8vw, 80px); }
.more .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: clamp(22px, 3vw, 32px); border: 1px dashed var(--line); border-radius: 16px; }
.more h2 { margin: 0 0 4px; font-size: 1.375rem; }
.more p { margin: 0; color: var(--muted); max-width: 52ch; }
.more-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Prose (privacy, support) ---------- */
.prose { max-width: 720px; margin: 0 auto; padding-top: clamp(36px, 6vw, 64px); padding-bottom: clamp(48px, 8vw, 80px); }
.prose h1 { margin: 0 0 10px; font-size: clamp(2.125rem, 6vw, 3rem); }
.prose h2 { margin: 40px 0 8px; font-size: 1.5rem; scroll-margin-top: 96px; }
.prose p, .prose li { color: var(--text-soft); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.25em; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--coral); }
.updated { margin: 0 0 18px; color: var(--muted); font: 0.8125rem/1.5 var(--mono); }
.callout { margin: 40px 0 8px; padding: 4px clamp(18px, 3vw, 26px) 14px; background: var(--card); border-left: 3px solid var(--coral); border-radius: 12px; scroll-margin-top: 96px; }
.callout h2 { margin-top: 20px; }

/* ---------- Footer (same shape as syncpodcast.com's) ---------- */
.site-footer {
  border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 0.875rem;
  padding-top: 40px; padding-bottom: max(40px, env(safe-area-inset-bottom));
}
.site-footer .btn { margin-bottom: 22px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--text); font-weight: 600; text-decoration: none; }
.copy { margin: 8px 0 0; font-size: 0.75rem; opacity: 0.75; }

/* Hover only where a pointer can hover, so taps don't leave sticky highlights. */
@media (hover: hover) {
  .nav-link:hover, .footer-links a:hover { color: var(--coral); }
  .btn-primary:hover { background: var(--butter); }
  .btn-secondary:hover { border-color: var(--coral); color: var(--coral); }
  .game:hover { background: var(--card-hover); border-color: var(--line); }
  .game:hover .btn-primary { background: var(--butter); }
}

@media (max-width: 1000px) { .games { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .nav-cta, .nav-podcast { display: none; } }
/* Phones: the screenshot leads the card as a banner, and Play spans the card. */
@media (max-width: 560px) {
  .brand img { width: 128px; }
  .game { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
  .shot { order: -1; width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: 0; box-shadow: none; }
  .game-body { padding: 18px 18px 20px; }
  .game-icon { width: 48px; height: 48px; border-radius: 12px; }
  .game h2 { font-size: 1.4375rem; }
  .game .btn { width: 100%; }
  .terms { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .terms dt { padding-top: 8px; }
  .more-actions, .more-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .btn:active { transform: none; }
}
