/* ==========================================================================
   Repeal Portland Preschool For All — theme
   Warm & friendly: slate headings, amber accents, cream background.
   Mobile-first. Plain CSS (no build step).
   ========================================================================== */

:root {
  --slate-900: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-400: #94a3b8;

  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;

  --cream: #fffaf3;
  --cream-200: #fdf3e3;
  --white: #ffffff;
  --border: #ecdfce;

  --text: var(--slate-700);
  --heading: var(--slate-900);
  --accent: var(--amber-600);

  --maxw: 1080px;
  --maxw-narrow: 44rem; /* ~70ch for comfortable reading */
  --radius: 14px;
  --shadow: 0 6px 24px rgba(30, 41, 59, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, "Helvetica Neue", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem; /* ~18px */
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--amber-500);
}

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

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: var(--maxw-narrow);
}

.center {
  text-align: center;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--slate-900);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.05s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--amber-600);
  color: #fff;
}
.btn-primary:hover {
  background: var(--amber-500);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--slate-900);
  border-color: var(--slate-900);
}
.btn-secondary:hover {
  background: var(--slate-900);
  color: #fff;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  font-weight: 800;
}
.brand-mark {
  color: var(--amber-600);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.brand-rest {
  color: var(--slate-900);
  font-size: 0.85rem;
  font-weight: 700;
}

/* CSS-only collapsible nav (checkbox hack) */
.nav-toggle-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--slate-900);
  border-radius: 999px;
  font-weight: 700;
  color: var(--slate-900);
  cursor: pointer;
  user-select: none;
}
.nav-toggle-checkbox:focus-visible + .nav-toggle {
  outline: 3px solid var(--amber-600);
  outline-offset: 2px;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--slate-900);
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before {
  top: -6px;
}
.nav-toggle-bars::after {
  top: 6px;
}

.nav-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 60;
}
.nav-toggle-checkbox:checked ~ .nav-menu {
  display: block;
}
.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  display: block;
  padding: 0.75rem 1rem;
  min-height: 44px;
  color: var(--slate-900);
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
}
.nav-menu a:hover {
  background: var(--cream-200);
}
.nav-menu a[aria-current="page"] {
  color: var(--amber-600);
}

/* Desktop: show nav inline, hide the toggle button */
@media (min-width: 760px) {
  .nav-toggle,
  .nav-toggle-checkbox {
    display: none;
  }
  .nav-menu,
  .nav-toggle-checkbox:checked ~ .nav-menu {
    position: static;
    display: flex;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
    min-width: 0;
  }
  .nav-menu ul {
    display: flex;
    gap: 0.25rem;
  }
  .nav-menu a:hover {
    background: var(--cream-200);
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--cream-200), var(--cream));
  padding: 3rem 0 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--amber-600);
  margin-bottom: 0.75rem;
}
.hero-title {
  font-size: clamp(2.25rem, 7vw, 4rem);
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-size: clamp(1.15rem, 3.5vw, 1.6rem);
  font-weight: 600;
  color: var(--slate-700);
  max-width: 36rem;
  margin: 0 auto 1.75rem;
  min-height: 2.6em; /* reserve space so layout doesn't jump on swap */
}
.subtitle-animated {
  transition: opacity 0.4s ease;
}
.subtitle-animated.is-fading {
  opacity: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ---------- Sections ---------- */
.section {
  padding: 3rem 0;
}
.section + .section {
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  text-align: center;
}
.section-intro,
.section-note {
  text-align: center;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}
.section-note {
  font-weight: 700;
}
.section-quotes {
  background: var(--cream-200);
}
.section-closing {
  background: var(--slate-900);
}
.section-closing .section-title,
.section-closing p {
  color: #fff;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0 1rem;
}
.fact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.fact-stat {
  font-size: 2rem;
  font-weight: 800;
  color: var(--amber-600);
  margin: 0 0 0.25rem;
}
.fact-label {
  margin: 0;
  color: var(--slate-600);
  font-size: 1rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Argument ---------- */
.section-argument .section-title {
  text-align: left;
}
.argument-cta {
  margin-top: 1.5rem;
}

/* ---------- Quotes ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
.quote-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--amber-500);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 0;
  box-shadow: var(--shadow);
}
.quote-card blockquote {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--slate-700);
  font-style: italic;
}
.quote-card figcaption {
  display: flex;
  flex-direction: column;
}
.quote-author {
  font-weight: 700;
  color: var(--slate-900);
}
.quote-role {
  font-size: 0.9rem;
  color: var(--slate-400);
}

@media (min-width: 800px) {
  .quote-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Article pages ---------- */
.article {
  padding: 2.5rem 0 3.5rem;
}
.article-header {
  margin-bottom: 2rem;
}
.article-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
.article-lede {
  font-size: 1.25rem;
  color: var(--slate-600);
}
.article-body h2 {
  margin-top: 2rem;
  font-size: 1.6rem;
}
.article-body h3 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}
.article-body ul,
.article-body ol {
  padding-left: 1.25rem;
}
.article-body li {
  margin-bottom: 0.5rem;
}
.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--cream-200);
  border-left: 5px solid var(--amber-500);
  border-radius: 8px;
}
/* Boxes used in markdown via raw HTML */
.callout {
  background: var(--amber-100);
  border: 1px solid var(--amber-500);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.callout p:last-child {
  margin-bottom: 0;
}
.email-template {
  background: var(--white);
  border: 1px dashed var(--slate-400);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--slate-900);
  color: #cbd5e1;
  padding: 2.5rem 0;
  margin-top: 0;
}
.footer-inner {
  display: grid;
  gap: 1.5rem;
}
.footer-heading {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.footer-meta a {
  color: var(--amber-500);
}
.footer-fine {
  font-size: 0.9rem;
  color: var(--slate-400);
}
.footer-disclaimer {
  font-style: italic;
}

@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .footer-meta {
    text-align: right;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
