:root {
  --bg: #0a0908;
  --text: #f7f1e8;
  --muted: #b8b0a5;
  --accent: #d7b98e;
  --line: #ffffff1f;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

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

.welcome {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #090807f2;
  backdrop-filter: blur(12px);
  padding: 24px;
  transition: opacity .5s ease, visibility .5s;
}

.welcome.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-card {
  width: min(520px, 94vw);
  padding: 44px 36px;
  text-align: center;
  border: 1px solid var(--line);
  background: #14110f;
  box-shadow: 0 30px 100px #000c;
}

.welcome-card h2 {
  font: 500 clamp(38px, 7vw, 64px)/.95 "Cormorant Garamond", serif;
  margin: 0 0 18px;
}

.welcome-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.welcome-card form {
  display: flex;
  gap: 10px;
  margin: 24px 0 12px;
}

.welcome-card input {
  min-width: 0;
  flex: 1;
  background: #0b0a09;
  border: 1px solid #ffffff25;
  color: #fff;
  padding: 14px 15px;
  border-radius: 2px;
  font: inherit;
}

.welcome-card button[type=submit] {
  background: var(--text);
  color: #171310;
  border: 0;
  padding: 14px 18px;
  border-radius: 2px;
  font-weight: 600;
  cursor: pointer;
}

.text-button {
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  padding: 8px;
}

.welcome-card small {
  display: block;
  color: #777;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 18px;
}

.hero-story {
  position: relative;
  height: 320svh;
  background: #0a0908;
}
.hero-stage {
  height: 100svh;
  min-height: 620px;
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 50% 45%, #29221c 0, #0a0908 62%);
}
.hero-photo {
  position: absolute;
  z-index: -2;
  inset: -5%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);
  will-change: transform;
  transition: opacity 1s ease;
}
.hero-photo.loaded { opacity: .72; }
.hero-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, #09080735 0%, #09080770 48%, #0a0908 100%);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  z-index: -1;
  width: 65vw;
  height: 65vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, #6d54342b, transparent 68%);
  filter: blur(10px);
}
.hero-inner {
  z-index: 1;
  text-align: center;
  padding: 24px;
  position: relative;
  width: min(100%, 1200px);
  animation: reveal 1.2s ease both;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 11px;
  color: var(--accent);
  margin: 0 0 22px;
}
.hero-story h1 {
  font: 500 clamp(62px, 12vw, 160px)/.74 "Cormorant Garamond", serif;
  margin: 0;
  display: grid;
  transition: opacity .5s ease, transform .5s ease;
}
.hero-story h1 em {
  font-size: .5em;
  font-style: normal;
  line-height: 1.15;
  color: var(--accent);
}
.hero-subtitle {
  font: 400 clamp(22px, 3vw, 34px) "Cormorant Garamond", serif;
  margin: 38px 0 10px;
}
.hero-meta { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.hero-story-copy {
  position: relative;
  min-height: 2.2em;
  margin: clamp(24px, 6vh, 64px) auto 0;
  max-width: 660px;
  font: 400 clamp(19px, 3vw, 30px)/1.25 "Cormorant Garamond", serif;
}
.story-line {
  position: absolute;
  inset: 0;
  margin: 0;
  color: var(--text);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.story-line.is-active { opacity: 1; transform: translateY(0); }
.scroll-hint {
  margin-top: clamp(28px, 7vh, 72px);
  border: 1px solid #ffffff55;
  background: #0003;
  color: var(--text);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.scroll-hint:hover { transform: translateY(4px); background: #ffffff18; }

.section-heading {
  min-height: 42svh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 10vw 8vw 4vw;
}

.section-heading h2 {
  font: 500 clamp(44px, 7vw, 92px)/.92 "Cormorant Garamond", serif;
  margin: 0;
}

.intro,
.closing,
.empty {
  min-height: 70svh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 10vw;
}

.intro h2,
.closing h2,
.empty h2 {
  font: 500 clamp(44px, 7vw, 92px)/.92 "Cormorant Garamond", serif;
  max-width: 1000px;
  margin: 0;
}

.intro > p:last-child,
.closing > p:last-child,
.empty > p:last-child {
  color: var(--muted);
  margin-top: 24px;
}

.gallery {
  width: 100%;
}

.photo-card {
  min-height: 105svh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 5vw;
  overflow: hidden;
}

.photo-wrap {
  width: min(88vw, 1250px);
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #151311;
  box-shadow: 0 30px 100px #0009;
  transform: translateY(0) scale(.94);
  transition: transform .18s linear;
}

/* Desktop: preserve the full image rather than cropping it. */
.photo-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80svh;
  object-fit: contain;
  transform: scale(var(--photo-scale, 1));
  transform-origin: center center;
  transition: transform .35s ease;
  cursor: zoom-in;
}

.photo-card figcaption {
  position: absolute;
  left: 6vw;
  bottom: 5vh;
  color: #fff;
  text-shadow: 0 2px 18px #000;
  font-size: 12px;
  letter-spacing: .12em;
}

.photo-number {
  opacity: .6;
  margin-right: 10px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000f;
  display: grid;
  place-items: center;
  padding: 30px;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 95vw;
  max-height: 90svh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox p {
  position: fixed;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ddd;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: #fff1;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 101;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
  .hero-story { height: 280svh; }
  .hero-stage { min-height: 560px; }
  .hero-photo.loaded { opacity: .64; }

  .section-heading {
    min-height: 32svh;
    padding: 72px 20px 28px;
  }
  .welcome-card {
    padding: 34px 22px;
  }

  .welcome-card form {
    display: grid;
  }

  .hero-story h1 {
    font-size: clamp(58px, 18vw, 100px);
  }

  .hero-subtitle {
    margin-top: 30px;
  }

  .scroll-hint {
    margin-top: 12vh;
  }

  .photo-card {
    min-height: auto;
    padding: 48px 16px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /*
    Mobile: let the image determine its own height.
    This is the key fix: no fixed-height box + no object-fit: cover.
    Portrait and landscape photos both remain completely visible.
  */
  .photo-wrap {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    display: block;
    overflow: hidden;
    transform: translateY(0) scale(.98);
  }

  .photo-wrap img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    transform: scale(var(--photo-scale, 1));
  }

  .photo-card figcaption {
    position: static;
    width: 100%;
    margin-top: 12px;
    text-align: center;
    text-shadow: none;
    color: var(--muted);
    display: none;
  }
}

@media (max-width: 430px) {
  .photo-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .photo-wrap img {
    transform: scale(var(--photo-scale, 1));
  }
}


/* Category shortcuts keep long galleries easy to explore. */
.gallery-nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: center; gap: 8px; padding: 10px 16px; overflow-x: auto; background: #0a0908ed; border-block: 1px solid var(--line); backdrop-filter: blur(12px); scrollbar-width: none; }
.gallery-nav::-webkit-scrollbar { display: none; }
.gallery-nav[hidden] { display: none; }
.gallery-nav a { flex: 0 0 auto; padding: 9px 14px; border: 1px solid transparent; color: var(--muted); text-decoration: none; text-transform: uppercase; letter-spacing: .13em; font-size: 10px; transition: color .2s, border-color .2s; }
.gallery-nav a:hover, .gallery-nav a:focus-visible { color: var(--text); border-color: #ffffff55; outline: none; }
.section-hero { min-height: min(72svh, 780px); display: grid; place-items: center; position: relative; margin: 22px auto 0; scroll-margin-top: 82px; background: #12100e; overflow: hidden; }
.section-hero-button { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; color: var(--text); background: transparent; cursor: zoom-in; }
.section-hero-button:focus-visible { outline: 2px solid var(--accent); outline-offset: -5px; }
.section-hero-image { display: block; width: 100%; height: 100%; max-height: min(72svh, 780px); object-fit: contain; margin: auto; }
.section-hero-button::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, #090807d9); pointer-events: none; }
.section-hero-caption { position: absolute; z-index: 1; inset: auto 24px 32px; display: grid; justify-items: center; gap: 8px; text-shadow: 0 2px 18px #000; pointer-events: none; }
.section-hero-caption .eyebrow { margin: 0; }
.section-hero-title { font: 500 clamp(38px, 7vw, 82px)/.95 "Cormorant Garamond", serif; }
.section-hero-hint { color: #e1d9cf; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; cursor: zoom-in; }
.photo-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.photo-open img { cursor: zoom-in; }
.photo-card figcaption { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-align: center; padding: 9px 12px 0; }
.lightbox-control { position: fixed; top: 50%; z-index: 102; display: grid; place-items: center; width: 50px; height: 50px; transform: translateY(-50%); border: 1px solid #ffffff55; border-radius: 50%; background: #ffffff14; color: #fff; font-size: 30px; cursor: pointer; transition: background .2s; }
.lightbox-control:hover { background: #ffffff2b; }
.lightbox-control:focus-visible, .lightbox-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }
@media (max-width: 700px) {
  .gallery-nav { justify-content: flex-start; padding-inline: 12px; }
  .gallery-nav a { padding: 9px 11px; font-size: 9px; }
  .section-heading { scroll-margin-top: 68px; }
  .section-hero { min-height: 54svh; margin-top: 10px; scroll-margin-top: 68px; }
  .section-hero-image { max-height: 54svh; }
  .section-hero-caption { bottom: 20px; }
  .photo-card figcaption { display: block; margin-top: 10px; padding: 0 8px; font-size: 11px; }
  .lightbox-control { width: 40px; height: 40px; font-size: 24px; }
  .lightbox-prev { left: 9px; }
  .lightbox-next { right: 9px; }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Scroll reveals continue the story through each event chapter. */
html.motion-ready .photo-card .photo-wrap {
  opacity: .28;
  transition: opacity .6s ease, transform .18s linear;
}
html.motion-ready .photo-card.is-visible .photo-wrap { opacity: 1; }
.section-hero-image {
  transform: scale(1.055);
  transition: transform 1.15s cubic-bezier(.2,.7,.2,1);
}
.section-hero.is-visible .section-hero-image { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  html.motion-ready .photo-card .photo-wrap { opacity: 1; }
  .section-hero-image, .section-hero.is-visible .section-hero-image { transform: none; }
}

/* Event chapters use a compact horizontal reel with touch and arrow navigation. */
.chapter-carousel { position: relative; padding: 52px 0 24px; }
.chapter-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 7vw 18px; }
.chapter-carousel-heading { margin: 0; color: var(--muted); font: 400 20px "Cormorant Garamond", serif; }
.chapter-carousel-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #d7b98e55 transparent; overscroll-behavior-x: contain; }
.chapter-track { display: flex; align-items: stretch; gap: 2vw; width: max-content; padding: 0 7vw 18px; }
.chapter-track .photo-card { flex: 0 0 min(78vw, 1050px); width: min(78vw, 1050px); min-height: 0; height: min(76svh, 760px); padding: 0; overflow: visible; scroll-snap-align: center; }
.chapter-track .photo-wrap { width: 100%; height: 100%; }
.chapter-track .photo-wrap img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.chapter-track .photo-card figcaption { position: absolute; inset: auto 0 -32px; padding: 0; text-align: center; color: var(--muted); text-shadow: none; }
.chapter-arrow { position: absolute; z-index: 3; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #ffffff55; border-radius: 50%; background: #111d; color: white; font-size: 25px; cursor: pointer; transform: translateY(-50%); }
.chapter-arrow:hover { background: #ffffff2a; }
.chapter-arrow:focus-visible, .chapter-prev { left: 22px; }
.chapter-next { right: 22px; }
@media (max-width: 700px) {
  .chapter-carousel { padding-top: 30px; }
  .chapter-toolbar { margin-inline: 16px; }
  .chapter-track { gap: 14px; padding-inline: 16px; }
  .chapter-track .photo-card { flex-basis: 88vw; width: 88vw; height: 58svh; }
  .chapter-arrow { width: 40px; height: 40px; }
  .chapter-prev { left: 8px; }
  .chapter-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter-carousel-viewport { scroll-behavior: auto; }
}

.event-chapter { scroll-margin-top: 82px; }
@media (max-width: 700px) { .event-chapter { scroll-margin-top: 68px; } }

/* Each event is presented as one chapter heading and one photo reel. */
.chapter-carousel { padding: clamp(56px, 9vh, 110px) 0 74px; }
.chapter-toolbar { align-items: end; }
.chapter-title-block .eyebrow { margin: 0 0 8px; }
.chapter-title { margin: 0; color: var(--text); font: 500 clamp(38px, 6vw, 76px)/.95 "Cormorant Garamond", serif; }
.chapter-count { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }
.event-chapter { scroll-margin-top: 82px; }
@media (max-width: 700px) {
  .chapter-carousel { padding: 54px 0 56px; }
  .chapter-toolbar { align-items: center; }
  .chapter-title { font-size: clamp(36px, 10vw, 54px); }
  .chapter-count { font-size: 9px; }
    .chapter-track .photo-card { height: 58svh; }
  .event-chapter { scroll-margin-top: 68px; }
}

/* Event title and slideshow action sit within the same full-width photo chapter. */
.chapter-carousel {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.chapter-toolbar {
  position: absolute;
  z-index: 4;
  inset: clamp(24px, 6vh, 66px) 0 auto;
  justify-content: center;
  margin: 0;
  text-align: center;
  pointer-events: none;
}
.chapter-title-block { text-align: center; }
.chapter-title-block .eyebrow { margin-bottom: 6px; }
.chapter-title { text-shadow: 0 2px 22px #000b; }
.chapter-count { color: #f3eee7; text-shadow: 0 1px 12px #000; }
.chapter-carousel-viewport { width: 100%; scrollbar-width: none; }
.chapter-carousel-viewport::-webkit-scrollbar { display: none; }
.chapter-track { gap: 0; padding: 0; }
.chapter-track .photo-card {
  flex-basis: 100vw;
  width: 100vw;
  height: 88svh;
  min-height: 600px;
  padding: 0 5vw;
  scroll-snap-align: center;
}
.chapter-track .photo-wrap {
  width: min(90vw, 1500px);
  height: 100%;
  background: transparent;
  box-shadow: none;
}
.chapter-track .photo-wrap img { max-height: 100%; }
.chapter-carousel::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #08070685 0%, transparent 24%, transparent 70%, #08070685 100%);
}
.chapter-arrow { z-index: 4; }
@media (max-width: 700px) {
  .chapter-title { font-size: clamp(34px, 9vw, 50px); }
  .chapter-carousel { padding: 0; }
  .chapter-track .photo-card {
    flex-basis: 100vw;
    width: 100vw;
    height: 78svh;
    min-height: 540px;
    padding-inline: 4vw;
  }
  .chapter-track .photo-wrap { width: 92vw; }
    .chapter-carousel::after {
    background: linear-gradient(180deg, #0807069c 0%, transparent 27%, transparent 68%, #08070699 100%);
  }
}

/* Fit each carousel photo to the slide using its real aspect ratio. */
.chapter-track .photo-wrap {
  display: grid;
  place-items: center;
  overflow: hidden;
}
.chapter-track .photo-wrap .photo-open {
  display: grid;
  place-items: center;
  width: 100%;
  height: min(76svh, 760px);
  min-height: 0;
}
.chapter-track .photo-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

@media (max-width: 700px) {
  .chapter-track .photo-wrap .photo-open {
    height: 68svh;
  }
}
