/* Checkered Futures — site styles
   Brand tokens locked 2026-10-07. See Docs/03 CF Website - Homepage Scope.md §5.
   Contrast rules: navy buttons take white text (13.24:1). Orange buttons MUST take
   near-black text (6.82:1) — white on orange is 3.08:1 and fails WCAG 2.2 AA. */

:root {
  --navy: #002484;
  --navy-deep: #001a63;
  --orange: #fc600c;
  --orange-text: #c2410c;     /* AA-safe orange for text on white (5.2:1) */
  --ink: #0b0b0c;
  --ink-soft: #3f4046;
  --paper: #ffffff;
  --surface: #f4f5f8;
  --line: #d9dbe3;
  --on-navy: #ffffff;
  --on-orange: #0b0b0c;
  --focus: #fc600c;
  --radius: 14px;
  --shell: 1200px;
  --font: "Atkinson Hyperlegible", ui-sans-serif, system-ui, -apple-system,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #8fa8ff;           /* navy #002484 is 1.49:1 on near-black — unusable */
    --navy-deep: #b9c7ff;
    --orange-text: #ff8a4c;
    --ink: #f2f3f7;
    --ink-soft: #b9bcc7;
    --paper: #0b0b0c;
    --surface: #15161a;
    --line: #2d2f36;
  }
}

