/* ==========================================================
   Reading with Riley — readingwithriley.com
   Brand colors:
     --sun      #FFC93C  sunny yellow (primary)
     --sky      #2E86DE  vibrant blue
     --orange   #FF7A45  warm orange (CTA)
     --green    #2BB673  playful green
     --berry    #E84393  accent pink
     --text     #23324A  ink navy
     --bg       #FFFFFF
   Fonts: Baloo 2 (headings), Nunito (body)
   ========================================================== */

/* 1. CSS custom properties */
:root {
  --sun: #FFC93C;
  --sun-light: #FFF4D1;
  --sky: #2E86DE;
  --sky-dark: #1B5FAA;
  --sky-light: #E3F1FF;
  --orange: #FF7A45;
  --orange-dark: #D85A28;
  --orange-light: #FFE8DD;
  --green: #2BB673;
  --green-dark: #1E8F59;
  --green-light: #DDF7EA;
  --berry: #E84393;
  --berry-light: #FDE4F0;

  --text: #23324A;
  --muted: #55657E;
  --bg: #FFFFFF;
  --cream: #FFFCF5;
  --line: #E9EEF5;
  --dark-bg: #111111;

  --font-head: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 4px 12px rgba(35, 50, 74, 0.08);
  --shadow: 0 12px 32px rgba(35, 50, 74, 0.12);

  --header-h: 76px;
}

/* 2. Reset & base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
a { color: var(--sky-dark); }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; }

/* 3. Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 4. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
  text-decoration: none;
  border: 3px solid transparent;
  cursor: pointer;
  padding: 12px 28px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 0 var(--orange-dark); }
.btn-primary:hover { box-shadow: 0 9px 0 var(--orange-dark); }
.btn-primary:active { box-shadow: 0 3px 0 var(--orange-dark); }

.btn-outline { background: #fff; color: var(--sky-dark); border-color: var(--sky); box-shadow: 0 6px 0 rgba(27, 95, 170, 0.25); }
.btn-outline:hover { box-shadow: 0 9px 0 rgba(27, 95, 170, 0.25); }

.btn-accent { background: var(--green); color: #fff; box-shadow: 0 6px 0 var(--green-dark); }
.btn-accent:hover { box-shadow: 0 9px 0 var(--green-dark); }


/* 5. Header + hamburger nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 4px solid var(--sun);
  box-shadow: 0 1px 0 rgba(35, 50, 74, 0.04);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 8px 24px rgba(35, 50, 74, 0.14); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--sky-dark);
  transform: rotate(-4deg);
  transition: transform 0.3s ease;
}
.logo:hover .logo-icon { transform: rotate(4deg) scale(1.05); }
.logo-wordmark { display: block; width: auto; height: 44px; }
.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.01em;
}
.logo-text .accent { color: var(--orange); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  white-space: nowrap;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.main-nav a:hover { background: var(--sun-light); }
.main-nav a.active { background: var(--sky); color: #fff; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 14px;
  background: var(--sun);
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 6. Hero / page-hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.35) 0 90px, transparent 91px),
    linear-gradient(135deg, var(--sun) 0%, #FFB33C 55%, var(--orange) 100%);
  padding: 96px 0 140px;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  background: #fff;
  color: var(--sky-dark);
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  font-weight: 800;
  margin-bottom: 0.4em;
}
.hero h1 .highlight { color: var(--sky-dark); }
.hero-lead {
  font-size: 1.2rem;
  font-weight: 600;
  color: #4A3A1A;
  max-width: 34ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-art {
  position: relative;
  max-width: 500px;
  width: 100%;
  justify-self: center;
  padding: 24px 12px;
}
.hero-art picture {
  display: block;
  background: #fff;
  border-radius: 32px;
  padding: 14px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  animation: float 5s ease-in-out infinite;
}
.hero-art img { display: block; width: 100%; height: auto; border-radius: 20px; }
.hero-art .sparkle { z-index: 1; }
.sparkle { position: absolute; font-size: 2rem; animation: twinkle 2.4s ease-in-out infinite; }
.sparkle.s1 { top: 4%; left: 8%; }
.sparkle.s2 { top: 12%; right: 2%; animation-delay: 0.8s; }
.sparkle.s3 { bottom: 0; left: 0; animation-delay: 1.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.25) rotate(15deg); opacity: 0.7; }
}

.wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1;
}

.page-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 0 120px;
}
.page-hero.sky { background: linear-gradient(135deg, var(--sky) 0%, var(--sky-dark) 100%); }
.page-hero.orange { background: linear-gradient(135deg, #FFA155 0%, var(--orange) 100%); }
.page-hero.green { background: linear-gradient(135deg, #45C98A 0%, var(--green-dark) 100%); }
.page-hero.berry { background: linear-gradient(135deg, #F06AAE 0%, #C2307A 100%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; }
.page-hero p { color: rgba(255, 255, 255, 0.95); font-size: 1.2rem; font-weight: 600; max-width: 620px; margin: 0 auto; }
.page-hero .emoji { font-size: 3rem; line-height: 1; margin-bottom: 8px; }

/* 7. Section titles */
.section { padding: 88px 0; }
.section.tight { padding-top: 24px; }
.section.cream { background: var(--cream); }
.section.sky-light { background: var(--sky-light); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
  background: var(--sun-light);
  color: #8A6100;
}
.section-title { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.section-divider {
  width: 72px;
  height: 8px;
  margin: 4px auto 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--sun) 0 33%, var(--orange) 33% 66%, var(--sky) 66%);
}
.section-head p { font-size: 1.15rem; color: var(--muted); margin: 0; }

