/* ════════════════════════════════════════════════════
   BODA CERVANTES — styles.css
   Palette: Deep Olive #454c2d · Ivory #FDFBF7
   ════════════════════════════════════════════════════ */

/* ─── Viewport Lock (Android blackout / side-wobble fix) ── */
html, body {
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
  margin: 0;
  padding: 0;
  -webkit-overflow-scrolling: touch;
}

/* ─── Custom Properties ───────────────────────────── */
:root {
  --olive:       #454c2d;
  --olive-dark:  #363c22;
  --olive-mid:   #3c4227;
  --ivory:       #FDFBF7;
  --ivory-dim:   rgba(253,251,247,0.70);
  --ivory-muted: rgba(253,251,247,0.45);
  --ivory-ghost: rgba(253,251,247,0.12);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Montserrat', system-ui, sans-serif;

  --env-w:    clamp(290px, 76vw, 480px);
  --env-h:    clamp(196px, 51vw, 322px);
  --seal-size: clamp(76px, 16vw, 100px);

  --z-controls: 1100;
  --z-overlay:  1000;
  --z-fold:     5;
  --z-flap:     20;
  --z-seal:     30;

  --ease-silk: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--olive-dark);
  color: var(--ivory);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

img   { display: block; max-width: 100%; }
video { display: block; }
ol, ul { list-style: none; }

button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

a { color: inherit; text-decoration: none; }

.is-hidden { display: none !important; }


/* ════════════════════════════════════════════════════
   TOP CONTROLS
   ════════════════════════════════════════════════════ */
#top-controls {
  position: fixed;
  top: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: var(--z-controls);
}

.ctrl-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(69,76,45,0.30);
  background: rgba(253,251,247,0.88);
  color: var(--olive);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: background .25s var(--ease-silk), border-color .25s var(--ease-silk),
              color .25s var(--ease-silk), transform .2s var(--ease-silk);
}
.ctrl-btn:hover { background: rgba(253,251,247,0.98); border-color: rgba(69,76,45,0.55); transform: scale(1.07); }
.ctrl-btn:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

/* Hidden until envelope is opened */
.ctrl-btn--envelope-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.5s ease !important;
}

.ctrl-icon { width: 15px; height: 15px; pointer-events: none; }

#lang-toggle {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 4px;
  border: 1px solid rgba(69,76,45,0.30);
  border-radius: 24px;
  background: rgba(253,251,247,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.lang-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: rgba(69,76,45,0.16);
  border-radius: 20px;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.lang-thumb.slide-es { transform: translateX(100%); }

.lang-opt {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: rgba(69,76,45,0.50);
  padding: 6px 14px;
  text-align: center;
  line-height: 1;
  z-index: 1;
  transition: color .2s ease;
  border-radius: 20px;
}
.lang-opt.is-active, .lang-opt:hover { color: var(--olive); }
.lang-opt:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; border-radius: 20px; }

/* Dark-background variant — strong dark pill so ivory text stays readable */
#top-controls.on-dark .ctrl-btn { color: var(--ivory); border-color: rgba(253,251,247,.25); background: rgba(40,45,28,0.78); }
#top-controls.on-dark .ctrl-btn:hover { background: rgba(40,45,28,0.92); border-color: rgba(253,251,247,.50); }
#top-controls.on-dark .ctrl-btn:focus-visible { outline-color: var(--ivory); }
#top-controls.on-dark #lang-toggle { border-color: rgba(253,251,247,.20); background: rgba(40,45,28,0.82); box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
#top-controls.on-dark .lang-thumb { background: rgba(253,251,247,.16); }
#top-controls.on-dark .lang-opt { color: rgba(253,251,247,0.55); }
#top-controls.on-dark .lang-opt.is-active, #top-controls.on-dark .lang-opt:hover { color: var(--ivory); }
#top-controls.on-dark .lang-opt:focus-visible { outline-color: var(--ivory); }


/* ════════════════════════════════════════════════════
   INTRO OVERLAY
   ════════════════════════════════════════════════════ */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  will-change: transform, opacity;
}

#intro-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.04;
  pointer-events: none;
}

#intro-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(215,210,198,.38) 100%);
  pointer-events: none;
}

.overlay-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
  padding-top: 40px;
}

.invite-eyebrow {
  font-family: var(--font-sans);
  font-size: clamp(9px,1.6vw,11px);
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--olive);
  opacity: 0.6;
  margin-bottom: 12px;
}

.invite-heading {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--olive);
  letter-spacing: .02em;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.invite-wedding-of {
  font-size: clamp(14px,2.6vw,20px);
  font-weight: 300;
  font-style: italic;
  opacity: 0.65;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.invite-wedding-of:empty { display: none; }

.invite-name {
  font-size: clamp(30px,7vw,52px);
  font-weight: 400;
  line-height: 1.1;
}

.invite-connector {
  font-size: clamp(16px,3.2vw,24px);
  font-weight: 300;
  line-height: 1;
  opacity: 0.55;
  padding: 2px 0;
}

.invite-cta {
  font-family: var(--font-sans);
  font-size: clamp(7.5px,1.4vw,9.5px);
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--olive);
  opacity: 0.42;
  margin-top: 28px;
}


