/* ============================================================
   ORLANDO MOTHERS WATCH — styles.css
   Plain CSS. No framework, no build step, no external requests.
   Brand: "Marigold at Midnight" — care, not authority.
   See STYLE.md for palette rationale + alternates.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* light (default) */
  --paper: #FFF8EE;          /* warm page ground */
  --paper-2: #F9EFDD;        /* alt band */
  --card: #FFFFFF;
  --ink: #241B0E;            /* near-black warm */
  --ink-soft: #5C4F3A;       /* secondary text — 5.7:1 on paper */
  --rule: #E7D9C2;           /* hairlines */
  --link: #8A4B00;           /* 6.4:1 on paper */
  --marigold: #F5A623;       /* THE color */
  --marigold-hot: #DD8F0B;   /* hover state for marigold buttons */
  --marigold-deep: #8A5500;
  --accent-ink: #201502;     /* text on marigold */
  --night: #16110B;          /* dark panels (used in both themes) */
  --night-2: #221B12;
  --night-ink: #F6EDDE;
  --night-ink-soft: #CDBFA6;
  --good: #3E7C5B;
  --focus: #8A4B00;
  /* coverage clock */
  --clock-bg: #131017;
  --clock-face: #1D1823;
  --clock-tick: #4A4152;
  --clock-label: #EFE6D8;
  --clock-amb: #5FB0AE;      /* care — teal */
  --clock-opd: #8E99A8;      /* enforcement — steel */
  --clock-venue: #67748A;    /* venue extra-duty — slate */
  --clock-mw: #F5A623;       /* mothers watch — marigold */
  --shadow: 0 1px 2px rgba(36,27,14,.06), 0 8px 24px rgba(36,27,14,.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171310;
    --paper-2: #1F1913;
    --card: #221C15;
    --ink: #F2E9DB;
    --ink-soft: #C8B79F;
    --rule: #3A3226;
    --link: #F2B14E;
    --accent-ink: #201502;
    --marigold-deep: #F2B14E;
    --focus: #F5A623;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --paper: #171310;
  --paper-2: #1F1913;
  --card: #221C15;
  --ink: #F2E9DB;
  --ink-soft: #C8B79F;
  --rule: #3A3226;
  --link: #F2B14E;
  --accent-ink: #201502;
  --marigold-deep: #F2B14E;
  --focus: #F5A623;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.06rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 6.5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-top: 0; }
h3 { font-size: clamp(1.15rem, 3vw, 1.4rem); }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
::selection { background: var(--marigold); color: var(--accent-ink); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.skip-link {
  position: absolute; left: 0; top: -100%;
  background: var(--night); color: var(--night-ink);
  padding: .7rem 1.2rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.1rem; }
.measure { max-width: 44rem; }
.center { text-align: center; }
.small { font-size: .9rem; }
.muted { color: var(--ink-soft); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; gap: .8rem;
  min-height: 3.6rem; flex-wrap: wrap; padding-top: .35rem; padding-bottom: .35rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: Georgia, serif; font-weight: 700;
  font-size: 1.06rem; color: var(--ink); text-decoration: none;
  letter-spacing: .01em; white-space: nowrap;
}
.brand .logo-mark { width: 30px; height: 30px; flex: none; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none; border: 1px solid var(--rule); border-radius: 8px;
  padding: .45rem .7rem; font: inherit; color: var(--ink); cursor: pointer;
}
.site-nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--ink);
  padding: .5rem .6rem; border-radius: 8px; font-size: .95rem;
}
.site-nav a:hover { background: var(--paper-2); }
.site-nav a.nav-ks { color: var(--marigold); }
.site-nav a.nav-ks:hover { background: var(--paper-2); }
.site-nav a[aria-current="page"] {
  background: var(--paper-2);
  box-shadow: inset 0 -3px 0 var(--marigold);
}
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  border-radius: 999px; padding: .72rem 1.35rem;
  font-weight: 700; font-size: 1rem; border: 2px solid transparent;
  cursor: pointer;
}
.btn-donate {
  background: var(--marigold); color: var(--accent-ink);
  border-color: var(--marigold);
}
.btn-donate:hover { background: var(--marigold-hot); border-color: var(--marigold-hot); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--paper-2); }
.btn-night { background: var(--night); color: var(--night-ink); border-color: var(--night); }
.btn-night:hover { background: var(--night-2); }
.btn[aria-disabled="true"] { opacity: .65; cursor: not-allowed; }
.btn .micro {
  display: block; font-size: .74em; font-weight: 400;
  opacity: .85; letter-spacing: .02em; margin-top: .1rem;
}
.site-nav .btn-donate { padding: .5rem 1.05rem; margin-left: .35rem; }
.hero .btn-ghost, .section-night .btn-ghost {
  color: var(--night-ink); border-color: var(--night-ink);
}
.hero .btn-ghost:hover, .section-night .btn-ghost:hover { background: rgba(255,255,255,.08); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; order: 3; }
  .header-donate { order: 2; margin-left: auto; }
  .nav-toggle { margin-left: 0; }
  .site-nav {
    order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch;
    padding: .4rem 0 .8rem; margin-left: 0; gap: .1rem;
  }
  .site-nav a { padding: .65rem .6rem; }
  html.js .site-nav[data-collapsed="true"] { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(58rem 30rem at 85% -18%, rgba(245,166,35,.16), transparent 60%),
    var(--night);
  color: var(--night-ink);
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.6rem, 7vw, 5rem);
}
.hero h1 { color: #FFFDF6; max-width: 15ch; }
.hero .kicker {
  color: var(--marigold); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; font-size: .8rem; margin-bottom: 1rem;
}
.hero .sub { color: var(--night-ink); font-size: clamp(1.05rem, 2.4vw, 1.25rem); max-width: 38rem; }
.hero .sub strong { color: #FFFDF6; }
.hero .cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero .fine { color: var(--night-ink-soft); font-size: .9rem; margin-top: 1.1rem; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.25fr .75fr; } }
.hero-art { text-align: center; }
.hero-art svg { width: min(100%, 300px); }

/* page heroes (interior) */
.page-hero { background: var(--paper-2); border-bottom: 1px solid var(--rule); padding: clamp(2.2rem, 6vw, 3.6rem) 0; }
.page-hero h1 { max-width: 22ch; }
.page-hero .lede { font-size: clamp(1.05rem, 2.3vw, 1.2rem); color: var(--ink-soft); max-width: 42rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.4rem, 6vw, 4.2rem) 0; }
.section-alt { background: var(--paper-2); }
.section-night { background: var(--night); color: var(--night-ink); }
.section-night h2, .section-night h3 { color: #FFFDF6; }
.section-night .muted { color: var(--night-ink-soft); }
.section-night a { color: var(--marigold); }
.section-night .btn-donate { color: var(--accent-ink); } /* v5 fix: night-section link color was overriding the button ink (invisible text) */
.eyebrow {
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-size: .78rem; color: var(--marigold-deep); margin: 0 0 .5rem;
}
.section-night .eyebrow { color: var(--marigold); }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px;
  padding: 1.25rem 1.25rem 1.05rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: .1rem; }
