/* HelmetFest — coastal archive theme.
   Two accents only (gold + terracotta) on deep navy and warm paper;
   hairline borders over drop shadows; Fraunces for display type. */

:root {
  --sunset-1: #c2643f;
  --sunset-2: #d08a52;
  --sunset-3: #e3b04b;
  --ocean-deep: #0e2a3a;
  --ocean: #1d4356;
  --ocean-light: #35617a;
  --foam: #eef4f2;
  --sand: #faf6ed;
  --sand-dark: #e4dbc6;
  --ink: #22333d;
  --ink-soft: #5c6b73;
  --coral: #c2643f;
  --gold: #d9a441;
  --white: #ffffff;
  --line: #e7dfcd;
  --shadow: 0 12px 32px rgba(14, 42, 58, 0.12);
  --shadow-sm: 0 2px 8px rgba(14, 42, 58, 0.06);
  --radius: 12px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "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(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Top nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ocean-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.main-nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--white);
}

.main-nav .years-trigger {
  position: relative;
  display: flex;
}

.years-trigger-btn {
  display: block;
}

.years-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 10px;
  width: 280px;
  max-height: 340px;
  overflow-y: auto;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.years-dropdown.open { display: grid; }

.years-dropdown a {
  color: var(--ocean-deep);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 7px 4px;
  text-align: center;
  border-radius: 6px;
}

.years-dropdown a:hover { background: var(--sand); }
.years-dropdown a.empty-year { color: #c3bba9; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(175deg, var(--ocean-deep) 0%, var(--ocean) 100%);
  padding: 96px 0 88px;
}

.hero .wrap { position: relative; text-align: center; }

.hero .eyebrow,
.hero .sun {
  /* .sun retired from the markup; kept harmless if cached HTML still has it */
  display: none;
}

.hero-stamp {
  width: 132px;
  height: 132px;
  margin: 0 auto 26px;
  filter: invert(1);
  opacity: 0.92;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.5vw, 4.4rem);
  margin: 0 0 14px;
  letter-spacing: 0.06em;
}

.hero .tagline {
  font-size: 1.06rem;
  max-width: 540px;
  margin: 0 auto 40px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.hero .stat-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.stat-pill {
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 14px 26px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 130px;
}

.stat-pill span.num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: 0;
  color: var(--sunset-3);
}

.upcoming-banner {
  display: inline-block;
  margin-top: 34px;
  padding: 12px 26px;
  border-radius: 8px;
  background: var(--sunset-1);
  color: var(--white);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.15s ease;
}

.upcoming-banner:hover {
  background: #ad5231;
  transform: translateY(-1px);
}

/* ---------- Sections ---------- */

section { padding: 72px 0; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  color: var(--ocean-deep);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-sub {
  color: var(--ink-soft);
  margin: 0 0 40px;
  max-width: 640px;
}

/* ---------- Decade / timeline ---------- */

.decade-block { margin-bottom: 48px; }

.decade-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 720px) {
  .year-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 460px) {
  .year-grid { grid-template-columns: repeat(2, 1fr); }
}

.year-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.year-card .attendee-count {
  position: absolute;
  bottom: 16px;
  right: 14px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.year-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--ocean-light);
}

.year-card .yr {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ocean-deep);
}

.year-card .house {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 5px;
  min-height: 2.2em;
  line-height: 1.45;
}

.year-card .unknown {
  opacity: 0.5;
  font-style: italic;
}

/* Inline line-icons (house / camera / people) used on cards and year pages */
.icn {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
}

.year-hero .house-name .icn { width: 15px; height: 15px; }

.year-card .photo-count {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.year-card.placeholder {
  background: transparent;
  border: 1px dashed var(--sand-dark);
  color: var(--ink-soft);
}

.year-card.placeholder:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--ocean-light);
}

.year-card.placeholder .yr { color: #b3a888; }
.year-card.placeholder .house { font-style: italic; opacity: 0.75; }

/* ---------- Officers / roster ---------- */

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.roster-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.roster-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ocean-deep);
  display: grid;
  place-items: center;
  color: var(--sunset-3);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}

.roster-card .role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sunset-1);
  font-weight: 600;
}

.roster-card .name {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Seed / crest page ---------- */

.crest-stamp {
  width: 210px;
  height: 210px;
  margin: 0 auto 44px;
}

.story {
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 44px;
  font-size: 1.02rem;
  line-height: 1.75;
}

.story p { margin: 0 0 20px; }
.story p:last-child { margin-bottom: 0; }

.vitals-table {
  max-width: 460px;
  margin: 34px auto 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.vitals-table .row {
  display: flex;
  justify-content: space-between;
  padding: 13px 22px;
  border-bottom: 1px solid var(--sand);
  font-size: 0.92rem;
}
.vitals-table .row:last-child { border-bottom: none; }
.vitals-table .row .k { font-weight: 600; color: var(--ocean); }
.vitals-table .row .v { color: var(--ink-soft); }

/* ---------- Year detail page ---------- */

.year-hero {
  color: var(--white);
  background: linear-gradient(175deg, var(--ocean-deep), var(--ocean));
  padding: 52px 0 64px;
  text-align: center;
}

.year-hero .yr-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 0.88rem;
}

.year-hero .yr-nav a {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.year-hero .yr-nav a:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.year-hero .yr-nav .disabled { opacity: 0.3; pointer-events: none; }

.year-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  letter-spacing: 0.03em;
  margin: 0 0 8px;
}

.year-hero .house-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--sunset-3);
  font-weight: 600;
}

.attendees-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 720px;
  margin: 22px auto 0;
}

.attendee-chip {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.gallery figure {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--white);
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery figure:hover img { transform: scale(1.05); }

.video-tile {
  position: relative;
  width: 200px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  margin-bottom: 28px;
}

.video-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.video-tile:hover img { transform: scale(1.05); }

.video-tile .play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(14, 42, 58, 0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding-left: 4px;
  pointer-events: none;
}

.video-embed {
  aspect-ratio: 16 / 9;
  max-width: 560px;
  margin-bottom: 28px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-sm);
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.empty-year-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px 36px;
}

.empty-year-card .big-icon { font-size: 2.6rem; margin-bottom: 12px; opacity: 0.85; }
.empty-year-card h2 { font-family: var(--font-display); font-weight: 600; color: var(--ocean-deep); margin: 0 0 10px; }
.empty-year-card p { color: var(--ink-soft); line-height: 1.7; }
.empty-year-card code {
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.85em;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 24, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 82vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-close:hover,
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover { background: rgba(255, 255, 255, 0.14); }

.lightbox .lb-count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ocean-deep);
  color: rgba(255, 255, 255, 0.55);
  padding: 40px 0;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.8;
}

.site-footer p { margin: 0; }
.site-footer strong {
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-display);
  font-weight: 600;
}

@media (max-width: 640px) {
  .story { padding: 28px 24px; }
  .hero { padding: 72px 0 64px; }
  .stat-pill { min-width: 0; flex: 1; padding: 12px 14px; }
}