/* 8. Page-specific sections */

/* Home: features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature {
  display: block;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature:nth-child(1):hover { border-color: var(--sky); }
.feature:nth-child(2):hover { border-color: var(--green); }
.feature:nth-child(3):hover { border-color: var(--berry); }
.feature-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  border-radius: 24px;
}
.feature:nth-child(1) .feature-icon { background: var(--sky-light); }
.feature:nth-child(2) .feature-icon { background: var(--green-light); }
.feature:nth-child(3) .feature-icon { background: var(--berry-light); }
.feature h3 { font-size: 1.5rem; margin-bottom: 0.3em; }
.feature p { color: var(--muted); margin: 0 0 12px; }
.feature .more { font-family: var(--font-head); font-weight: 700; color: var(--orange-dark); }

/* Home: mission callout */
.mission {
  position: relative;
  max-width: 940px;
  margin: 0 auto;
  background: var(--sky);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 72px 64px 64px;
  text-align: center;
  box-shadow: 0 14px 0 var(--sky-dark), var(--shadow);
  overflow: hidden;
}
.mission::before,
.mission::after { content: ""; position: absolute; border-radius: 50%; }
.mission::before { width: 220px; height: 220px; background: var(--sun); top: -80px; left: -60px; opacity: 0.35; }
.mission::after { width: 160px; height: 160px; background: #fff; bottom: -60px; right: -40px; opacity: 0.18; }

.mission-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: var(--sun);
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 8px 22px;
  border-radius: 999px;
  margin-bottom: 26px;
  transform: rotate(-2deg);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
}
.mission blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.2vw, 2.25rem);
  line-height: 1.35;
}
.mission blockquote::before {
  content: "\201C";
  display: block;
  font-size: 5rem;
  line-height: 0.6;
  color: var(--sun);
  margin-bottom: 8px;
}
.mission blockquote strong { color: var(--sun); font-weight: 800; }
.mission-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
.mission-tags li {
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.4);
  padding: 6px 18px;
  border-radius: 999px;
  font-weight: 700;
}

/* Home: CTA band */
.cta-band {
  background: var(--sun-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--muted); }

