:root {
  --p: 0;                 /* scroll progress, set by JS (0 → 1) */
  --hero-h: 100vh;
  --mini-h: 88px;         /* mini banner height after scroll */
  --bg: #13110e;
  --ink: #f3ece0;
  --ink-dim: rgba(243, 236, 224, 0.72);
  --accent: #c9a96a;
  --accent-hover: #d8b87a;
  --accent-ink: #1a1208;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@supports (height: 100dvh) {
  :root { --hero-h: 100dvh; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse at top, rgba(201,169,106,0.08) 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Video stage (fixed, shrinks with scroll) ──────────── */
.video-stage {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--hero-h) + (var(--mini-h) - var(--hero-h)) * var(--p));
  background: #000;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, calc(0.55 * var(--p)));
  will-change: height;
}

.video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.45) 70%, rgba(0,0,0,0.7) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.05) 35%, rgba(0,0,0,0.55) 100%);
  /* Fades out as the video shrinks */
  opacity: calc(1 - var(--p) * 1.4);
}

/* ── Hero overlay (text + scroll cue) ──────────────────── */
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  color: var(--ink);
  /* Fade out within the first 35% of the scroll */
  opacity: clamp(0, calc(1 - var(--p) * 2.8), 1);
  pointer-events: auto;
}
.hero-overlay.is-gone { pointer-events: none; }

.eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--ink-dim);
  margin: 0 0 0.35rem;
}

.title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.5rem, 12vw, 8rem);
  line-height: 1;
  margin: 0;
  letter-spacing: 0.005em;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
}

.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  color: var(--ink-dim);
  margin: 0.6rem 0 0;
}

.scroll-cue {
  position: absolute;
  bottom: max(2rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  animation: bob 1.8s ease-in-out infinite;
}
.scroll-cue svg {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.scroll-cue:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 6px;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

/* ── Sound toggle ──────────────────────────────────────── */
.sound-toggle {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  z-index: 2;
}
.sound-toggle:hover { background: rgba(0,0,0,0.65); border-color: rgba(255,255,255,0.45); }
.sound-toggle:active { transform: scale(0.96); }
.sound-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.sound-toggle .i-unmuted { display: none; }
.sound-toggle[aria-pressed="true"] .i-muted { display: none; }
.sound-toggle[aria-pressed="true"] .i-unmuted { display: block; }

/* ── Layout ────────────────────────────────────────────── */
.hero-spacer { height: var(--hero-h); }

.content {
  position: relative;
  z-index: 1;
  padding-top: var(--mini-h);        /* keep content below the pinned mini banner */
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  display: flex;
  justify-content: center;
}

.info {
  width: min(100%, 600px);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem) 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.details {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}
.details > div { display: flex; flex-direction: column; gap: 0.1rem; }
.details dt {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
}
.details dd { margin: 0; font-weight: 300; color: var(--ink); }
.details .sep { margin: 0 0.5rem; color: var(--ink-dim); }

.map-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}
.map-link:hover { border-bottom-color: var(--accent); }

.blurb {
  max-width: 40ch;
  margin: 0;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-dim);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

.rsvp {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  padding: 0.95rem 1.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.rsvp svg { width: 18px; height: 18px; }
.rsvp:hover { transform: translateY(-1px); background: var(--accent-hover); box-shadow: 0 14px 36px rgba(0,0,0,0.45); }
.rsvp:active { transform: translateY(0); }
.rsvp:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.rsvp-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-dim);
  font-weight: 300;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .details .sep { display: block; height: 0; margin: 0; visibility: hidden; }
}

/* ── Reduced motion: skip the scroll choreography ──────── */
@media (prefers-reduced-motion: reduce) {
  :root { --p: 1; }
  .video-stage { box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
  .scroll-cue { animation: none; }
  .hero-spacer { display: none; }
  .content { padding-top: calc(var(--mini-h) + 1.5rem); }
}
