:root {
  /* Brand colors sampled from the Q-SPARK and Fort Lewis College logos */
  --blue-950: #100640;
  --blue-900: #160958; /* Q-SPARK logo navy */
  --blue-800: #004b8d; /* Fort Lewis College blue */
  --blue-700: #015c9c;
  --blue-500: #027dc4; /* FLC light blue */
  --blue-100: #e7f1fa;
  --gold-500: #fdbb30; /* Q-SPARK logo gold */
  --gold-400: #ffd066;
  --gold-100: #fff4dc;
  --gold-ink: #855400;
  --ink: #14172b;
  --muted: #5f6b80;
  --line: #d9e3ee;
  --bg: #f7fbff;
  --white: #ffffff;
  --shadow: 0 20px 56px rgba(16, 6, 64, .14);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: .97rem;
  line-height: 1.6;
}
a { color: var(--blue-700); }
img { max-width: 100%; display: block; }
code { background: rgba(2, 125, 196, .1); padding: .08rem .35rem; border-radius: 7px; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 1rem; background: var(--white); padding: .75rem 1rem; z-index: 20; }
.skip-link:focus { left: 1rem; }
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 14px rgba(16, 6, 64, .05);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--blue-900); text-decoration: none; }
.brand-logo { width: 60px; height: auto; }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font-size: 1.02rem; letter-spacing: -.02em; }
.brand small { color: var(--blue-800); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; font-size: .6rem; margin-top: .28rem; }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a { color: var(--blue-900); text-decoration: none; font-weight: 700; font-size: .86rem; white-space: nowrap; }
.site-nav a:hover { color: var(--blue-700); }
.nav-admin { padding: .42rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.nav-toggle { display: none; border: 0; background: transparent; width: 42px; height: 42px; padding: 8px; }
.nav-toggle span { display: block; height: 2px; background: var(--blue-900); margin: 6px 0; }

/* Hero with workshop photo background */
.hero {
  position: relative;
  display: grid; align-items: center;
  min-height: clamp(400px, 58vh, 540px);
  padding: 60px 0;
  background: var(--blue-950);
  color: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
  filter: saturate(.7) contrast(1.05);
  transform: scale(1.06);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 6, 64, .62), rgba(16, 6, 64, .8)),
    linear-gradient(100deg, rgba(16, 6, 64, .92) 0%, rgba(22, 9, 88, .7) 46%, rgba(0, 75, 141, .26) 100%),
    radial-gradient(circle at 84% 16%, rgba(253, 187, 48, .22), transparent 46%);
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.eyebrow { margin: 0 0 .6rem; color: var(--blue-700); letter-spacing: .13em; text-transform: uppercase; font-weight: 800; font-size: .7rem; }
.hero .eyebrow, .page-hero .eyebrow, .blue-section .eyebrow { color: var(--gold-500); }
h1, h2, h3 { line-height: 1.15; margin: 0; color: inherit; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); letter-spacing: -.02em; }
h3 { font-size: 1.02rem; letter-spacing: -.01em; }
.hero-text { font-size: clamp(.98rem, 1.3vw, 1.06rem); color: rgba(255, 255, 255, .88); max-width: 620px; margin: 1rem 0 1.6rem; }
.hero-actions, .stacked-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .68rem 1.1rem; border-radius: 999px; font-weight: 800; font-size: .88rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.button.primary { background: var(--gold-500); color: var(--blue-950); box-shadow: 0 12px 28px rgba(253, 187, 48, .3); }
.button.primary:hover { background: var(--gold-400); }
.button.secondary { background: var(--white); color: var(--blue-800); border-color: var(--line); }
.button.ghost { background: transparent; color: var(--blue-700); border-color: var(--line); }
.hero .button.secondary, .blue-section .button.secondary { background: rgba(255, 255, 255, .12); color: var(--white); border-color: rgba(255, 255, 255, .32); }
.note { color: rgba(255, 255, 255, .78); font-size: .88rem; margin-bottom: 0; }
.note a { color: var(--gold-500); font-weight: 800; }