/* Events */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.event-card {
  --accent: var(--sky);
  --accent-light: var(--sky-light);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  border: 3px solid transparent;
  border-top: 8px solid var(--accent);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.event-card.orange { --accent: var(--orange); --accent-light: var(--orange-light); }
.event-card.green  { --accent: var(--green);  --accent-light: var(--green-light); }
.event-card.berry  { --accent: var(--berry);  --accent-light: var(--berry-light); }
.event-card.sun    { --accent: #F0A500;       --accent-light: var(--sun-light); }

.event-top { display: flex; gap: 18px; align-items: center; padding: 24px 24px 0; }
.event-date {
  flex-shrink: 0;
  width: 76px;
  text-align: center;
  background: var(--accent-light);
  border-radius: 16px;
  padding: 10px 0 8px;
  font-family: var(--font-head);
  line-height: 1;
}
.event-date .month {
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.event-date .day { display: block; font-weight: 800; font-size: 2.2rem; color: var(--text); margin-top: 4px; }
.event-top h3 { font-size: 1.35rem; margin: 0; }

.event-body { padding: 18px 24px 24px; flex: 1; display: flex; flex-direction: column; }
.event-meta { list-style: none; margin: 0 0 14px; padding: 0; font-weight: 700; font-size: 0.97rem; color: var(--muted); }
.event-meta li { margin-bottom: 4px; }
.event-body p { color: var(--muted); flex: 1; }
.event-pill {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--accent-light);
  padding: 4px 14px;
  border-radius: 999px;
}

.no-events {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 3px dashed #FFCDB6;
  border-radius: var(--radius-lg);
  padding: 48px 32px;
}
.no-events-icon { font-size: 3.5rem; line-height: 1; margin-bottom: 12px; }
.no-events h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.no-events p { color: var(--muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto 28px; }
.no-events-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* Get Involved */
.involved-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.ways { display: grid; gap: 18px; }
.way {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 3px dashed var(--line);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.way:hover { transform: translateY(-4px); border-color: var(--green); box-shadow: var(--shadow-sm); }
.way-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border-radius: 16px;
}
.way:nth-child(1) .way-icon { background: var(--sun-light); }
.way:nth-child(2) .way-icon { background: var(--green-light); }
.way:nth-child(3) .way-icon { background: var(--orange-light); }
.way:nth-child(4) .way-icon { background: var(--berry-light); }
.way-link { text-decoration: none; color: inherit; border-style: solid; border-color: var(--orange-light); }
.way-link:hover { border-color: var(--orange); }
.way-link strong { color: var(--orange-dark); }
.way h3 { font-size: 1.3rem; margin-bottom: 0.2em; }
.way p { margin: 0; color: var(--muted); }

.form-card {
  background: var(--green-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 10px 0 #B6EBD0;
}
.form-card h2 { font-size: 1.8rem; margin-bottom: 0.2em; }
.form-card .form-intro { color: var(--muted); margin-bottom: 24px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label,
.field legend {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
  padding: 0;
}
.field .req { color: var(--orange-dark); }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  border: 3px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2323324A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 5px rgba(43, 182, 115, 0.2);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: var(--orange); }

fieldset.field { border: none; margin: 0 0 18px; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  background: #fff;
  border: 3px solid transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.chip span:hover { border-color: #B6EBD0; }
.chip input:checked + span { background: var(--green); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

.form-card .btn { width: 100%; margin-top: 6px; }

.form-card.orange { background: var(--orange-light); box-shadow: 0 10px 0 #FFCDB6; }
.form-card.orange .field input:focus,
.form-card.orange .field select:focus,
.form-card.orange .field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 5px rgba(255, 122, 69, 0.2); }
.form-card.orange .chip input:checked + span { background: var(--orange); }

/* Library reading requests */
.visit-info {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}
.visit-info h3 { font-size: 1.6rem; }
.visit-list { list-style: none; margin: 0 0 20px; padding: 0; }
.visit-list li { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; }
.visit-list li > span {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  border-radius: 16px;
  background: var(--sun-light);
}
.visit-list li:nth-child(2) > span { background: var(--green-light); }
.visit-list li:nth-child(3) > span { background: var(--sky-light); }
.visit-list li:nth-child(4) > span { background: var(--berry-light); }
.visit-list strong { display: block; font-family: var(--font-head); font-size: 1.15rem; }
.visit-list div { color: var(--muted); }
.visit-note {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--sky-light);
  font-weight: 700;
}

.library-band {
  background: linear-gradient(135deg, #FFA155 0%, var(--orange) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px;
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 10px 0 var(--orange-dark);
}
.library-band h2 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0 0 6px; }
.library-band p { margin: 0; font-weight: 600; font-size: 1.1rem; }
.library-band .btn { background: #fff; color: var(--orange-dark); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15); }

.form-success { display: none; text-align: center; padding: 32px 12px; }
.form-success .big { font-size: 4rem; line-height: 1; margin-bottom: 12px; }
.form-card.sent form { display: none; }
.form-card.sent .form-success { display: block; }

/* Storytime videos — responsive 16:9 YouTube embeds */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.video-card {
  background: #fff;
  border-radius: var(--radius);
  border: 3px solid transparent;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--sky); }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--text);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  text-align: center;
  padding: 16px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 14px, transparent 14px 28px),
    linear-gradient(135deg, var(--sky) 0%, var(--sky-dark) 100%);
}
.video-card:nth-child(3n+2) .video-placeholder {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 14px, transparent 14px 28px),
    linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
}
.video-card:nth-child(3n+3) .video-placeholder {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 14px, transparent 14px 28px),
    linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
}
.play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.play-btn::after {
  content: "";
  margin-left: 6px;
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent var(--text);
}
.video-placeholder small { font-weight: 700; }

.video-info { padding: 20px 22px 24px; }
.video-info h3 { font-size: 1.3rem; margin-bottom: 0.25em; }
.video-info p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.video-age {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--sun-light);
  padding: 2px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.center-cta { text-align: center; margin-top: 48px; }

/* Livestreamed storytimes */
.live-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.live-player {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 0 rgba(27, 95, 170, 0.18), var(--shadow-sm);
}
.live-player-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-family: var(--font-head);
  font-weight: 700;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #E53935;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.live-schedule {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.live-schedule h3 { font-size: 1.5rem; }
.schedule-list { list-style: none; margin: 0 0 16px; padding: 0; }
.schedule-list li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 2px dashed var(--line);
}
.schedule-list li:last-child { border-bottom: none; }
.schedule-when {
  flex-shrink: 0;
  width: 112px;
  background: var(--sun-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}
.schedule-when strong,
.schedule-what strong { display: block; font-family: var(--font-head); }
.schedule-when strong { color: var(--orange-dark); }
.schedule-what { color: var(--muted); font-size: 0.97rem; }
.schedule-what strong { color: var(--text); font-size: 1.1rem; }
.schedule-note { color: var(--muted); font-size: 0.95rem; }
.live-schedule .btn { width: 100%; }

/* Reading links */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.resource-card {
  --accent: var(--sky);
  --accent-light: var(--sky-light);
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.resource-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.resource-card.green  { --accent: var(--green);  --accent-light: var(--green-light); }
.resource-card.orange { --accent: var(--orange); --accent-light: var(--orange-light); }
.resource-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  border-radius: 16px;
  background: var(--accent-light);
  margin-bottom: 14px;
}
.resource-tag {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--muted);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.resource-card h3 { font-size: 1.35rem; margin-bottom: 0.3em; }
.resource-card p { color: var(--muted); flex: 1; margin-bottom: 14px; }
.resource-link { font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.resource-card.sky .resource-link { color: var(--sky-dark); }
.resource-card.green .resource-link { color: var(--green-dark); }
.resource-card.orange .resource-link { color: var(--orange-dark); }
.resource-disclaimer {
  max-width: 760px;
  margin: 48px auto 0;
  text-align: center;
  background: var(--sun-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-weight: 700;
}
.resource-disclaimer small { display: block; margin-top: 8px; font-weight: 600; color: var(--muted); }

/* Scroll reveal (only hides content once main.js has run) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* 10. Footer */
.site-footer { background: var(--text); color: #C9D3E3; }
.footer-main { padding: 56px 0 40px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .logo { color: #fff; margin-bottom: 16px; }
.site-footer h4 { color: var(--sun); font-size: 1.2rem; margin-bottom: 12px; }
.footer-about p { margin: 0; max-width: 34ch; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #C9D3E3; text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--sun); }

.footer-bottom {
  background: #0B0B0B;
  color: #A8A8A8;
  font-size: 0.95rem;
  padding: 18px 0;
  text-align: center;
}
.footer-bottom .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.footer-bottom a { color: var(--sun); text-decoration: none; font-weight: 700; }
.footer-bottom a:hover { text-decoration: underline; }

/* 11. Responsive */
/* Five nav tabs: switch to the hamburger menu before they crowd the logo */
@media (max-width: 1080px) {
  .hamburger { display: flex; }
  .main-nav {
    position: absolute;
    top: calc(var(--header-h) + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 4px solid var(--sun);
    box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; padding: 16px 24px 24px; }
  .main-nav a { padding: 12px 18px; font-size: 1.2rem; }
}

@media (max-width: 900px) {
  .hero { padding: 64px 0 110px; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { max-width: 420px; order: -1; }

  .features { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .involved-grid { grid-template-columns: 1fr; }
  .live-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .section { padding: 64px 0; }
  .mission { padding: 56px 28px 48px; }
  .cta-band,
  .library-band { padding: 32px 24px; text-align: center; justify-content: center; }
  .visit-info { padding: 28px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 28px 20px; }
  .events-grid,
  .video-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .logo { gap: 8px; }
  .logo-icon { width: 40px; height: 40px; }
  .logo-wordmark { height: 34px; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .footer-cols { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .site-header .logo-icon { display: none; }
}
