/* ============================================================================
   MOONIEFUL BRAND SYSTEM
   Single source of truth for colour and type across every Moonieful surface
   except the homepage, whose CSS is deliberately inline (see
   docs/HANDOFF-homepage-2026-08.md section 1). The token values below are
   identical to the homepage's :root block — if you change one, change both.

   Palette source: Miki's Character Sheet, 2026-07-28, confirmed authoritative
   by Harry 2026-08-09. Six brand colours plus three accessibility-derived
   neutrals. Every ratio quoted below was measured, not estimated.

   FOUR RULES THAT ARE NOT STYLE PREFERENCES
   1. --gold is never text. 2.10:1 on white, 3.00:1 on teal. Dividers and
      flourishes only.
   2. --accent is 24px-and-up only, and never on a teal background, where it
      measures 1.48:1.
   3. Body copy is --ink. Miki's six contain no colour that passes for long
      copy, so this neutral was derived.
   4. Small text on a teal band is --on-teal, not --aqua-light. Aqua-light
      measures 3.99:1 there, just under the 4.5 minimum.
   ========================================================================== */

:root {
  /* --- Miki's six --- */
  --teal-deep:  #0E6B6B;   /* headings, solid buttons, focus ring. 6.30:1 on white */
  --accent:     #1583B3;   /* large text 24px+, icons, borders. 4.26:1 on white */
  --aqua-light: #A6D7D5;   /* decoration, and solid panels carrying dark text */
  --page:       #FFFFFF;   /* page background. White per Miki, 2026-08-09 */
  --aqua-pale:  #E7F3F1;   /* alternate section background */
  --gold:       #D4AF37;   /* decorative only, never a word */

  /* --- Derived neutrals (not Miki's; tune only if you re-measure) --- */
  --ink:        #243434;   /* body text. 13.00:1 on white, 11.44:1 on aqua-pale */
  --ink-soft:   #3A4A4A;   /* secondary text. 9.30:1 on white */
  --on-teal:    #BFE2E1;   /* small text on a teal band. 4.55:1 */

  --white:      #FFFFFF;

  /* --- Status colours. Miki's six carry no success/warn/danger, so these are
     derived the same way --ink is, and each was measured against both white
     and its own tint. Every pair below clears 4.5:1 in both directions. --- */
  --ok:         #1B7A5A;   /* success.     5.28:1 on white, 4.66:1 on --ok-bg */
  --ok-bg:      #E6F4EE;
  --warn:       #8A5A00;   /* caution.     5.93:1 on white, 5.29:1 on --warn-bg */
  --warn-bg:    #FBF1DF;
  --danger:     #A32020;   /* destructive. 7.54:1 on white, 6.48:1 on --danger-bg */
  --danger-bg:  #FBEAEA;

  /* --- Surfaces --- */
  --line:       rgba(14,107,107,.22);
  --line-soft:  rgba(14,107,107,.12);
  /* Aura, not drop shadow: a tight contact shadow plus a wide halo tinted to
     teal rather than grey. Grey reads as lift; a tinted halo reads as glow. */
  --shadow:      0 1px 2px rgba(36,52,52,.06), 0 4px 40px rgba(14,107,107,.13);
  --shadow-lift: 0 2px 6px rgba(36,52,52,.07), 0 8px 56px rgba(14,107,107,.20);

  --radius:     14px;
  --radius-sm:  10px;
  --wrap:       1120px;
  --measure:    65ch;

  /* --- Type. Shantell Sans for headings, Arimo for body. Both OFL. --- */
  --font-head: 'Shantell Sans', 'Trebuchet MS', sans-serif;
  --font-body: Arimo, Arial, Helvetica, sans-serif;
}

/* ---------------------------------------------------------------- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .6em;
  text-wrap: balance;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-deep); }

/* Visible, and never removed. 6.30:1 against white. */
:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* --------------------------------------------------------------- buttons --- */
/* 52px tall, comfortably past the 24px WCAG 2.2 AA target-size minimum. */
.mf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px; border-radius: 999px;
  /* Inside a flex row a button will otherwise shrink below its own label. */
  flex: 0 0 auto; white-space: nowrap;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.mf-btn--primary { background: var(--teal-deep); color: var(--white); box-shadow: var(--shadow); }
