/* Protect Trans Kids Colorado — site.css
 *
 * External stylesheet, never an embedded block: one file, one place to change,
 * and it caches. (OPERATIONAL_RULES web rule 1 — no CSP exception applies here,
 * this is a self-hosted page that can fetch a second file.)
 *
 * There is no JavaScript on this site and the CSP enforces that, so everything
 * below is CSS-only. Theme follows prefers-color-scheme; there is no toggle,
 * because a toggle needs either script or a hack that costs more than it earns.
 *
 * THEME STRATEGY. The hero is a FIXED dark field in both themes, like a printed
 * poster, with its own fixed foreground tokens. Colors that do not invert
 * between themes need a pinned foreground or one theme fails — the ivory-on-gold
 * class of bug. Everything below the hero adapts.
 */

/* ---------- tokens: light (bare :root is the complete palette) ------------- */
:root {
  --ink:            #0B0D12;
  --ink-soft:       #2A2F3A;
  --ground:         #FFFFFF;
  --ground-sunk:    #F2F3F6;
  --rule:           #D8DBE2;
  --accent:         #C81E0F;   /* darker on light ground so body-size text holds AA */
  --accent-quiet:   #8E1409;
  --link:           #0B0D12;

  /* Hero tokens are FIXED — identical in both themes, by design. */
  --hero-field:     #0B0D12;
  --hero-fg:        #FFFFFF;
  --hero-fg-dim:    #B9BEC9;
  --hero-accent:    #FF5B47;   /* 5.9:1 on #0B0D12 — checked in browser, not from math */
  --hero-rule:      #333947;

  /* Button is a FIXED pair in both themes -- fill AND label.
     Pinning only the label was the bug: --accent inverts to a bright coral in
     dark, so white-on-accent measured 5.76:1 in light and 3.07:1 in dark. A
     non-inverting foreground over an inverting fill is not a fixed pair, it is
     half a fix. Both halves are pinned now: #FFFFFF on #C81E0F = 5.76:1,
     identical in both themes because neither side moves. */
  --btn-fill:       #C81E0F;
  --btn-fill-hover: #A0150A;
  --btn-fg:         #FFFFFF;

  /* Trans flag, used once, as signal rather than decoration. */
  --flag-blue:      #5BCEFA;
  --flag-pink:      #F5A9B8;
  --flag-white:     #FFFFFF;

  --measure:        34rem;
  --step--1:        clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:         clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1:         clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:         clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3:         clamp(2.4rem, 1.8rem + 3vw, 4.5rem);
  --step-4:         clamp(3rem, 2rem + 5.2vw, 6.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:          #EEF0F4;
    --ink-soft:     #A8AEBB;
    --ground:       #0B0D12;
    --ground-sunk:  #14171F;
    --rule:         #2A2F3A;
    --accent:       #FF5B47;
    --accent-quiet: #FF8C7D;
    --link:         #EEF0F4;
  }
}
:root[data-theme="dark"] {
  --ink: #EEF0F4; --ink-soft: #A8AEBB; --ground: #0B0D12;
  --ground-sunk: #14171F; --rule: #2A2F3A; --accent: #FF5B47;
  --accent-quiet: #FF8C7D; --link: #EEF0F4;
}

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

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

body {
  margin: 0;
  /* System stack only. A webfont would be a third-party request, and this site
     makes none — that is a privacy property for this audience, not a budget. */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.04; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--accent); }

:where(a, button, input, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: min(100% - 2.5rem, 64rem); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--hero-field); color: var(--hero-fg);
  padding: 0.75rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

/* ---------- flag bar ------------------------------------------------------ */
.flag {
  height: 6px;
  background: linear-gradient(
    to bottom,
    var(--flag-blue)  0 20%, var(--flag-pink) 20% 40%,
    var(--flag-white) 40% 60%, var(--flag-pink) 60% 80%, var(--flag-blue) 80% 100%);
}

/* ---------- hero ---------------------------------------------------------- */
.hero {
  background: var(--hero-field);
  color: var(--hero-fg);
  padding: clamp(1.75rem, 5vw, 4rem) 0 clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hero-fg-dim);
  margin: 0 0 clamp(0.75rem, 2vw, 1.25rem);
}
.eyebrow b { color: var(--hero-fg); font-weight: 700; }