/* ════════════════════════════════════════════════════
   ENVELOPE FRAME + FLORAL CORNERS
   ════════════════════════════════════════════════════ */
.envelope-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.floral-corner {
  position: absolute;
  width: 130px;
  height: 130px;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}
.floral-tl { top: -28px; left: -28px; }
.floral-br { bottom: -28px; right: -28px; transform: rotate(180deg); }

/* ════════════════════════════════════════════════════
   ENVELOPE — LAYERED POCKET STRUCTURE
   ════════════════════════════════════════════════════ */

/* Scene: sized container with perspective, floats above floral corners */
.envelope-scene {
  position: relative;
  z-index: 1;
  width: var(--env-w);
  height: var(--env-h);
  perspective: 1000px;
  perspective-origin: 50% 40%;
}

/* Layer 1: olive back pocket */
.envelope-back {
  position: absolute;
  inset: 0;
  background: var(--olive);
  border-radius: 3px;
  z-index: 1;
  box-shadow:
    0 2px 4px rgba(0,0,0,.05),
    0 8px 28px rgba(53,61,30,.22),
    0 28px 70px rgba(53,61,30,.20),
    0 50px 90px rgba(53,61,30,.10);
}

/* Layer 2: fold triangles (create the diamond-pocket illusion) */
.envelope-front {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.fold { position: absolute; inset: 0; pointer-events: none; }
.fold-left   { background: rgba(0,0,0,.14); clip-path: polygon(0 0, 50% 50%, 0 100%); }
.fold-right  { background: rgba(0,0,0,.10); clip-path: polygon(100% 0, 50% 50%, 100% 100%); }
.fold-bottom { background: rgba(255,255,255,.055); clip-path: polygon(0 100%, 50% 50%, 100% 100%); }

/* Layer 3: top flap — hinged at TOP seam, flips backward with rotationX: -185 */
.envelope-flap {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 52%;
  background: var(--olive-dark);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 4;
  pointer-events: none;
  will-change: transform;
}

.envelope-flap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(175deg, rgba(255,255,255,.08) 0%, transparent 52%);
  pointer-events: none;
}

/* Layer 5: wax seal (highest) */
.wax-seal-btn {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: var(--seal-size);
  height: var(--seal-size);
  border-radius: 50%;
  will-change: transform;
}
.wax-seal-btn:focus-visible { outline: 2.5px solid var(--olive); outline-offset: 5px; border-radius: 50%; }

.wax-seal-img {
  width: var(--seal-size);
  height: var(--seal-size);
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 5px 16px rgba(0,0,0,.40));
  transition: filter .3s ease;
  pointer-events: none;
  will-change: transform, opacity, filter;
}
.wax-seal-btn:hover .wax-seal-img { filter: drop-shadow(0 8px 24px rgba(0,0,0,.55)) brightness(1.06); }


/* ════════════════════════════════════════════════════
   MAIN CONTENT
   ════════════════════════════════════════════════════ */
#main-content {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity, transform;
}
#main-content.is-revealed { visibility: visible; pointer-events: auto; }


/* ════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video-wrap { position: absolute; inset: 0; z-index: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }

/* Dark at top (text area) + bottom (date area), clear in middle */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,.84) 0%,
      rgba(0,0,0,.60) 18%,
      rgba(0,0,0,.10) 45%,
      rgba(0,0,0,.45) 78%,
      rgba(0,0,0,.70) 100%);
}

.hero-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--ivory);
  gap: 0;
}

.hero-label {
  font-family: var(--font-serif);
  font-size: clamp(17px, 2.8vw, 30px);
  font-weight: 300;
  font-style: italic;
  color: var(--ivory-dim);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 20px rgba(0,0,0,.70);
  margin-bottom: 10px;
}

/* Stacked names column */
.hero-names {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ivory);
  letter-spacing: .015em;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-name {
  font-size: clamp(70px, 13vw, 130px);
  font-weight: 500;
  line-height: 1.0;
  text-shadow: 0 4px 40px rgba(0,0,0,.80), 0 2px 16px rgba(0,0,0,.55), 0 0 80px rgba(0,0,0,.40);
}

.hero-connector {
  font-size: clamp(32px, 5.5vw, 60px);
  font-weight: 300;
  line-height: 1;
  opacity: 0.70;
  padding: 2px 0;
  text-shadow: 0 2px 20px rgba(0,0,0,.70);
}

.hero-divider { width: 56px; height: 1px; background: rgba(253,251,247,.38); margin-bottom: 18px; }

.hero-date {
  font-family: var(--font-serif);
  font-size: clamp(16px,2.8vw,24px);
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--ivory);
  margin-bottom: 12px;
  text-shadow: 0 1px 16px rgba(0,0,0,.55);
}

