:root {
  --blue-50:  #F2F6FA;
  --blue-100: #DCE7F1;
  --blue-200: #C2D5E5;
  --blue-300: #A8C4DC;
  --blue-500: #6B96B8;
  --blue-700: #426E91;
  --ink:      #2C3947;
  --ink-soft: #5A6675;
  --silver:   #B8C2CC;
  --silver-2: #E6EBF0;
  --cream:    #FBF8F2;
  --accent:   #C5A572;
  --max:      460px;
  --pad:      1.5rem;
  --radius:   18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--blue-50);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.page {
  max-width: var(--max);
  margin: 0 auto;
  background-color: var(--blue-50);
  background-image: linear-gradient(rgba(242,246,250,0.78), rgba(242,246,250,0.86)), url('assets/ornaments/backdrop.jpg');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  position: relative;
  overflow: hidden;
}

/* ====== HERO ====== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: var(--blue-200);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 95% 45% at 50% 80%, rgba(242,246,250,0.45) 0%, rgba(242,246,250,0) 70%),
    linear-gradient(to bottom, rgba(242,246,250,0.0) 30%, rgba(242,246,250,0.45) 70%, rgba(242,246,250,0.95) 100%),
    linear-gradient(to bottom, rgba(60,82,104,0.30) 0%, rgba(60,82,104,0.0) 35%);
}
.hero-text {
  position: absolute;
  left: 0; right: 0; bottom: 14vh;
  text-align: center;
  padding: 0 var(--pad);
  color: var(--ink);
}
.eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
  color: var(--blue-700);
  text-shadow:
    0 1px 2px rgba(20,30,50,0.45),
    0 2px 8px rgba(255,255,255,0.55);
}
.bride-name {
  font-family: 'Allura', cursive;
  font-weight: 400;
  font-size: clamp(4.5rem, 18vw, 7rem);
  margin: 0;
  line-height: 1;
  color: var(--ink);
  text-shadow:
    0 2px 4px rgba(20,30,50,0.35),
    0 4px 18px rgba(255,255,255,0.7),
    0 1px 1px rgba(255,255,255,0.55);
}
.hero-date {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  margin: 0.75rem 0 0;
  color: var(--blue-700);
  text-shadow:
    0 1px 2px rgba(20,30,50,0.45),
    0 2px 8px rgba(255,255,255,0.6);
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 3vh;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 0.5rem;
  white-space: nowrap;
  padding: 0.7rem 1.4rem;
  background: rgba(255,255,255,0.85);
  color: var(--ink);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--blue-200);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(60,82,104,0.12);
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue svg { width: 16px; height: 16px; fill: none; stroke: var(--blue-700); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ====== MUSIC BUTTON ====== */
.music-btn {
  position: fixed;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 60;
  width: 96px; height: 96px;
  border: 0; padding: 0; background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  border-radius: 50%;
  outline-offset: 4px;
}
.music-btn:focus-visible {
  outline: 2px solid var(--blue-700);
}
.music-btn:focus:not(:focus-visible) { outline: none; }
.music-ring {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  animation: spin 18s linear infinite;
  animation-play-state: paused;
}
.music-btn[aria-pressed="true"] .music-ring { animation-play-state: running; }
.ring-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.18em;
  fill: var(--blue-700);
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 2px;
  stroke-linejoin: round;
}

