/* ==========================================================================
   learn.brandonrescue.org — design tokens + shared components

   Palette matches brandonrescue-lp's 2026-07-27 redesign exactly (rescue
   blue, deep blue-gray, ink, warm off-white, amber for actions) so the site
   reads as one BARS property. Contrast ratios noted next to each pairing —
   re-check with a contrast checker if a token value ever changes.

   Mobile-first. System font stack only — no webfont requests. No shadows,
   no gradients beyond the hero scrim, no carousels, no autoplay media.
   ========================================================================== */

:root {
  /* Brand tokens — from brandonrescue-lp */
  --rescue-blue: #0B6FB8;
  --strong-blue: #075A97;
  --deep-blue-gray: #0A3550;
  --ink: #16303C;
  --paper: #FAF7F2;
  --white: #FFFFFF;
  --amber: #F5A00A;
  --amber-hover: #D98C05;

  /* This site's own tokens, built from the base palette */
  --text-main: var(--ink);
  --text-muted: #4B5D68;
  --border: #D8DEE2;
  --focus-ring: #0B6FB8;

  /* Feedback colors — not present in the base palette, added the same way
     bars-volunteer added --error: high-contrast, and never the only signal
     (every use pairs with an icon/text label, see quiz-choice__tag). */
  --success: #1B7A3D;   /* 4.7:1 on white */
  --success-bg: #E7F5EC;
  --error: #B3261E;     /* 6.5:1 on white */
  --error-bg: #FBEAE9;

  --max-content-width: 780px;
  --max-wide-width: 1100px;
  --radius: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-main);
  background: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

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

a { color: var(--strong-blue); }
a:hover { color: var(--deep-blue-gray); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

.container { max-width: var(--max-wide-width); margin: 0 auto; padding: 0 20px; }
.prose-page { max-width: var(--max-content-width); margin: 0 auto; padding: 0 20px; }

.section { padding: 48px 0; }
.section--paper { background: var(--paper); }
.section--tight { padding: 32px 0; }

.label { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; font-weight: 700; color: var(--strong-blue); margin: 0 0 8px; }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 640px; }

.fineprint { font-size: 0.9rem; color: var(--text-muted); }

/* Focus visibility — required everywhere, never suppressed */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--ink);
  padding: 12px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--strong-blue);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