.hero-location {
  font-family: var(--font-sans);
  font-size: clamp(8.5px,1.4vw,11px);
  font-weight: 400;
  letter-spacing: 4.5px;
  text-transform: uppercase;
  color: var(--ivory-muted);
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}

.scroll-hint { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 1; }
.scroll-line {
  display: block;
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--ivory-muted), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes scrollPulse {
  0%   { opacity: 0; transform: scaleY(0); }
  40%  { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1) translateY(14px); }
}


/* ════════════════════════════════════════════════════
   SECTION SHARED
   ════════════════════════════════════════════════════ */
.section { padding: 96px 0; }
.section--dark  { background: var(--olive); }
.section--ivory { background: var(--ivory); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 36px; }
.container--narrow { max-width: 720px; margin: 0 auto; padding: 0 36px; }

/* Eyebrow */
.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
  text-align: center;
}
.section--dark  .section-eyebrow { color: var(--ivory-muted); }
.section--ivory .section-eyebrow { color: rgba(69,76,45,.50); }

/* Title */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(32px,6vw,56px);
  font-weight: 400;
  font-style: italic;
  text-align: center;
  line-height: 1.1;
  letter-spacing: .015em;
  margin-bottom: 14px;
}
.section--dark  .section-title { color: var(--ivory); }
.section--ivory .section-title { color: var(--olive); }

/* Subtitle */
.section-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(12px,1.8vw,14px);
  font-weight: 300;
  text-align: center;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 56px;
}
.section--dark  .section-subtitle { color: var(--ivory-dim); }
.section--ivory .section-subtitle { color: rgba(69,76,45,.65); }


/* ════════════════════════════════════════════════════
   COUNTDOWN
   ════════════════════════════════════════════════════ */
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 52px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: clamp(80px,16vw,120px);
}

.countdown-num {
  font-family: var(--font-serif);
  font-size: clamp(52px,10vw,88px);
  font-weight: 300;
  color: var(--ivory);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.countdown-colon {
  font-family: var(--font-serif);
  font-size: clamp(40px,8vw,70px);
  font-weight: 300;
  color: var(--ivory-muted);
  line-height: 1;
  margin-top: 4px;
  padding: 0 4px;
  align-self: flex-start;
}


/* ════════════════════════════════════════════════════
   SAVE THE DATE — ivory section overrides
   ════════════════════════════════════════════════════ */
#save-the-date .countdown-num   { color: var(--olive); }
#save-the-date .countdown-label { color: rgba(69,76,45,0.50); }
#save-the-date .countdown-colon { color: rgba(69,76,45,0.32); }


/* ════════════════════════════════════════════════════
   MINI CALENDAR
   ════════════════════════════════════════════════════ */
.cal-mini-wrap {
  margin: 36px auto 0;
  max-width: 320px;
  width: 100%;
}

.cal-mini-header {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
}

.cal-mini-month {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  color: var(--olive);
}

.cal-mini-year {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  color: rgba(69,76,45,0.50);
}

.cal-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  margin-bottom: 28px;
}

.cal-mini-name {
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(69,76,45,0.40);
  padding: 5px 0 8px;
}

.cal-mini-day {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: rgba(69,76,45,0.55);
  padding: 6px 2px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  border-radius: 50%;
}

.cal-mini-empty { padding: 6px 2px; aspect-ratio: 1; }

.cal-mini-day--wedding {
  background: var(--olive);
  color: var(--ivory) !important;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(69,76,45,0.30);
}

.cal-add-btn {
  display: block;
  width: fit-content;
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ivory);
  background: var(--olive);
  border-radius: 4px;
  padding: 14px 28px;
  text-decoration: none;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 2px 12px rgba(69,76,45,0.20);
}
.cal-add-btn:hover {
  background: var(--olive-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(69,76,45,0.28);
}
.cal-add-btn:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }


/* ════════════════════════════════════════════════════
   VERSE
   ════════════════════════════════════════════════════ */
.verse-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.verse-ornament {
  font-size: 36px;
  color: var(--olive);
  opacity: 0.3;
  line-height: 1;
}

.verse-quote {
  font-family: var(--font-serif);
  font-size: clamp(18px,3vw,26px);
  font-weight: 300;
  font-style: italic;
  color: var(--olive);
  line-height: 1.75;
  letter-spacing: .01em;
}

.verse-ref {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(69,76,45,.50);
  margin-top: 4px;
}

/* verse2 lives on a dark (olive) background — override the default olive text */
.section--dark .verse-ornament { color: var(--ivory); }
.section--dark .verse-quote    { color: var(--ivory); }
.section--dark .verse-ref      { color: var(--ivory-muted); }


/* ════════════════════════════════════════════════════
   COLOR PALETTE
   ════════════════════════════════════════════════════ */
.palette-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 36px 44px;
  margin-top: 8px;
}

.palette-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.swatch-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  transition: transform .25s var(--ease-silk);
}
.swatch-circle--bordered { border: 1.5px solid rgba(69,76,45,.2); }
.palette-swatch:hover .swatch-circle { transform: scale(1.08) translateY(-3px); }

.swatch-name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  font-style: italic;
  color: var(--ivory);
}

