:root {
  --charcoal: #303131;
  --cream: #FDFBF5;
  --ivory: #F3F2E9;
  --sage: #707C6F;       /* large text only */
  --deep-sage: #5E695D;
  --line: rgba(48, 49, 49, 0.14);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Montserrat', system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 6vw, 56px);
  --measure: 640px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.loading {
  min-height: 100svh;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--deep-sage);
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Hero */
.hero {
  position: relative;
  min-height: 88svh;
  display: flex;
  align-items: flex-end;
  padding: var(--gutter);
  padding-bottom: calc(var(--gutter) + 84px);
  color: var(--cream);
  background: var(--charcoal);
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 31, 31, 0.78) 0%, rgba(30, 31, 31, 0.25) 45%, rgba(30, 31, 31, 0.05) 100%);
}

.hero--no-cover::after {
  background: radial-gradient(ellipse at 30% 20%, rgba(94, 105, 93, 0.45), transparent 60%);
}

.hero__logo {
  position: absolute;
  z-index: 1;
  top: calc(var(--gutter) + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: clamp(120px, 32vw, 160px);
  height: auto;
  opacity: 0.95;
}

.hero__text {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero__names {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(44px, 12vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.hero__details {
  margin: 18px 0 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.hero__cue {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  opacity: 0.85;
}

.hero__cue::after {
  content: '';
  width: 1px;
  height: 28px;
  background: currentColor;
}

/* Body */
.body {
  padding: 0 var(--gutter);
}

.note {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(64px, 12vw, 120px) 0 clamp(48px, 9vw, 96px);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(19px, 4.6vw, 23px);
  line-height: 1.6;
}

.note p { margin: 0 0 1em; }

.note__signoff {
  margin-top: 1.6em !important;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--deep-sage);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 22px;
  padding: 0 26px;
  border: 1px solid var(--deep-sage);
  border-radius: 2px;
  background: var(--deep-sage);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

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

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

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

.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--deep-sage);
  outline-offset: 3px;
}

/* Share + review */
.share {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 96px) 0;
  text-align: center;
}

.share p { margin: 0; font-size: 15px; }

.share .share__keep {
  margin-bottom: 14px;
  font-weight: 600;
  color: var(--deep-sage);
}

.review {
  max-width: var(--measure);
  margin: 0 auto clamp(56px, 10vw, 96px);
  padding: clamp(36px, 7vw, 56px) clamp(24px, 6vw, 56px);
  background: var(--ivory);
  text-align: center;
}

.review h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 6vw, 34px);
}

.review p { margin: 0 0 18px; }

.text-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--deep-sage);
  text-underline-offset: 6px;
}

/* Footer */
.footer {
  padding: 56px var(--gutter) calc(56px + env(safe-area-inset-bottom));
  background: var(--charcoal);
  color: var(--cream);
  text-align: center;
}

.footer p { margin: 0; }

.footer__logo {
  display: block;
  width: 72px;
  height: auto;
  margin: 0 auto;
}

.footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 14px !important;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.footer__links a { text-decoration: none; opacity: 0.9; }
.footer__links a:hover { text-decoration: underline; }

.footer__help {
  margin-top: 22px !important;
  font-size: 12px;
  opacity: 0.65;
}

/* Not found / no link */
.message {
  min-height: 100svh;
  max-width: 520px;
  margin: 0 auto;
  padding: var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.message__logo {
  width: 64px;
  height: auto;
  margin-bottom: 28px;
}

.message h1 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 8vw, 48px);
  line-height: 1.1;
}

.message p { margin: 0 0 24px; }

/* Toolbar: section links + download all, sticks to the top while scrolling */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  /* Full width so photos never show beside it, with its contents lined up with the grid */
  margin: 0 calc(var(--gutter) * -1);
  display: flex;
  align-items: center;
  gap: 12px 24px;
  padding: 12px calc(var(--gutter) + max(0px, (100% - 1280px) / 2));
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.toolbar__sections {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar__sections::-webkit-scrollbar { display: none; }

.toolbar__sections a {
  display: block;
  padding: 10px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  color: var(--deep-sage);
}

.toolbar__sections a:hover { color: var(--charcoal); }

.toolbar__download {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-left: auto;
  padding: 6px 20px;
  border-radius: 2px;
  background: var(--deep-sage);
  color: var(--cream);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.4;
  transition: background 0.2s;
}

.toolbar__download:hover { background: var(--charcoal); }

.toolbar__download small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  opacity: 0.85;
}

