:root {
  --night: #102018;
  --night-2: #1a2e24;
  --cream: #f4efe4;
  --cream-dim: #d9d0c0;
  --brass: #e0c48a;
  --brass-deep: #a68445;
  --pine: #2f6a4a;
  --line: rgba(244, 239, 228, 0.16);
  --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(224, 196, 138, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(47, 106, 74, 0.35), transparent 55%),
    var(--night);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.07;
  mix-blend-mode: overlay;
}

a { color: var(--brass); }
a:hover { color: var(--cream); }

.wrap {
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
}

header {
  display: flex;
  align-items: center;
  padding: 1.2rem 0 0.2rem;
}

header a { display: block; line-height: 0; }

header img {
  display: block;
  height: 54px;
  width: auto;
}

.hero-stage {
  position: relative;
}

#drift {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.hero {
  position: relative;
  z-index: 1;
  padding: 2.4rem 0 1.6rem;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  grid-template-areas:
    "copy stub"
    "portrait portrait";
  column-gap: 3rem;
  row-gap: 1rem;
  align-items: end;
}

.copy { grid-area: copy; }
.stub { grid-area: stub; }

.portrait-block {
  grid-area: portrait;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 2.4 / 1;
  margin-top: 0;
  cursor: pointer;
}

#open-gallery {
  font: inherit;
  cursor: pointer;
}

#snowfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.kicker {
  margin: 0 0 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--brass);
}

@font-face {
  font-family: Canterbury;
  src: url("/fonts/Canterbury.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

h1 {
  font-family: Canterbury, Palatino, serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 6vw, 5.1rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 1.2rem;
  color: #f7f3ea;
  -webkit-text-stroke: 0.018em #1a0c0e;
  paint-order: stroke fill;
  text-shadow: 0.04em 0.05em 0 #140608;
}

.lede {
  max-width: 38rem;
  color: var(--cream-dim);
  font-size: 1.15rem;
}

.stub {
  border: 1px solid var(--line);
  background: rgba(16, 32, 24, 0.55);
  padding: 1.25rem 1.3rem 1.1rem;
  border-radius: 2px 18px 2px 18px;
}

.stub strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stub p { margin: 0.35rem 0 0; color: var(--cream-dim); }
.stub a { white-space: nowrap; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--brass);
  color: var(--night);
  background: var(--brass);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.button.ghost {
  background: transparent;
  color: var(--cream);
}

.button:hover { background: var(--cream); color: var(--night); border-color: var(--cream); }

section { padding: 2.6rem 0; border-top: 1px solid var(--line); }

#the-night,
#sponsors {
  background: #9a3737;
  border-top-color: transparent;
}

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  margin: 0 0 0.6rem;
}

.section-note { max-width: 40rem; color: var(--cream-dim); margin: 0 0 1.5rem; }

.run {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.run li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.run li > span {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--brass);
}

.run .when {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--brass);
}

.run strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.2;
}

.bios {
  display: grid;
  gap: 2.8rem;
}

.bios article {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.6rem;
  align-items: start;
}

.bios article:not(:has(img)) {
  grid-template-columns: 1fr;
}

.bios img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  margin: 0;
}

.bios h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 0.6rem;
}

.bios p:last-child {
  margin: 0;
  color: var(--cream-dim);
}

.logo-rail {
  list-style: none;
  margin: 0 0 0.4rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem 1.6rem;
}

.logo-rail li {
  min-height: 108px;
  border: 0;
  display: grid;
  place-items: center;
  padding: 0.4rem 0.6rem;
}

.logo-rail span {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--brass-deep);
}

.logo-rail img {
  max-width: 100%;
  max-height: 86px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.logo-rail li:last-child:nth-child(3n + 1) {
  grid-column: 2;
}

#sponsors .actions {
  justify-content: center;
}

.photo-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.frame {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(224, 196, 138, 0.18), transparent 42%),
    var(--night-2);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--cream-dim);
}

.frame strong {
  display: block;
  font-family: var(--serif);
  color: var(--cream);
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

footer {
  padding: 2rem 0 3rem;
  color: var(--cream-dim);
  font-size: 0.92rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

main, header, footer { position: relative; z-index: 1; }

@media (max-width: 760px) {
  .hero, .photo-panel, .bios, .bios article { grid-template-columns: 1fr; }
  .hero {
    padding-top: 1.6rem;
    grid-template-areas:
      "copy"
      "portrait"
      "stub";
  }
  .portrait { aspect-ratio: 16 / 10; }
  .logo-rail { grid-template-columns: 1fr 1fr; }
  .logo-rail li:last-child:nth-child(3n + 1) { grid-column: auto; }
}

.gallery {
  width: min(1080px, calc(100% - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 2px 22px 2px 22px;
  background: var(--night);
  color: var(--cream);
  overflow: hidden;
}

.gallery::backdrop {
  background: rgba(8, 14, 11, 0.82);
}

.gallery-sheet {
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
  padding: 1.4rem 1.4rem 1.8rem;
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.gallery-head .kicker { margin-bottom: 0.35rem; }

.gallery-close,
.viewer-nav {
  font: inherit;
  cursor: pointer;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--brass);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

.gallery-close:hover,
.viewer-nav:hover { background: var(--cream); color: var(--night); }

.gallery-years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 1.1rem;
}

.gallery-years:empty { display: none; }

.gallery-years button {
  font: inherit;
  cursor: pointer;
  color: var(--cream-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}

.gallery-years button[aria-pressed="true"] {
  color: var(--night);
  background: var(--brass);
  border-color: var(--brass);
}

.gallery-status {
  color: var(--cream-dim);
  margin: 0.4rem 0 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
}

.gallery-grid button {
  display: block;
  padding: 0;
  border: 0;
  background: var(--night-2);
  cursor: pointer;
  border-radius: 2px 14px 2px 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.viewer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem;
  background: rgba(8, 14, 11, 0.94);
}

.viewer[hidden] { display: none; }

.viewer figure {
  margin: 0;
  min-width: 0;
}

.viewer img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 7rem);
  object-fit: contain;
}

.viewer figcaption {
  margin-top: 0.55rem;
  text-align: center;
  color: var(--cream-dim);
  font-size: 0.92rem;
}

.viewer figcaption:empty { display: none; }

@media (max-width: 760px) {
  .gallery-sheet { padding: 1.1rem 1rem 1.4rem; }
  .viewer { grid-template-columns: 1fr; }
  .viewer-nav.prev { order: 2; }
  .viewer-nav.next { order: 3; }
  .viewer figure { order: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portrait { cursor: default; }
}