.swatch-hex {
  font-family: var(--font-sans);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--ivory-muted);
}


/* ════════════════════════════════════════════════════
   TIMELINE / ITINERARY
   ════════════════════════════════════════════════════ */
.timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 32px 1fr;
  align-items: flex-start;
  gap: 0 16px;
}

.timeline-time-col { text-align: right; padding-top: 3px; }

.timeline-time {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--olive);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timeline-ampm {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(69,76,45,.50);
  vertical-align: super;
  margin-left: 2px;
}

.timeline-marker-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding-top: 5px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--olive);
  border: 3px solid var(--ivory);
  box-shadow: 0 0 0 1.5px var(--olive);
  flex-shrink: 0;
}

.timeline-dot--final {
  background: var(--ivory);
  border: 3px solid var(--olive);
  box-shadow: 0 0 0 1.5px var(--olive);
}

.timeline-track {
  width: 1px;
  flex: 1;
  min-height: 52px;
  background: rgba(69,76,45,.18);
}

.timeline-item--last .timeline-marker-col { padding-bottom: 0; }

.timeline-body { padding-bottom: 36px; padding-top: 1px; }

.timeline-name {
  font-family: var(--font-serif);
  font-size: clamp(19px,3.2vw,26px);
  font-weight: 400;
  color: var(--olive);
  line-height: 1.2;
}


/* ════════════════════════════════════════════════════
   RSVP FORM
   ════════════════════════════════════════════════════ */

/* Frosted glass floating card */
.rsvp-card {
  background: rgba(253,251,247,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(69,76,45,0.20);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.60) inset;
  padding: 52px 56px;
  margin-top: 44px;
}

/* Section botanical corner accents */
.rsvp-floral {
  position: absolute;
  width: 150px;
  height: 150px;
  pointer-events: none;
}
.rsvp-floral--tl { top: 0; left: 0; }
.rsvp-floral--br { bottom: 0; right: 0; transform: rotate(180deg); }

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Standard form group — label sits above */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Floating label variant — input comes first in HTML */
.form-group--floating {
  position: relative;
  padding-top: 26px;
  gap: 0;
}

.form-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.form-input {
  background: rgba(253,251,247,.07);
  border: 1px solid rgba(253,251,247,.20);
  border-radius: 3px;
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  padding: 14px 18px;
  transition: border-color .2s ease, background .2s ease;
  width: 100%;
  -webkit-appearance: none;
}
.form-input::placeholder { color: var(--ivory-muted); }
.form-input:focus {
  outline: none;
  border-color: rgba(253,251,247,.50);
  background: rgba(253,251,247,.11);
}

.form-input--narrow { max-width: 120px; }

/* ── RSVP card: all inputs become bottom-border-only ── */
#rsvp .form-input {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(69,76,45,0.18);
  border-radius: 0;
  padding: 10px 0;
  color: var(--olive);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.2px;
  transition: border-color 0.25s ease;
}
#rsvp .form-input::placeholder { color: transparent; }
#rsvp .form-input:focus {
  outline: none;
  border-bottom-color: var(--olive);
  background: transparent;
}

/* Standard label (non-floating) in RSVP context */
#rsvp .form-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(69,76,45,0.52);
}

/* Floating label — resting position (visually inside the input) */
#rsvp .form-group--floating .form-label {
  position: absolute;
  top: 36px;
  left: 0;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.3px;
  text-transform: none;
  color: rgba(69,76,45,0.40);
  transition: top 0.22s ease, font-size 0.22s ease, letter-spacing 0.22s ease,
              font-weight 0.22s ease, text-transform 0.22s ease, color 0.22s ease;
  pointer-events: none;
}

/* Floating label — floated state (on focus or when field has content) */
#rsvp .form-group--floating .form-input:focus ~ .form-label,
#rsvp .form-group--floating .form-input:not(:placeholder-shown) ~ .form-label {
  top: 0;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--olive);
}

/* Guest detail rows */
.rsvp-guests { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }

.rsvp-guests-heading {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ivory-muted);
  margin-bottom: 12px;
  margin-top: 8px;
}

.rsvp-guest-row {
  display: grid;
  grid-template-columns: 32px 1fr 80px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.guest-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--ivory-muted);
  text-align: right;
  line-height: 1;
}

#rsvp .rsvp-guests-heading { color: rgba(69,76,45,0.50); }
#rsvp .guest-num            { color: rgba(69,76,45,0.40); }

.form-input--age { max-width: 80px; min-width: 0; }

/* Submit button — base (dark section default) */
.btn-primary {
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--olive);
  background: var(--ivory);
  border-radius: 2px;
  padding: 18px 48px;
  transition: background .25s ease, transform .22s ease, box-shadow .22s ease;
  cursor: pointer;
  margin-top: 8px;
}
.btn-primary:hover { background: rgba(253,251,247,.88); transform: translateY(-1px); }
.btn-primary:focus-visible { outline: 2px solid var(--ivory); outline-offset: 3px; }

