/* Iyer High School · Batch of '94
   Palette from the uniform (creamish light-brown shirt, dark brown pants,
   tie striped brown on tan) and the classroom (blackboard, blue-grey benches,
   register ink). Page background is a neutral warm off-white. */

:root {
  color-scheme: light;

  /* page */
  --page: #f5f4ed;        /* warm off-white background */

  /* uniform */
  --shirt: #eadcc3;       /* creamish light-brown shirt: form card, photo frame */
  --shirt-edge: #d3bf9d;  /* thin edge so the shirt colour shows against the page */
  --shirt-deep: #e2d2b5;
  --pants: #4a3324;       /* dark brown pants */
  --tie: #7a5236;         /* tie stripe brown */
  --tie-light: #c9a47f;   /* tie stripe tan */
  --accent: var(--pants); /* headings, buttons, links */
  --accent-deep: #2f2017;
  --paper: #fffdf8;       /* notebook paper and input fields */

  /* classroom */
  --board: #24302b;
  --board-edge: #6b4a2f;
  --chalk: #eeefe6;
  --chalk-dim: #d9dccf;
  --bench: #5d7684;
  --bench-light: #dbe4e7;
  --wall-mint: #d6eadb;

  /* register ink */
  --ink: #3a2e26;
  --ink-soft: #6f5d4b;    /* muted text; darker than the trailer's #86735f to pass 4.5:1 */
  --pen-blue: #1d4a94;
  --pen-red: #b0281f;
  --pen-amber: #8a5a00;
  --rule: #c9d6e6;
  --margin-red: #d98b84;

  --font-display: 'Rozha One', Georgia, 'Times New Roman', serif;
  --font-body: 'Mukta', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Kalam', 'Comic Sans MS', cursive;
  --font-kn: 'Noto Sans Kannada', 'Kalam', sans-serif;

  --text-hero: clamp(3.2rem, 1.6rem + 7vw, 7rem);
  --text-h2: clamp(2rem, 1.4rem + 2.4vw, 3.2rem);
  --space-section: clamp(4rem, 3rem + 4vw, 7.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --max: 1180px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint cotton weave, like the shirt */
  background-image:
    repeating-linear-gradient(0deg, rgba(122, 82, 54, 0.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(122, 82, 54, 0.02) 0 1px, transparent 1px 3px);
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: var(--text-h2); font-weight: 400; color: var(--accent); }
p { margin: 0 0 1em; text-wrap: pretty; }
::placeholder { color: #6b625a; opacity: 1; }
a { color: var(--accent); }

:focus-visible { outline: 3px solid var(--pen-blue); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--accent); color: var(--shirt); padding: 0.5rem 1rem; z-index: 50;
}
.skip:focus { left: 0.5rem; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}

/* ---------- Tie stripe divider (the school tie, diagonally) ---------- */
.tie {
  height: 18px;
  background: repeating-linear-gradient(-45deg, var(--tie) 0 9px, var(--tie-light) 9px 18px);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--shirt);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--btn-bg);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 700 1rem/1.1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--accent-deep);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--accent-deep); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-deep); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn--small { min-height: 40px; padding: 0.45rem 1rem; font-size: 0.95rem; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--accent); box-shadow: none; }
