/* The homepage's base: Mmory's tokens (from the app's Ivory palette), a reset, the badge, focus
   styles and the footer. The legal pages use /assets/site.css instead. */

:root {
  color-scheme: dark;
  --black: #000;
  --ivory: #edebe6;
  --text: rgba(237, 235, 230, 0.92);
  --soft: rgba(237, 235, 230, 0.7);
  --faint: rgba(237, 235, 230, 0.6);     /* the lowest alpha that passes 4.5:1 on black */
  --hair: rgba(237, 235, 230, 0.12);
  --champagne: #eddbb8;
  /* The black hole's own gold: the bright band of the accretion disk in AppIcon-1024.png
     (sampled: the most saturated 10% of disk pixels brighter than 175/255). 8.6:1 on black.
     Reserved for privacy: what stays on the iPhone. */
  --gold: #b3a385;
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left));
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: #000; }
body {
  margin: 0; background: #000; color: var(--text); font-family: var(--sys);
  font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--ivory); color: #000; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.badge { display: inline-block; border-radius: 10px; line-height: 0; }
/* The App Store link: appstore.js sets html[data-appstore] before the first paint. Until there is a
   real URL the badges give way to "Coming soon" and the header's Download is hidden; with
   JavaScript off, neither shows (the URL lives in /assets/config.js). */
.soon { display: none; margin: 0; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--hair); color: var(--soft); font-size: 15px; }
html[data-appstore="soon"] .soon { display: inline-block; }
html[data-appstore="soon"] [data-app-store], html:not(.js) [data-app-store] { display: none !important; }

/* Privacy, in the black hole's gold. A phrase at a time, never a paragraph. */
.priv { color: var(--gold); font-weight: 500; }
.badge img { width: 150px; height: auto; }

.wordmark { font-weight: 600; letter-spacing: -0.02em; text-decoration: none; color: var(--ivory); font-size: 20px; }

/* A quiet text button used for Pause / Replay; big enough to tap (WCAG 2.5.8). */
.ghost {
  min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: rgba(237, 235, 230, 0.06); border: 1px solid rgba(237, 235, 230, 0.16); color: var(--soft);
  font-size: 14px; font-weight: 500;
}
.ghost:hover { color: var(--ivory); border-color: rgba(237, 235, 230, 0.3); }

/* ---- Footer (identical across prototypes; links match today's live URLs) ---- */
.site-foot {
  padding: 40px var(--gutter) max(40px, env(safe-area-inset-bottom)); border-top: 1px solid var(--hair);
  display: grid; gap: 18px; justify-items: center; text-align: center; font-size: 14px; color: var(--faint);
}
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.site-foot nav a { color: var(--soft); text-decoration: none; padding: 10px 10px; }
.site-foot nav a:hover { color: var(--ivory); text-decoration: underline; text-underline-offset: 3px; }
.site-foot .facts { max-width: 40rem; }
.site-foot small { font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