.section { padding: 64px 0; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; }
.align-start { align-items: start; }
.copy-block p, .section-intro { color: var(--muted); font-size: .98rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 28px; }
.feature-card { padding: 1.4rem 1.3rem 1.3rem; position: relative; overflow: hidden; }
.feature-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--gold-500), var(--blue-500)); }
.icon { display: inline-flex; font-weight: 900; font-size: .82rem; color: var(--gold-ink); background: var(--gold-100); border-radius: 999px; padding: .3rem .65rem; margin-bottom: .85rem; }
.feature-card p, .video-card p, .event-card p, .photo-card p, .impact-list span { color: var(--muted); font-size: .92rem; }
.feature-card p { margin-bottom: 0; }
.feature-card, .event-card, .video-card, .photo-card, .impact-list div, .contact-card, .admin-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(16, 6, 64, .07); }
.blue-section { background: var(--blue-950); color: var(--white); }
.section-heading { max-width: 720px; text-align: center; margin: 0 auto 26px; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: .98rem; }
.blue-section .section-heading p:not(.eyebrow), .light { color: rgba(255, 255, 255, .78); }
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: .55rem; margin-bottom: 24px; }
.chip { border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: .48rem .85rem; background: rgba(255, 255, 255, .08); color: var(--white); font-weight: 800; font-size: .84rem; cursor: pointer; font-family: inherit; }
.chip.active { background: var(--gold-500); border-color: var(--gold-500); color: var(--blue-950); }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.video-card { overflow: hidden; background: #170c4d; border-color: rgba(255, 255, 255, .12); color: var(--white); }
.video-frame { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--blue-800), var(--blue-500)); display: grid; place-items: center; }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; }
.video-placeholder { text-align: center; padding: 2rem; font-weight: 800; }
.video-body { padding: 1.1rem; }
.video-body p { color: rgba(255, 255, 255, .74); }
.video-meta { color: var(--gold-500); font-weight: 800; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; }
.video-tags { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .75rem; }
.video-tags span { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; padding: .22rem .55rem; font-size: .74rem; color: rgba(255, 255, 255, .82); }
.event-list { display: grid; gap: .9rem; }
.event-card { padding: 1.2rem; }
.event-date { color: var(--blue-700); font-weight: 900; text-transform: uppercase; font-size: .76rem; letter-spacing: .08em; margin-bottom: .3rem; }
.gallery-section { background: var(--blue-100); }
.gallery-actions { display: flex; justify-content: center; margin-top: 1.6rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.photo-card { display: flex; flex-direction: column; overflow: hidden; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: linear-gradient(135deg, var(--blue-800), var(--blue-500)); transition: transform .35s ease; }
.photo-open:hover img { transform: scale(1.04); }
.photo-open:focus-visible { outline: 3px solid var(--gold-500); outline-offset: -3px; }
.photo-card div { padding: 1rem; }
.photo-card .photo-date { margin: 0 0 .3rem; color: var(--blue-700); font-weight: 900; text-transform: uppercase; font-size: .76rem; letter-spacing: .08em; }
/* Clamp the caption so cards in a row keep matching heights; the lightbox shows it in full */
.photo-card p:not(.photo-date) { margin: .4rem 0 0; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Photo slideshow */
.slideshow { max-width: 900px; margin: 0 auto; }
.slideshow-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 62vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-950);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s ease, visibility .7s ease;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide-backdrop {
  position: absolute; inset: -8%;
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(.6) brightness(.5);
}
.slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
}
.slide figcaption {
  position: absolute; inset: auto 0 0;
  padding: 2.6rem 1.2rem 1.1rem;
  color: var(--white);
  background: linear-gradient(180deg, transparent, rgba(16, 6, 64, .9));
}
.slide figcaption h3 { color: var(--gold-500); }
.slide figcaption p { margin: .3rem 0 0; color: rgba(255, 255, 255, .86); font-size: .9rem; max-width: 60ch; }
.slide-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(16, 6, 64, .55);
  color: var(--white);
  cursor: pointer;
}
.slide-arrow:hover { background: var(--gold-500); color: var(--blue-950); border-color: var(--gold-500); }
.slide-arrow svg { width: 20px; height: 20px; }
.slide-arrow.prev { left: 12px; }
.slide-arrow.next { right: 12px; }
.slideshow-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .6rem 1rem; margin-top: 1rem; }
.slide-play {
  min-height: 34px; padding: .3rem .85rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--blue-800);
  font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer;
}
.slide-play:hover { border-color: var(--blue-500); }
.slide-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.slide-dot {
  width: 10px; height: 10px; padding: 0;
  border: 1px solid var(--blue-800); border-radius: 999px;
  background: transparent; cursor: pointer;
}
.slide-dot.is-active { background: var(--blue-800); transform: scale(1.25); }
.slide-count { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 700; }
.slide-arrow:focus-visible, .slide-dot:focus-visible, .slide-play:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* Full-screen photo viewer (<dialog>, so it stacks above the sticky header) */
.lightbox {
  width: 100vw; max-width: 100vw;
  height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0;
  background: rgba(16, 6, 64, .95);
  color: var(--white);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(16, 6, 64, .95); }
