/* ==========================================================================
   Siskiyou Child Care Council — storybook design system (see DESIGN.md)
   Warm peach paper, chunky slab headlines, black-outlined pills & cards,
   flat crayon-box color. No shadows, no gradients.
   ========================================================================== */

:root {
  /* Colors */
  --color-peach-paper: #f6e0db;
  --color-ink: #000000;
  --color-snow: #ffffff;
  --color-ember: #ef724f;
  --color-magenta: #981082;
  --color-sunbeam: #e7db4c;
  --color-mint: #ace2df;
  --color-powder: #84bfff;
  --color-lilac: #e69dff;
  --color-lime: #6ed311;
  --color-cobalt: #5196ff;

  /* Typography */
  --font-display: 'Alfa Slab One', 'Roboto Slab', Georgia, serif;
  --font-body: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Shape */
  --radius-pill: 47px;
  --radius-card: 40px;
  --radius-card-lg: 47px;
  --radius-sm: 10px;

  /* Layout */
  --page-max: 1200px;
  --section-gap: clamp(46px, 7vw, 64px);
}

/* Accessibility widget modes (classes set on <html>) -------------------- */
html.a11y-text-lg { font-size: 112.5%; }
html.a11y-text-xl { font-size: 127%; }
html.a11y-font {
  --font-display: 'Atkinson Hyperlegible', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Atkinson Hyperlegible', ui-sans-serif, system-ui, sans-serif;
}
html.a11y-underline a { text-decoration: underline !important; }
html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Cross-page fade (modern browsers; harmless elsewhere) */
@view-transition { navigation: auto; }

body {
  margin: 0;
  background: var(--color-peach-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); line-height: 1.09; }
h2 { font-size: clamp(1.8rem, 4vw, 2.875rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.5625rem); line-height: 1.24; }
h4 { font-family: var(--font-body); font-weight: 800; font-size: 1.1rem; margin: 0 0 0.4em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-underline-offset: 3px; }
a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-cobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

.container {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: var(--section-gap); }
.section--tight { padding-block: calc(var(--section-gap) * 0.6); }

.center { text-align: center; }

.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;
}

/* Skip link --------------------------------------------------------------*/
.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 200;
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* Pills & buttons ---------------------------------------------------------*/
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-snow);
  color: var(--color-ink);
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: translateY(0); }
.pill--bold { font-weight: 800; }
.pill--orange { background: var(--color-ember); }
.pill--mint { background: var(--color-mint); }
.pill--sunbeam { background: var(--color-sunbeam); }
.pill--lilac { background: var(--color-lilac); }
.pill--powder { background: var(--color-powder); }
.pill[aria-current="page"] { background: var(--color-sunbeam); font-weight: 700; }

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.pill-row--center { justify-content: center; }

/* Tag pills */
.tag {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
}
.tag--ember { background: var(--color-ember); border: none; }
.tag--mint { background: var(--color-mint); border: none; }
.tag--sunbeam { background: var(--color-sunbeam); border: none; }
.tag--lilac { background: var(--color-lilac); border: none; }
.tag--powder { background: var(--color-powder); border: none; }

/* Header & navigation -----------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-peach-paper);
  border-bottom: 2px solid var(--color-ink);
}
.header-inner {
  position: relative;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand svg { width: 44px; height: 44px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.1;
}
.nav-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list li { margin: 0; }
.nav-ctas { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  html.js .nav-toggle { display: inline-flex; font-weight: 700; }
  html.js .nav-wrap {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 16px;
    right: 16px;
    z-index: 110;
    background: var(--color-snow);
    border: 2px solid var(--color-ink);
    border-radius: 24px;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100dvh - 110px);
    overflow: auto;
  }
  html.js .nav-wrap.open { display: flex; }
  html.js .nav-list { flex-direction: column; }
  html.js .nav-list .pill,
  html.js .nav-ctas .pill { width: 100%; }
  html.js .nav-ctas { flex-direction: column; }
}

/* Hero --------------------------------------------------------------------*/
.hero {
  position: relative;
  overflow: clip;
  text-align: center;
  padding: clamp(56px, 9vw, 96px) 20px clamp(44px, 7vw, 72px);
}
.hero-inner { position: relative; max-width: 880px; margin-inline: auto; }
.hero .lede {
  font-size: 1.15rem;
  max-width: 620px;
  margin: 18px auto 26px;
}
.hero--sub { padding-block: clamp(40px, 6vw, 64px) clamp(28px, 4vw, 44px); }

/* Doodles — thin black line-art scattered around headlines */
.doodle {
  position: absolute;
  width: clamp(40px, 6vw, 68px);
  height: clamp(40px, 6vw, 68px);
  stroke: var(--color-ink);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  rotate: var(--rot, 0deg);
  animation: floaty 7s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}
@media (prefers-reduced-motion: reduce) {
  .doodle { animation: none; }
}
@media (max-width: 720px) {
  .doodle--lg-only { display: none; }
}

/* Cards -------------------------------------------------------------------*/
.card {
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-card);
  padding: clamp(24px, 4vw, 40px);
}
.card--flat { border: none; }
.bg-ember { background: var(--color-ember); }
.bg-mint { background: var(--color-mint); }
.bg-sunbeam { background: var(--color-sunbeam); }
.bg-lilac { background: var(--color-lilac); }
.bg-powder { background: var(--color-powder); }

