@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Jost:wght@300;400;500&family=Great+Vibes&display=swap');

:root {
  --bg:         #fdf7f0;
  --bg-alt:     #f7ede0;
  --bg-warm:    #f0e0cc;
  --white:      #fefaf5;
  --text:       #2a1a10;
  --mid:        #6b4a38;
  --muted:      #b09278;
  --rose:       #c47a8a;
  --rose-light: rgba(196, 122, 138, 0.15);
  --line:       rgba(180, 130, 90, 0.2);
  --sage:       #b89a5a;
  --sand:       #d9b882;
  --amber:      #c4854a;

  --display:    "Cormorant Garamond", Georgia, serif;
  --vintage:    "Great Vibes", cursive;
  --sans:       "Jost", system-ui, sans-serif;

  --max:        780px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

/* ─── reveal — scroll-triggered ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.from-left  { transform: translateX(-32px); }
.reveal.from-right { transform: translateX(32px); }
.reveal.on { opacity: 1; transform: none; }

/* ─── line reveals inside about ─── */
.line-reveal {
  display: block;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.line-reveal.on { opacity: 1; transform: none; }

/* ═══════════════════════════════════════
   SCROLL PROGRESS BAR
═══════════════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--rose), var(--sand));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 1000;
  transition: transform 0.1s linear;
}

/* ═══════════════════════════════════════
   1. HERO
═══════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 110px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 3px 0 0 rgba(217, 184, 130, 0.7);
}

/* ─── Ken Burns background ─── */
.hero-bg {
  position: absolute;
  inset: -12% 0;
  background-image: url('hero.jpeg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  z-index: 0;
  will-change: transform;
  animation: ken-burns 24s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1.0) translateY(0); }
  to   { transform: scale(1.1) translateY(-2%); }
}

/* ─── gradient overlay ─── */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 8, 4, 0.35) 0%,
    rgba(18, 8, 4, 0.16) 30%,
    rgba(18, 8, 4, 0.08) 50%,
    rgba(240, 224, 204, 1) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* ─── grain ─── */
.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.035;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 4;
}

/* ─── bokeh orbs ─── */
.hero-bokeh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  animation: bokeh-drift linear infinite;
}

.b1 { width: 320px; height: 320px; background: rgba(217,184,130,0.22); top: -8%;   left: 5%;  animation-duration: 38s; animation-delay:   0s; }
.b2 { width: 240px; height: 240px; background: rgba(196,122,138,0.18); top: 10%;   right: 8%; animation-duration: 44s; animation-delay: -12s; }
.b3 { width: 280px; height: 280px; background: rgba(196,133,74,0.15);  bottom: 18%; left: 18%; animation-duration: 52s; animation-delay:  -7s; }
.b4 { width: 200px; height: 200px; background: rgba(217,184,130,0.18); top: 35%;   right: 22%; animation-duration: 35s; animation-delay: -20s; }
.b5 { width: 360px; height: 360px; background: rgba(196,122,138,0.11); bottom: 5%; right: -5%; animation-duration: 60s; animation-delay:  -5s; }
.b6 { width: 180px; height: 180px; background: rgba(255,220,160,0.16); top: 55%;   left: 42%; animation-duration: 42s; animation-delay: -30s; }

@keyframes bokeh-drift {
  0%   { opacity: 0;   transform: translate(0,    0)     scale(1);    }
  8%   { opacity: 1; }
  45%  {              transform: translate(30px, -24px)  scale(1.08); }
  92%  { opacity: 1; }
  100% { opacity: 0;   transform: translate(-10px, 18px) scale(0.95); }
}

/* ─── hero tilt/scroll wrapper ─── */
.hero-tilt {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 3;
  transform: translate(var(--tilt-x, 0px), var(--tilt-y, 0px));
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.5s ease,
              filter 0.5s ease;
  will-change: transform, opacity;
}

/* ─── hero text styles ─── */
.hero-tag {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.4rem;
  text-transform: uppercase;
  color: rgba(255, 248, 240, 0.78);
  text-shadow: 0 1px 20px rgba(18, 8, 4, 0.25);
  margin-bottom: 52px;
  animation: hero-fade-in 1.1s ease 0.2s both;
}