/* Glassy orb core — small, bubble-like, multi-highlight */
.music-core {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  /* Layered glass gradients, painted bottom-to-top: */
  background:
    /* 1. top specular highlight (sharp white sheen) */
    radial-gradient(ellipse 65% 38% at 50% 14%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.4) 35%, rgba(255,255,255,0) 70%),
    /* 2. bottom rim refracted light */
    radial-gradient(ellipse 80% 28% at 50% 96%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 75%),
    /* 3. tinted glass body */
    radial-gradient(circle at 50% 60%, rgba(168,196,220,0.55) 0%, rgba(107,150,184,0.45) 100%);
  backdrop-filter: blur(14px) saturate(1.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    /* inset bottom rim glow */
    inset 0 -3px 6px rgba(107, 150, 184, 0.3),
    /* inset top hairline */
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    /* outer halo */
    0 0 16px rgba(168, 196, 220, 0.45),
    /* main lift shadow */
    0 8px 22px rgba(60, 82, 104, 0.32),
    0 2px 4px rgba(60, 82, 104, 0.18);
  display: grid; place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.music-btn:hover .music-core,
.music-btn:active .music-core {
  transform: scale(1.08);
  box-shadow:
    inset 0 -3px 6px rgba(107, 150, 184, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.95),
    0 0 22px rgba(168, 196, 220, 0.55),
    0 12px 28px rgba(60, 82, 104, 0.38),
    0 2px 4px rgba(60, 82, 104, 0.18);
}
.music-core svg {
  width: 18px; height: 18px;
  fill: var(--blue-700);
  filter: drop-shadow(0 1px 1.5px rgba(255,255,255,0.7));
  position: relative;
  /* nudge play triangle right ~1px so it visually centers */
  margin-left: 2px;
}
.music-core .icon-pause { margin-left: 0; }
.music-btn[aria-pressed="true"] .music-core svg { fill: var(--blue-700); }
.music-core .icon-pause { display: none; }
.music-btn[aria-pressed="true"] .icon-play { display: none; }
.music-btn[aria-pressed="true"] .icon-pause { display: block; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ====== SHARED CARD ====== */
.card,
.gallery,
.countdown-card {
  margin: 1.25rem var(--pad);
  padding: 2rem 1.5rem;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--silver-2);
  box-shadow: 0 6px 24px rgba(60,82,104,0.05);
  position: relative;
  overflow: hidden;
}
.gallery { padding: 1.5rem 0; overflow: visible; }
.countdown-card { background: linear-gradient(160deg, var(--cream) 0%, var(--blue-50) 100%); }

/* Cards with corner ornaments — salutation + hosts */
.salutation::before,
.hosts-card::before {
  content: '';
  position: absolute;
  top: -10px; left: -10px;
  width: 130px; height: 130px;
  background-image: url('assets/ornaments/corner.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
.hosts-card::after {
  content: '';
  position: absolute;
  bottom: -10px; right: -10px;
  width: 130px; height: 130px;
  background-image: url('assets/ornaments/corner.png');
  background-size: contain;
  background-repeat: no-repeat;
  transform: rotate(180deg);
  opacity: 0.55;
  pointer-events: none;
}

/* Section divider — slim ornament strip placed between cards */
.divider {
  display: block;
  width: 100%;
  max-width: 320px;
  height: 32px;
  margin: 0.5rem auto;
  background-image: url('assets/ornaments/divider-h.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
}

.script-heading {
  font-family: 'Allura', cursive;
  font-weight: 400;
  font-size: 2.5rem;
  text-align: center;
  margin: 0 0 1rem;
  color: var(--blue-700);
  line-height: 1;
}

/* ====== SALUTATION ====== */
.salutation { text-align: center; }
.salutation-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}
.poem {
  display: flex; flex-direction: column;
  gap: 0.35rem;
  margin: 1.5rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--silver-2);
  border-bottom: 1px solid var(--silver-2);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--blue-700);
}
.poem span { display: block; }
.invitation-text {
  font-size: 1.05rem;
  margin: 1rem 0 0;
  color: var(--ink);
}

/* ====== DATE / CALENDAR ====== */
.date-card { text-align: center; }
.date-line {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0.5rem 0 1.5rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.calendar {
  background: #fff;
  border-radius: 14px;
  padding: 1rem 0.75rem;
  border: 1px solid var(--silver-2);
  margin-bottom: 1.25rem;
}
.cal-row, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
  text-align: center;
}
.cal-head span {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding: 0.4rem 0;
}
.cal-grid { margin-top: 0.5rem; }
.cal-grid span {
  position: relative;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.55rem 0;
  border-radius: 50%;
}
.cal-event {
  background: var(--blue-500);
  color: #fff !important;
  font-weight: 600 !important;
}
.cal-heart {
  position: absolute;
  top: -6px; right: -2px;
  width: 14px; height: 14px;
  fill: #C9617B;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}
.time-line {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.4rem;
  margin: 0;
  color: var(--ink-soft);
}
.time-line strong { color: var(--blue-700); font-weight: 700; font-style: normal; font-size: 1.05em; }

/* ====== VENUE ====== */
.venue-card { text-align: center; }
.venue-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0.25rem 0 0.75rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.venue-help {
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}
.venue-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  border: 1px solid var(--silver-2);
  background: var(--silver-2);
  margin: 0.75rem 0 1.25rem;
  box-shadow: 0 6px 18px rgba(60,82,104,0.15);
}
.map-btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  background: var(--blue-500);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(107,150,184,0.35);
}
.map-btn:hover, .map-btn:active { background: var(--blue-700); transform: translateY(-1px); }
.map-btn svg { width: 18px; height: 18px; fill: #fff; }

/* ====== GALLERY (coverflow carousel) ====== */
.gallery { padding: 1.25rem 0 1.5rem; }
.carousel {
  position: relative;
  height: 0;
  padding-bottom: 80%;          /* aspect ratio 5:4 — generous stage */
  overflow: hidden;
}
.carousel-stage {
  position: absolute; inset: 0;
}
.carousel-slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: 64%;
  height: 100%;
  margin-left: -32%;            /* center the slide on left:50% */
  transition: transform 0.6s cubic-bezier(.22,.61,.36,1), opacity 0.5s ease;
  will-change: transform, opacity;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--silver-2);
  box-shadow: 0 10px 26px rgba(60,82,104,0.20);
  display: block;
  background: var(--silver-2);  /* placeholder while lazy-loading */
}
.carousel-slide.is-active { z-index: 3; }
.carousel-slide.is-side   { z-index: 2; opacity: 0.55; }
.carousel-slide.is-hidden { z-index: 0; opacity: 0; pointer-events: none; }

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 5;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(60,82,104,0.18);
  transition: background 0.2s, transform 0.15s;
}
.carousel-nav:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.carousel-nav:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; }
.carousel-nav.prev { left: 0.6rem; }
.carousel-nav.next { right: 0.6rem; }
.carousel-nav svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: var(--blue-700);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-dots {
  display: flex; justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0 1rem;
}
.carousel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--silver);
  border: 0; padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, width 0.25s ease, border-radius 0.25s ease;
}
.carousel-dot:hover { background: var(--blue-300); }
.carousel-dot:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 3px; }
.carousel-dot.is-active {
  background: var(--blue-500);
  width: 22px;
  border-radius: 4px;
}