/* RSVP card: premium pill CTA */
#rsvp .btn-primary {
  align-self: center;
  background: var(--olive);
  color: var(--ivory);
  border-radius: 40px;
  padding: 18px 64px;
  letter-spacing: 3.5px;
  margin-top: 24px;
  box-shadow: 0 8px 24px rgba(69,76,45,0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
#rsvp .btn-primary:hover {
  background: var(--olive-dark);
  transform: scale(1.03);
  box-shadow: 0 14px 34px rgba(69,76,45,0.34);
}
#rsvp .btn-primary:active  { transform: scale(0.98); }
#rsvp .btn-primary:focus-visible { outline: 2px solid var(--olive); outline-offset: 4px; }

#rsvp .rsvp-success-msg  { color: var(--olive); }
#rsvp .rsvp-success-sub  { color: rgba(69,76,45,.60); }
#rsvp .rsvp-success-icon { border-color: rgba(69,76,45,.30); color: var(--olive); }

/* Success state */
.rsvp-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 48px 24px;
  margin-top: 16px;
}

.rsvp-success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(253,251,247,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--ivory);
}

.rsvp-success-msg {
  font-family: var(--font-serif);
  font-size: clamp(20px,3vw,26px);
  font-weight: 300;
  font-style: italic;
  color: var(--ivory);
}

.rsvp-success-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 1.5px;
  color: var(--ivory-muted);
  line-height: 1.6;
  max-width: 360px;
}


/* ════════════════════════════════════════════════════
   SECTION FLORAL ACCENTS (botanical watermarks)
   ════════════════════════════════════════════════════ */
.has-floral-bg  { position: relative; overflow: hidden; }
.has-floral-bg-ivory { position: relative; overflow: hidden; }

.section-floral-accent {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 210px;
  height: 340px;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.section-floral-accent-ivory {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 190px;
  height: 310px;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* Keep content above watermark SVGs */
.has-floral-bg > .container,
.has-floral-bg > .container--narrow,
.has-floral-bg-ivory > .container,
.has-floral-bg-ivory > .container--narrow { position: relative; z-index: 1; }


/* ════════════════════════════════════════════════════
   VENUE CARD (replaces map)
   ════════════════════════════════════════════════════ */
.venue-card {
  max-width: 480px;
  margin: 0 auto 36px;
  background: rgba(253,251,247,.06);
  border: 1px solid rgba(253,251,247,.16);
  border-radius: 6px;
  padding: 48px 40px;
  text-align: center;
  position: relative;
}

.venue-card-ornament {
  width: 200px;
  height: 56px;
  margin: 0 auto 28px;
  display: block;
}

.venue-card-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ivory-muted);
  margin-bottom: 16px;
}

.venue-card-rule {
  width: 44px;
  height: 1px;
  background: rgba(253,251,247,.20);
  margin: 18px auto;
}

.venue-card-name {
  font-family: var(--font-serif);
  font-size: clamp(28px,5vw,44px);
  font-weight: 300;
  font-style: italic;
  color: var(--ivory);
  margin-bottom: 16px;
  line-height: 1.15;
}

.venue-card-address {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-style: normal;
  margin-bottom: 0;
}

.venue-street,
.venue-city {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  color: var(--ivory-dim);
  letter-spacing: .02em;
}

.venue-card-detail {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.btn-maps {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--ivory);
  background: transparent;
  border: 1.5px solid rgba(253,251,247,0.55);
  border-radius: 40px;
  padding: 18px 48px;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
  text-decoration: none;
  margin: 0 auto;
  width: fit-content;
}
.btn-maps:hover {
  border-color: rgba(253,251,247,0.92);
  background: rgba(253,251,247,0.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}
.btn-maps:active { transform: translateY(0); }
.btn-maps:focus-visible { outline: 2px solid var(--ivory); outline-offset: 4px; }


/* ════════════════════════════════════════════════════
   OUR STORY
   ════════════════════════════════════════════════════ */
.story-floral {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 120px;
  height: 400px;
  pointer-events: none;
  z-index: 0;
}

/* Our Story — circular profile photo */
.story-profile {
  display: flex;
  justify-content: center;
  margin: 0 auto 52px;
}

.story-profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(69,76,45,0.28);
  box-shadow: 0 8px 36px rgba(69,76,45,0.12), 0 0 0 6px rgba(69,76,45,0.05);
}


/* ════════════════════════════════════════════════════
   HAND-DRAWN SKETCH ICONS
   ════════════════════════════════════════════════════ */
.sketch-icon {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
}

/* Wedding dress — right side of Our Story */
.sketch-dress {
  width: 70px;
  height: 130px;
  right: 4%;
  top: 12%;
  opacity: 0.13;
}

/* Bow tie — left side of Our Story */
.sketch-bowtie {
  width: 90px;
  height: 44px;
  left: 3%;
  bottom: 18%;
  opacity: 0.12;
}

/* Interlocking rings — registry ivory section */
.sketch-rings {
  width: 110px;
  height: 60px;
  right: 5%;
  top: 8%;
  opacity: 0.14;
}

