/* ---------- Design tokens (pulled from the school logo) ---------- */
:root {
  --green: #6cbf2a;
  --green-dark: #4f9a1a;
  --green-light: #eaf7dd;
  --gold: #f5b942;
  --sky: #4a9ede;
  --ink: #26321f;
  --ink-soft: #55614c;
  --paper: #ffffff;
  --paper-soft: #fbfdf7;
  --border: #e3ecd8;
  --shadow: 0 10px 30px rgba(38, 50, 31, 0.08);
  --radius: 18px;
  --font-head: "Baloo 2", "Segoe UI", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); margin: 0 0 0.5em; color: var(--green-dark); }
p { margin: 0 0 1em; }
a { color: var(--green-dark); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-head);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(108, 191, 42, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(108, 191, 42, 0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-logo { width: 44px; height: 44px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-head); font-weight: 700; color: var(--green-dark); font-size: 1.05rem; }
.brand-sub { font-size: 0.75rem; color: var(--ink-soft); }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--green-dark); }
.nav-cta {
  background: var(--green);
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--green-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span { width: 24px; height: 3px; background: var(--green-dark); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 120% at 50% 0%, var(--green-light) 0%, var(--paper) 65%);
  padding: 4rem 0 3.5rem;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: 96px; height: 96px; border-radius: 50%; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); max-width: 20ch; }
.tagline { font-family: var(--font-head); color: var(--gold); font-weight: 700; font-size: 1.15rem; margin-bottom: 1rem; }
.hero-copy { max-width: 46ch; color: var(--ink-soft); }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section h2 { font-size: clamp(1.4rem, 3vw, 2rem); text-align: center; }
.section-lead { text-align: center; color: var(--ink-soft); max-width: 56ch; margin: 0 auto 2.5rem; }
.about { background: var(--paper-soft); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.feature-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.feature-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

/* ---------- Programs ---------- */
.programs-subhead {
  text-align: center;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 2.5rem 0 1.25rem;
}
.programs-subhead:first-of-type { margin-top: 0.5rem; }
.programs-grid { margin-bottom: 0; }
@media (min-width: 1000px) {
  /* Force exactly 5-across on laptop+ so both program rows (5 tiles each)
     land on one line, instead of auto-fit wrapping a 5th tile to a new row. */
  .programs-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- Events / gallery cards ---------- */
.poster-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.poster-grid[hidden], .gallery-grid[hidden] { display: none; }
.poster-card, .gallery-card {
  position: relative;
  border: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--paper);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
}
.poster-card img, .gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.poster-card:hover img, .gallery-card:hover img { transform: scale(1.05); }
.poster-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(38,50,31,0.85), transparent);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.9rem 0.8rem 0.6rem;
  text-align: left;
}
.poster-grid--single {
  grid-template-columns: minmax(200px, 280px);
  margin: 0 auto 3rem;
}
.poster-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 1;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.poster-badge--upcoming { background: var(--green); }
.poster-badge--past { background: rgba(38, 50, 31, 0.6); }
.gallery-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  background: var(--green-light);
  text-align: center;
  padding: 1rem;
  cursor: default;
}
.gallery-placeholder span { font-size: 2rem; }
.gallery-placeholder p { margin: 0; font-size: 0.9rem; }

/* ---------- Gallery carousel ---------- */
.carousel {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.carousel-track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: carousel-scroll 50s linear infinite;
}
.carousel:hover .carousel-track,
.carousel:focus-within .carousel-track {
  animation-play-state: paused;
}
.carousel-item {
  position: relative;
  flex-shrink: 0;
  height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.carousel-item img {
  height: 100%;
  width: auto;
  display: block;
}
.carousel-item .poster-label { font-size: 0.82rem; }
@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-track { animation: none; }
}
@media (max-width: 640px) {
  .carousel-item { height: 190px; }
}

/* ---------- Contact ---------- */
.contact { background: var(--paper-soft); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
.contact-info h2, .contact-info .section-lead { text-align: left; margin-left: 0; }
.info-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.info-list [data-placeholder] { color: var(--ink-soft); font-style: italic; }

.contact-form {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.form-row label { font-weight: 700; font-size: 0.9rem; }
.form-row input, .form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--paper-soft);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.form-row--hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status { margin: 0.9rem 0 0; font-weight: 600; min-height: 1.2em; }
.form-status.success { color: var(--green-dark); }
.form-status.error { color: #c0392b; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d8e6c9; padding: 2rem 0; text-align: center; }
.footer-inner p { margin: 0.2rem 0; font-size: 0.9rem; }
.footer-credit { color: #9fb28a; font-size: 0.8rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 15, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.open { max-height: 260px; }
  .site-nav a { width: 100%; padding: 0.9rem 1.25rem; border-top: 1px solid var(--border); }
  .nav-cta { border-radius: 0; text-align: center; }
}
