/* ==========================================================================
   Shared foundation for app pages.

   This file is MATERIALS ONLY — color, type, footer, the App Store button.
   It deliberately contains no page layout: the composition of each app page is
   written in that page's own `page.css`, because the pages are meant to look
   made rather than filled in. If you find yourself adding a layout rule here
   that two pages share, stop — that is how the last set ended up identical.

   Canonical copy lives in `_dev/`. Run `_dev/sync.sh` to distribute it.
   ========================================================================== */

:root {
  --bg: #0b0b0c;
  --ink: #f2f2f3;
  --ink-soft: #8d8f94;
  --ink-faint: #5f6167;
  --rule: #232427;

  /* Each page may set --accent in its own page.css. */
  --accent: #f2f2f3;

  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--ink); color: var(--bg); }

:where(a, button):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

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

/* --- Platform line -------------------------------------------------------
   Always "iOS / iPad / Mac", in that order, omitting what doesn't apply. */
.platforms {
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --- App Store button ---------------------------------------------------- */
.appstore {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font: 600 0.9rem/1 var(--sans);
  letter-spacing: 0.01em;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.appstore:hover { transform: translateY(-1px); opacity: 0.92; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: clamp(4rem, 12vh, 8rem);
  padding: 1.5rem 0 3rem;
  font: 400 0.74rem/1.8 var(--mono);
  color: var(--ink-faint);
}
.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
}
.site-footer a { color: var(--ink-faint); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }

/* --- Privacy documents ---------------------------------------------------
   Privacy pages are documents, not compositions, so their (minimal) layout
   is the one shared exception. */
.doc { max-width: 36rem; }
.doc h1 {
  margin: 0 0 2.5rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
}
.doc h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.doc p { margin: 0 0 1rem; color: var(--ink-soft); }
.doc p strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--ink); }
.doc ul { margin: 0 0 1.2rem; padding-left: 1.1rem; color: var(--ink-soft); }
.doc li { margin-bottom: 0.45rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