.btn--ghost:hover { background: rgba(122, 82, 54, 0.07); box-shadow: none; }
.btn--light { --btn-bg: var(--chalk); --btn-fg: var(--board); box-shadow: 0 3px 0 #0f1512; }
.btn--ghost-light { background: transparent; border-color: var(--chalk-dim); color: var(--chalk); box-shadow: none; }
.btn--ghost-light:hover { background: rgba(238, 239, 230, 0.1); box-shadow: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem var(--gutter);
  background: rgba(245, 244, 237, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(122, 82, 54, 0.15);
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand__crest {
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50% 50% 46% 46% / 40% 40% 60% 60%;
  background: var(--accent); color: var(--shirt);
  font: 400 1.05rem var(--font-display);
}
.brand__text { font: 400 1.1rem/1.1 var(--font-display); }
.brand__text small { display: block; font: 500 0.78rem var(--font-body); color: var(--ink-soft); letter-spacing: 0.02em; }
.topnav { display: flex; gap: 1.4rem; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.topnav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) { .topnav { display: none; } }
@media (max-width: 380px) { .brand__text small { display: none; } }

/* ---------- Hero: blackboard ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem) var(--gutter) var(--space-section);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

.board {
  background: var(--board-edge);
  padding: 14px 14px 0;
  border-radius: 6px;
  box-shadow: 0 24px 50px -24px rgba(42, 35, 32, 0.6);
  transform: rotate(-0.6deg);
}
.board__surface {
  position: relative;
  padding: clamp(1.4rem, 1rem + 2vw, 2.6rem);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.07), transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(255, 255, 255, 0.05), transparent 50%),
    var(--board);
  color: var(--chalk);
  border-radius: 2px;
  overflow: hidden;
}
/* old smudges of erased chalk */
.board__surface::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 40% 12% at 70% 30%, rgba(238, 239, 230, 0.06), transparent 70%),
    radial-gradient(ellipse 30% 10% at 25% 75%, rgba(238, 239, 230, 0.05), transparent 70%);
  pointer-events: none;
}

.chalk { font-family: var(--font-hand); color: var(--chalk); text-shadow: 0 0 1px rgba(238, 239, 230, 0.6); margin: 0; }
.chalk--kn { font-family: var(--font-kn); font-size: 1.1rem; color: var(--chalk-dim); letter-spacing: 0.04em; }
.chalk--title { font-family: var(--font-hand); font-weight: 700; line-height: 0.95; margin-top: 0.4rem; }
.chalk__year { display: block; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.chalk__big { display: block; font-size: var(--text-hero); letter-spacing: 0.02em; transform: rotate(-2deg); transform-origin: left; }
.chalk--welcome { font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem); margin-top: 0.2rem; }

.chalk-smiley {
  position: absolute; top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2.4rem);
  width: clamp(56px, 10vw, 92px);
  fill: none; stroke: var(--chalk); stroke-width: 2.2; stroke-linecap: round;
  opacity: 0.85;
}
.chalk-smiley .fill { fill: var(--chalk); stroke: none; }

.board__facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
  margin: 1.8rem 0 0; padding-top: 1.2rem;
  border-top: 2px dashed rgba(238, 239, 230, 0.25);
}
@media (max-width: 480px) { .board__facts { grid-template-columns: 1fr; } }
.board__facts dt { font: 700 0.75rem var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--chalk-dim); }
.board__facts dd { margin: 0.1rem 0 0; font: 400 1.3rem/1.3 var(--font-hand); }
.board__facts a { color: var(--chalk); }

.countdown { display: flex; gap: 1.6rem; margin-top: 1.2rem; }
.countdown div { display: flex; flex-direction: column; }
.countdown span { font: 700 2.4rem/1 var(--font-hand); }
.countdown small { font-size: 0.8rem; color: var(--chalk-dim); letter-spacing: 0.08em; text-transform: uppercase; }