/* The rotated card creates a stacking context, so a z-index:-1 child paints
   between the element's background and its content. We exploit that: the
   element itself is the colored backing, the ::before is the white card. */
.card--tilt {
  position: relative;
  rotate: -2deg;
  background: var(--tilt-color, var(--color-mint));
  border: none;
}
.card--tilt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
  border-radius: inherit;
  rotate: 2.5deg;
}

.card-icon {
  width: 56px;
  height: 56px;
  stroke: var(--color-ink);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 14px;
}

/* Card grids */
.grid {
  display: grid;
  gap: clamp(16px, 2.5vw, 28px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }

/* Color bands — full-bleed rest stops between sections ---------------------*/
.band {
  height: clamp(48px, 7vw, 80px);
  border-block: 2px solid var(--color-ink);
}
.band--thin { height: 28px; }

/* Notice band */
.notice {
  background: var(--color-sunbeam);
  border-block: 2px solid var(--color-ink);
  padding: 14px 20px;
  text-align: center;
  font-weight: 700;
}

/* Tables ------------------------------------------------------------------*/
.table-wrap {
  overflow-x: auto;
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
  border-radius: 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 480px;
}
caption {
  text-align: left;
  font-weight: 800;
  padding: 14px 18px 6px;
}
th {
  font-weight: 800;
  text-align: left;
  background: var(--color-sunbeam);
  border-block: 2px solid var(--color-ink);
  padding: 12px 18px;
}
td { padding: 10px 18px; border-bottom: 1px solid var(--color-ink); }
tbody tr:last-child td { border-bottom: none; }

/* Accordions (<details>) ----------------------------------------------------*/
.acc {
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
  border-radius: 24px;
  margin-bottom: 12px;
}
.acc summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  font-weight: 800;
  font-size: 1.05rem;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.3rem;
  flex: none;
}
.acc[open] summary::after { content: "\2212"; }
.acc-body { padding: 0 22px 20px; }

/* Forms ---------------------------------------------------------------------*/
label { font-weight: 700; }
select {
  font: 600 1rem var(--font-body);
  color: var(--color-ink);
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
}

/* Income checker result */
.checker-result {
  margin-top: 16px;
  padding: 18px 22px;
  border-radius: 24px;
  background: var(--color-mint);
  font-weight: 700;
  display: none;
}
.checker-result.show { display: block; }

/* Contact / info blocks -------------------------------------------------------*/
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { margin-bottom: 8px; }
.info-list strong { font-weight: 800; }

.map-frame {
  width: 100%;
  height: 320px;
  border: 2px solid var(--color-ink);
  border-radius: 24px;
  display: block;
}

/* Footer ----------------------------------------------------------------------*/
.site-footer {
  border-top: 2px solid var(--color-ink);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 32px;
  margin-bottom: 36px;
}
.footer-grid h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { text-decoration: none; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid var(--color-ink);
  padding-top: 18px;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

/* Reveal-on-scroll (progressive enhancement) -----------------------------------*/
html.js .reveal {
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.55s ease, translate 0.55s ease;
}
html.js .reveal.is-visible { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; translate: 0 0; transition: none; }
}
html.a11y-no-motion .reveal { opacity: 1 !important; translate: 0 0 !important; }

/* Back to top -------------------------------------------------------------------*/
.to-top {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* Accessibility widget ------------------------------------------------------------*/
.a11y-widget { position: fixed; right: 18px; bottom: 18px; z-index: 120; }
.a11y-btn {
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 50%;
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.a11y-btn svg { width: 32px; height: 32px; }
.a11y-btn:hover { background: var(--color-sunbeam); }
.a11y-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(320px, calc(100vw - 36px));
  background: var(--color-snow);
  border: 2px solid var(--color-ink);
  border-radius: 24px;
  padding: 20px;
}
.a11y-panel h2 {
  font-size: 1.15rem;
  margin-bottom: 14px;
}
.a11y-panel .pill {
  width: 100%;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
  text-align: left;
}
.a11y-panel .pill[aria-pressed="true"] {
  background: var(--color-mint);
  font-weight: 800;
}
.a11y-panel .pill[aria-pressed="true"]::after { content: "\2713"; }
.a11y-panel .a11y-reset { justify-content: center; background: var(--color-peach-paper); }

/* High contrast mode ---------------------------------------------------------------*/
html.a11y-contrast body,
html.a11y-contrast .site-header,
html.a11y-contrast .site-footer { background: #ffffff; }
html.a11y-contrast .card,
html.a11y-contrast .card--flat,
html.a11y-contrast .pill,
html.a11y-contrast .tag,
html.a11y-contrast th,
html.a11y-contrast .notice,
html.a11y-contrast .checker-result,
html.a11y-contrast .a11y-panel .pill[aria-pressed="true"],
html.a11y-contrast [class*="bg-"] {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
}
html.a11y-contrast .card--tilt::before { background: #ffffff; border: 2px solid #000; }
html.a11y-contrast .band { background: #000000 !important; height: 6px; }
html.a11y-contrast a { text-decoration: underline; }

/* Print -----------------------------------------------------------------------------*/
@media print {
  .site-header, .site-footer, .a11y-widget, .to-top, .doodle, .band { display: none; }
  body { background: #fff; }
  .card { border-radius: 8px; }
}