.toolbar__count {
  margin: 0 0 0 auto;
  padding: 10px 0;
  font-size: 13px;
  color: var(--deep-sage);
}

/* Gallery */
.gallery {
  --row: 150px;
  max-width: 1280px;
  margin: 0 auto;
}

.set {
  padding: clamp(40px, 8vw, 72px) 0 0;
  scroll-margin-top: 72px;
}

.set__head { margin-bottom: 22px; }
.set__head .eyebrow { color: var(--deep-sage); }

.set__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 7vw, 48px);
  line-height: 1.1;
}

.set__meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--deep-sage);
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 calc(var(--gutter) * -1);
}

/* Keeps the last row from stretching a lone photo across the whole width */
.grid::after {
  content: '';
  flex: 999 1 0;
}

.tile {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: var(--ivory);
  cursor: zoom-in;
  overflow: hidden;
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.tile:hover img { opacity: 0.88; }

.tile:focus-visible {
  outline: 2px solid var(--deep-sage);
  outline-offset: 2px;
}

.tile--placeholder {
  border: 1px dashed var(--line);
  cursor: default;
}

/* Lightbox */
body.has-lightbox { overflow: hidden; }

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #1e1f1f;
  color: var(--cream);
}

.lightbox::backdrop { background: #1e1f1f; }

.lightbox[open] {
  display: grid;
  grid-template-rows: auto 1fr;
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
}

.lightbox__count {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.lightbox__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox__save,
.lightbox__close,
.lightbox__nav {
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--sans);
  cursor: pointer;
}

.lightbox__save {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(253, 251, 245, 0.5);
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox__save:hover { background: var(--cream); color: var(--charcoal); }

.lightbox__close {
  width: 44px;
  height: 44px;
  font-size: 30px;
  line-height: 1;
}

.lightbox__stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom));
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 88px;
  margin-top: -20px;
  font-size: 44px;
  line-height: 1;
  opacity: 0.7;
}

.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: 4px; }
.lightbox__nav--next { right: 4px; }

.lightbox button:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

/* Phones swipe instead */
@media (pointer: coarse) {
  .lightbox__nav { display: none; }
}

.films-link {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 96px) 0 0;
  text-align: center;
}

.films-link p { margin: 0 0 10px; font-size: 15px; }

/* Phones: smaller download button, and a fade on the section links so it's clear they scroll */
@media (max-width: 599px) {
  .toolbar { gap: 14px; }
  .toolbar__sections {
    -webkit-mask-image: linear-gradient(to right, #000 75%, transparent);
    mask-image: linear-gradient(to right, #000 75%, transparent);
    padding-right: 24px;
  }
  .toolbar__download { min-height: 44px; padding: 4px 14px; }
  .toolbar__download small { display: none; }
}

@media (min-width: 600px) {
  .gallery { --row: 220px; }
}

@media (min-width: 900px) {
  .gallery { --row: 280px; }
  .grid { margin: 0; gap: 6px; }
  .lightbox__stage { padding: 0 72px calc(24px + env(safe-area-inset-bottom)); }

  /* Tall cover: photo on the right, names on charcoal on the left */
  .hero--portrait { align-items: center; padding-bottom: var(--gutter); }
  .hero--portrait .hero__img { left: auto; width: 46%; }
  .hero--portrait::after { background: linear-gradient(to right, var(--charcoal) 54%, rgba(48, 49, 49, 0) 54%); }
  .hero--portrait .hero__text { max-width: 48%; }
  .hero--portrait .hero__logo { left: var(--gutter); transform: none; }
  .hero--portrait .hero__cue { left: 27%; }
}

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