/* ============================================================
   Mu Media — shared stylesheet for the text pages
   ============================================================

   Linked by halo.html, privacy.html and support.html.

   index.html is DELIBERATELY NOT linked here yet: its settled-frame render
   was measured byte-identical against the reduced-motion layout, and that
   measurement is a recorded caveat in HANDOVER.md. Folding it in is the
   next step, not this pass — see HANDOVER OPEN.

   Scope, on purpose, is only what the text pages SHARE: the palette tokens,
   the reset, the layout container, the a11y helpers, the header, the card,
   the footer and the reduced-motion block. Anything a single page owns
   (heroes, feature lists, screenshots, CTAs, forms, the tile animation)
   stays in that page's own <style> block.

   The :root block below is a verbatim copy of index.html's :root — token
   for token, value for value. index.html remains the single source of
   truth for the palette until it is folded in here. Diff the two blocks
   after touching either.
   ============================================================ */

:root {
  --page: #fdf4d7;
  --card: #fffdf4;
  --ink: #1f1a14;
  --body: #7c6d4b;
  --status: #a5966f;
  --footer: #b3a26f;
  --accent: #ffd166;
  --accent-glow: rgba(224, 168, 32, 0.35);
  --hero-accent: #e39b00;
  --clay-top: #f7edd2;
  --clay-bottom: #eee0b8;
  --clay-ledge: #ddcd9e;
  --badge-border: #dcc98f;
  --badge-ink: #8a7c5a;
  --field: #f7edd2;
  --placeholder: #9a8a5e;
  --muwatch: #2aa188;
  --beep: #f0704a;
  --halo: #8f6ae0;
  --display: 'Baloo 2', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --text: 'Outfit', 'Avenir Next', system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 5vw, 96px);
}

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

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  /* Defensive only: verified no horizontal overflow at 320/390/1440
     with this rule removed. See HANDOVER.md. */
  overflow-x: clip;
}

a { color: #b45309; }
a:hover { color: #92400e; }

img, svg { max-width: 100%; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

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

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

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: clamp(20px, 3vw, 36px);
  padding-bottom: clamp(10px, 2vw, 24px);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.5px;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
}

.wordmark:hover { color: var(--ink); }

.back-link {
  font-family: var(--text);
  font-weight: 600;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
  text-decoration: none;
}

.back-link:hover { color: var(--ink); }

/* ---------- content cards ---------- */

.card {
  background: var(--card);
  border-radius: clamp(28px, 3.5vw, 44px);
  padding: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 64px);
  box-shadow: 0 24px 48px rgba(60, 48, 30, 0.08);
}

.card h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.4vw, 2.875rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 clamp(12px, 1.5vw, 20px) 0;
  text-wrap: balance;
}

.card p {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--body);
  max-width: 640px;
  margin: 0;
  text-wrap: pretty;
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(40px, 6vw, 72px);
  font-size: clamp(13px, 1.2vw, 15px);
  color: var(--footer);
  text-align: center;
  text-wrap: balance;
}

/* Footer links are navigation the App Store requires readers to find, so
   they take the readable --body (~5.5:1 on the page) rather than the
   quieter --footer used for the company line. */
.site-footer a {
  color: var(--body);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer a:hover { color: var(--ink); }

.site-footer .sep { color: var(--footer); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