.hero-names {
  font-family: var(--vintage);
  font-size: clamp(3.8rem, 12vw, 7.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: rgba(255, 250, 245, 0.85);
  text-shadow: 0 1px 30px rgba(18, 8, 4, 0.25);
  animation: hero-fade-up 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.hero-names em {
  display: block;
  font-style: italic;
  color: rgba(240, 215, 175, 0.92);
  font-size: 0.5em;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-shadow: 0 1px 25px rgba(18, 8, 4, 0.3);
  animation: pulse-amp 4s ease-in-out 2s infinite;
}

@keyframes pulse-amp {
  0%, 100% { opacity: 1; letter-spacing: 0.1em; }
  50%       { opacity: 0.75; letter-spacing: 0.15em; }
}

.hero-sub {
  margin-top: 32px;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.45rem, 3.2vw, 2.2rem);
  font-weight: 300;
  color: rgba(255, 248, 240, 0.78);
  text-shadow: 0 1px 20px rgba(18, 8, 4, 0.2);
  animation: hero-fade-up 1.0s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both;
}

.hero-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 36px auto 0;
  color: #fff;
  opacity: 0.85;
  font-size: 0.7rem;
  text-shadow: 0 2px 28px rgba(18, 8, 4, 0.5);
  animation: hero-fade-in 1.0s ease 1.1s both;
}
.hero-rule::before,
.hero-rule::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217,184,130,0.5));
}
.hero-rule::after {
  background: linear-gradient(90deg, rgba(217,184,130,0.5), transparent);
}

/* ─── scroll hint ─── */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
  animation: hero-fade-in 1s ease 2s both;
  transition: opacity 0.6s ease;
}
.scroll-hint.hidden { opacity: 0; pointer-events: none; }

.scroll-hint-label {
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.28rem;
  text-transform: uppercase;
  color: rgba(217, 184, 130, 0.55);
}

.scroll-hint-line {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(217,184,130,0.6), transparent);
  transform-origin: top;
  animation: scroll-line 2s ease-in-out 2.2s infinite;
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); opacity: 1; transform-origin: top; }
  49%  { transform: scaleY(1); opacity: 1; transform-origin: top; }
  50%  { transform: scaleY(1); opacity: 1; transform-origin: bottom; }
  100% { transform: scaleY(0); opacity: 0; transform-origin: bottom; }
}

/* ─── hero entrance keyframes ─── */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ═══════════════════════════════════════
   SECTION SHARED
═══════════════════════════════════════ */
section {
  padding: 112px 0;
  position: relative;
}

.section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3rem;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 24px;
}

/* ═══════════════════════════════════════
   2. TWO EVENTS
═══════════════════════════════════════ */
.venue {
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-warm) 0%, var(--bg-alt) 40%, var(--bg) 100%);
  padding-top: 96px;
}

.venue-title {
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  margin-bottom: 56px;
  line-height: 1.05;
}

/* ─── events wrap ─── */
.events-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

/* ─── event card ─── */
.event-card {
  flex: 1;
  max-width: 340px;
  padding: 44px 32px 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 252, 247, 0.5);
  backdrop-filter: blur(2px);
  position: relative;
  cursor: default;
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.35s ease;
}
.event-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(
    145deg,
    rgba(255,255,245,0.6) 0%,
    transparent 50%,
    rgba(180,130,90,0.04) 100%
  );
  pointer-events: none;
  z-index: 0;
}
.event-card > * { position: relative; z-index: 1; }

/* name */
.event-card-name {
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 18px;
}

/* divider */
.event-card-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--sand), transparent);
  margin: 0 auto 22px;
}

/* details list */
.event-card-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-card-row {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.event-row-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9f6b44;
}

.event-row-label {
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: #7f5a3e;
  min-width: 40px;
}

.event-row-value {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 400;
  color: #3d2416;
  letter-spacing: 0.01em;
}