.board__ledge {
  position: relative; height: 18px;
  margin: 0 -14px;
  background: linear-gradient(#7d5a3c, #5b3f27);
  border-radius: 0 0 6px 6px;
}
.chalk-stick { position: absolute; top: -4px; left: 18%; width: 34px; height: 7px; border-radius: 3px; background: var(--chalk); }
.chalk-stick--short { left: 26%; width: 18px; background: #f3d9d4; }
.duster {
  position: absolute; top: -10px; right: 16%; width: 64px; height: 16px; border-radius: 3px;
  background: linear-gradient(#8a6a4a 0 55%, #d8d4c8 55%);
}

.hero__lede { font: 400 clamp(2rem, 1.4rem + 2.6vw, 3.4rem)/1.02 var(--font-display); color: var(--accent); margin-bottom: 1rem; }
.hero__copy p:not(.eyebrow):not(.hero__lede):not(.hero__count) { color: var(--ink-soft); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.hero__count { margin-top: 1.2rem; font: 400 1.15rem var(--font-hand); color: var(--pen-blue); min-height: 1.6em; }

/* ---------- Then ---------- */
.then {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-section) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}
@media (max-width: 800px) { .then { grid-template-columns: 1fr; } }

.taped {
  position: relative;
  margin: 0;
  padding: 12px 12px 0;
  background: var(--shirt);
  border: 1px solid var(--shirt-edge);
  box-shadow: 0 18px 40px -22px rgba(42, 35, 32, 0.55);
  transform: rotate(1.4deg);
  max-width: 460px;
  justify-self: center;
}
.taped::before, .taped::after {
  content: '';
  position: absolute; top: -12px;
  width: 90px; height: 26px;
  background: rgba(233, 220, 196, 0.85);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.taped::before { left: -18px; transform: rotate(-32deg); }
.taped::after { right: -18px; transform: rotate(28deg); }
.taped img { width: 100%; filter: sepia(0.15) contrast(1.02); }
.taped figcaption { font: 400 1.1rem var(--font-hand); color: var(--pen-blue); padding: 0.6rem 0.2rem 0.8rem; }
.then__copy h2 { margin-bottom: 1rem; }
.then__copy p:not(.eyebrow) { color: var(--ink-soft); max-width: 40ch; }

/* ---------- Section heads ---------- */
.section-head { max-width: 46rem; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.section-head h2 { margin-bottom: 0.8rem; }
.section-head p:not(.eyebrow) { color: var(--ink-soft); }

/* ---------- Roll call ---------- */
.rollcall {
  padding: var(--space-section) var(--gutter);
  background: var(--wall-mint);
  border-top: 1px solid rgba(42, 35, 32, 0.08);
}
.rollcall > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.rollcall__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  align-items: start;
}
@media (max-width: 900px) { .rollcall__grid { grid-template-columns: 1fr; } }

.form-card {
  background: var(--shirt);
  border: 1px solid var(--shirt-edge);
  border-radius: 0;
  padding: calc(clamp(1.2rem, 1rem + 1.5vw, 2rem) + 6px) clamp(1.2rem, 1rem + 1.5vw, 2rem) clamp(1.2rem, 1rem + 1.5vw, 2rem);
  /* maroon bar along the top, like the band on a school form */
  box-shadow: inset 0 6px 0 var(--accent), 0 16px 36px -26px rgba(42, 35, 32, 0.6);
}
.form-card__title { font-size: 1.5rem; margin-bottom: 1.2rem; color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
.field > span { font-weight: 700; font-size: 0.95rem; }
.field em { font-style: normal; font-weight: 400; color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
@media (max-width: 420px) { .field-row { grid-template-columns: 1fr; } }

input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.75rem;
  font: 400 1.05rem var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid #bcae97;
  border-radius: 6px;
  transition: border-color 140ms, box-shadow 140ms;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 82, 54, 0.18); }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--pen-red); }

.attendance { border: 0; padding: 0; margin: 0.4rem 0 1rem; display: grid; gap: 0.5rem; }
.attendance legend { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.4rem; padding: 0; }
.mark { position: relative; cursor: pointer; }
.mark input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.mark span {
  display: flex; align-items: center; gap: 0.8rem;
  min-height: 52px;
  padding: 0.5rem 0.9rem;
  border: 1.5px solid #bcae97;
  border-radius: 8px;
  background: var(--paper);
  font-weight: 500;
  transition: border-color 140ms, background-color 140ms;
}
.mark b {
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  border: 2px solid currentColor; border-radius: 50%;
  font: 700 1.1rem/1 var(--font-hand);
}
.mark--present b { color: var(--pen-blue); }
.mark--maybe b { color: var(--pen-amber); }
.mark--absent b { color: var(--pen-red); }
.mark:hover span { border-color: var(--ink-soft); }
.mark input:focus-visible + span { outline: 3px solid var(--pen-blue); outline-offset: 2px; }
.mark--present input:checked + span { border-color: var(--pen-blue); background: #e7eef9; }
.mark--maybe input:checked + span { border-color: var(--pen-amber); background: #f8efd9; }
.mark--absent input:checked + span { border-color: var(--pen-red); background: #f8e4e1; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg { min-height: 1.4em; font-weight: 500; margin: 0 0 0.8rem; }
.form-msg[data-tone='error'] { color: var(--pen-red); }
.form-msg[data-tone='ok'] { color: var(--pen-blue); }

/* Attendance register: ruled school notebook */
.register {
  background: var(--paper);
  border-radius: 4px;
  box-shadow: 0 16px 36px -26px rgba(42, 35, 32, 0.6), inset 0 0 0 1px rgba(42, 35, 32, 0.08);
  padding: 1.4rem 0 1rem;
  overflow: hidden;
}
.register__head { padding: 0 1.2rem 0.8rem 3.2rem; border-bottom: 2px solid var(--rule); }
.register__head h3 { font-size: 1.4rem; }
.register__tally { margin: 0.3rem 0 0; font: 400 1.05rem var(--font-hand); color: var(--ink-soft); }
.register__tally b { font-weight: 700; }
.register__tally .t-present { color: var(--pen-blue); }
.register__tally .t-maybe { color: var(--pen-amber); }
.register__tally .t-absent { color: var(--pen-red); }

.register__table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.register__table th {
  text-align: left; font: 700 0.72rem var(--font-body); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); padding: 0.6rem 0.5rem;
}
.register__table td { padding: 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.register__table th:first-child, .register__table td:first-child {
  width: 3rem; padding-left: 1rem; text-align: right; color: var(--ink-soft);
  border-right: 2px solid var(--margin-red);
}
.register__table td:nth-child(2) { font: 400 1.15rem/1.3 var(--font-hand); color: var(--pen-blue); }
.register__table td:nth-child(3), .register__table td:nth-child(4) { color: var(--ink-soft); }
.register__table td:nth-child(5) { text-align: center; font-weight: 700; color: var(--ink); }
.register__table th:nth-child(5) { text-align: center; }
.register__table td:last-child { width: 3.5rem; text-align: center; }
.att { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; font: 700 1.15rem/1 var(--font-hand); }
.att--present { color: var(--pen-blue); }
.att--maybe { color: var(--pen-amber); }
.att--absent { color: var(--pen-red); border: 2px solid var(--pen-red); border-radius: 50%; }
.att small { display: block; font: 400 0.7rem var(--font-body); }
.register__table tr.is-new td { animation: ink-in 1.6s var(--ease); }
@keyframes ink-in { from { background: #fff4c2; } to { background: transparent; } }
.register__empty { padding: 1.6rem 1.2rem 0.6rem 3.2rem; font: 400 1.15rem var(--font-hand); color: var(--ink-soft); margin: 0; }
@media (max-width: 520px) {
  .register__table th:nth-child(4), .register__table td:nth-child(4) { display: none; }
  .register__head, .register__empty { padding-left: 1.2rem; }
}

/* ---------- Missing / share band ---------- */
.missing {
  background: var(--board);
  color: var(--chalk);
  padding: clamp(2.5rem, 2rem + 3vw, 4.5rem) var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: start;
}
.missing > * { max-width: 40rem; }
.missing__actions { margin-top: 1.4rem; }
.missing h2 { color: var(--chalk); font-family: var(--font-hand); font-weight: 700; margin-bottom: 0.8rem; }
.missing p { color: var(--chalk-dim); }
.missing__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---------- Chits ---------- */
.chits { max-width: var(--max); margin: 0 auto; padding: var(--space-section) var(--gutter); }
.chit-form {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 0 1rem;
  padding: 1.2rem;
  background: var(--shirt-deep);
  border-radius: 8px;
  margin-bottom: 2.4rem;
}
.chit-form__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.chit-form__foot .form-msg { margin: 0; }
@media (max-width: 640px) { .chit-form { grid-template-columns: 1fr; } }

.chit-wall {
  list-style: none; margin: 0; padding: 0;
  columns: 3 260px;
  column-gap: 1.4rem;
}
.chit {
  break-inside: avoid;
  margin: 0 0 1.4rem;
  padding: 1.1rem 1.1rem 0.9rem 1.6rem;
  background:
    linear-gradient(90deg, transparent 0.9rem, var(--margin-red) 0.9rem, var(--margin-red) calc(0.9rem + 1px), transparent calc(0.9rem + 1px)),
    repeating-linear-gradient(var(--paper) 0 1.7rem, var(--rule) 1.7rem calc(1.7rem + 1px));
  box-shadow: 0 10px 22px -16px rgba(42, 35, 32, 0.55);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 200ms var(--ease);
}
.chit:hover { transform: rotate(0deg) scale(1.02); }
.chit p { font: 400 1.15rem/1.7rem var(--font-hand); color: var(--pen-blue); margin: 0 0 0.4rem; white-space: pre-line; overflow-wrap: anywhere; }
.chit footer { font-size: 0.9rem; color: var(--ink-soft); }
.chit footer b { color: var(--ink); }
.chit--prompt { background: transparent; border: 2px dashed #bcae97; box-shadow: none; }
.chit--prompt p { color: var(--ink-soft); }

/* ---------- Photos ---------- */
.photos {
  padding: var(--space-section) var(--gutter);
  background: var(--bench-light);
}
.photos > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.gallery {
  list-style: none; margin: 0 auto; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 240px), 1fr));
  grid-auto-flow: dense;
  gap: clamp(0.5rem, 0.3rem + 1vw, 0.8rem);
}
.gallery li:nth-child(5n + 1) { grid-column: span 2; grid-row: span 2; }
.gallery button {
  display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: var(--bench); cursor: zoom-in;
  border-radius: 4px; overflow: hidden;
}
.gallery img {
  width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 400ms var(--ease), filter 400ms;
  filter: saturate(0.92);
}
.gallery button:hover img { transform: scale(1.04); filter: saturate(1.05); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
  margin: 0; padding: 0; border: 0;
  background: rgba(20, 24, 22, 0.94);
  color: var(--chalk);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(20, 24, 22, 0.94); }
.lightbox img { max-width: min(92vw, 1280px); max-height: 84vh; width: auto; object-fit: contain; border-radius: 3px; }
.lightbox button {
  position: absolute; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(238, 239, 230, 0.4); background: rgba(20, 24, 22, 0.6);
  color: var(--chalk); font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(238, 239, 230, 0.15); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__nav--prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; font: 400 1rem var(--font-hand); margin: 0; }

/* ---------- Footer ---------- */
.footer { padding: 2.4rem var(--gutter) 3rem; text-align: center; color: var(--ink-soft); }
.footer p { margin: 0 0 0.4rem; }
.footer p:first-child { font: 400 1.25rem var(--font-display); color: var(--accent); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.2rem; z-index: 60;
  transform: translate(-50%, 150%);
  background: var(--ink); color: var(--shirt);
  padding: 0.7rem 1.2rem; border-radius: 999px;
  font-weight: 500;
  transition: transform 260ms var(--ease), opacity 260ms, visibility 260ms;
  max-width: calc(100vw - 2rem);
  opacity: 0;
  visibility: hidden;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Preview-mode banner ---------- */
.demo-banner {
  padding: 0.7rem var(--gutter);
  background: #fff1c7;
  color: #4a3400;
  border-bottom: 2px solid #e2b23a;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ---------- Headcount summary ---------- */
.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: clamp(1.4rem, 1rem + 1.5vw, 2.2rem);
  padding: clamp(1rem, 0.8rem + 1vw, 1.6rem);
  background: var(--board);
  border-radius: 6px;
  color: var(--chalk);
}
.summary__item { display: flex; flex-direction: column; align-items: flex-start; }
.summary__item span { font: 700 clamp(2.4rem, 1.8rem + 3vw, 4rem)/1 var(--font-hand); }
.summary__item small { font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--chalk-dim); }
.summary__item--present span { color: #b9d3ff; }
.summary__item--maybe span { color: #ffd98a; }
.summary__note { grid-column: 1 / -1; margin: 0.4rem 0 0; font-size: 0.92rem; color: var(--chalk-dim); }

.field__hint { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- Still looking for ---------- */
.roster { background: rgba(238, 239, 230, 0.06); border: 1px dashed rgba(238, 239, 230, 0.3); border-radius: 6px; padding: 1.2rem 1.3rem; }
.roster__title { font: 700 1.6rem var(--font-hand); color: var(--chalk); margin-bottom: 0.3rem; }
.missing .roster__progress { color: var(--chalk); font-weight: 500; margin-bottom: 0.3rem; }
.missing .roster__hint { font-size: 0.92rem; }
.roster__list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.roster__name {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0.35rem 0.9rem;
  border: 1.5px solid rgba(238, 239, 230, 0.55); border-radius: 999px;
  background: transparent; color: var(--chalk);
  font: 400 1.05rem var(--font-hand); cursor: pointer;
  transition: background-color 140ms, border-color 140ms;
}
button.roster__name:hover { background: rgba(238, 239, 230, 0.12); border-color: var(--chalk); }
.roster__name--done { cursor: default; border-style: dashed; color: var(--chalk-dim); }
.roster__name--done::before { content: '\2713'; margin-right: 0.4rem; color: #b9d3ff; }
.roster__done { margin-top: 1rem; }
.roster__done summary { cursor: pointer; color: var(--chalk-dim); min-height: 40px; display: flex; align-items: center; }

/* ---------- Trailer (top of page) ---------- */
.trailer {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.2rem, 0.8rem + 2vw, 3rem) var(--gutter) clamp(2rem, 1.5rem + 2vw, 3.5rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}
.trailer__frame {
  position: relative;
  height: min(78vh, 680px);
  aspect-ratio: 9 / 16;
  padding: 10px;
  background: var(--shirt);
  border: 1px solid var(--shirt-edge);
  box-shadow: 0 24px 50px -26px rgba(42, 35, 32, 0.6);
  transform: rotate(-1deg);
}
.trailer__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--page);
}
.trailer__play {
  position: absolute;
  inset: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  /* the icon sits on the class photo (about a third down); the label at the bottom edge */
  padding: calc(62% - 38px) 0 6%;
  border: 0;
  background: linear-gradient(to top, rgba(47, 32, 23, 0.55), rgba(47, 32, 23, 0) 18%);
  color: #fff;
  cursor: pointer;
}
.trailer__icon {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 180ms var(--ease);
}
.trailer__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 14px 0 14px 23px;
  border-color: transparent transparent transparent var(--shirt);
}
.trailer__play:hover .trailer__icon { transform: scale(1.06); }
.trailer__play:focus-visible { outline: 3px solid var(--pen-blue); outline-offset: -3px; }
.trailer__label {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(47, 32, 23, 0.72);
  font: 500 0.95rem var(--font-body);
  letter-spacing: 0.02em;
}
.trailer__title {
  font-size: clamp(2.2rem, 1.3rem + 3.6vw, 4.2rem);
  line-height: 1.02;
  color: var(--accent);
  margin-bottom: 1rem;
  text-wrap: balance;
}
.trailer__copy p:not(.eyebrow):not(.hero__count) { color: var(--ink-soft); max-width: 34ch; }

@media (max-width: 760px) {
  .trailer { grid-template-columns: 1fr; justify-items: center; }
  .trailer__frame { height: min(56vh, 520px); max-width: 100%; }
  .trailer__copy { justify-self: stretch; }
}
