:root {
  --black: #000;
  --white: #fff;
  --mint: #c3e4d6;
  --green: #016b49;
  --text: #000;
  --muted: #555;
  --max: 1200px;
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(2.25rem, 4vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.9rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(#bdbdbd, #fff);
  padding: 32px 24px;
}
.site-header .wrap { display: flex; align-items: center; justify-content: center; gap: 24px; }
.site-header .logo img { width: min(900px, 75vw); }
.home .site-header { background: var(--black); }

.social { display: flex; gap: 10px; }
.social a {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
}
.social svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 48px 24px 56px; }
.site-footer .social { justify-content: center; margin-bottom: 16px; }
.site-footer p { color: var(--green); font-weight: 700; font-size: .85rem; letter-spacing: .02em; margin: 0; }
.site-footer .photo-credit { margin-top: 10px; font-weight: 400; font-size: .7rem; color: #8b8f86; }
.site-footer .photo-credit a { color: inherit; }
.home .site-footer { background: var(--black); }

/* ---------- Buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 28px 0; }
.btn {
  display: inline-block;
  border: 2px solid var(--green);
  color: var(--green);
  padding: 16px 30px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .02em;
  text-align: center;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--green); color: #fff; }
.dark .btn { border-color: var(--mint); color: var(--mint); }
.dark .btn:hover { background: var(--mint); color: #000; }

/* ---------- Galleries ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; }
.gallery button {
  all: unset; cursor: zoom-in; display: block; width: 100%;
  aspect-ratio: 3 / 2; overflow: hidden; background: #ddd;
}
.gallery button:focus-visible { outline: 3px solid var(--green); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.gallery button:hover img { opacity: .85; }
.gallery figcaption { font-size: .78rem; line-height: 1.4; margin-top: 6px; }
.gallery-note { text-align: center; margin-top: 16px; }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.93); z-index: 50;
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 56px 64px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox p { color: #ddd; margin: 14px 0 0; text-align: center; font-size: .9rem; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff; font-size: 40px;
  cursor: pointer; padding: 8px 16px; line-height: 1;
}
.lightbox .close { top: 10px; right: 14px; font-size: 34px; }
.lightbox .prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Contact ---------- */
.contact { max-width: 640px; margin: 0 auto; }
.contact h3 { text-align: center; margin-bottom: 28px; }
.contact label { display: block; font-size: .9rem; margin-bottom: 18px; }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact input, .contact textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px;
  font: inherit; color: #000; background: #fff; border: 1px solid #ccc;
}
.contact textarea { min-height: 140px; resize: vertical; }
.contact button { font: inherit; background: none; cursor: pointer; }
.contact .status { text-align: center; margin-top: 12px; min-height: 1.5em; }

/* ---------- Project pages ---------- */
.project { padding: 40px 0 24px; }
.project .wrap { max-width: 1000px; }
.project h1, .project h2, .project h3, .project h4 { text-align: center; }
.project > .wrap > p, .project .center { text-align: center; }
.project .block-img { margin: 28px auto; max-width: 720px; }
.project .block-img.small { max-width: 260px; }
.project .lede { max-width: 760px; margin: 0 auto 1em; font-size: 1.05rem; }
.project .body-text { max-width: 760px; margin: 0 auto 1em; text-align: left; }
.project-section { padding: 32px 0; }

.video { position: relative; aspect-ratio: 16 / 9; margin: 28px auto 8px; max-width: 900px; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption { text-align: center; font-size: .9rem; margin-bottom: 24px; }
.episodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 24px; margin: 24px 0; }
.episodes .video { margin: 0 0 6px; }

.credits { columns: 3 240px; column-gap: 32px; margin: 24px 0; }
.credits p { break-inside: avoid; font-size: .8rem; text-transform: none; margin: 0 0 10px; white-space: pre-line; text-align: left; }

.pager { display: flex; justify-content: space-between; gap: 24px; padding: 56px 0 8px; }
.pager a { text-decoration: none; font-weight: 700; font-size: clamp(1.1rem, 2.2vw, 1.75rem); }
.pager a:hover { color: var(--green); }
.pager .next { margin-left: auto; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .episodes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .site-header { padding: 20px 16px; }
  .site-header .wrap { flex-direction: column; gap: 14px; }
  .site-header .logo img { width: 100%; }
  .wrap { padding: 0 16px; }
  .episodes { grid-template-columns: 1fr; }
  .contact .row { grid-template-columns: 1fr; gap: 0; }
  .lightbox { padding: 48px 8px; }
  .section { padding: 48px 0; }
}