/* click-to-RSVP hint */
.event-card-cta {
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.3s ease;
}
.event-card:hover .event-card-cta,
.event-card:focus .event-card-cta {
  opacity: 1;
  transform: translateY(0);
}

/* clickable */
.event-card {
  cursor: pointer;
}

/* selected state */
.event-card.selected {
  border-color: var(--amber);
  background: rgba(255, 252, 247, 0.8);
  box-shadow:
    0 0 0 1px rgba(196, 133, 74, 0.15),
    0 8px 32px rgba(196, 133, 74, 0.1);
}
.event-card.selected .event-card-cta {
  opacity: 1;
  transform: translateY(0);
  color: var(--amber);
}
.event-card.selected::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 6px;
  border: 1px solid rgba(196, 133, 74, 0.2);
  pointer-events: none;
  z-index: 2;
}

/* ─── connector ─── */
.events-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  flex-shrink: 0;
}

.connector-line {
  display: block;
  width: 1px;
  flex: 1;
  min-height: 24px;
  background: linear-gradient(to bottom, transparent, var(--line), transparent);
}

.connector-motif {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--sand);
  line-height: 1;
}

/* ═══════════════════════════════════════
   3. COUNTDOWN
═══════════════════════════════════════ */
.countdown {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  position: relative;
  isolation: isolate;
  transition: background 0.9s ease;
}
.countdown > .wrap {
  position: relative;
  z-index: 1;
}

/* ─── atmospheric background ─── */
.countdown-atmo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.countdown-atmo::before,
.countdown-atmo::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* ═══ CHRISTIAN — gothic forest photo background ═══ */
.theme-christian {
  background: #1a0f08;
}
.theme-christian .countdown-atmo {
  background-image: url("Aesthetic.jpeg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.theme-christian .countdown-atmo::before {
  /* dark gradient overlay so text stays readable */
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.5) 100%);
}
.theme-christian .countdown-atmo::after {
  /* warm candle-like glow overlay */
  background:
    radial-gradient(ellipse 60% 30% at 50% 10%, rgba(255, 220, 170, 0.08) 0%, transparent 60%);
}

/* lighten text on the dark christian bg */
.theme-christian .section-label { color: rgba(255,235,220,0.7); }
.theme-christian .countdown-event-label,
.theme-christian .countdown-event-label.active { color: rgba(255,240,225,0.85); }
.theme-christian .countdown-item span { color: rgba(255,230,200,0.9); }
.theme-christian .countdown-item small { color: rgba(255,235,220,0.5); }
.theme-christian .countdown-item { border-color: rgba(255,235,220,0.12); }
.theme-christian .countdown-grid { border-color: rgba(255,235,220,0.12); }

/* ═══ HINDU — Nataraja image background ═══ */
.theme-hindu {
  background: #1a0f08;
}
.theme-hindu .countdown-atmo {
  background-image: url("Nataraja.jpeg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}
.theme-hindu .countdown-atmo::before {
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.5) 100%);
}
.theme-hindu .countdown-atmo::after {
  background:
    radial-gradient(ellipse 60% 30% at 50% 10%, rgba(255, 210, 150, 0.08) 0%, transparent 60%);
}

/* lighten text on the dark hindu bg */
.theme-hindu .section-label { color: rgba(255,235,220,0.7); }
.theme-hindu .countdown-event-label,
.theme-hindu .countdown-event-label.active { color: rgba(255,240,225,0.85); }
.theme-hindu .countdown-item span { color: rgba(255,230,200,0.9); }
.theme-hindu .countdown-item small { color: rgba(255,235,220,0.5); }
.theme-hindu .countdown-item { border-color: rgba(255,235,220,0.12); }
.theme-hindu .countdown-grid { border-color: rgba(255,235,220,0.12); }

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.countdown-item {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  cursor: default;
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.3s ease;
}
.countdown-item:last-child { border-right: none; }

.countdown-item span {
  display: block;
  font-family: var(--display);
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 300;
  color: var(--amber);
}

.countdown-item small {
  display: block;
  margin-top: 12px;
  font-size: 0.64rem;
  letter-spacing: 0.24rem;
  text-transform: uppercase;
  color: var(--muted);
}