/* Leaf branches — verse dark section, top-left */
.sketch-leaf-tl {
  width: 100px;
  height: 100px;
  top: 0;
  left: 0;
  opacity: 0.18;
}

/* Interlocking rings — verse dark section, bottom-right */
.sketch-rings-verse {
  width: 120px;
  height: 65px;
  bottom: 10%;
  right: 5%;
  opacity: 0.16;
}


.story-intro {
  font-family: var(--font-serif);
  font-size: clamp(20px, 3.6vw, 34px);
  font-weight: 300;
  font-style: italic;
  color: var(--olive);
  line-height: 1.50;
  text-align: center;
  margin: 44px 0 56px;
  letter-spacing: 0.01em;
}

.story-body {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-bottom: 60px;
}

.story-p {
  font-family: var(--font-sans);
  font-size: clamp(13.5px, 1.6vw, 15.5px);
  font-weight: 300;
  line-height: 1.92;
  color: rgba(69,76,45,.72);
  letter-spacing: 0.012em;
}

.story-closing-wrap {
  border-top: 1px solid rgba(69,76,45,.15);
  padding-top: 52px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.story-closing {
  font-family: var(--font-sans);
  font-size: clamp(12px, 1.4vw, 13.5px);
  font-weight: 300;
  line-height: 1.90;
  color: rgba(69,76,45,.55);
  max-width: 480px;
  letter-spacing: 0.025em;
}

.story-ending {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.8vw, 50px);
  font-weight: 300;
  font-style: italic;
  color: var(--olive);
  letter-spacing: 0.02em;
  line-height: 1.15;
}


/* ════════════════════════════════════════════════════
   ITINERARY
   ════════════════════════════════════════════════════ */
#itinerary {
  padding-top: 100px;
  padding-bottom: 110px;
}

.itin-date {
  font-family: var(--font-serif);
  font-size: clamp(14px, 2vw, 17px);
  font-style: italic;
  color: rgba(69,76,45,0.55);
  letter-spacing: 0.04em;
  margin-top: -14px;
  margin-bottom: 72px;
  text-align: center;
}

.itin-timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 20px;
}

/* Vertical center line */
.itin-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(69,76,45,0.18);
  transform: translateX(-50%);
  transform-origin: top center;
}

/* Each timeline row */
.itin-item {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 60px;
  position: relative;
}

.itin-item:last-child { margin-bottom: 0; }

/* Left-side events: content | icon | dot */
.itin-item--left {
  flex-direction: row;
}
.itin-item--left .itin-content {
  text-align: right;
  flex: 1;
  padding-right: 36px;
}
.itin-item--left .itin-icon-wrap {
  flex-shrink: 0;
  margin-right: 0;
}
.itin-item--left .itin-dot {
  flex-shrink: 0;
}

/* Right-side events: dot | icon | content */
.itin-item--right {
  flex-direction: row;
}
.itin-item--right .itin-content {
  text-align: left;
  flex: 1;
  padding-left: 36px;
}
.itin-item--right .itin-icon-wrap {
  flex-shrink: 0;
  margin-left: 0;
}
.itin-item--right .itin-dot {
  flex-shrink: 0;
}

/* Center dot on the line */
.itin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--olive);
  border: 2.5px solid var(--ivory);
  box-shadow: 0 0 0 2px rgba(69,76,45,0.25);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* Icon circle */
.itin-icon-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(69,76,45,0.055);
  border: 1px solid rgba(69,76,45,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.itin-icon {
  width: 52px;
  height: 52px;
  display: block;
}

/* Content text */
.itin-time {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(69,76,45,0.45);
  margin-bottom: 7px;
}

.itin-event-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 400;
  color: var(--olive);
  line-height: 1.15;
  margin: 0 0 8px;
}

.itin-event-sub {
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.6vw, 15px);
  font-weight: 300;
  color: rgba(69,76,45,0.60);
  line-height: 1.55;
  margin: 0;
}

/* ── Mobile: single-column left-line layout ── */
@media (max-width: 768px) {
  .itin-line {
    left: 32px;
    transform: none;
  }

  .itin-item--left,
  .itin-item--right {
    flex-direction: row;
    align-items: flex-start;
    padding-left: 72px;
  }

  .itin-item--left .itin-content,
  .itin-item--right .itin-content {
    text-align: left;
    padding-left: 20px;
    padding-right: 0;
    order: 2;
    flex: 1;
  }

  .itin-item--left .itin-icon-wrap,
  .itin-item--right .itin-icon-wrap {
    order: 1;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
  }

  .itin-icon {
    width: 42px;
    height: 42px;
  }

  .itin-dot {
    left: 32px;
    top: 36px;
    transform: translate(-50%, 0);
  }

  .itin-item--left .itin-content,
  .itin-item--right .itin-content {
    order: 2;
  }
}