.lightbox-inner {
  position: relative;
  /* minmax(0,…) not 1fr: a bare 1fr floors the track at the image's intrinsic
     height, which leaves the stage indefinite and lets tall photos overflow. */
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .9rem;
  width: 100%; height: 100%;
  padding: 58px 16px 20px;
}
/* Let the image fill the track and letterbox itself: a percentage max-height
   would resolve against an indefinite grid area and tall photos would overflow. */
.lightbox-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.lightbox-image { width: 100%; height: 100%; object-fit: contain; }
.lightbox-meta { max-width: 70ch; margin: 0 auto; text-align: center; }
.lightbox-meta > * { margin: 0; }
.lightbox-date { color: var(--gold-500); font-weight: 900; text-transform: uppercase; font-size: .74rem; letter-spacing: .08em; }
.lightbox-title { color: var(--white); font-size: 1.05rem; margin-top: .25rem; }
.lightbox-caption { color: rgba(255, 255, 255, .82); font-size: .9rem; margin-top: .35rem; }
.lightbox-count { color: rgba(255, 255, 255, .6); font-size: .78rem; font-weight: 700; margin-top: .6rem; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px;
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px;
  background: rgba(16, 6, 64, .55); color: var(--white); cursor: pointer;
}
.lightbox-close:hover { background: var(--gold-500); color: var(--blue-950); border-color: var(--gold-500); }
.lightbox-close svg { width: 20px; height: 20px; }
.lightbox-close:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* Testimonials: the teacher quote leads, the longest student quote spans two rows */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.testimonial {
  position: relative;
  display: flex; flex-direction: column; gap: 1.1rem;
  margin: 0; padding: 1.4rem 1.35rem 1.3rem;
  background: #170c4d;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  overflow: hidden;
}
.testimonial::before { content: "\201C"; display: block; height: 1.6rem; color: var(--gold-500); font-size: 3.4rem; font-weight: 800; line-height: 1; }
.testimonial.is-featured { grid-column: span 2; background: linear-gradient(135deg, #1d1063, #170c4d 60%); }
.testimonial.is-featured::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--gold-500), var(--blue-500)); }
.testimonial.is-tall { grid-row: span 2; }
.testimonial blockquote { margin: 0; }
.testimonial blockquote p { margin: 0; color: rgba(255, 255, 255, .86); font-size: .95rem; }
.testimonial.is-featured blockquote p { color: var(--white); font-size: clamp(1rem, 1.4vw, 1.1rem); font-weight: 500; }
.testimonial-author { display: flex; align-items: center; gap: .7rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.testimonial-initial { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 999px; background: var(--gold-500); color: var(--blue-950); font-weight: 900; font-size: .9rem; }
.testimonial-author strong, .testimonial-author small { display: block; line-height: 1.25; }
.testimonial-author strong { color: var(--white); }
.testimonial-author small { color: var(--gold-500); font-weight: 700; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; margin-top: .15rem; }

.impact-band { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.impact-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 26px; }
.impact-list div { padding: 1.15rem; }
.impact-list strong, .impact-list span { display: block; }
.impact-list strong { color: var(--blue-900); }
.contact-section { padding-top: 0; }
.contact-card { padding: 1.9rem; display: grid; grid-template-columns: 1fr auto; gap: 1.8rem; align-items: center; background: linear-gradient(135deg, var(--white), var(--blue-100)); }
.contact-card p:not(.eyebrow) { color: var(--muted); font-size: .95rem; }

.site-footer { padding: 48px 0 24px; background: var(--blue-950); color: rgba(255, 255, 255, .74); font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.2rem; }
.footer-grid strong { color: var(--white); font-size: 1rem; }
.footer-grid p { margin: .5rem 0 0; }
.footer-logo { width: 190px; height: auto; background: var(--white); padding: 10px 14px; border-radius: 12px; margin-bottom: 1rem; }
.footer-heading { display: block; color: var(--gold-500); letter-spacing: .12em; text-transform: uppercase; font-weight: 800; font-size: .72rem; }
.footer-links ul { list-style: none; margin: .85rem 0 0; padding: 0; display: grid; gap: .65rem; }
.footer-links a { display: inline-flex; align-items: center; gap: .55rem; color: rgba(255, 255, 255, .84); text-decoration: none; font-weight: 700; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--gold-500); }
.footer-links svg { width: 19px; height: 19px; flex: none; }
.footer-contact .button { margin-top: 1rem; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-size: .84rem; }
.footer-bottom p { margin: 0; }