/* ====== FORM ====== */
.form-card { text-align: left; }
.form-intro { font-style: italic; font-size: 1rem; color: var(--ink-soft); text-align: center; margin: 0 0 1.5rem; }
.field { display: block; margin-bottom: 1.25rem; border: 0; padding: 0; }
.field-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.field input[type="text"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--silver);
  border-radius: 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input[type="text"]:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(107,150,184,0.18);
}
.radio {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.4rem;
  background: #fff;
  border: 1px solid var(--silver-2);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.radio:has(input:checked) { border-color: var(--blue-500); background: var(--blue-50); }
.radio input { accent-color: var(--blue-500); width: 18px; height: 18px; flex: 0 0 auto; }
.radio span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--ink);
}
.submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  background: var(--blue-500);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 6px 18px rgba(107,150,184,0.35);
}
.submit-btn:hover:not(:disabled) { background: var(--blue-700); }
.submit-btn:active:not(:disabled) { transform: translateY(1px); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.submit-btn.is-loading .btn-label { opacity: 0.5; }
.submit-btn.is-loading .btn-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.btn-spinner { display: none; }
.form-msg {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  min-height: 1.5em;
}
.form-msg.is-ok { color: #2a7a3a; font-style: normal; font-weight: 500; }
.form-msg.is-err { color: #9b3232; }

/* ====== COUNTDOWN ====== */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}
.cd-cell {
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem 0.4rem;
  background: #fff;
  border: 1px solid var(--silver-2);
  border-radius: 14px;
}
.cd-num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 2rem;
  line-height: 1;
  color: var(--blue-700);
  font-variant-numeric: tabular-nums;
}
.cd-lbl {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

/* ====== HOSTS ====== */
.hosts-card { text-align: center; }
.hosts p {
  margin: 0.5rem 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  color: var(--ink);
}
.hosts strong {
  font-weight: 600;
  color: var(--blue-700);
  font-style: italic;
  margin-right: 0.4rem;
}

/* ====== FOOTER ====== */
.footer {
  text-align: center;
  padding: 2rem var(--pad) 3rem;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.85rem;
}
.hairline {
  display: block;
  width: 80px; height: 1px;
  margin: 0 auto 1rem;
  background: var(--silver);
}
.footer span[aria-label] { color: #C9617B; }
.credits {
  margin: 0.55rem 0 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-style: normal;
  color: var(--silver);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.credits:hover { opacity: 0.95; }
.credits a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.credits a:hover {
  color: var(--blue-700);
  border-bottom-color: var(--blue-700);
}
.credits-sep { margin: 0 0.4rem; opacity: 0.6; }
[data-theme="dark"] .credits { color: var(--ink-soft); }
[data-theme="dark"] .credits a:hover { color: var(--blue-700); }

/* ====== LIGHTBOX ====== */
.carousel-slide { cursor: pointer; }
.carousel-slide.is-active { cursor: zoom-in; }
.carousel-slide.is-hidden { cursor: default; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 33, 0.94);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: lb-in 0.25s ease-out;
}
.lightbox[hidden] { display: none; }
@keyframes lb-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  animation: lb-zoom 0.32s cubic-bezier(.22,.61,.36,1);
}
@keyframes lb-zoom {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.lightbox-close {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: grid; place-items: center;
  z-index: 1;
  transition: background 0.2s, transform 0.15s;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); transform: scale(1.06); }
.lightbox-close:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; }
.lightbox-close svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: grid; place-items: center;
  z-index: 1;
  transition: background 0.2s, transform 0.15s;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-50%) scale(1.06);
}
.lightbox-nav:active { transform: translateY(-50%) scale(0.96); }
.lightbox-nav:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; }
.lightbox-nav.prev { left: max(1rem, env(safe-area-inset-left)); }
.lightbox-nav.next { right: max(1rem, env(safe-area-inset-right)); }
.lightbox-nav svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: white;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ====== REVEAL ON SCROLL ====== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(.22,.61,.36,1), transform 0.7s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.divider.reveal { transform: translateY(0) scaleX(0.6); transform-origin: center; }
.divider.is-visible { transform: translateY(0) scaleX(1); }