.hero h1 {
  font-size: var(--step-4);
  font-weight: 850;
  letter-spacing: -0.04em;
  margin: 0 0 clamp(0.75rem, 2vw, 1.25rem);
}
.hero h1 .no { color: var(--hero-accent); display: block; }

.standfirst {
  font-size: var(--step-1);
  font-weight: 400;
  color: var(--hero-fg);
  max-width: 30rem;
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
}

.countdown {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--hero-rule);
  padding-top: clamp(1rem, 2.5vw, 1.5rem);
}
.countdown .n {
  font-size: var(--step-3);
  font-weight: 850;
  letter-spacing: -0.04em;
  color: var(--hero-accent);
  line-height: 1;
}
.countdown .lbl { font-size: var(--step--1); color: var(--hero-fg-dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- sections ------------------------------------------------------ */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
section + section { border-top: 1px solid var(--rule); }

.kicker {
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-quiet); margin: 0 0 1.25rem;
}
:root:not([data-theme="light"]) .kicker { color: var(--accent); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .kicker { color: var(--accent-quiet); } }

h2 { font-size: var(--step-2); font-weight: 800; margin: 0 0 1.5rem; }
h3 { font-size: var(--step-1); font-weight: 800; margin: 0 0 0.5rem; }

/* ---------- measures ------------------------------------------------------ */
.measures { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); grid-template-columns: 1fr; }
@media (min-width: 46rem) { .measures { grid-template-columns: 1fr 1fr; } }

.measure {
  background: var(--ground-sunk);
  border-left: 4px solid var(--accent);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.measure .num {
  font-size: var(--step--1); font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-quiet); margin: 0 0 0.35rem;
}
:root:not([data-theme="light"]) .measure .num { color: var(--accent); }
.measure .official { font-style: italic; color: var(--ink-soft); font-size: var(--step--1); margin-bottom: 1rem; }
.measure ul { margin: 0; padding-left: 1.1rem; }
.measure li { margin-bottom: 0.6rem; }
.measure li:last-child { margin-bottom: 0; }

blockquote {
  margin: 1rem 0; padding-left: 1rem;
  border-left: 2px solid var(--rule);
  font-style: normal; color: var(--ink);
}
blockquote p { font-size: var(--step--1); margin-bottom: 0.4rem; }
blockquote cite { font-size: var(--step--1); color: var(--ink-soft); font-style: normal; }

/* ---------- signup -------------------------------------------------------- */
.signup { background: var(--ground-sunk); }
.signup form { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: var(--measure); margin-top: 1.25rem; }
.signup label { display: block; font-size: var(--step--1); font-weight: 700; margin-bottom: 0.4rem; }
.signup .field { flex: 1 1 16rem; }
input[type="email"] {
  width: 100%; font: inherit; padding: 0.8rem 0.9rem;
  border: 2px solid var(--rule); background: var(--ground); color: var(--ink); border-radius: 2px;
}
input[type="email"]::placeholder { color: var(--ink-soft); opacity: 1; }
button[type="submit"] {
  font: inherit; font-weight: 800; letter-spacing: 0.02em;
  padding: 0.8rem 1.5rem; border: 2px solid var(--btn-fill);
  background: var(--btn-fill); color: var(--btn-fg);
  border-radius: 2px; cursor: pointer; flex: 0 0 auto;
}
button[type="submit"]:hover { background: var(--btn-fill-hover); border-color: var(--btn-fill-hover); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note { font-size: var(--step--1); color: var(--ink-soft); max-width: var(--measure); }

/* ---------- sources / footer ---------------------------------------------- */
.sources { font-size: var(--step--1); }
.sources ol { padding-left: 1.3rem; margin: 0; }
.sources li { margin-bottom: 0.5rem; }
.sources a { word-break: break-word; }

footer { background: var(--ground-sunk); border-top: 1px solid var(--rule); padding: 2.5rem 0; font-size: var(--step--1); color: var(--ink-soft); }
footer p { max-width: 48rem; }
footer strong { color: var(--ink); }

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