/* countdown digit change animation */
@keyframes digit-swap {
  0%   { opacity: 0; transform: translateY(-20%) blur(4px); filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0);   filter: blur(0); }
}
.countdown-item span.ticking {
  animation: digit-swap 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* event label above countdown */
.countdown-event-label {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: -12px;
  margin-bottom: 0;
  min-height: 1.6em;
  transition: color 0.4s ease;
}
.countdown-event-label.active {
  color: var(--mid);
}

/* ─── countdown divider ─── */
.countdown-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px auto 22px;
  color: rgba(255,255,255,0.5);
  font-size: 0.6rem;
}
.countdown-divider::before,
.countdown-divider::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2));
}
.countdown-divider::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
}

/* ─── countdown details card ─── */
.countdown-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 24px 28px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  text-align: left;
}
.details-venue-row,
.details-datetime-row,
.details-dress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.details-icon {
  flex-shrink: 0;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
}
.details-venue {
  font-family: var(--display);
  font-size: 1rem;
  color: rgba(255,248,240,0.85);
}
.details-datetime {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255,248,240,0.6);
  letter-spacing: 0.02em;
}
.details-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  margin: 4px 0;
}
.details-section {
  width: 100%;
}
.details-heading {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.22rem;
  text-transform: uppercase;
  color: rgba(255,248,240,0.4);
  margin-bottom: 10px;
}
.details-agenda {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.details-agenda li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(255,248,240,0.75);
}
.agenda-time {
  min-width: 72px;
  font-weight: 400;
  color: rgba(255,248,240,0.5);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.agenda-label {
  color: rgba(255,248,240,0.8);
}
.details-dress-row {
  margin-top: 2px;
}
.details-dress-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: rgba(255,248,240,0.4);
}
.details-dress-value {
  font-family: var(--display);
  font-size: 0.95rem;
  font-style: italic;
  color: rgba(255,248,240,0.85);
}

/* ═══════════════════════════════════════
   4. ABOUT US
═══════════════════════════════════════ */
.about {
  text-align: center;
  background: var(--bg-alt);
}

.about-inner {
  max-width: 600px;
  margin-inline: auto;
}

.about-title {
  font-family: var(--display);
  font-size: clamp(2.8rem, 6.5vw, 4.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  margin-bottom: 36px;
  line-height: 1.05;
}

.about-text {
  color: var(--mid);
  font-size: 1.08rem;
  line-height: 2;
  font-weight: 300;
}
.about-text + .about-text { margin-top: 22px; }

.about-route {
  display: inline-block;
  margin-top: 40px;
  font-size: 0.62rem;
  letter-spacing: 0.26rem;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--sans);
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 40px;
}

/* ═══════════════════════════════════════
   5. RSVP
═══════════════════════════════════════ */
.rsvp {
  background: var(--bg);
  text-align: center;
  padding-bottom: 120px;
}

.rsvp-inner {
  max-width: 540px;
  margin-inline: auto;
}

.rsvp-title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.05;
}

.rsvp-deadline {
  font-size: 0.68rem;
  letter-spacing: 0.24rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

.rsvp-note {
  color: var(--mid);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 44px;
}

/* event context line in RSVP */
.rsvp-event-context {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 28px;
  min-height: 1.5em;
  transition: color 0.4s ease;
}
.rsvp-event-context.active {
  color: var(--mid);
}

/* ─── RSVP choice buttons ─── */
.rsvp-choice {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.rsvp-choice-btn {
  flex: 1;
  min-width: 180px;
  max-width: 220px;
  padding: 18px 24px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: var(--mid);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.rsvp-choice-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196,133,74,0.12);
}
.rsvp-choice-btn.selected[data-choice="yes"] {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196,133,74,0.25);
}
.rsvp-choice-btn.selected[data-choice="no"] {
  background: var(--mid);
  border-color: var(--mid);
  color: #fff;
  transform: translateY(-2px);
}