/* ---- Buttons — 44x44 minimum touch target ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.btn--amber { background: var(--amber); color: #241800; }
.btn--amber:hover { background: var(--amber-hover); color: #241800; }
.btn--primary { background: var(--strong-blue); color: var(--white); }
.btn--primary:hover { background: var(--deep-blue-gray); color: var(--white); }
.btn--quiet { background: transparent; border-color: var(--border); color: var(--ink); }
.btn--quiet:hover { border-color: var(--strong-blue); color: var(--strong-blue); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { border-radius: 6px; }
.brand__name { font-weight: 700; font-size: 1.05rem; }

.nav-toggle {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; cursor: pointer; padding: 8px; min-height: 44px; min-width: 44px;
}
.nav-toggle__bars span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 3px 0; }
.nav-toggle__label { font-size: 0.7rem; }

.nav__list { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.nav__list a { text-decoration: none; color: var(--ink); font-weight: 600; }
.nav__list a[aria-current="page"] { color: var(--strong-blue); }
.nav__cta-mobile { display: none; }
.header__cta { display: none; }

@media (max-width: 899px) {
  .header__cta { display: none; }
  .nav {
    position: fixed; inset: 0 0 auto 0; top: 64px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .nav--open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__list { flex-direction: column; gap: 14px; }
  .nav__cta-mobile { display: block; margin-top: 16px; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { display: block; }
  .nav__list { align-items: center; }
  .header__cta { display: block; }
}

/* ---- Hero ---- */
.hero { background: var(--deep-blue-gray); color: var(--white); padding: 56px 0 48px; }
.hero__inner { display: flex; flex-direction: column; gap: 32px; align-items: center; }
.hero__copy h1 { color: var(--white); }
.hero .label { color: #9FD0F0; }
.hero__lede { font-size: 1.15rem; color: #E3ECF2; max-width: 640px; }
.hero__art { width: 200px; max-width: 60%; color: rgba(255,255,255,0.9); flex-shrink: 0; }
@media (min-width: 800px) {
  .hero__inner { flex-direction: row; justify-content: space-between; align-items: center; }
  .hero__copy { flex: 1; }
  .hero__art { width: 260px; }
}
.notice {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.95rem;
}
.notice--onpaper { background: var(--paper); border-color: var(--border); color: var(--text-main); }

.trust-line { color: #C9DCE9; font-size: 0.95rem; margin-top: 6px; }

/* ---- Cards / facts ---- */
.fact-strip { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 20px 0; }
.fact-strip__item { font-weight: 700; color: var(--white); }

.cards { display: grid; gap: 20px; grid-template-columns: 1fr; margin: 24px 0; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-top: 0; }
.card__icon { color: var(--strong-blue); margin-bottom: 8px; }

/* ---- Instructional diagrams (guide, homepage) ---- */
.diagram-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; margin: 16px 0; }
.diagram-row__icon { flex-shrink: 0; }
.diagram-row__list { flex: 1; min-width: 240px; margin: 0; }

/* ---- FAQ ---- */
.faq__item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq__q { margin: 0 0 8px; }
.faq__a { margin: 0 0 8px; color: var(--text-muted); }

/* ---- Callouts ---- */
.callout { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.callout--error { border-color: var(--error); background: var(--error-bg); }
.callout__h { margin: 0 0 6px; }

/* ---- Training next-step (reusable partial) ---- */
.training-next-step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 24px;
  margin: 28px 0;
}
.training-next-step h2 { margin-top: 0; }
.training-next-step__choices { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 18px 0; }
@media (min-width: 700px) { .training-next-step__choices { grid-template-columns: 1fr 1fr; } }
.training-next-step__choice {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.training-next-step__choice h3 { margin: 0 0 6px; font-size: 1.05rem; }
.training-next-step__choice p { margin: 0 0 14px; color: var(--text-muted); }

/* ---- Core disclaimer callout ---- */
.disclaimer-notice {
  border: 1px solid var(--border);
  border-left: 4px solid var(--strong-blue);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 0.95rem;
}

/* ---- Forms ---- */
.vform__row { margin-bottom: 18px; }
.vform__row--two { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .vform__row--two { grid-template-columns: 1fr 1fr; } }
.vform__field label, .vform__fieldset legend { display: block; font-weight: 700; margin-bottom: 6px; }
.vform__req { font-weight: 400; color: var(--text-muted); font-size: 0.85rem; }
.vform__optional { font-weight: 400; color: var(--text-muted); font-size: 0.85rem; }
.vform input[type="text"], .vform input[type="email"], .vform input[type="tel"], .vform select, .vform textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.vform textarea { min-height: 120px; }
.vform__field--invalid input, .vform__field--invalid select, .vform__field--invalid textarea { border-color: var(--error); }
.vform__error { color: var(--error); font-weight: 700; margin: 0 0 6px; }
.vform__hint { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 6px; }
.vform__trap { position: absolute; left: -9999px; }
.vform__consent { margin: 20px 0; display: flex; gap: 10px; align-items: flex-start; }
.vform__consent input { margin-top: 4px; }

/* ---- Footer ---- */
.site-footer { background: var(--deep-blue-gray); color: #D9E4EA; padding: 40px 0 24px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--white); }
.site-footer h3 { color: var(--white); font-size: 1rem; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-list a { color: #C9DCE9; }
.footer-emergency { color: #FCEBC8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 28px; padding-top: 16px; font-size: 0.85rem; color: #AFC3CD; }
.footer-bottom .link-button { color: #C9DCE9; }

/* ---- Consent banner ---- */
.consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,0.2);
}
.consent-banner__inner { max-width: var(--max-wide-width); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.consent-banner p { margin: 0; font-size: 0.9rem; max-width: 560px; }
.consent-banner a { color: #9FD0F0; }
.consent-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* The body-padding reservation, toggled by consent.js, is what guarantees
   this banner never overlaps the quiz's primary action on mobile. */
body.has-consent-banner { padding-bottom: 120px; }
@media (min-width: 700px) { body.has-consent-banner { padding-bottom: 76px; } }

/* ---- Flyer preview (reference page) ---- */
.flyer-preview { margin: 20px 0; text-align: center; }
.flyer-preview img {
  max-width: 340px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(10,53,80,0.12);
}

/* ---- Print reference page ---- */
@media print {
  .site-header, .site-footer, .consent-banner, .no-print { display: none !important; }
  body { font-size: 13pt; color: #000; }
  a { color: #000; text-decoration: none; }
  .container, .prose-page { max-width: 100%; padding: 0; }
}