@media (max-width: 480px) {
  #itinerary { padding-top: 72px; padding-bottom: 80px; }
  .itin-date { margin-bottom: 48px; }
  .itin-item { margin-bottom: 44px; }
  .itin-icon-wrap { width: 60px; height: 60px; }
  .itin-icon { width: 36px; height: 36px; }
  .itin-item--left,
  .itin-item--right { padding-left: 60px; }
  .itin-dot { left: 28px; }
  .itin-line { left: 28px; }
}


/* ════════════════════════════════════════════════════
   GALLERY
   ════════════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 260px 220px 300px 220px 260px 220px;
  gap: 10px;
  margin-top: 8px;
}

.gallery-cell {
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.65s var(--ease-silk);
  will-change: transform;
}

.gallery-cell:hover .gallery-img { transform: scale(1.04); }

/* Gallery botanical accents */
.gallery-floral-bl {
  position: absolute;
  left: -8px;
  bottom: -8px;
  width: 160px;
  height: 200px;
  pointer-events: none;
  z-index: 0;
}

.gallery-floral-tr {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 160px;
  height: 200px;
  pointer-events: none;
  z-index: 0;
  transform: rotate(180deg);
}


/* ════════════════════════════════════════════════════
   REGISTRY / WEDDING FUNDS
   ════════════════════════════════════════════════════ */
.registry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.fund-card {
  background: var(--olive-mid);
  border: 1px solid rgba(253,251,247,.13);
  border-radius: 6px;
  padding: 30px 26px 26px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color .25s var(--ease-silk), transform .25s var(--ease-silk), background .25s var(--ease-silk);
  will-change: transform;
  text-align: left;
}
.fund-card:hover {
  border-color: rgba(253,251,247,.30);
  transform: translateY(-3px);
  background: rgba(53,61,30,.90);
}
.fund-card:focus-visible { outline: 2px solid var(--ivory); outline-offset: 3px; }

.fund-card-emoji {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 14px;
  display: block;
}

.fund-card-name {
  font-family: var(--font-serif);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 400;
  font-style: italic;
  color: var(--ivory);
  line-height: 1.2;
  margin-bottom: 4px;
}

.fund-card-goal-line {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ivory-muted);
  margin-bottom: 18px;
}

.fund-card-track {
  width: 100%;
  height: 2px;
  background: rgba(253,251,247,.14);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.fund-card-fill {
  height: 100%;
  background: var(--ivory);
  border-radius: 2px;
  min-width: 0;
  transition: width .6s var(--ease-expo);
}

.fund-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
}

.fund-card-raised {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--ivory-dim);
}

.fund-card-pct {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--ivory-muted);
}

.fund-card-btn {
  display: block;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--olive);
  background: var(--ivory);
  border-radius: 2px;
  padding: 13px 0;
  margin-top: auto;
  transition: background .2s ease, transform .15s ease;
}
.fund-card:hover .fund-card-btn { background: rgba(253,251,247,.88); }

/* Registry on ivory background — flip all card colors to olive palette */
#registry .fund-card {
  background: rgba(69,76,45,0.06);
  border-color: rgba(69,76,45,0.14);
}
#registry .fund-card:hover {
  background: rgba(69,76,45,0.11);
  border-color: rgba(69,76,45,0.25);
  transform: translateY(-3px);
}
#registry .fund-card:focus-visible { outline-color: var(--olive); }
#registry .fund-card-name     { color: var(--olive); }
#registry .fund-card-goal-line { color: rgba(69,76,45,0.48); }
#registry .fund-card-track    { background: rgba(69,76,45,0.12); }
#registry .fund-card-fill     { background: var(--olive); }
#registry .fund-card-raised   { color: rgba(69,76,45,0.68); }
#registry .fund-card-pct      { color: rgba(69,76,45,0.45); }
#registry .fund-card-btn {
  color: var(--ivory);
  background: var(--olive);
  text-decoration: none;
}
#registry .fund-card:hover .fund-card-btn { background: var(--olive-dark); }


/* ────── Registry Modal ────── */
.registry-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.registry-modal.is-open {
  pointer-events: auto;
  visibility: visible;
}

.registry-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

.registry-modal-card {
  position: relative;
  z-index: 1;
  background: var(--olive-dark);
  border: 1px solid rgba(253,251,247,.18);
  border-radius: 8px;
  padding: 52px 44px 40px;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.55), 0 8px 24px rgba(0,0,0,.30);
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.registry-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(253,251,247,.18);
  background: transparent;
  color: var(--ivory-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.registry-modal-close:hover { background: rgba(253,251,247,.10); color: var(--ivory); }
.registry-modal-close:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }

.registry-modal-emoji {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 18px;
}

.registry-modal-name {
  font-family: var(--font-serif);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 400;
  font-style: italic;
  color: var(--ivory);
  line-height: 1.15;
  margin-bottom: 6px;
}

.registry-modal-goal-line {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ivory-muted);
  margin-bottom: 28px;
}