/* ─── event radio select ─── */
.rsvp-event-select {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
}
.rsvp-event-option {
  flex: 1;
  display: flex;
  cursor: pointer;
  transition: background 0.25s ease;
}
.rsvp-event-option + .rsvp-event-option {
  border-left: 1px solid var(--line);
}
.rsvp-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rsvp-radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 8px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06rem;
  color: var(--muted);
  transition: color 0.25s ease, background 0.25s ease;
}
.rsvp-radio:checked + .rsvp-radio-label {
  color: var(--text);
  background: var(--rose-light);
}

/* ─── RSVP fields (animated in) ─── */
.rsvp-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.5s ease 0.15s;
}
.rsvp-fields.open {
  max-height: 600px;
  opacity: 1;
}

.rsvp-input,
.rsvp-textarea {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  resize: none;
}
.rsvp-input::placeholder,
.rsvp-textarea::placeholder {
  color: var(--muted);
  font-weight: 300;
}
.rsvp-input:focus,
.rsvp-textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(196,133,74,0.1);
}

/* ─── RSVP confirm message ─── */
.rsvp-confirm {
  padding: 32px 0;
}
.rsvp-confirm-text {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--mid);
  line-height: 1.6;
}

/* ─── send button ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px;
  background: var(--amber);
  border: none;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
}
.btn:hover {
  background: #a86d38;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196,133,74,0.3);
}

/* ─── bottom sign-off ─── */
.site-end {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto 52px;
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.site-end p {
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

/* ─── cursor sparkle ─── */
@keyframes sparkle-out {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.85; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0); opacity: 0; }
}
.cursor-sparkle {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sand) 0%, var(--rose) 100%);
  pointer-events: none;
  z-index: 9999;
  animation: sparkle-out 0.55s ease-out forwards;
}

/* ═══════════════════════════════════════
   0. INTRO OVERLAY — WEDDING ENVELOPE
═════════════════════════════════════════ */

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #160c06;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.intro-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 60%, #2f1a10 0%, #160c06 60%, #0d0704 100%);
  z-index: 0;
}

.intro-ambient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle 420px at 50% 35%, rgba(196, 133, 74, 0.08) 0%, transparent 70%),
    radial-gradient(circle 260px at 25% 50%, rgba(217, 184, 130, 0.04) 0%, transparent 60%),
    radial-gradient(circle 280px at 75% 50%, rgba(196, 122, 138, 0.04) 0%, transparent 60%);
  transition: opacity 1.2s ease;
}
.intro-overlay.fade-out .intro-ambient {
  opacity: 0;
}

/* warm flash */
.intro-spark {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse 45% 28% at 50% 42%, rgba(217, 184, 130, 0.25) 0%, transparent 70%);
  transition: opacity 0.5s ease;
}
.intro-spark.glow {
  opacity: 1;
}

/* ─── scene ─── */
.env-scene {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(-14px);
}