.stat-card .figure {
  font-family: Georgia, serif; font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 700; line-height: 1.05; color: var(--ink);
}
.stat-card .figure .unit { font-size: .55em; }
.stat-card .label { color: var(--ink-soft); margin-top: .35rem; }
.stat-card .cite { font-size: .8rem; color: var(--ink-soft); margin-top: .55rem; }
.callout {
  border-left: 5px solid var(--marigold);
  background: var(--paper-2);
  padding: 1rem 1.2rem; border-radius: 0 12px 12px 0;
  margin: 1.4rem 0;
}
.section-alt .callout, .section-night .callout { background: var(--card); color: var(--ink); }
.quote {
  font-family: Georgia, serif; font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  border-left: 5px solid var(--marigold); margin: 1.4rem 0; padding: .4rem 0 .4rem 1.1rem;
}
.quote footer { font-family: system-ui, sans-serif; font-size: .88rem; color: var(--ink-soft); margin-top: .5rem; }
.section-night .quote footer { color: var(--night-ink-soft); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; font-weight: 700; padding-bottom: .5rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
tbody tr:nth-child(odd) { background: var(--paper-2); }

/* ---------- Coverage Clock ---------- */
.clock-panel {
  background: var(--clock-bg); border-radius: 18px; padding: clamp(1rem, 3vw, 2rem);
  color: var(--clock-label); box-shadow: var(--shadow);
}
.clock-figure { margin: 0; }
.clock-figure svg { display: block; width: min(100%, 560px); margin: 0 auto; }
.clock-legend { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; }
@media (min-width: 720px) { .clock-legend { grid-template-columns: 1fr 1fr; } }
.clock-legend li { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.clock-legend .swatch {
  flex: none; width: 1rem; height: 1rem; border-radius: 4px; margin-top: .22rem;
}
.clock-legend strong { color: #FFFDF6; }
.clock-caption {
  margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid #322B3C;
  font-family: Georgia, serif; font-size: 1.05rem;
}
.clock-caption .src { display: block; font-family: system-ui, sans-serif; font-size: .82rem; color: #B7ACC7; margin-top: .4rem; }
.clock-footnote { font-size: .82rem; color: #B7ACC7; margin-top: .8rem; }
@media (prefers-reduced-motion: no-preference) {
  .clock-figure .ring-mw { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawring 1.6s ease-out .3s forwards; }
  @keyframes drawring { to { stroke-dashoffset: 0; } }
}

/* ---------- Ledger ---------- */
.ledger {
  background: var(--night); color: var(--night-ink);
  border-radius: 18px; padding: clamp(1.4rem, 4vw, 2.2rem); text-align: center;
}
.ledger .amount {
  font-family: Georgia, serif; font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.4rem); color: var(--marigold); line-height: 1.1;
}
.ledger .note { color: var(--night-ink-soft); max-width: 34rem; margin: .6rem auto 0; }

/* ---------- Donate tiers ---------- */
.tier { display: flex; flex-direction: column; }
.tier .price {
  font-family: Georgia, serif; font-size: 2.1rem; font-weight: 700; color: var(--ink);
}
.tier .unit { font-weight: 700; margin: .2rem 0 .5rem; }
.tier p { color: var(--ink-soft); font-size: .95rem; }
.pledge {
  border: 2px solid var(--marigold); border-radius: 14px;
  padding: 1.2rem 1.4rem; font-family: Georgia, serif;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem); margin: 1.6rem 0;
  background: var(--card);
}

/* ---------- Charter ---------- */
.charter-list { counter-reset: article; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.charter-list > li {
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px;
  padding: 1.2rem 1.3rem 1rem; box-shadow: var(--shadow);
}
.charter-list h3 { display: flex; gap: .7rem; align-items: baseline; }
.charter-list h3::before {
  counter-increment: article; content: counter(article, upper-roman);
  font-size: .8rem; letter-spacing: .08em; color: var(--marigold-deep);
  border: 1px solid var(--rule); border-radius: 999px; padding: .15rem .55rem;
  font-family: system-ui, sans-serif; flex: none;
}
.charter-list p:last-child { margin-bottom: .2rem; }

/* ---------- Mothers grid (waiting portraits) ---------- */
.portrait-card { text-align: left; }
.portrait-art {
  border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5;
  display: block; width: 100%;
  background: var(--paper-2);
}
.portrait-card .name { font-weight: 700; margin: .7rem 0 .1rem; font-family: Georgia, serif; }
.portrait-card .line { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Steps / definition rows ---------- */
.deflist { display: grid; gap: .9rem; padding: 0; margin: 0; }
.deflist > div { display: grid; gap: .15rem; padding: .8rem 1rem; border-left: 4px solid var(--marigold); background: var(--paper-2); border-radius: 0 10px 10px 0; }
.deflist dt { font-weight: 700; }
.deflist dd { margin: 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--night); color: var(--night-ink-soft);
  padding: 2.6rem 0 2.2rem; margin-top: 3rem; font-size: .92rem;
}
.site-footer a { color: var(--night-ink); }
.site-footer .cols { display: grid; gap: 1.6rem; }
@media (min-width: 760px) { .site-footer .cols { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer .brandline { font-family: Georgia, serif; color: #FFFDF6; font-size: 1.05rem; margin-bottom: .5rem; }
.site-footer .subhead { font-family: Georgia, serif; color: #FFFDF6; font-size: .95rem; margin-bottom: .5rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.legal-lines { border-top: 1px solid #322B3C; margin-top: 1.8rem; padding-top: 1.2rem; display: grid; gap: .45rem; font-size: .84rem; }
.todo {
  background: #3A2B10; color: #FFD98A; border: 1px dashed #B98A2E;
  padding: .05rem .45rem; border-radius: 6px; font-family: ui-monospace, monospace; font-size: .82em;
  white-space: nowrap;
}
.status-pill {
  display: inline-block; border: 1px solid var(--rule); border-radius: 999px;
  padding: .2rem .8rem; font-size: .8rem; letter-spacing: .04em; color: var(--ink-soft);
  background: var(--card);
}

/* ---------- Kickstarter (text badge only; official embed swapped in at deploy) ---------- */
.ks-badge {
  display: inline-block; background: #05CE78; color: #08281A;
  font-weight: 700; font-size: .85rem; letter-spacing: .01em;
  padding: .45rem .95rem; border-radius: 999px; text-decoration: none;
  font-family: system-ui, sans-serif; border: 2px solid #05CE78;
}
.ks-badge:hover { background: #06B96C; border-color: #06B96C; }
.btn-ks { background: #05CE78; color: #08281A; border-color: #05CE78; }
.btn-ks:hover { background: #06B96C; border-color: #06B96C; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cta-row, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
