@font-face { font-family: "Fredoka"; src: url("fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
/* Youth Science Academy: site styles. Colors come from the YSA logo (orange, red, gold) and the blue camp shirts. */
:root {
  --blue: #1f5bd8;
  --blue-dark: #123a96;
  --blue-soft: #e8efff;
  --orange: #f7931e;
  --red: #d62b2b;
  --gold: #ffc531;
  --ink: #14213d;
  --muted: #55607a;
  --line: #e3e7f0;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(20, 33, 61, 0.08);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 {
  font-family: "Fredoka", "Nunito", sans-serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 760px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #e9820a; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.center .btn-row { justify-content: center; }

/* Header and navigation */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.logo img { height: 72px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .nav button.drop-toggle {
  font: inherit; font-weight: 700; font-size: 0.95rem;
  color: var(--ink); text-decoration: none;
  padding: 10px 12px; border-radius: 10px;
  background: none; border: 0; cursor: pointer;
}
.nav a:hover, .nav button.drop-toggle:hover, .nav a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
.nav .btn-primary { color: #fff; margin-left: 8px; padding: 10px 20px; }
.nav .btn-primary:hover { background: #e9820a; color: #fff; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 8px; display: none;
}
.dropdown-menu a { display: block; }
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu, .dropdown.open .dropdown-menu { display: block; }
.menu-toggle {
  display: none; background: none; border: 2px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font: inherit; font-weight: 800; color: var(--ink); cursor: pointer;
}

@media (max-width: 1020px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a, .nav button.drop-toggle { text-align: left; width: 100%; }
  .dropdown-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 16px; }
  .nav .btn-primary { margin: 8px 0 0; text-align: center; }
}

/* Banner slider (the five original banner photos) */
.slider { position: relative; overflow: hidden; background: var(--blue-dark); }
.slides { display: flex; transition: transform 0.6s ease; }
.slides img { width: 100%; flex: 0 0 100%; aspect-ratio: 1950 / 388; object-fit: cover; }
.slider-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.slider-dots button {
  width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0;
}
.slider-dots button[aria-current="true"] { background: #fff; }

/* Intro band under the slider */
.intro { padding: 56px 0; }
.intro-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--blue-soft); border-radius: var(--radius); padding: 18px; text-align: center; }
.stat strong { display: block; font-family: "Fredoka", sans-serif; font-size: 1.8rem; color: var(--blue); }
.stat span { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }

/* Cards */
.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 32px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body p { color: var(--muted); }
.card-body .more { margin-top: auto; font-weight: 800; text-decoration: none; }
.tag {
  align-self: flex-start; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--gold); color: var(--ink); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.card.featured { border: 2px solid var(--orange); }

/* Two-column feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.feature + .feature { margin-top: 56px; }
.feature img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature.flip > :first-child { order: 2; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: 20px; } .feature.flip > :first-child { order: 0; } }

/* STEAM letters */
.steam-letters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 28px; }
.steam-letters div { border-radius: var(--radius); padding: 18px 12px; text-align: center; color: #fff; }
.steam-letters b { display: block; font-family: "Fredoka", sans-serif; font-size: 2.2rem; line-height: 1; }
.steam-letters span { font-weight: 800; font-size: 0.9rem; }
.steam-letters div:nth-child(1) { background: var(--blue); }
.steam-letters div:nth-child(2) { background: var(--orange); }
.steam-letters div:nth-child(3) { background: var(--red); }
.steam-letters div:nth-child(4) { background: #8a3ffc; }
.steam-letters div:nth-child(5) { background: #12a150; }
@media (max-width: 640px) { .steam-letters { grid-template-columns: repeat(3, 1fr); } }

/* Focus areas of the after-school program */
.focus-list { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 32px; }
.focus { background: #fff; border-radius: var(--radius); border-top: 6px solid var(--orange); box-shadow: var(--shadow); overflow: hidden; }
.focus:nth-child(2) { border-top-color: var(--red); }
.focus:nth-child(3) { border-top-color: var(--blue); }
.focus img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.focus .card-body ul { margin: 0 0 0 1.1em; padding: 0; color: var(--muted); }

.details {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px;
  background: var(--blue-soft); border-radius: var(--radius); padding: 24px; margin-top: 32px;
}
.details b { display: block; color: var(--blue); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* Notice box, used for the Summer Food press release */
.notice { border-left: 6px solid var(--gold); background: #fffaf0; border-radius: 12px; padding: 24px 26px; }
.notice h2, .notice h3 { margin-top: 0; }
.doc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.doc-links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); font-weight: 800; text-decoration: none;
}
.small { font-size: 0.88rem; color: var(--muted); }

/* Testimonials */
.quotes { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 28px; }
.quote { display: flex; gap: 18px; align-items: center; background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.quote img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; background: var(--blue-soft); }
.quote p { margin: 0 0 6px; font-size: 1.05rem; }
.quote h3 { font-size: 1.1rem; margin-bottom: 4px; }
.quote cite { font-style: normal; font-weight: 800; color: var(--orange); font-size: 0.9rem; }

/* Page title band */
.page-hero { background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: #fff; padding: 56px 0 48px; }
.page-hero p { color: #dbe5ff; max-width: 720px; font-size: 1.1rem; margin: 0; }
.page-hero h1 { margin-bottom: 10px; }

/* Long text pages */
.prose { max-width: 780px; }
.prose p { font-size: 1.06rem; }
.with-photo { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.with-photo img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .with-photo { grid-template-columns: 1fr; } }

/* Board */
.people { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 24px; }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.person .role { color: var(--orange); font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.person h3 { margin: 4px 0; }
.person p { color: var(--muted); margin: 0; }

/* Photo gallery and lightbox */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 24px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.3s ease; }
.gallery button:hover img { transform: scale(1.04); }
.lightbox {
  position: fixed; inset: 0; background: rgba(8, 14, 30, 0.92); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 86vh; max-width: 100%; border-radius: 8px; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.6rem; cursor: pointer;
}
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; }
.lightbox .lb-next { right: 16px; top: 50%; }

/* Science club themes */
.themes { counter-reset: theme; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.themes li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-weight: 700; display: flex; gap: 14px; align-items: center; }
.themes li span.wk {
  flex: none; background: var(--blue); color: #fff; border-radius: 10px; padding: 6px 10px;
  font-family: "Fredoka", sans-serif; font-size: 0.85rem; white-space: nowrap;
}

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 640px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--blue-soft); color: var(--blue-dark); font-weight: 800; }
tr:last-child td { border-bottom: 0; }

/* Support options */
.support-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 28px; }
.support-grid .card-body { padding: 28px; }
.support-grid .icon { font-size: 2rem; margin-bottom: 8px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list b { display: block; font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
form.contact { display: grid; gap: 14px; }
form.contact label { font-weight: 800; font-size: 0.92rem; display: grid; gap: 6px; }
form.contact input, form.contact textarea, form.contact select {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
form.contact textarea { min-height: 150px; resize: vertical; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* Call to action band */
.cta-band { background: linear-gradient(120deg, var(--orange), var(--red)); color: #fff; border-radius: var(--radius); padding: 40px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: #fff3e6; }
.cta-band .btn { background: #fff; color: var(--red); }

/* Footer, which carries the mission statement on every page, as the old site did */
.site-footer { background: var(--ink); color: #c9d2e6; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.footer-grid h3 { color: #fff; font-size: 1.1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; }
.footer-logo { background: #fff; border-radius: 12px; padding: 8px 12px; display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 80px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 36px; padding-top: 20px; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* Accessibility helpers */
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