.env-perspective {
  perspective: 1200px;
}
/* ═══ envelope — landscape C6 (long side horizontal, flap on long side) ═══ */
.env {
  position: relative;
  width: min(calc(85vh * 540 / 380), 92vw, 740px);
  aspect-ratio: 540 / 380;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.env.lift {
  transform: translateY(-14px);
}

/* ═══ body ═══ */
.env-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
}
.env-body-paper {
  width: 100%;
  height: 100%;
  background: #f5ecdd;
  border-radius: 4px 4px 8px 8px;
  box-shadow:
    0 10px 50px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 -2px 6px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* laid paper texture */
.env-body-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1.2px,
      rgba(160, 130, 95, 0.025) 1.2px,
      rgba(160, 130, 95, 0.025) 2.4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(160, 130, 95, 0.015) 2px,
      rgba(160, 130, 95, 0.015) 3px
    );
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: multiply;
}
/* noise grain */
.env-body-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: overlay;
}
/* 3D bulge */
.env-body-bulge {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 80% 70% at 50% 50%,
      rgba(255, 252, 242, 0.15) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 85% 90% at 50% 50%,
      transparent 50%,
      rgba(30, 18, 10, 0.06) 100%
    );
}
/* warm inner shade */
.env-body-shade {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 56%;
  background: linear-gradient(to bottom, rgba(35, 22, 12, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
/* gold-toned border */
.env-body-inner {
  position: absolute;
  inset: 12px 12px 14px;
  border: 1px solid rgba(196, 133, 74, 0.13);
  z-index: 5;
  border-radius: 2px;
}
/* corner ornaments */
.env-body-inner::before,
.env-body-inner::after {
  content: "◆";
  position: absolute;
  font-size: 0.3rem;
  color: rgba(196, 133, 74, 0.18);
  pointer-events: none;
}
.env-body-inner::before { top: 4px; left: 4px; }
.env-body-inner::after { bottom: 4px; right: 4px; }

/* ═══ flap — wide scalloped taper ═══ */
.env-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 55%;
  z-index: 10;
  transform-origin: top center;
  transition: transform 1.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform: rotateX(0deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  clip-path: polygon(
    0% 0%,
    100% 0%,
    96% 30%,
    90% 46%,
    78% 58%,
    50% 68%,
    22% 58%,
    10% 46%,
    4% 30%
  );
}
.env-flap.open {
  transform: rotateX(-180deg);
}
.env-flap-paper {
  width: 100%;
  height: 100%;
  background: #efe2ce;
  position: relative;
  overflow: hidden;
}
.env-flap-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 1.2px,
      rgba(160, 130, 95, 0.02) 1.2px,
      rgba(160, 130, 95, 0.02) 2.4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(160, 130, 95, 0.01) 2px,
      rgba(160, 130, 95, 0.01) 3px
    );
  pointer-events: none;
  mix-blend-mode: multiply;
}
.env-flap-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: 0.025;
  pointer-events: none;
  mix-blend-mode: overlay;
}
/* flap crease + cast shadow */
.env-flap-crease {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.03) 0%,
    transparent 5%,
    transparent 92%,
    rgba(0, 0, 0, 0.07) 97%,
    rgba(0, 0, 0, 0.04) 100%
  );
  pointer-events: none;
}

/* ═══ wax seal — inline SVG, no CSS background ═══ */
.env-seal {
  position: absolute;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  z-index: 12;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.4s ease;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.4));
  pointer-events: none;
}
.env-seal svg {
  width: 100%;
  height: 100%;
  display: block;
}
.env-seal.break {
  transform: translate(-50%, -50%) scale(1.3);
  opacity: 0;
}



/* ─── hint ─── */
.intro-hint {
  margin-top: 36px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  color: rgba(217, 184, 130, 0.35);
  letter-spacing: 0.1em;
  pointer-events: none;
  animation: hint-pulse 2.4s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { opacity: 0.3;  transform: translateY(0); }
  50%      { opacity: 0.65; transform: translateY(-4px); }
}

/* ─── responsive ─── */
@media (max-width: 640px) {
  .env {
    width: min(calc(65vh * 540 / 380), 94vw);
  }
  .env-seal {
    width: 42px;
    height: 42px;
  }
}
@media (max-width: 400px) {
  .env {
    width: 92vw;
  }
  .env-seal {
    width: 36px;
    height: 36px;
  }
}

/* original responsive */
@media (max-width: 580px) {
  .countdown-grid {
    grid-template-columns: 1fr 1fr;
  }
  .countdown-item:nth-child(1),
  .countdown-item:nth-child(2) { border-bottom: 1px solid var(--line); }
  .countdown-item:nth-child(2) { border-right: none; }

  .rsvp-choice { flex-direction: column; align-items: center; }
  .rsvp-choice-btn { max-width: 100%; width: 100%; }
}

/* two-events responsive */
@media (max-width: 780px) {
  .events-wrap {
    flex-direction: column;
    gap: 0;
  }
  .event-card {
    max-width: 100%;
    width: 100%;
  }
  .events-connector {
    flex-direction: row;
    padding: 0;
    gap: 12px;
  }
  .connector-line {
    width: 1px;
    height: 32px;
    min-height: 0;
    flex: 0 0 auto;
    background: linear-gradient(to bottom, transparent, var(--line), transparent);
  }
  .connector-motif {
  font-size: 0.85rem;
  }
}