.registry-modal-track {
  width: 100%;
  height: 3px;
  background: rgba(253,251,247,.14);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.registry-modal-fill {
  height: 100%;
  background: var(--ivory);
  border-radius: 3px;
  min-width: 0;
  transition: width .7s var(--ease-expo);
}

.registry-modal-meta {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 28px;
}

.registry-modal-meta-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.registry-modal-note {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.72;
  color: var(--ivory-muted);
  margin-bottom: 28px;
  max-width: 330px;
}

#paypal-container-KFECGZE26UMFS {
  width: 100%;
  margin-bottom: 18px;
  min-height: 50px;
}

.registry-modal-dismiss {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--ivory-muted);
  background: transparent;
  border: 1px solid rgba(253,251,247,.18);
  border-radius: 2px;
  padding: 12px 32px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.registry-modal-dismiss:hover { color: var(--ivory); border-color: rgba(253,251,247,.38); }
.registry-modal-dismiss:focus-visible { outline: 2px solid var(--ivory); outline-offset: 2px; }


/* ════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════ */
.footer {
  background: var(--olive-dark);
  padding: 60px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-names {
  font-family: var(--font-serif);
  font-size: clamp(26px,4vw,36px);
  font-weight: 300;
  font-style: italic;
  color: var(--ivory);
  letter-spacing: .02em;
}

.footer-rule {
  width: 44px;
  height: 1px;
  background: rgba(253,251,247,.25);
}

.footer-meta {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

.footer-love {
  font-size: 18px;
  color: rgba(253,251,247,.25);
  margin-top: 4px;
}


/* ════════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .scroll-line { animation: none; opacity: 0.4; transform: none; }
}


/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .container, .container--narrow { padding: 0 20px; }

  /* Timeline stacks on mobile */
  .timeline-item {
    grid-template-columns: 80px 28px 1fr;
    gap: 0 10px;
  }
  .timeline-track { min-height: 44px; }

  /* Gallery: 2-col on tablet, auto-flow with equal cells */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 8px;
  }
  .gallery-cell { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 1; height: auto; }
  /* gallary5 stays panoramic full-width; gallary10+11 share final row as equal squares */
  .gallery-cell:nth-child(5) { grid-column: 1 / -1 !important; aspect-ratio: 16/9; }

  /* Palette wraps tighter on tablet */
  .palette-grid { gap: 20px 28px; }
  .swatch-circle { width: 72px; height: 72px; }

  /* RSVP card: tighter padding on tablet */
  .rsvp-card { padding: 40px 36px; margin-top: 36px; }
  .rsvp-floral { width: 110px; height: 110px; }

  /* RSVP guest row: tighter columns */
  .rsvp-guest-row {
    grid-template-columns: 28px 1fr 70px;
    gap: 8px;
  }

  /* Venue card on mobile */
  .venue-card { padding: 36px 24px; }

  /* Registry: 2-col on tablet */
  .registry-grid { grid-template-columns: repeat(2, 1fr); }
  .registry-modal-card { padding: 44px 28px 36px; }
}

@media (max-width: 480px) {
  #top-controls { top: 14px; right: 14px; gap: 12px; }
  .overlay-content { padding: 0 16px; padding-top: 28px; }
  .invite-heading { margin-bottom: 28px; }
  .invite-cta { margin-top: 20px; }
  .scroll-hint { bottom: 20px; }

  .countdown { gap: 0; }
  .countdown-unit { min-width: clamp(68px,22vw,90px); }

  /* ── Calendar: hard-reset outer container padding ── */
  #save-the-date .container {
    padding-left: 6px !important;
    padding-right: 6px !important;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  .cal-mini-wrap { max-width: 100%; padding: 0 4px; }
  .cal-mini-day  { font-size: 10.5px; }
  .cal-mini-name { font-size: 7.5px; letter-spacing: 0; }

  /* ── Color palette: all 5 circles in one horizontal line ── */
  .palette-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 0;
  }
  .palette-swatch {
    flex: 1 1 0;
    gap: 6px;
    align-items: center;
  }
  .swatch-circle {
    width: 44px;
    height: 44px;
    box-shadow: 0 3px 10px rgba(0,0,0,.22);
  }
  .swatch-name {
    font-size: 9px;
    line-height: 1.2;
    text-align: center;
  }
  .swatch-hex { display: none; }

  /* ── Gallery: 2-col even square grid, items 10+11 side-by-side ── */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 6px;
  }
  .gallery-cell {
    grid-column: auto !important;
    grid-row: auto !important;
    aspect-ratio: 1;
    height: auto;
  }
  /* gallary5 stays panoramic; all others including 10+11 are equal squares */
  .gallery-cell:nth-child(5) { grid-column: 1 / -1 !important; aspect-ratio: 16/9; }

  .timeline-item { grid-template-columns: 68px 24px 1fr; }

  .btn-primary { align-self: stretch; text-align: center; justify-content: center; }
  .rsvp-card { padding: 32px 24px; margin-top: 28px; border-radius: 10px; }
  .rsvp-floral { width: 90px; height: 90px; }
  #rsvp .btn-primary { align-self: stretch; border-radius: 30px; padding: 18px 32px; }

  /* Registry: 1-col on mobile */
  .registry-grid { grid-template-columns: 1fr; }
}
