/* ==========================================================================
   Design tokens — 21st.dev "Modern Minimal" (see CLAUDE.md for source)
   ========================================================================== */

:root {
  --background: oklch(1 0 0);
  --foreground: oklch(.321 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(.321 0 0);
  --primary: oklch(.623 .188 259.815);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(.967 .003 264.542);
  --secondary-foreground: oklch(.446 .026 256.802);
  --muted: oklch(.985 .002 247.839);
  --muted-foreground: oklch(.551 .023 264.364);
  --accent: oklch(.951 .025 236.824);
  --accent-foreground: oklch(.379 .138 265.522);
  --border: oklch(.928 .006 264.531);
  --input: oklch(.928 .006 264.531);

  --radius: 0.375rem;
  --radius-lg: 1.25rem; /* larger radius for photo cards — softer, more "gallery" feel */
  --spacing: 0.25rem;
  --letter-spacing: 0em;

  --shadow-color: 0 0% 0%;
  --shadow: 0 4px 8px -1px hsl(var(--shadow-color) / 0.1);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(.205 0 0);
    --foreground: oklch(.922 0 0);
    --card: oklch(.269 0 0);
    --card-foreground: oklch(.922 0 0);
    --secondary: oklch(.269 0 0);
    --secondary-foreground: oklch(.922 0 0);
    --muted: oklch(.239 0 0);
    --muted-foreground: oklch(.715 0 0);
    --accent: oklch(.379 .138 265.522);
    --accent-foreground: oklch(.882 .057 254.128);
    --border: oklch(.371 0 0);
    --input: oklch(.371 0 0);
    --shadow-color: 0 0% 0%;
    --shadow: 0 4px 12px -1px hsl(var(--shadow-color) / 0.4);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  letter-spacing: var(--letter-spacing);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ==========================================================================
   Header
   ========================================================================== */

.hero {
  padding: calc(var(--spacing) * 20) calc(var(--spacing) * 6) calc(var(--spacing) * 12);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0 0 calc(var(--spacing) * 4);
}

.hero__names {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 3.25rem);
  margin: 0 0 calc(var(--spacing) * 3);
  color: var(--foreground);
}

.hero__date {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  margin: 0 0 calc(var(--spacing) * 5);
}

.hero__note {
  font-size: 1rem;
  color: var(--foreground);
  opacity: 0.85;
  margin: 0;
}

/* ==========================================================================
   Gallery — single scrolling flow
   ========================================================================== */

.gallery {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 4) calc(var(--spacing) * 24);
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 5);
}

.gallery__item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: zoom-in;

  /* Reserve real space before the image has loaded — without this the item
     has ~0 height and IntersectionObserver never reports it as intersecting
     (zero-area targets never cross the 0 threshold), so lazy-load/fade-in
     silently never fires. Also prevents layout shift as photos pop in. */
  min-height: 45vw;

  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (min-width: 720px) {
  .gallery__item { min-height: 320px; }
}

.gallery__item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery__item img,
.gallery__item video {
  width: 100%;
  height: auto;
  display: block;
}

.gallery__item--video::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, hsl(0 0% 0% / 0.28), transparent 40%);
}

.gallery__play {
  position: absolute;
  left: calc(var(--spacing) * 4);
  bottom: calc(var(--spacing) * 4);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: hsl(0 0% 100% / 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gallery__play svg { width: 1rem; height: 1rem; fill: oklch(.205 0 0); }

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: hsl(0 0% 0% / 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox__stage {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
}

.lightbox__stage img,
.lightbox__stage video {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  margin: 0 auto;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: hsl(0 0% 100% / 0.1);
  border: none;
  color: #fff;
  border-radius: 999px;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover { background: hsl(0 0% 100% / 0.2); }

.lightbox__close { top: calc(var(--spacing) * 5); right: calc(var(--spacing) * 5); }
.lightbox__nav--prev { left: calc(var(--spacing) * 5); top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: calc(var(--spacing) * 5); top: 50%; transform: translateY(-50%); }

.lightbox__close svg, .lightbox__nav svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }

@media (max-width: 640px) {
  .lightbox__nav { width: 2.25rem; height: 2.25rem; }
  .lightbox__nav--prev { left: calc(var(--spacing) * 2); }
  .lightbox__nav--next { right: calc(var(--spacing) * 2); }
  .lightbox__close { top: calc(var(--spacing) * 3); right: calc(var(--spacing) * 3); }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  text-align: center;
  padding: calc(var(--spacing) * 10) calc(var(--spacing) * 4) calc(var(--spacing) * 14);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .gallery__item {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .lightbox { transition: none; }
}