.mf-btn--primary:hover { background: #0a5555; color: var(--white); }
.mf-btn--ghost { background: transparent; color: var(--teal-deep); border-color: var(--teal-deep); }
.mf-btn--ghost:hover { background: rgba(14,107,107,.07); }
.mf-btn--danger { background: var(--danger); color: var(--white); }
.mf-btn--danger:hover { background: #8a1b1b; color: var(--white); }
.mf-btn--sm { min-height: 38px; padding: 8px 18px; font-size: .92rem; }

/* On a teal band the solid button inverts, so it stays the brightest thing. */
.mf-on-teal .mf-btn--primary { background: var(--white); color: var(--teal-deep); }
.mf-on-teal .mf-btn--primary:hover { background: var(--aqua-pale); }

/* ----------------------------------------------------------------- cards --- */
.mf-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------- the gold accent --- */
/* Crescent plus two sparkles, redrawn from the icon row on the Character
   Sheet. Carried as a data URI so it inherits nothing and loads nothing. */
.mf-secbreak { padding: 0; }
.mf-secbreak-in {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
}
.mf-secbreak-rule {
  flex: 1 1 auto; height: 1px; max-width: 210px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,.55));
}
.mf-secbreak-mark ~ .mf-secbreak-rule {
  background: linear-gradient(90deg, rgba(212,175,55,.55), transparent);
}
.mf-secbreak-mark {
  flex: 0 0 auto; width: 56px; height: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24' fill='none'%3E%3Cpath d='M23.6 4.6a7.6 7.6 0 1 0 0 14.8 8.2 8.2 0 0 1 0-14.8Z' stroke='%23D4AF37' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M9.4 4.4l.86 2.34 2.34.86-2.34.86-.86 2.34-.86-2.34-2.34-.86 2.34-.86.86-2.34Z' fill='%23D4AF37'/%3E%3Cpath d='M33 13.4l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6.6-1.6Z' fill='%23D4AF37'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ------------------------------------------------------- shared page chrome --- */
/* Header and footer used by the privacy policy and any other standalone page
   that should read as part of the same site as the homepage. */
.mf-hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
@supports not (backdrop-filter: blur(8px)) { .mf-hdr { background: var(--page); } }
.mf-hdr-in {
  display: flex; align-items: center; gap: 20px; min-height: 68px;
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
}
.mf-brand {
  display: flex; align-items: center; gap: 10px; padding: 5px 0;
  text-decoration: none; font-family: var(--font-head); font-weight: 700;
  color: var(--teal-deep); letter-spacing: .02em;
}
.mf-brand-mark { height: 34px; width: auto; flex: 0 0 auto; }
.mf-brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.mf-brand-name { font-size: 1.22rem; }
/* Arimo, not Shantell, so it reads as a descriptor rather than a second logo. */
.mf-brand-tag {
  font-family: var(--font-body); font-weight: 400; font-size: .72rem;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft);
}

.mf-ftr {
  background: var(--teal-deep); color: rgba(255,255,255,.85);
  padding: 44px 0 28px; font-size: .95rem; text-align: center;
}
.mf-ftr-in { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.mf-ftr a { color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.mf-ftr a:hover { border-bottom-color: var(--gold); }
/* Footer links measured 18px tall, under the 24px AA minimum, and they sit in
   a list rather than inline in a sentence so the inline exception misses them. */
.mf-ftr-links {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 26px; justify-content: center;
}
.mf-ftr-links a { display: inline-block; padding: 7px 0; }
.mf-ftr-tag { font-family: var(--font-head); color: var(--on-teal); margin: 0 0 6px; }
.mf-ftr-btm {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.2);
  font-size: .88rem; color: rgba(255,255,255,.78);
}

/* ----------------------------------------------------------------- motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