/* ====== HERO PARALLAX ====== */
.hero-img { transition: transform 0.05s linear; will-change: transform; }

/* ====== A11Y ====== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ====================================================================
   HERO VIDEO (always in DOM; opacity gated by theme + load state)
   ==================================================================== */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  background: #0E1A2E;
}

/* ====================================================================
   THEME TOGGLE BUTTON — glass orb above the music button
   ==================================================================== */
.theme-toggle {
  position: fixed;
  top: max(1.1rem, calc(env(safe-area-inset-top) + 0.6rem));
  right: max(1.1rem, calc(env(safe-area-inset-right) + 0.6rem));
  z-index: 60;
  width: 56px; height: 56px;
  border: 0; padding: 0; background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  border-radius: 50%;
  outline-offset: 4px;
}

/* Onboarding hint pointing at the theme toggle — appears for ~5s on first visit */
.theme-hint {
  position: fixed;
  top: max(1.95rem, calc(env(safe-area-inset-top) + 1.45rem));
  right: max(5.4rem, calc(env(safe-area-inset-right) + 4.9rem));
  z-index: 59;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue-700);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid rgba(168, 196, 220, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 22px rgba(60,82,104,0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.theme-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
  animation: hint-nudge 1.8s ease-in-out infinite;
}
@keyframes hint-nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(5px); }
}
.theme-hint svg {
  width: 14px; height: 14px;
  fill: none; stroke: var(--blue-700);
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
/* In dark mode the hint is irrelevant and should never appear */
[data-theme="dark"] .theme-hint { display: none; }
.theme-toggle:focus-visible {
  outline: 2px solid var(--blue-700);
}
.theme-toggle:focus:not(:focus-visible) { outline: none; }

.theme-core {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse 65% 38% at 50% 14%, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.4) 35%, rgba(255,255,255,0) 70%),
    radial-gradient(ellipse 80% 28% at 50% 96%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 75%),
    radial-gradient(circle at 50% 60%, rgba(168,196,220,0.55) 0%, rgba(107,150,184,0.45) 100%);
  backdrop-filter: blur(14px) saturate(1.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 -3px 6px rgba(107, 150, 184, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.9),
    0 0 14px rgba(168, 196, 220, 0.4),
    0 6px 18px rgba(60, 82, 104, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.theme-toggle:hover .theme-core,
.theme-toggle:active .theme-core { transform: scale(1.08); }

.theme-core svg {
  width: 22px; height: 22px;
  stroke: var(--blue-700);
  fill: var(--blue-700);
  filter: drop-shadow(0 1px 1.5px rgba(255,255,255,0.7));
  transition: transform 0.4s cubic-bezier(.22,.61,.36,1), opacity 0.3s ease;
}
.theme-core .icon-sun circle { fill: var(--blue-700); stroke: none; }
.theme-core .icon-sun line { stroke: var(--blue-700); fill: none; }
.theme-core .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: none; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: block; }

/* ====================================================================
   ============================ DARK MODE ===============================
   Triggered by data-theme="dark" on <html> (set by theme-init.js +
   toggled by app.js). All overrides are scoped here — light mode
   is untouched.
   ==================================================================== */

:root[data-theme="dark"] {
  --blue-50:  #0E1A2E;   /* page bg — deep night */
  --blue-100: #152544;   /* card panel base */
  --blue-200: #1E3358;   /* divider, hover */
  --blue-300: #3F6B52;   /* cypress-green accent line */
  --blue-500: #7AA9D6;   /* swirling-sky highlight */
  --blue-700: #D4A85A;   /* brass — primary accent */
  --ink:      #EFE3CB;   /* gaslight cream body text */
  --ink-soft: #B6A98C;   /* muted cream */
  --silver:   #3A4F70;   /* navy hairline */
  --silver-2: #1A2A48;   /* card edge */
  --cream:    #152133;   /* card panel ink */
  --accent:   #E07A4B;   /* ember orange — calendar 29 + flares */
}

/* Page backdrop — Van-Gogh starry painting under a deep navy wash */
[data-theme="dark"] body { background: var(--blue-50); }
[data-theme="dark"] .page {
  background-color: var(--blue-50);
  background-image:
    linear-gradient(rgba(14,26,46,0.55), rgba(14,26,46,0.78)),
    url('assets/dark/dark-backdrop.jpg');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

/* Subtle CSS twinkling stars overlay (zero new asset bytes) */
[data-theme="dark"] .page::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 18% 12%, rgba(255,243,210,0.9) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 82% 22%, rgba(255,243,210,0.7) 50%, transparent 100%),
    radial-gradient(1.8px 1.8px at 35% 58%, rgba(255,243,210,0.65) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 68% 78%, rgba(255,243,210,0.85) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 50% 38%, rgba(255,243,210,0.55) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 92% 50%, rgba(255,243,210,0.7) 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 8% 70%, rgba(255,243,210,0.6) 50%, transparent 100%),
    radial-gradient(1.6px 1.6px at 60% 92%, rgba(255,243,210,0.5) 50%, transparent 100%);
  background-size: 100% 720px;
  background-repeat: repeat-y;
  opacity: 0.55;
  animation: twinkle 5.5s ease-in-out infinite;
  z-index: 0;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.75; }
}