:root[data-theme="dark"] {
  --navy: #8fa8ff;
  --navy-deep: #b9c7ff;
  --orange-text: #ff8a4c;
  --ink: #f2f3f7;
  --ink-soft: #b9bcc7;
  --paper: #0b0b0c;
  --surface: #15161a;
  --line: #2d2f36;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }

a { color: var(--orange-text); }
a:hover { color: var(--ink); }

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

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

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 200;
  background: var(--navy); color: #fff; padding: 12px 18px;
  border-radius: 0 0 10px 10px; font-weight: 700; text-decoration: none;
  transition: top .15s ease;
}
.skip:focus { top: 0; color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  cursor: pointer; text-align: center; white-space: nowrap;
}
.btn-primary { background: var(--navy); color: #fff; }          /* 13.24:1 */
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-accent { background: var(--orange); color: var(--on-orange); } /* 6.82:1 */
.btn-accent:hover { background: #e4540a; color: var(--on-orange); }
.btn-ghost { background: transparent; color: var(--ink); border-color: currentColor; }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-on-dark { background: #fff; color: var(--ink); }
.btn-on-dark:hover { background: #e9ebf3; color: var(--ink); }

/* ---------- chequer strip ---------- */
.chequer {
  height: 10px;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  background-color: #fff;
}

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 42px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a.navlink {
  color: var(--ink); text-decoration: none; font-weight: 600;
  padding: 10px 12px; border-radius: 8px; min-height: 44px;
  display: inline-flex; align-items: center;
}
.nav a.navlink:hover { background: var(--surface); }
.nav .btn { margin-left: 6px; }
.navtoggle { display: none; }

@media (max-width: 980px) {
  .nav { gap: 2px; }
  .nav a.navlink { display: none; }
  .navtoggle {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; min-width: 48px; border: 2px solid var(--line);
    background: transparent; color: var(--ink); border-radius: 10px;
    font-size: 1.4rem; cursor: pointer; order: 3;
  }
  .nav .btn { padding: 11px 14px; font-size: .95rem; }
  #menu[hidden] { display: none; }
  #menu {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px; display: grid; gap: 2px;
  }
  #menu a {
    color: var(--ink); text-decoration: none; font-weight: 600;
    padding: 14px 10px; border-radius: 8px; display: block;
  }
  #menu a:hover { background: var(--surface); }
}
@media (max-width: 560px) {
  .nav .btn-ghost { display: none; }   /* Donate stays in the menu, hero and footer */
  .brand img { height: 36px; }
  .nav .btn { padding: 11px 13px; }
}
@media (min-width: 981px) { #menu { display: none !important; } }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--ink); isolation: isolate; }
.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%; z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(0,0,0,.35) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.86) 100%);
}
.hero-inner { padding-block: clamp(80px, 16vw, 170px) clamp(44px, 8vw, 90px); }
.hero h1 { color: #fff; max-width: 17ch; text-wrap: balance; }
.hero p.lede { color: #e8eaf2; font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.credit {
  position: absolute; right: 14px; bottom: 10px;
  color: #e8eaf2; font-size: .78rem; opacity: .85; margin: 0;
}
.credit a { color: #e8eaf2; }

/* ---------- sections ---------- */
.section { padding-block: clamp(52px, 8vw, 96px); }
.section-alt { background: var(--surface); }
.section > .shell > h2 { text-wrap: balance; }
.lead { font-size: 1.15rem; max-width: 62ch; color: var(--ink-soft); }

.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; height: 100%;
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; }
.pillar { border-top: 5px solid var(--orange); }

.photocard {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; height: 100%;
  display: flex; flex-direction: column;
}
.photocard img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.photocard .body { padding: 18px 20px 22px; }
.photocard h3 { text-transform: uppercase; letter-spacing: .04em; color: var(--navy); }
.photocard p { color: var(--ink-soft); margin: 0; }

.tier { display: flex; flex-direction: column; }
.tier .btn { margin-top: auto; }
.tier .who { color: var(--ink-soft); margin-bottom: 1.1rem; }
.tier .fee {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px; margin-bottom: .9rem;
}
.note {
  margin-top: 26px; padding: 18px 20px; border-left: 5px solid var(--orange);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
}
.note p { margin: 0; color: var(--ink-soft); }

/* ---------- sponsors ---------- */
.logos {
  display: grid; gap: 18px; margin-top: 30px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.logo-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  min-height: 112px; display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.logo-tile img { max-height: 58px; width: auto; max-width: 100%; }
.partner { margin-top: 34px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.partner img { max-height: 42px; width: auto; background: #fff; border-radius: 6px; }
.partner p { margin: 0; color: var(--ink-soft); }

/* ---------- footer ---------- */
.footer { background: #001a63; color: #e8eaf2; padding-block: 54px 34px; }
.footer a { color: #fff; }
.footer a:hover { color: #ffd9c2; }
.footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-logo { height: 46px; width: auto; margin-bottom: 14px; }
.legal {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.22);
  font-size: .9rem; color: #c9cde0;
}
.legal p { margin: 0 0 .5rem; }

/* ---------- donate page ---------- */
.page-head { background: var(--surface); padding-block: clamp(46px, 8vw, 84px); border-bottom: 1px solid var(--line); }
.callout {
  border: 2px solid var(--orange); border-radius: var(--radius);
  padding: 24px 26px; background: var(--paper); margin-bottom: 30px;
}
.callout h2 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- sponsor tiles: linked ---------- */
.logo-tile a {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 56px; text-decoration: none;
}
.logo-tile a:hover img { transform: scale(1.04); }
.logo-tile img { transition: transform .15s ease; }
.logo-tile a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
/* Hip Pocket — text stand-in until a logo file is supplied */
.logo-text {
  display: block; text-align: center; color: var(--navy);
  font-weight: 800; font-size: 1.15rem; line-height: 1.15; letter-spacing: -.01em;
}
.logo-text small {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); margin-top: 3px;
}

/* ---------- contact form ---------- */
.field { margin: 0 0 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field .req { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  border: 2px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 1rem;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--navy);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- policy pages ---------- */
main table {
  width: 100%; border-collapse: collapse; margin: 1.2rem 0 1.8rem;
  font-size: .97rem;
}
main th, main td {
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
main thead th { background: var(--surface); font-weight: 700; }
main h2 { margin-top: 2.2rem; }
main ol, main ul { padding-left: 1.3rem; }
main li { margin-bottom: .5rem; }
.table-wrap { overflow-x: auto; }