.admin-main { padding-top: 44px; }
.admin-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1rem; align-items: start; }
.admin-card { padding: 1.3rem; }
.admin-form { display: grid; gap: .85rem; margin-top: 1rem; }
.admin-form label { font-weight: 800; color: var(--blue-900); font-size: .9rem; }
.admin-form input, .admin-form textarea, .admin-form select, .json-output { width: 100%; margin-top: .35rem; border: 1px solid var(--line); border-radius: 12px; padding: .8rem; font: inherit; background: #fbfdff; }
.admin-form textarea { min-height: 105px; }
.json-output { min-height: 520px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.compact-actions { margin-top: 1rem; }

.page-hero { padding: 56px 0 36px; background: radial-gradient(circle at 85% 20%, rgba(253, 187, 48, .2), transparent 34%), linear-gradient(135deg, var(--blue-950), var(--blue-800)); color: var(--white); }
.page-hero .section-heading { margin-bottom: 0; }
.page-hero h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.page-hero p:not(.eyebrow) { color: rgba(255, 255, 255, .8); }
.featured-video-card { margin: 0; }
#featuredVideo .video-card { width: 100%; }
.empty-state { padding: 1.2rem; border-radius: var(--radius); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); }
.gallery-section.is-empty { display: none; }
.videos-page-section { padding-top: 36px; }
.photos-page-section { padding-top: 36px; }
/* The base .empty-state is white-on-dark; the gallery background is light */
.gallery-section .empty-state { background: var(--white); border-color: var(--line); color: var(--muted); }
.video-contact-section { padding-top: 56px; }

/* Keep the full menu on one line just above the hamburger breakpoint */
@media (min-width: 851px) and (max-width: 1000px) {
  .site-nav { gap: .7rem; }
  .site-nav a { font-size: .82rem; }
}
@media (max-width: 850px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 20px; right: 20px; top: 72px; background: var(--white); padding: 1rem; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); flex-direction: column; align-items: flex-start; }
  .site-nav.open, .site-nav.always-open { display: flex; }
  .split, .contact-card, .footer-grid, .admin-grid { grid-template-columns: 1fr; }
  .card-grid, .video-grid, .impact-list, .testimonial-grid { grid-template-columns: 1fr; }
  .testimonial.is-featured { grid-column: auto; }
  .testimonial.is-tall { grid-row: auto; }
  .hero { min-height: 0; padding: 48px 0 44px; }
  .section { padding: 48px 0; }
  .contact-actions { justify-content: flex-start; }
  .slideshow-frame { aspect-ratio: 4 / 3; }
  .slide figcaption { padding: 2rem .9rem .9rem; }
  .slide figcaption p { font-size: .84rem; }
  .slide-arrow { width: 38px; height: 38px; }
  .lightbox-inner { padding: 52px 10px 16px; }
  .lightbox-meta { max-width: none; }
  .lightbox-caption { font-size: .84rem; }
}
@media (max-width: 420px) {
  .brand-logo { width: 48px; }
  .brand small { font-size: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: none; }
  .photo-card img { transition: none; }
  .photo-open:hover img { transform: none; }
}