/* Hero — show video (poster visible immediately, then video plays), hide photo */
[data-theme="dark"] .hero { background: #0E1A2E; }
[data-theme="dark"] .hero-img { opacity: 0; transition: opacity 0.7s ease; }
[data-theme="dark"] .hero-video { opacity: 1; }

/* Hero veil — switch from light wash to dark wash so the video isn't muted */
[data-theme="dark"] .hero-veil {
  background:
    radial-gradient(ellipse 95% 45% at 50% 80%, rgba(14,26,46,0.40) 0%, rgba(14,26,46,0) 70%),
    linear-gradient(to bottom, rgba(14,26,46,0.0) 30%, rgba(14,26,46,0.55) 75%, rgba(14,26,46,0.95) 100%);
}
[data-theme="dark"] .eyebrow {
  color: var(--blue-700);
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
[data-theme="dark"] .bride-name {
  color: var(--ink);
  text-shadow:
    0 0 22px rgba(212, 168, 90, 0.4),
    0 4px 14px rgba(0,0,0,0.75);
}
[data-theme="dark"] .hero-date {
  color: var(--blue-700);
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
[data-theme="dark"] .scroll-cue {
  background: rgba(21, 33, 51, 0.7);
  color: var(--ink);
  border-color: rgba(212, 168, 90, 0.28);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

/* Cards — frosted dark glass */
[data-theme="dark"] .card,
[data-theme="dark"] .gallery,
[data-theme="dark"] .countdown-card {
  background: rgba(21, 33, 51, 0.78);
  border-color: rgba(212, 168, 90, 0.18);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
}
[data-theme="dark"] .countdown-card {
  background: linear-gradient(160deg, rgba(21,33,51,0.85) 0%, rgba(14,26,46,0.85) 100%);
}

/* Allura headings — gentle gold luminance */
[data-theme="dark"] .script-heading,
[data-theme="dark"] .bride-name {
  text-shadow: 0 0 18px rgba(212, 168, 90, 0.28);
}

/* Salutation poem — brass border lines */
[data-theme="dark"] .poem {
  border-top-color: rgba(212, 168, 90, 0.28);
  border-bottom-color: rgba(212, 168, 90, 0.28);
}

/* Calendar — dark inner panel, ember-glow on day 29 */
[data-theme="dark"] .calendar {
  background: rgba(10, 18, 32, 0.55);
  border-color: rgba(212, 168, 90, 0.22);
}
[data-theme="dark"] .cal-head span { color: rgba(212, 168, 90, 0.7); }
[data-theme="dark"] .cal-event {
  background: var(--accent);
  color: #0E1A2E !important;
  box-shadow: 0 0 18px rgba(224, 122, 75, 0.55);
}
[data-theme="dark"] .cal-heart {
  fill: #F4C957;
  filter: drop-shadow(0 0 4px rgba(244, 201, 87, 0.7));
}

/* Venue drone video — brass-edge in dark */
[data-theme="dark"] .venue-video {
  background: rgba(10, 18, 32, 0.85);
  border-color: rgba(212, 168, 90, 0.28);
  box-shadow: 0 0 28px rgba(212, 168, 90, 0.18), 0 6px 22px rgba(0, 0, 0, 0.5);
}

/* Venue + Submit + Map buttons — brass with ember hover */
[data-theme="dark"] .map-btn,
[data-theme="dark"] .submit-btn {
  background: var(--blue-700);
  color: #0E1A2E;
  box-shadow: 0 6px 18px rgba(212, 168, 90, 0.35);
}
[data-theme="dark"] .map-btn:hover,
[data-theme="dark"] .map-btn:active,
[data-theme="dark"] .submit-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #0E1A2E;
}
[data-theme="dark"] .map-btn svg { fill: #0E1A2E; }

/* Form inputs / radios — dark fields with brass focus ring */
[data-theme="dark"] .field input[type="text"] {
  background: rgba(10, 18, 32, 0.6);
  border-color: rgba(212, 168, 90, 0.25);
  color: var(--ink);
}
[data-theme="dark"] .field input[type="text"]:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(212, 168, 90, 0.22);
}
[data-theme="dark"] .radio {
  background: rgba(10, 18, 32, 0.6);
  border-color: rgba(212, 168, 90, 0.18);
}
[data-theme="dark"] .radio:has(input:checked) {
  background: rgba(212, 168, 90, 0.15);
  border-color: var(--blue-700);
}
[data-theme="dark"] .radio input { accent-color: var(--blue-700); }
[data-theme="dark"] .submit-btn .btn-spinner {
  border-color: rgba(14,26,46,0.4);
  border-top-color: #0E1A2E;
}

/* Countdown cells — dark tiles with brass numerals */
[data-theme="dark"] .cd-cell {
  background: rgba(10, 18, 32, 0.55);
  border-color: rgba(212, 168, 90, 0.18);
}

/* Footer + hairline */
[data-theme="dark"] .hairline { background: rgba(212, 168, 90, 0.4); }
[data-theme="dark"] .footer span[aria-label] { color: #F4C957; }

/* Carousel — center stage gets brass aura, dots become brass */
[data-theme="dark"] .carousel-slide.is-active img {
  box-shadow:
    0 0 36px rgba(212, 168, 90, 0.22),
    0 14px 32px rgba(0, 0, 0, 0.55);
  border-color: rgba(212, 168, 90, 0.3);
}
[data-theme="dark"] .carousel-nav {
  background: rgba(21, 33, 51, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .carousel-nav:hover {
  background: rgba(21, 33, 51, 0.95);
}
[data-theme="dark"] .carousel-nav svg { stroke: var(--blue-700); }
[data-theme="dark"] .carousel-dot { background: rgba(212, 168, 90, 0.35); }
[data-theme="dark"] .carousel-dot.is-active { background: var(--blue-700); }

/* Decorative ornament corners + divider — fade & warm-tint for dark */
[data-theme="dark"] .salutation::before,
[data-theme="dark"] .hosts-card::before,
[data-theme="dark"] .hosts-card::after {
  filter: brightness(1.6) sepia(0.5) hue-rotate(-15deg);
  opacity: 0.3;
}
[data-theme="dark"] .divider {
  filter: brightness(1.5) sepia(0.6) hue-rotate(-15deg);
  opacity: 0.5;
}

/* Music button — brass glass tint */
[data-theme="dark"] .music-core {
  background:
    radial-gradient(ellipse 65% 38% at 50% 14%, rgba(255,243,210,0.95) 0%, rgba(255,243,210,0.4) 35%, rgba(255,243,210,0) 70%),
    radial-gradient(ellipse 80% 28% at 50% 96%, rgba(255,243,210,0.5) 0%, rgba(255,243,210,0) 75%),
    radial-gradient(circle at 50% 60%, rgba(212,168,90,0.55) 0%, rgba(180,135,60,0.55) 100%);
  border-color: rgba(255, 243, 210, 0.5);
  box-shadow:
    inset 0 -3px 6px rgba(180, 135, 60, 0.4),
    inset 0 1px 1px rgba(255, 243, 210, 0.9),
    0 0 22px rgba(212, 168, 90, 0.5),
    0 8px 22px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .music-core svg { fill: #1A2A48; filter: drop-shadow(0 1px 1.5px rgba(255,243,210,0.7)); }
[data-theme="dark"] .ring-text {
  fill: var(--blue-700);
  stroke: rgba(0, 0, 0, 0.55);
}

/* Theme toggle — brass tint + golden icon glow when in dark mode */
[data-theme="dark"] .theme-core {
  background:
    radial-gradient(ellipse 65% 38% at 50% 14%, rgba(255,243,210,0.9) 0%, rgba(255,243,210,0.3) 35%, rgba(255,243,210,0) 70%),
    radial-gradient(ellipse 80% 28% at 50% 96%, rgba(255,243,210,0.4) 0%, rgba(255,243,210,0) 75%),
    radial-gradient(circle at 50% 60%, rgba(212,168,90,0.55) 0%, rgba(180,135,60,0.5) 100%);
  border-color: rgba(255, 243, 210, 0.5);
  box-shadow:
    inset 0 -3px 6px rgba(180, 135, 60, 0.35),
    inset 0 1px 1px rgba(255, 243, 210, 0.85),
    0 0 18px rgba(212, 168, 90, 0.5),
    0 6px 18px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .theme-core .icon-moon {
  fill: #1A2A48;
  stroke: #1A2A48;
  filter: drop-shadow(0 1px 1.5px rgba(255,243,210,0.7));
}

/* Lightbox unchanged in dark — already dark backdrop. Keep video/img stops still working */
