﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Scroll progress bar ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--sage), var(--gold));
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
  box-shadow: 0 0 6px 1px var(--sage);
}

:root {
  --cream: #faf6f0;
  --sage:  #8a9e7e;
  --gold:  #c9a96e;
  --dark:  #2c2c2c;
  --light-sage: #d4e0cd;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Lato', Arial, sans-serif;

  /* Display / new tokens */
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --champagne:    #f5e6c8;
  --deep-gold:    #9a7040;
  --ivory:        #fefcf7;
  --charcoal:     #1a1a1a;
  --rose-whisper: #f5e8e4;
  --grad-foil: linear-gradient(105deg, #9a7040 0%, #c9a96e 30%, #f5e6c8 50%, #c9a96e 70%, #9a7040 100%);
}

html {
  scroll-behavior: auto;
  scroll-padding-top: 76px;
}

body {
  background: var(--ivory);
  color: var(--dark);
  font-family: var(--font-sans);
  line-height: 1.7;
}

/* ── Fancy paper texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.62' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 400px 400px;
  opacity: 0.048;
  mix-blend-mode: multiply;
}


/* ── Foil shimmer keyframe (shared) ── */
@keyframes foilShimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -100% center; }
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  background: rgba(250,246,240,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* border-bottom kept for layout spacing but drawn via ::after */
  border-bottom: 1px solid transparent;
  /* Only animate background + padding — removes paint-triggering box-shadow & border-color */
  transition: background 0.4s ease, padding 0.4s ease;
}

/* Shadow & border drawn on a separate layer via opacity — composite-only, zero paint cost */
nav::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: 0 1px 0 rgba(201,169,110,0.22), 0 4px 24px rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(201,169,110,0.22);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

nav.scrolled {
  background: rgba(250,246,240,0.95);
  /* backdrop-filter kept at same blur(12px) — prevents GPU recomposite per frame */
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

nav.scrolled::after {
  opacity: 1;
}

nav .monogram {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--sage);
  letter-spacing: 0.1em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

nav a {
  text-decoration: none;
  color: var(--dark);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.35s ease;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

nav a:hover { color: var(--sage); }
nav a:hover::after { transform: scaleX(1); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(160deg, #eef4ea 0%, var(--ivory) 60%, var(--champagne) 100%);
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,169,110,0.15) 0%, transparent 70%);
}

/* ── Hero ethereal name halo ── */
.hero::after {
  content: '';
  position: absolute;
  width: 640px; height: 320px;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(201,169,110,0.22) 0%, rgba(245,232,208,0.12) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: haloPulse 7s ease-in-out infinite alternate;
}
@keyframes haloPulse {
  from { opacity: 0.65; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 1;    transform: translate(-50%, -50%) scale(1.14); }
}

/* ── Aurora mesh canvas ── */
#aurora-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
  will-change: transform;
}

#dust-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Hero spotlight beam ── */
.hero-spotlight {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  background: conic-gradient(
    from 220deg at 65% 10%,
    rgba(255,248,230,0.10) 0deg,
    rgba(245,232,190,0.07) 18deg,
    rgba(212,224,205,0.04) 30deg,
    transparent 38deg,
    transparent 360deg
  );
  animation: spotlightSweep 20s ease-in-out infinite alternate;
  transform-origin: 65% 10%;
}
@keyframes spotlightSweep {
  from { transform: rotate(-18deg); opacity: 0.7; }
  to   { transform: rotate(22deg);  opacity: 1; }
}

/* ── Sparkle canvas ── */
#sparkle-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3.9rem, 8.5vw, 7.2rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--dark);
  letter-spacing: 0.02em;
  will-change: transform, opacity;
  margin-bottom: 1rem;
}

.hero h1 .amp {
  font-style: italic;
  color: var(--sage);
  display: inline-block;
  padding-right: 0.08em;
}

.hero-date {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--sage);
  text-transform: uppercase;
  margin: 1.5rem 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem auto;
  width: 220px;
}
.divider hr { flex: 1; border: none; border-top: 1px solid var(--gold); }
.divider span { color: var(--gold); font-size: 1.1rem; }

/* ── Countdown ── */
.countdown {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  position: relative; /* needed for ::before glow */
}

/* Pulsing gold radial halo that breathes beneath the flip cards */
.countdown::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  height: 72px;
  background: radial-gradient(ellipse, rgba(201,169,110,0.22) 0%, transparent 68%);
  animation: countdownGlow 3.5s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}
@keyframes countdownGlow {
  from { opacity: 0.45; transform: translateX(-50%) scaleX(0.80); }
  to   { opacity: 1.00; transform: translateX(-50%) scaleX(1.20); }
}

.countdown-block {
  text-align: center;
  min-width: 70px;
}
.countdown-block .label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.5rem;
  /* Expands from tight/dim into full gold after the hero entrance finishes */
  animation: labelGoldIn 1.8s cubic-bezier(0.16, 1, 0.3, 1) 3.2s both;
}
@keyframes labelGoldIn {
  0%   { opacity: 0; letter-spacing: 0.10em; }
  100% { opacity: 1; letter-spacing: 0.20em; }
}

#countdown-celebration {
  margin-top: 2rem;
  text-align: center;
}
.countdown-celebration-msg {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--gold);
  letter-spacing: 0.12em;
  animation: celebFadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes celebFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── Flip card countdown ── */
.flip-num {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--sage);
  line-height: 1;
  display: inline-block;
}
.flip-card {
  position: relative;
  width: 72px;
  height: 3rem;
  border-radius: 6px;
  box-shadow:
    0 4px 10px rgba(0,0,0,0.12),
    0 1px 3px  rgba(0,0,0,0.08),
    inset 0 -2px 0 rgba(201,169,110,0.20);
  overflow: hidden;
}
.flip-top,
.flip-bottom,
.flip-anim-top,
.flip-anim-bot {
  position: absolute;
  top: 0; left: 0; right: 0;
  width: 100%;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 6px;
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--sage);
  background: #fdf9f3;
}
.flip-top    { z-index: 1; }
.flip-bottom { display: none; }
.flip-anim-bot { display: none; }
/* Overlay carries the old value — wipes away top-to-bottom, exposing new value beneath */
.flip-anim-top {
  z-index: 2;
  visibility: hidden;
  will-change: clip-path;
}
@keyframes flipWipeOut {
  from { clip-path: inset(0% 0 0 0); }
  to   { clip-path: inset(100% 0 0 0); }
}

/* ── Sections ── */
section { padding: 6rem 2rem; position: relative; }

/* Subliminal colour-temperature tint — set via JS IntersectionObserver */
/* No transition: values are 0.03–0.05 opacity, imperceptible; instant swap avoids 1.2s of background-paint per section */
section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--section-tint, transparent);
  pointer-events: none;
  z-index: 0;
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1; /* sits above the ::before tint layer */
}

.section-tag {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}
.section-tag::before,
.section-tag::after {
  content: '';
  flex: 0 0 32px;
  height: 1px;
  background: var(--gold);
  opacity: 0.55;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--dark);
}
section h2 {
  color: var(--gold);
  /* Wider gradient with a bright champagne highlight at the centre — this is
     what the sweep animation moves through the text */
  background: linear-gradient(
    135deg,
    #9a7840 0%,
    #c9a96e 28%,
    #f0d898 50%,
    #c9a96e 72%,
    #9a7840 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 350% auto;
  background-position: -30% center; /* settled resting state */
}

@keyframes h2GoldEntrance {
  0%    { background-position: 100% center; }
  55%   { background-position: -30% center; }
  100%  { background-position: -30% center; }
}
/* Class is added by JS *after* the opacity reveal transition finishes.
   9s linear matches the hero nameShimmer timing — runs once then holds. */
section h2.heading-swept {
  animation: h2GoldEntrance 3s linear forwards;
}
section h2::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--gold);
  margin: 0.7rem auto 0;
  opacity: 0.6;
}

.section-lead {
  font-size: 1.1rem;
  font-style: italic;
  color: #666;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

/* ── RSVP Deadline Badge ── */
.deadline-badge {
  display: block;
  width: fit-content;
  margin: 0.75rem auto 0;
  padding: 0.18em 0.75em;
  border-radius: 100px;
  font-size: 0.68rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.deadline-badge--relaxed {
  background: rgba(138,158,126,0.14);
  color: var(--sage);
  border: 1px solid rgba(138,158,126,0.35);
}
.deadline-badge--urgent {
  background: rgba(201,169,110,0.14);
  color: #a07830;
  border: 1px solid rgba(201,169,110,0.45);
}
.deadline-badge--today {
  background: rgba(201,169,110,0.2);
  color: #a07830;
  border: 1px solid var(--gold);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── RSVP closed state ── */
#rsvp.rsvp-closed #rsvp-form,
#rsvp.rsvp-closed .rsvp-lookup-link {
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

/* ── Below-fold rendering optimisation ── */
#story, #party, #details, #schedule, #gallery, #rsvp, #wishes, #registry {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* ── Story Timeline ── */
#story { background: white; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  text-align: left;
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 2px;
  height: calc(var(--line-progress, 0%) * 1);
  background: linear-gradient(to bottom, var(--light-sage), var(--gold), var(--light-sage));
  transition: height 0.1s linear;
  box-shadow:
    0 0 4px  rgba(201,169,110,0.55),
    0 0 12px rgba(201,169,110,0.30),
    0 0 28px rgba(201,169,110,0.15);
}
@keyframes dotPop {
  0%   { transform: scale(0); opacity: 0; }
  65%  { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}
@keyframes dotRing {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(2.2); opacity: 0;   }
  100% { transform: scale(2.2); opacity: 0;   }
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem; top: 0.4rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--gold);
  transform: scale(0);
  opacity: 0;
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: -2.35rem; top: 0.4rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(201,169,110,0.5);
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}
.timeline-item.is-visible::before {
  animation: dotPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.timeline-item.is-visible::after {
  animation: dotRing 1.2s ease 0.45s 1 forwards;
}
.timeline-year {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.timeline-item h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.timeline-item p { color: #666; }

/* ── Event Details ── */
#details { background: white; }

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
}

.detail-card {
  background: rgba(250,246,240,0.78);
  border: 1px solid rgba(201,169,110,0.30);
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 1.8rem 2rem 1.8rem 1.6rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.detail-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 0.5rem;
  color: var(--sage);
}
.detail-card p { font-size: 0.9rem; color: #666; line-height: 1.6; }

/* ── Gallery ── */
#gallery { background: white; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

@keyframes skeletonShimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.gallery-placeholder {
  aspect-ratio: 4/3;
  background: linear-gradient(90deg, #ede5da 25%, #f5ede3 50%, #ede5da 75%);
  background-size: 800px 100%;
  animation: skeletonShimmer 2.2s ease-in-out infinite;
  border-radius: 8px;
  border: 1px solid rgba(201,169,110,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.gallery-placeholder::before {
  content: '✦';
  font-size: 1.1rem;
  color: rgba(201,169,110,0.35);
}
.gallery-placeholder::after {
  content: 'Photos Coming Soon';
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(138,158,126,0.5);
}

.gallery-photo {
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(201,169,110,0.2);
  margin: 0;
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.gallery-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26,16,8,0.72) 0%,
    rgba(26,16,8,0.25) 40%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.gallery-photo:hover::after { opacity: 1; }

.gallery-photo figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 0.8rem 1rem;
  color: white;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  z-index: 2;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s;
}

.gallery-photo:hover figcaption {
  opacity: 1;
  transform: none;
}

.gallery-grid:hover .gallery-photo:not(:hover) img {
  /* opacity-only — composite layer, zero paint (was filter:blur which forced repaint on all N−1 images) */
  opacity: 0.65;
  transform: scale(0.99);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.detail-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  text-decoration: none;
  border-bottom: 1px solid var(--light-sage);
  transition: color 0.2s, border-color 0.2s;
}
.detail-link:hover { color: var(--gold); border-color: var(--gold); }

.detail-card-map {
  display: block;
  width: 100%;
  height: 190px;
  border: none;
  border-top: 1px solid rgba(201,169,110,0.18);
  border-radius: 0 0 8px 0;
  margin-top: 1.25rem;
}

/* ── RSVP ── */
#rsvp { background: var(--cream); }

.rsvp-form {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: left;
}

.field-float {
  position: relative;
  margin-bottom: 0;
}
.field-float input,
.field-float select,
.field-float textarea,
.form-group.field-float input,
.form-group.field-float select,
.form-group.field-float textarea {
  width: 100%;
  padding: 1.5rem 1rem 0.45rem;
  border: 1px solid var(--light-sage);
  border-radius: 6px;
  background: white;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--dark);
  transition: border-color 0.2s;
}
.field-float input:focus,
.field-float select:focus,
.field-float textarea:focus {
  outline: none;
  border-color: var(--sage);
}
.field-float label {
  display: block;
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #999;
  pointer-events: none;
  transition: transform 0.18s ease, font-size 0.18s ease, color 0.18s ease, letter-spacing 0.18s ease;
  transform-origin: left top;
  white-space: nowrap;
}
.field-float input:focus + label,
.field-float input:not(:placeholder-shown) + label,
.field-float textarea:focus + label,
.field-float textarea:not(:placeholder-shown) + label,
.field-float select.has-value + label {
  transform: translateY(-0.75rem) scale(0.78);
  color: var(--gold);
  letter-spacing: 0.18em;
}
.field-float::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.field-float:focus-within::after {
  transform: scaleX(1);
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.4rem;
}
/* Floating-label fields: restore gray placeholder color (overrides .form-group label above) */
.form-group.field-float label { color: #999; letter-spacing: 0.12em; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--light-sage);
  border-radius: 6px;
  background: white;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--dark);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sage);
}

@keyframes rippleExpand {
  from { transform: scale(0); opacity: 0.5; }
  to   { transform: scale(4); opacity: 0; }
}
.ripple-circle {
  position: absolute;
  border-radius: 50%;
  width: 60px; height: 60px;
  pointer-events: none;
  animation: rippleExpand 0.6s ease-out forwards;
  background: rgba(255,255,255,0.4);
}
.ripple-circle.ripple-outline {
  background: rgba(138,158,126,0.25);
}

.btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: linear-gradient(135deg, var(--sage), #9ab08a, #c9a96e, #b8924f, var(--sage));
  background-size: 300% 300%;
  color: white;
  border: none;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow 0.4s ease, transform 0.15s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  animation: btnGoldShift 5s ease infinite;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.28) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.btn:hover::before { left: 150%; }
.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0  8px rgba(201,169,110,0.50),
    0 0 20px rgba(201,169,110,0.30),
    0 0 40px rgba(201,169,110,0.15);
}
.btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 0 6px rgba(201,169,110,0.25);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--sage);
  color: var(--sage);
  transition: box-shadow 0.4s ease, border-color 0.3s ease, transform 0.15s;
}
.btn-outline:hover {
  background: transparent;
  color: var(--sage);
  border-color: var(--gold);
  box-shadow:
    0 0 12px rgba(201,169,110,0.40),
    0 0 28px rgba(201,169,110,0.20);
}
@keyframes btnGoldShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.btn-success {
  background: #7a8e6e !important;
  animation: none !important;
}
.btn--loading {
  pointer-events: none;
  color: transparent !important;
  position: relative;
}
.btn--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpinner 0.65s linear infinite;
}
@keyframes btnSpinner {
  to { transform: rotate(360deg); }
}

/* ── RSVP attendance choice buttons ── */
.attendance-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  transition: grid-template-columns 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              gap 0.35s ease;
}
.attendance-choice.accepted { grid-template-columns: 1fr 0fr; gap: 0; }
.attendance-choice.declined { grid-template-columns: 0fr 1fr; gap: 0; }
.attendance-choice.accepted .rsvp-decline-btn,
.attendance-choice.declined .rsvp-accept-btn { padding-left: 0; padding-right: 0; opacity: 0; }

.rsvp-choice-btn {
  overflow: hidden;
  white-space: nowrap;
  padding: 0.9rem 1.5rem;
  border-radius: 6px;
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s ease, box-shadow 0.3s ease, transform 0.15s,
              padding-left 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              padding-right 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}
.rsvp-accept-btn {
  background: linear-gradient(135deg, #c9a96e, #b8924f);
  color: white;
}
.rsvp-accept-btn:hover {
  box-shadow: 0 0 16px rgba(201,169,110,0.45);
  transform: translateY(-1px);
}
.rsvp-decline-btn {
  background: transparent;
  border-color: var(--light-sage);
  color: var(--dark);
}
.rsvp-decline-btn:hover { border-color: var(--sage); }
.rsvp-choice-btn.active {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}
.attendance-choice.declined .rsvp-decline-btn {
  background: var(--sage);
  color: white;
  border-color: var(--sage);
}

/* ── Guests choice (same grid animation pattern) ── */
.guests-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  transition: grid-template-columns 0.45s cubic-bezier(0.4, 0, 0.2, 1), gap 0.35s ease;
}
.guests-choice.solo     { grid-template-columns: 1fr 0fr; gap: 0; }
.guests-choice.plus-one { grid-template-columns: 0fr 1fr; gap: 0; }
.guests-choice.solo     #btn-plus-one,
.guests-choice.plus-one #btn-solo { padding-left: 0; padding-right: 0; opacity: 0; }

#btn-solo, #btn-plus-one {
  background: white;
  border-color: var(--light-sage);
  color: var(--dark);
}
.guests-choice.solo #btn-solo {
  background: var(--sage);
  color: white;
  border-color: var(--sage);
}
.guests-choice.plus-one #btn-plus-one {
  background: linear-gradient(135deg, #c9a96e, #b8924f);
  color: white;
  border-color: transparent;
}

.choice-question {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 0.5rem;
}

/* ── Attending fields reveal ── */
.attending-fields-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease 0.15s;
}
.attending-fields-wrap.visible { max-height: 2000px; opacity: 1; }

/* ── Submit wrap reveal ── */
.rsvp-submit-wrap {
  display: flex;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease 0.1s;
}
.rsvp-submit-wrap .btn { width: 100%; }
.rsvp-submit-wrap.visible { max-height: 100px; opacity: 1; }

/* ── Registry ── */
#registry { background: var(--cream); }

.registry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
  margin-top: 2rem;
}

.registry-card {
  background:
    rgba(250,246,240,0.78) padding-box,
    linear-gradient(135deg,
      rgba(201,169,110,0.30),
      rgba(212,224,205,0.15),
      rgba(201,169,110,0.30)
    ) border-box;
  border: 1px solid transparent;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 1.8rem 2rem 1.8rem 1.6rem;
  text-align: left;
  text-decoration: none;
  color: var(--dark);
  transition: box-shadow 0.25s, transform 0.25s;
  min-width: 180px;
  position: relative;
  overflow: hidden;
}
.registry-card::before {
  content: '→';
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translate(12px, -50%);
  opacity: 0;
  color: var(--gold);
  font-size: 1.1rem;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.registry-card:hover::before {
  opacity: 1;
  transform: translate(0, -50%);
}
.registry-card:hover {
  transform: translateX(4px) translateY(-1px);
  box-shadow:
    0 8px 32px rgba(201,169,110,0.22),
    -3px 0 0 var(--gold),
    0 0 24px rgba(201,169,110,0.18);
}
.registry-card .store-name { font-family: var(--font-serif); font-size: 1.2rem; color: var(--sage); letter-spacing: 0.04em; }
.registry-card .store-desc { font-size: 0.82rem; color: #777; margin-top: 0.5rem; }
.store-cta {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.8rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.registry-card:hover .store-cta { opacity: 1; }

/* ── Nav Backdrop ── */
#nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44,44,44,0.28);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#nav-backdrop.active {
  /* backdrop-filter removed — 2px blur was imperceptible and added an unnecessary compositor layer */
}

/* ── Guest Book / Wishes Wall ── */
#wishes { background: white; }

#wishes-form {
  max-width: 600px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#wishes-form input,
#wishes-form textarea {
  width: 100%;
  padding: 1.5rem 1rem 0.45rem;
  border: 1.5px solid var(--light-sage);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  background: white;
  color: var(--dark);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-sizing: border-box;
}
#wishes-form input:focus,
#wishes-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fffef9;
  box-shadow: inset 0 2px 8px rgba(201,169,110,0.07);
}
#wishes-form textarea { min-height: 110px; resize: vertical; }
#wishes-form .btn { align-self: center; }

#wishes-status {
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.5rem;
  min-height: 1.4em;
  color: var(--sage);
}
#wishes-status.error { color: #c0392b; }

#wishes-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.wish-card {
  background:
    rgba(255,255,255,0.78) padding-box,
    linear-gradient(135deg,
      rgba(201,169,110,0.30),
      rgba(212,224,205,0.20),
      rgba(201,169,110,0.30)
    ) border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.2rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  position: relative;
  text-align: left;
  transition: box-shadow 0.35s ease, transform 0.25s ease;
}
.wish-card::before {
  content: '\201C';
  position: absolute;
  top: -0.3rem;
  left: 1.1rem;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
  pointer-events: none;
}
.wish-card-message {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
  padding-top: 0.8rem;
}
.wish-card-name {
  margin-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

#wishes-load-more {
  display: block;
  margin: 2rem auto 0;
}

/* ── Footer ── */
footer {
  background: var(--dark);
  color: #aaa;
  text-align: center;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}
footer .monogram {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 1;
}
footer p { font-size: 0.85rem; letter-spacing: 0.05em; position: relative; z-index: 1; }

footer::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,169,110,0.09) 0%, transparent 65%);
  pointer-events: none;
}
footer::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 12%  22%, rgba(201,169,110,0.55) 0%, transparent 100%),
    radial-gradient(1px 1px at 88%  15%, rgba(255,248,220,0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 35% 68%, rgba(201,169,110,0.40) 0%, transparent 100%),
    radial-gradient(1px 1px at 65%  55%, rgba(255,248,220,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 78%  82%, rgba(201,169,110,0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 20% 88%, rgba(255,248,220,0.38) 0%, transparent 100%),
    radial-gradient(1px 1px at 50%  38%, rgba(201,169,110,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 7%   60%, rgba(255,248,220,0.30) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 92% 72%, rgba(201,169,110,0.42) 0%, transparent 100%);
  pointer-events: none;
}

/* ── Wedding Party ── */
#party { background: var(--cream); }

.party-columns {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  margin-top: 3rem;
}

.party-side { flex: 1; }

.party-side-label {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--sage);
  margin-bottom: 1.5rem;
  text-align: center;
  letter-spacing: 0.05em;
}

.party-divider-vert {
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  align-self: stretch;
  min-height: 300px;
}

.party-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.party-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  transform-style: preserve-3d;
}

.party-photo-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.5s ease;
}

.party-photo-wrap img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--light-sage);
  transition: border-color 0.35s ease, filter 0.4s ease;
  display: block;
}

.party-initials {
  display: none;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--light-sage), #e8d5bc);
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--sage);
  border: 3px solid var(--light-sage);
  transition: border-color 0.35s ease;
}

.party-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--dark);
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

/* ── Party card hover ── */
.party-card:hover .party-photo-wrap {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px var(--gold), 0 10px 36px rgba(201,169,110,0.45);
}
.party-card:hover .party-photo-wrap img,
.party-card:hover .party-initials {
  border-color: var(--gold);
  filter: saturate(1.15) brightness(1.05);
}
.party-card:hover .party-name {
  color: var(--gold);
  letter-spacing: 0.06em;
}

.party-role {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--gold);
}

/* ── Day-of Schedule ── */
#schedule { background: var(--cream); }

.schedule-timeline .timeline-year {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sage);
  letter-spacing: 0;
}

/* ── Add to Calendar buttons ── */
.calendar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
}

/* ── Form status message ── */
.form-status {
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.5rem;
  min-height: 1.4em;
  color: var(--sage);
}
.form-status.error { color: #c0392b; }
@keyframes statusFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.form-status.confirmed {
  font-size: 1rem;
  font-weight: 600;
  animation: statusFadeIn 0.4s ease both;
}

/* ── Confetti canvas ── */
#confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

/* ── Gold shimmer utility ── */
@keyframes goldSweep {
  0%, 20%  { background-position: 200% center; }
  55%, 100% { background-position: -100% center; }
}
.shimmer-gold {
  background: linear-gradient(105deg, var(--gold) 30%, rgba(255,235,180,0.95) 50%, var(--gold) 70%);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldSweep 6s linear infinite;
}

.hero > *:not(canvas) { position: relative; z-index: 1; }

/* ── Hero name — warm gold with shimmer sweep ── */
.hero h1 .name-text {
  display: inline-block;
  background: linear-gradient(105deg,
    #b8924f 0%, #b8924f 25%,
    #c9a96e 37%,
    rgba(255,235,180,0.95) 50%,
    #c9a96e 63%,
    #b8924f 75%, #b8924f 100%
  );
  background-size: 400% auto;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: nameShimmer 9s linear infinite;
}

.hero h1 .name-text:nth-child(3) {
  animation-delay: 4.5s;
  animation-fill-mode: backwards;
}

@keyframes nameShimmer {
  0%    { background-position: 100% center; }
  55%   { background-position: 0% center; }
  100%  { background-position: 0% center; }
}

/* ── Hero entrance animations ── */
@keyframes heroSlideDown {
  from { opacity: 0; transform: translateY(-22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: none; }
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes heroTitleEntrance {
  from { opacity: 0; transform: translateY(32px) scaleX(0.96); }
  to   { opacity: 1; transform: translateY(0)    scaleX(1); }
}

.hero h1         { animation: heroTitleEntrance 2.0s cubic-bezier(0.16, 1, 0.3, 1) 0.1s  both; }
.hero-eyebrow    { animation: heroSlideDown 1.1s  cubic-bezier(0.16, 1, 0.3, 1) 1.0s  both; }
.hero .divider   { animation: heroFadeIn    1.0s  ease                           1.4s  both; }
.hero .hero-date { animation: heroSlideUp   1.1s  cubic-bezier(0.16, 1, 0.3, 1) 1.6s  both; }
.hero .countdown { animation: heroSlideUp   1.1s  cubic-bezier(0.16, 1, 0.3, 1) 1.85s both; }
nav              { animation: heroSlideDown 1.0s  cubic-bezier(0.16, 1, 0.3, 1) 2.3s  both; }

/* ── Scroll Reveal System ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.section-title {
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.from-left  { transform: translateX(-44px); }
.reveal.from-right { transform: translateX(44px); }
.reveal.from-scale { transform: scale(0.88) translateY(20px); }

.reveal.flip-in-3d {
  transform: perspective(500px) rotateY(90deg);
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.scale-bloom {
  transform: scale(0.95);
  opacity: 0;
  box-shadow: 0 0 0 transparent;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.scale-bloom.is-visible {
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

.reveal.rise-spring {
  transform: translateY(60px);
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-d1 { transition-delay: 0.07s; }
.reveal-d2 { transition-delay: 0.14s; }
.reveal-d3 { transition-delay: 0.21s; }
.reveal-d4 { transition-delay: 0.28s; }
.reveal-d5 { transition-delay: 0.35s; }
.reveal-d6 { transition-delay: 0.42s; }
.reveal-d7 { transition-delay: 0.49s; }
.reveal-d8 { transition-delay: 0.56s; }

/* Section wipe entrance — negative left/right insets allow timeline dots and
   from-left/from-right reveal overflow to show without clipping */
section[id] > .section-inner {
  clip-path: inset(0 -3rem 0% -3rem);
  transition: clip-path 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-wipe-hidden {
  clip-path: inset(0 -3rem 100% -3rem);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.from-left, .reveal.from-scale,
  .reveal.from-right, .reveal.flip-in-3d, .reveal.scale-bloom, .reveal.rise-spring {
    opacity: 1; transform: none; transition: none; box-shadow: none;
  }
  section[id] > .section-inner { clip-path: none !important; transition: none; }
  .hero-eyebrow, .hero h1, .hero .divider, .hero .hero-date, .hero .countdown, nav { animation: none; }
  .countdown::before { animation: none; opacity: 0.6; }
  .countdown-block .label { animation: none; opacity: 1; letter-spacing: 0.2em; }
  .shimmer-gold { animation: none; }
  section h2.heading-swept { animation: none; background-position: -30% center; }
  .detail-card h3 { animation: none !important; }
  .ornament-path { transition: none; stroke-dashoffset: 0; }
  .ornament-center { opacity: 1; transition: none; animation: none; }

  .gallery-placeholder { animation: none; }
  .timeline-item::before { transform: scale(1); opacity: 1; animation: none; }
  .btn { animation: none; background-size: 100% 100%; }
  .hero-spotlight { animation: none; }
  .hero h1 .name-text { animation: none; background-size: 100% auto; }
  .hero::after { animation: none; }
  body::before { display: none; }
}

/* ── 3D card tilt ── */
.registry-card {
  will-change: transform;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.registry-card.tilt-active {
  transition: transform 0.08s linear, box-shadow 0.08s linear;
}

.detail-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.detail-card:hover {
  transform: translateX(4px) translateY(-1px);
  box-shadow:
    0 8px 32px rgba(201,169,110,0.22),
    -3px 0 0 var(--gold),
    0 0 24px rgba(201,169,110,0.18);
}

.wish-card:hover {
  box-shadow:
    0 4px 20px rgba(0,0,0,0.07),
    0 0  28px  rgba(201,169,110,0.20),
    inset 0 1px 0 rgba(255,255,255,0.8);
  transform: translateY(-3px);
}
/* ── Wish submitted state ── */
.wish-submitted-card {
  max-width: 600px;
  margin: 2.5rem auto 0;
  text-align: left;
  background:
    rgba(255,255,255,0.78) padding-box,
    linear-gradient(135deg,
      rgba(201,169,110,0.30),
      rgba(212,224,205,0.20),
      rgba(201,169,110,0.30)
    ) border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 1.8rem 1.8rem 1.4rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  position: relative;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.25,0.46,0.45,0.94) 0.15s,
              transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94) 0.15s;
}
.wish-submitted-card::before {
  content: '\201C';
  position: absolute;
  top: -0.3rem; left: 1.1rem;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
  pointer-events: none;
}
.wish-submitted-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.wish-submitted-note {
  margin-top: 0.8rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}
.wish-already-sent {
  max-width: 600px;
  margin: 2.5rem auto 0;
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

@keyframes wishArrive {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes wishGlow {
  0%   { box-shadow: 0 0 0 0   rgba(201,169,110,0),    0 2px 16px rgba(0,0,0,0.06); }
  25%  { box-shadow: 0 0 0 5px rgba(201,169,110,0.24), 0 4px 24px rgba(201,169,110,0.16); }
  100% { box-shadow: 0 0 0 0   rgba(201,169,110,0),    0 2px 16px rgba(0,0,0,0.06); }
}
.wish-card--entering {
  animation: wishArrive 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--wish-delay, 0s) both;
}
.wish-card--new {
  animation:
    wishArrive 1.0s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s   both,
    wishGlow   2.2s ease-out                              1.0s forwards;
}
.party-card {
  will-change: transform;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.party-card.tilt-active {
  transition: transform 0.08s linear;
}

/* ── Section ornaments ── */

/* Match each ornament's bg to its neighboring section colors */
header    + .section-ornament { background: linear-gradient(to bottom, var(--cream),  white); }
#story    + .section-ornament { background: linear-gradient(to bottom, white,         var(--cream)); }
#party    + .section-ornament { background: linear-gradient(to bottom, var(--cream),  white); }
#details  + .section-ornament { background: linear-gradient(to bottom, white,         var(--cream)); }
#schedule + .section-ornament { background: linear-gradient(to bottom, var(--cream),  white); }
#gallery  + .section-ornament { background: linear-gradient(to bottom, white,         var(--cream)); }
#rsvp     + .section-ornament { background: linear-gradient(to bottom, var(--cream),  white); }
#wishes   + .section-ornament { background: linear-gradient(to bottom, white,         var(--cream)); }
#registry + .section-ornament { background: linear-gradient(to bottom, var(--cream),  white); }

.section-ornament {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 56px;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.section-ornament svg {
  width: 440px;
  max-width: 90vw;
  overflow: visible;
}
.ornament-path {
  stroke: var(--gold);
  stroke-width: 1.2;
  fill: none;
  stroke-dasharray: var(--path-length, 400);
  stroke-dashoffset: var(--path-length, 400);
  transition: stroke-dashoffset 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-ornament.is-visible .ornament-path {
  stroke-dashoffset: 0;
  transition-delay: 0.4s;
}
.ornament-center {
  fill: var(--gold);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.section-ornament.is-visible .ornament-center {
  opacity: 1;
  transition-delay: 1.2s;
  animation: ornamentGlow 3s ease-in-out 1.4s infinite;
}
@keyframes ornamentGlow {
  0%, 100% { opacity: 0.70; }
  50%       { opacity: 1.00; }
}
.divider-flower {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Back to top ── */
#back-to-top {
  position: fixed;
  bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  right: 2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(138,158,126,0.88);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
  pointer-events: none;
  z-index: 90;
  /* backdrop-filter removed — button is already opaque enough at 0.88 alpha; no compositor layer needed */
}
#back-to-top.visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
#back-to-top:hover { background: var(--sage); }
#back-to-top svg { width: 16px; height: 16px; }

/* ── Nav hamburger toggle ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s, background 0.2s;
}
nav.scrolled .nav-toggle span { background: var(--dark); }

/* ── Responsive ── */
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  /* Nav */
  nav { padding: 0.9rem 1.5rem; }
  .nav-toggle { display: flex; }

  nav ul {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: rgba(250,246,240,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--light-sage);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    padding: 0.5rem 0 1.2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  }

  nav.nav-open ul {
    max-height: 600px;
    opacity: 1;
    pointer-events: auto;
  }

  nav ul li {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  nav.nav-open ul li              { opacity: 1; transform: translateY(0); }
  nav.nav-open ul li:nth-child(1) { transition-delay: 0.06s; }
  nav.nav-open ul li:nth-child(2) { transition-delay: 0.11s; }
  nav.nav-open ul li:nth-child(3) { transition-delay: 0.16s; }
  nav.nav-open ul li:nth-child(4) { transition-delay: 0.21s; }
  nav.nav-open ul li:nth-child(5) { transition-delay: 0.26s; }
  nav.nav-open ul li:nth-child(6) { transition-delay: 0.31s; }
  nav.nav-open ul li:nth-child(7) { transition-delay: 0.36s; }
  nav.nav-open ul li:nth-child(8) { transition-delay: 0.41s; }

  nav ul li a {
    display: block;
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    width: 100%;
    text-align: center;
  }

  /* Hamburger → X */
  nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Hero */
  .hero { padding: 5.5rem 1.5rem 3rem; }

  /* Countdown */
  .countdown { gap: 0.7rem; }
  .flip-card { width: 62px; }
  .flip-top, .flip-anim-top { font-size: 1.9rem; }

  /* Sections */
  section { padding: 4rem 1.5rem; }
  .section-lead { margin-bottom: 2rem; }

  /* Timeline */
  .timeline { padding-left: 1.5rem; }
  .timeline-item::before { left: calc(-1.5rem - 5px); }

  /* Details grid — single column, cards centered */
  .details-grid { grid-template-columns: 1fr; }
  .detail-card { text-align: center; }

  /* Party */
  .party-columns { flex-direction: column; gap: 2rem; align-items: stretch; }
  .party-side { width: 100%; }
  .party-divider-vert { display: none; }
  .party-grid { grid-template-columns: repeat(2, 1fr); justify-items: center; }

  /* RSVP */
  .rsvp-form { padding: 0 0.25rem; }
  .rsvp-form .btn { width: 100%; text-align: center; }
  .rsvp-choice-btn { padding: 0.75rem 0.6rem; font-size: 0.9rem; }

  /* Calendar */
  .calendar-btns { flex-direction: column; align-items: center; }

  /* Back to top — higher z-index than RSVP pill (95) so it stays tappable if they share the same bottom row */
  #back-to-top { bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); right: 1.5rem; z-index: 97; }

  /* Nav backdrop */
  #nav-backdrop { display: block; }
  #nav-backdrop.active { opacity: 1; pointer-events: auto; }

  /* Wishes */
  #wishes-wall { grid-template-columns: 1fr; }
  #wishes-form .btn { width: 100%; }

  /* Registry */
  .registry-links { flex-direction: column; align-items: stretch; }
  .registry-card { min-width: unset; width: 100%; }
}

/* ── Landscape phone: tighter hero so h1 clears the nav ── */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { padding: 4.5rem 1.5rem 1.5rem; min-height: 100svh; }
  .hero h1 { font-size: clamp(2.4rem, 6.5vw, 3.9rem); }
  .countdown { margin-top: 1rem; }
}

/* ── Sticky RSVP pill (mobile only) ── */
#rsvp-pill {
  display: none;
}
@media (max-width: 700px) {
  #rsvp-pill {
    display: block;
    position: fixed;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 2rem));
    z-index: 95;
    background: linear-gradient(135deg, #c9a96e 0%, #b8924f 100%);
    color: white;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    padding: 0.75rem 2rem;
    border-radius: 999px;
    box-shadow: 0 6px 24px rgba(201,169,110,0.45);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
  }
  #rsvp-pill.pill-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ── Gate Overlay ── */

/* Allows CSS to interpolate --iris-r inside radial-gradient() stops */
@property --iris-r {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

@keyframes gateCardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.88); }
  to   { opacity: 1; transform: none; }
}
@keyframes gateCanvasIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gateNameRise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes gateAmpIn {
  from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  to   { opacity: 1; transform: none; }
}
@keyframes gateOrnDraw {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 0.45; transform: scaleX(1); }
}
@keyframes gateDotIn {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 0.75; transform: none; }
}
@keyframes gateChildIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes gateScaleThrough {
  0%   { opacity: 1; transform: scale(1);    filter: blur(0px); }
  100% { opacity: 0; transform: scale(1.30); filter: blur(10px); }
}
@keyframes gateCardOut {
  0%   { opacity: 1;   transform: none;                          filter: blur(0)   brightness(1);   }
  25%  { opacity: 1;   transform: scale(1.03) translateY(-4px);  filter: blur(0)   brightness(2.5);  }
  100% { opacity: 0;   transform: scale(1.04) translateY(-8px);  filter: blur(6px) brightness(3.5);  }
}
@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  18%       { transform: translateX(-11px); }
  36%       { transform: translateX(11px); }
  54%       { transform: translateX(-7px); }
  72%       { transform: translateX(7px); }
  90%       { transform: translateX(-3px); }
}
@keyframes gateNameShimmer {
  0%   { background-position: 100% center; }
  55%  { background-position: 0% center; }
  100% { background-position: 0% center; }
}
@keyframes gateHaloPulse {
  from { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 0.9; transform: translate(-50%, -50%) scale(1.14); }
}
@keyframes gateRingPulse {
  from { opacity: 0.25; transform: scale(0.985); }
  to   { opacity: 0.70; transform: scale(1.010); }
}

@keyframes gateSpotlight {
  from { transform: rotate(-15deg); opacity: 0.8; }
  to   { transform: rotate(18deg);  opacity: 1;   }
}

#gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #8a9e7e;
  overflow: hidden;
  /* Safe-area padding so the card clears notches/home bars on all iPhones */
  padding:
    max(1.5rem, env(safe-area-inset-top,    0px))
    max(1.25rem, env(safe-area-inset-right,  0px))
    max(1.5rem, env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left,   0px));
}

/* Scale-through — overlay expands and dissolves */
#gate-overlay.gate-unlocking {
  animation: gateScaleThrough 1.4s 0.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}
#gate-overlay.gate-unlocking #gate-card {
  animation: gateCardOut 0.60s ease-in forwards;
}

/* Golden bloom — expands from center on unlock, rendered above overlay */
#gate-bloom {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 200vmax;
  height: 200vmax;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  background: radial-gradient(circle at center,
    rgba(255,252,235,1)     0%,
    rgba(255,245,200,0.98) 7%,
    rgba(240,210,150,0.82) 22%,
    rgba(210,175,110,0.48) 48%,
    rgba(180,140,60,0.14)  70%,
    transparent            86%
  );
}

#gate-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: gateCanvasIn 2.2s ease-out 0.2s both;
}

.gate-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: conic-gradient(
    from 210deg at 60% 8%,
    rgba(255,248,225,0.14) 0deg,
    rgba(245,228,185,0.09) 22deg,
    rgba(212,224,205,0.05) 40deg,
    rgba(200,185,155,0.02) 65deg,
    transparent 95deg,
    transparent 360deg
  );
  animation: gateSpotlight 22s ease-in-out infinite alternate;
  transform-origin: 60% 8%;
}


#gate-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.97);
  border-radius: 22px;
  padding: 3.6rem 3.2rem 2.8rem;
  width: min(440px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow:
    0 0 0 1.5px rgba(201,169,110,0.40),
    0 14px 60px rgba(0,0,0,0.50),
    0 0  100px rgba(201,169,110,0.18),
    0 0  200px rgba(180,140,60,0.07),
    inset 0 1px 0 rgba(255,255,255,1.0);
  animation: gateCardIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
  will-change: transform, opacity;
}

#gate-card::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(201,169,110,0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  animation: gateHaloPulse 7s ease-in-out infinite alternate;
}

#gate-card.gate-shake {
  animation: gateShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

#gate-card::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 34px;
  border: 1px solid rgba(201,169,110,0.18);
  pointer-events: none;
  z-index: -1;
  animation: gateRingPulse 4.5s ease-in-out infinite alternate;
}

.gate-monogram {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
  margin-bottom: 0.55rem;
}

.gate-monogram .gate-name {
  display: inline-block;
  background: linear-gradient(105deg,
    #b8924f 0%, #b8924f 25%,
    #c9a96e 37%,
    rgba(255,235,180,0.95) 50%,
    #c9a96e 63%,
    #b8924f 75%, #b8924f 100%
  );
  background-size: 400% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  will-change: transform, opacity;
  animation:
    gateNameRise    0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.15s both,
    gateNameShimmer 9s  linear                          3.5s  infinite;
}
.gate-monogram .gate-name:last-child {
  animation:
    gateNameRise    0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.38s both,
    gateNameShimmer 9s  linear                          8.0s  infinite;
}

.gate-monogram .gate-amp {
  display: inline-block;
  font-style: italic;
  color: var(--sage);
  will-change: transform, opacity;
  animation: gateAmpIn 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 1.27s both;
}

.gate-orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0.5rem 0 0.5rem;
}
.gate-orn-line {
  width: 50px;
  height: 1px;
  background: var(--gold);
  opacity: 0.45;
}
.gate-orn-line:first-child {
  transform-origin: right center;
  animation: gateOrnDraw 1.1s cubic-bezier(0.16, 1, 0.3, 1) 1.72s both;
}
.gate-orn-line:last-child {
  transform-origin: left center;
  animation: gateOrnDraw 1.1s cubic-bezier(0.16, 1, 0.3, 1) 1.72s both;
}
.gate-orn-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.75;
  animation: gateDotIn 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 1.60s both;
}

.gate-date {
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
  text-align: center;
  animation: gateChildIn 1.0s cubic-bezier(0.16, 1, 0.3, 1) 2.0s both;
}

.gate-hint {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #aaa;
  text-align: center;
  line-height: 1.7;
  margin-bottom: 1.6rem;
  animation: gateChildIn 1.0s cubic-bezier(0.16, 1, 0.3, 1) 2.25s both;
}

.gate-input-wrap {
  width: 100%;
  margin-bottom: 0.9rem;
  animation: gateChildIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 2.55s both;
}

#gate-input {
  width: 100%;
  padding: 1.1rem 1.5rem;
  border: 1.5px solid rgba(201,169,110,0.38);
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 300;
  text-align: center;
  letter-spacing: 0.18em;
  color: var(--dark);
  outline: none;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
#gate-input::placeholder { color: rgba(44,44,44,0.28); letter-spacing: 0.08em; font-size: 0.95rem; }
#gate-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.16);
}

#gate-btn {
  width: 100%;
  padding: 0.92rem 1.5rem;
  background: linear-gradient(135deg, #c9a96e 0%, #b8924f 100%);
  color: white;
  border: none;
  border-radius: 11px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 5px 22px rgba(201,169,110,0.40);
  margin-bottom: 0.8rem;
  animation: gateChildIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 2.8s both;
}
#gate-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(201,169,110,0.50);
}
#gate-btn:active:not(:disabled) { transform: translateY(0); filter: brightness(0.97); }
#gate-btn:disabled { opacity: 0.6; cursor: default; }

#gate-error {
  font-size: 0.83rem;
  color: #c0392b;
  text-align: center;
  min-height: 1.25em;
  font-style: italic;
  line-height: 1.4;
}

@media (max-width: 500px) {
  #gate-card { padding: 2.8rem 1.8rem 2.2rem; }
  .gate-monogram { font-size: 2.1rem; }
  .gate-hint { font-size: 0.88rem; }
}

/* Landscape phones / short viewports — allow scrolling if card still doesn't fit */
@media (max-height: 680px) {
  #gate-overlay { overflow-y: auto; }

  #gate-card { padding: 2.2rem 2.4rem 1.8rem; }
  .gate-monogram { font-size: clamp(1.8rem, 5vw, 2.4rem); }
  .gate-orn { margin: 0.3rem 0; }
  .gate-date { margin-bottom: 1rem; }
  .gate-hint { margin-bottom: 1rem; }
  .gate-input-wrap { margin-bottom: 0.6rem; }
}
@media (max-height: 520px) {
  .gate-hint { display: none; }
}

/* ── Lock body scroll while gate is visible ── */
body.gate-visible { overflow: hidden; }

/* ── Suppress hero animations while gate is covering the page ── */
body.gate-visible .hero h1,
body.gate-visible .hero-eyebrow,
body.gate-visible .hero .divider,
body.gate-visible .hero .hero-date,
body.gate-visible .hero .countdown,
body.gate-visible nav {
  opacity: 0;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  #gate-card { animation: none; opacity: 1; }
  #gate-card::before { animation: none; }
  #gate-canvas { animation: none; opacity: 1; }
  .gate-monogram .gate-name { animation: none; color: var(--gold); background: none; -webkit-background-clip: unset; background-clip: unset; }
  .gate-monogram .gate-amp { animation: none; opacity: 1; }
  .gate-orn-line, .gate-orn-line:first-child, .gate-orn-line:last-child { animation: none; opacity: 0.45; transform: none; }
  .gate-orn-dot { animation: none; opacity: 0.75; transform: none; }
  .gate-date, .gate-hint, .gate-input-wrap, #gate-btn { animation: none; opacity: 1; transform: none; }
  .gate-petal { display: none; }
  .gate-spotlight { animation: none; }
  #gate-overlay.gate-unlocking,
  #gate-overlay[data-exit-style="iris"].gate-unlocking,
  #gate-overlay[data-exit-style="scale"].gate-unlocking { animation: none; display: none; }
  #gate-overlay.gate-unlocking #gate-card { animation: none; }
}

/* ── Gallery Lightbox ── */
.gallery-photo {
  cursor: zoom-in;
  overflow: hidden;
}
.gallery-photo img {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-photo:hover img { transform: scale(1.04); }

/* ── Lightbox ────────────────────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}
#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

/* Cinematic backdrop — separate element so controls sit above the blur */
#lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 5, 3, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
}

/* ── Image ── */
#lightbox-figure {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  max-width: min(90vw, 1280px);
  padding: 0 5.5rem;
  /* give thumbs room at bottom */
  margin-bottom: 5rem;
}
#lightbox-img-wrap {
  position: relative;
  /* Subtle gold-foil outer glow */
  filter: drop-shadow(0 0 1px rgba(201,169,110,0.25));
}
#lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(201,169,110,0.12),
    0 32px 100px rgba(0,0,0,0.95),
    0 8px 30px rgba(0,0,0,0.7);
  will-change: transform, opacity;
}

/* Entrance: bloom scale from 0.88 */
@keyframes lbImgBloom {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
/* Directional slide transitions */
@keyframes lbSlideInRight {
  from { opacity: 0; transform: translateX(48px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes lbSlideInLeft {
  from { opacity: 0; transform: translateX(-48px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes lbSlideOutLeft {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateX(-48px) scale(0.96); }
}
@keyframes lbSlideOutRight {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateX(48px) scale(0.96); }
}

#lightbox-img.lb-bloom       { animation: lbImgBloom    0.63s cubic-bezier(0.16, 1, 0.3, 1) both; }
#lightbox-img.lb-enter-right { animation: lbSlideInRight 0.34s cubic-bezier(0.16, 1, 0.3, 1) both; }
#lightbox-img.lb-enter-left  { animation: lbSlideInLeft  0.34s cubic-bezier(0.16, 1, 0.3, 1) both; }
#lightbox-img.lb-exit-left   { animation: lbSlideOutLeft  0.2s cubic-bezier(0.4, 0, 1, 1)    both; }
#lightbox-img.lb-exit-right  { animation: lbSlideOutRight 0.2s cubic-bezier(0.4, 0, 1, 1)    both; }
/* Keep plain lb-fade for reduced-motion and legacy callsites */
#lightbox-img.lb-fade { opacity: 0; }

/* ── Caption ── */
#lightbox-caption {
  color: rgba(245,232,208,0.62);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-align: center;
  min-height: 1.4em;
}

/* ── Counter "03 / 12" ── */
#lightbox-counter {
  position: fixed;
  top: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(245,232,208,0.42);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Thumbnail strip ── */
#lightbox-thumbs {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.45rem;
  max-width: 90vw;
  overflow-x: auto;
  padding: 0.4rem 0.5rem;
  scrollbar-width: none;
  transition: opacity 0.4s ease;
  /* frosted pill background */
  background: rgba(7,5,3,0.45);
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#lightbox-thumbs::-webkit-scrollbar { display: none; }

.lb-thumb {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid rgba(245,232,208,0.10);
  opacity: 0.45;
  transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
  background: rgba(40,30,20,0.6);
}
.lb-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.lb-thumb:hover {
  opacity: 0.8;
  transform: translateY(-3px);
}
.lb-thumb.active {
  border-color: var(--gold);
  opacity: 1;
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(201,169,110,0.35);
}

/* ── Buttons (close / prev / next) ── */
#lightbox-close,
#lightbox-prev,
#lightbox-next {
  position: fixed;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,232,208,0.06);
  border: 1px solid rgba(245,232,208,0.14);
  color: rgba(245,232,208,0.80);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, opacity 0.4s ease, transform 0.18s ease;
}
#lightbox-close {
  top: 1.2rem; right: 1.5rem;
  width: 2.8rem; height: 2.8rem;
}
#lightbox-close svg { width: 18px; height: 18px; }

#lightbox-prev,
#lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 3.6rem; height: 3.6rem;
}
#lightbox-prev svg,
#lightbox-next svg { width: 22px; height: 22px; }

#lightbox-prev { left: 1.5rem; }
#lightbox-next { right: 1.5rem; }

#lightbox-close:hover,
#lightbox-prev:hover,
#lightbox-next:hover {
  background: rgba(201,169,110,0.16);
  border-color: rgba(201,169,110,0.42);
  color: var(--champagne);
}
#lightbox-prev:active  { transform: translateY(-50%) translateX(-4px); }
#lightbox-next:active  { transform: translateY(-50%) translateX(4px); }
#lightbox-close:active { transform: scale(0.92); }

#lightbox-prev[hidden],
#lightbox-next[hidden] { display: none; }

/* ── Auto-hide controls after idle ── */
#lightbox.lb-idle #lightbox-close,
#lightbox.lb-idle #lightbox-prev,
#lightbox.lb-idle #lightbox-next,
#lightbox.lb-idle #lightbox-counter,
#lightbox.lb-idle #lightbox-thumbs {
  opacity: 0;
  pointer-events: none;
}

/* ── Mobile ── */
@media (max-width: 700px) {
  #lightbox-figure { padding: 0 3.5rem; max-width: 97vw; margin-bottom: 4.5rem; }
  #lightbox-prev { left: 0.4rem; }
  #lightbox-next { right: 0.4rem; }
  #lightbox-prev, #lightbox-next { width: 2.8rem; height: 2.8rem; }
  #lightbox-prev svg, #lightbox-next svg { width: 18px; height: 18px; }
  #lightbox-close { top: 0.8rem; right: 0.9rem; width: 2.6rem; height: 2.6rem; }
  #lightbox-close svg { width: 16px; height: 16px; }
  .lb-thumb { width: 44px; height: 44px; }
  #lightbox-thumbs { bottom: 0.9rem; gap: 0.35rem; }
}

/* ── RSVP Lookup Modal ── */
#rsvp-lookup-modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(20,15,10,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(6px);
  padding: 1.5rem;
}
#rsvp-lookup-modal.open {
  opacity: 1;
  pointer-events: auto;
}
#rsvp-lookup-card {
  position: relative;
  background: var(--cream);
  border-radius: 18px;
  padding: 2.8rem 2.4rem 2.4rem;
  width: min(440px, 100%);
  box-shadow:
    0 0 0 1.5px rgba(201,169,110,0.25),
    0 16px 60px rgba(0,0,0,0.18);
  text-align: center;
}
#rsvp-lookup-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--dark);
  opacity: 0.4;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s ease;
}
#rsvp-lookup-close:hover { opacity: 0.8; }
#lookup-result {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: left;
}
#lookup-result .lookup-card {
  background: white;
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(201,169,110,0.25);
}
#lookup-result .lookup-card p { margin: 0.25rem 0; }
#lookup-result .lookup-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}
#lookup-result.error { color: #c0392b; font-style: italic; text-align: center; }
#lookup-result.not-found { color: var(--dark); opacity: 0.6; text-align: center; font-style: italic; }

#lookup-edit-view { text-align: left; }
#lookup-attend-choice, #lookup-guests-choice { display: flex; gap: 0.75rem; }
#lookup-attend-choice .rsvp-choice-btn,
#lookup-guests-choice .rsvp-choice-btn { flex: 1; padding: 0.75rem 0.5rem; font-size: 0.9rem; border: 2px solid var(--light-sage); background: transparent; color: var(--dark); }
#lookup-attend-choice .rsvp-choice-btn.active,
#lookup-guests-choice .rsvp-choice-btn.active { background: var(--gold); color: white; border-color: var(--gold); }

/* ── RSVP lookup link ── */
/* ── RSVP Success Card ── */
#rsvp-success-card {
  max-width: 540px;
  margin: 0 auto;
  opacity: 0;
  transform: scale(0.96) translateY(10px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
#rsvp-success-card.is-visible {
  opacity: 1;
  transform: none;
}
.rsvp-success-inner {
  border: 1px solid rgba(201,169,110,0.4);
  border-radius: 12px;
  padding: 2.8rem 2.2rem;
  background: rgba(250,246,240,0.6);
  box-shadow:
    0 4px 32px rgba(201,169,110,0.1),
    inset 0 1px 0 rgba(255,255,255,0.9);
  text-align: center;
}
.rsvp-success--declining .rsvp-success-inner {
  border-color: rgba(138,158,126,0.4);
  box-shadow:
    0 4px 32px rgba(138,158,126,0.1),
    inset 0 1px 0 rgba(255,255,255,0.9);
}
.rsvp-success-icon {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.9rem;
  line-height: 1;
}
.rsvp-success--declining .rsvp-success-icon { color: var(--sage); }
.rsvp-success-tag {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.rsvp-success--declining .rsvp-success-tag { color: var(--sage); }
.rsvp-success-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.rsvp-success-sub {
  font-size: 0.88rem;
  color: #999;
  font-style: italic;
  margin-bottom: 1.8rem;
}
.rsvp-change-link {
  font-size: 0.78rem;
  color: #bbb;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.15);
}
.rsvp-change-link:hover { color: var(--dark); }
@media (prefers-reduced-motion: reduce) {
  #rsvp-success-card { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-card h3 { animation: none; background-position: 0 center; }
  .btn::before { display: none; }
  .gallery-grid:hover .gallery-photo:not(:hover) img { opacity: 1; transform: none; }
}

.rsvp-lookup-link {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  opacity: 0.65;
  text-align: center;
}
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}
.btn-link:hover { opacity: 0.75; }

/* ── RSVP personal note field ── */
#personal-note { resize: vertical; min-height: 80px; }

/* ── A1: Active schedule event ── */
.timeline-item--active {
  background: rgba(201,169,110,0.07);
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  margin: -0.6rem -0.75rem;
}
.timeline-item--active .timeline-year::before {
  content: 'Now · ';
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── A2: Schedule timezone note ── */
.schedule-tz-note {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2rem;
  opacity: 0.7;
}

/* ── A3: Empty state message ── */
.section-empty {
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
  font-style: italic;
  padding: 2rem 0;
}

/* ── B1: Inline RSVP validation errors ── */
.field-error {
  display: block;
  font-size: 0.78rem;
  color: #b94a48;
  letter-spacing: 0.02em;
  margin-top: -0.9rem;
}
.field-error:empty { display: none; }
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: #b94a48;
}

/* ── B2: Character counters ── */
.char-counter {
  display: block;
  text-align: right;
  font-size: 0.72rem;
  color: #bbb;
  margin-top: 0.2rem;
  transition: color 0.2s;
}
.char-counter--near { color: var(--gold); }

/* ── C1: Gallery broken-image fallback ── */
.gallery-photo--broken {
  background: rgba(201,169,110,0.06);
  border: 1px dashed rgba(201,169,110,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-photo--broken::after {
  content: '✦';
  color: rgba(201,169,110,0.35);
  font-size: 1.5rem;
  /* Reset inherited position/opacity from .gallery-photo::after so the icon is visible and centered */
  position: static;
  inset: unset;
  opacity: 1;
  background: none;
}

/* ── C2: Wish count ── */
.wishes-count {
  text-align: center;
  font-size: 0.78rem;
  color: #bbb;
  margin: 1rem 0 0.5rem;
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════════════════════════
   Dark theme — <html data-theme="dark">
   Mirrors the gate screen's jewel-box palette across the full site
   ══════════════════════════════════════════════════════════════════ */

/* 1. Variable overrides — cascade to all children automatically */
[data-theme="dark"] {
  --ivory:      #070504;
  --cream:      #0f0c08;
  --champagne:  #1a1208;
  --light-sage: #1e2b1e;
  --dark:       #ece6df;
  --charcoal:   #f0ebe4;
}

/* 2. Hardcoded white section backgrounds */
[data-theme="dark"] #story,
[data-theme="dark"] #details,
[data-theme="dark"] #gallery,
[data-theme="dark"] #wishes {
  background: var(--ivory);
}

/* 3. Nav */
[data-theme="dark"] nav {
  background: rgba(7, 5, 4, 0.96);
}

/* 4. Hero gradient */
[data-theme="dark"] .hero {
  background: linear-gradient(160deg, #0a0805 0%, #0e0b08 60%, #121008 100%);
}

/* 5. Cards — dark glass treatment */
[data-theme="dark"] .detail-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(201, 169, 110, 0.18);
}
[data-theme="dark"] .detail-card:hover {
  box-shadow: 0 8px 32px rgba(201, 169, 110, 0.18), -3px 0 0 var(--gold), 0 0 24px rgba(201, 169, 110, 0.12);
}
[data-theme="dark"] .wish-card {
  background: rgba(255, 255, 255, 0.04) padding-box,
              linear-gradient(135deg, rgba(201,169,110,0.20), rgba(138,158,126,0.12), rgba(201,169,110,0.20)) border-box;
}
[data-theme="dark"] .registry-card {
  background: rgba(255, 255, 255, 0.04) padding-box,
              linear-gradient(135deg, rgba(201,169,110,0.20), rgba(138,158,126,0.10), rgba(201,169,110,0.20)) border-box;
}

/* 6. Section ornament transitions — replace white stops with --ivory */
[data-theme="dark"] header + .section-ornament         { background: linear-gradient(to bottom, var(--cream),  var(--ivory)); }
[data-theme="dark"] #story + .section-ornament         { background: linear-gradient(to bottom, var(--ivory),  var(--cream)); }
[data-theme="dark"] #party + .section-ornament         { background: linear-gradient(to bottom, var(--cream),  var(--ivory)); }
[data-theme="dark"] #details + .section-ornament       { background: linear-gradient(to bottom, var(--ivory),  var(--cream)); }
[data-theme="dark"] #schedule + .section-ornament      { background: linear-gradient(to bottom, var(--cream),  var(--ivory)); }
[data-theme="dark"] #gallery + .section-ornament       { background: linear-gradient(to bottom, var(--ivory),  var(--cream)); }
[data-theme="dark"] #rsvp + .section-ornament          { background: linear-gradient(to bottom, var(--cream),  var(--ivory)); }
[data-theme="dark"] #wishes + .section-ornament        { background: linear-gradient(to bottom, var(--ivory),  var(--cream)); }
[data-theme="dark"] #registry + .section-ornament      { background: linear-gradient(to bottom, var(--cream),  var(--ivory)); }

/* 7. Form inputs */
[data-theme="dark"] .field-float input,
[data-theme="dark"] .field-float select,
[data-theme="dark"] .field-float textarea,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] #wishes-form input,
[data-theme="dark"] #wishes-form textarea {
  background: #1a1410;
  color: var(--dark);
  border-color: rgba(201, 169, 110, 0.22);
}
[data-theme="dark"] .field-float input:focus,
[data-theme="dark"] .field-float select:focus,
[data-theme="dark"] .field-float textarea:focus,
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] #wishes-form input:focus,
[data-theme="dark"] #wishes-form textarea:focus {
  background: #1e1810;
  border-color: var(--gold);
}
[data-theme="dark"] .field-float label,
[data-theme="dark"] .form-group label { color: var(--dark); }

/* 8. Story timeline line — keep visible on dark */
[data-theme="dark"] .timeline::before {
  background: linear-gradient(to bottom, transparent, rgba(201,169,110,0.30), transparent);
}

/* 9. Footer — preserve its dark appearance despite --dark variable flip */
[data-theme="dark"] footer {
  background: #0e0b08;
}

/* 10. Nav scrolled state — override the hardcoded cream frosted glass */
[data-theme="dark"] nav.scrolled {
  background: rgba(7, 5, 4, 0.96);
}

/* 11. RSVP guest-count toggle buttons */
[data-theme="dark"] #btn-solo,
[data-theme="dark"] #btn-plus-one {
  background: #1a1410;
  border-color: rgba(201, 169, 110, 0.22);
  color: var(--dark);
}
[data-theme="dark"] .guests-choice.solo #btn-solo {
  background: var(--sage);
}
[data-theme="dark"] .guests-choice.plus-one #btn-plus-one {
  background: linear-gradient(135deg, #c9a96e, #b8924f);
}

/* 12. RSVP name lookup result card */
[data-theme="dark"] #lookup-result .lookup-card {
  background: #1a1410;
  border-color: rgba(201, 169, 110, 0.22);
  color: var(--dark);
}

/* 13. Countdown flip-card faces */
[data-theme="dark"] .flip-top,
[data-theme="dark"] .flip-bottom,
[data-theme="dark"] .flip-anim-top,
[data-theme="dark"] .flip-anim-bot {
  background: #1c1610;
}

/* ── C3: Print styles ── */
@media print {
  nav, #scroll-progress, .rsvp-pill, .back-to-top,
  #aurora-canvas, #dust-canvas, #sparkle-canvas, #gate-overlay,
  .hero-spotlight, #rsvp, #wishes, #gallery,
  .calendar-btns, .detail-link, footer { display: none !important; }

  body { background: white; color: black; font-size: 11pt; }
  section { padding: 1rem 0; page-break-inside: avoid; }
  .section-inner { max-width: 100%; }

  .detail-card {
    border: 1px solid #ccc;
    border-left: 3px solid #999;
    background: white;
    box-shadow: none;
    backdrop-filter: none;
    page-break-inside: avoid;
    margin-bottom: 0.75rem;
  }
  .details-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }

  .timeline-item { page-break-inside: avoid; }
  .timeline-line { display: none; }

  a::after { content: none; }

  h2 { font-size: 16pt; }
  h3 { font-size: 13pt; }
}

/* ── FAQ Section ──────────────────────────────────────────────────────────── */
#faq { background: white; }

.faq-list {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid rgba(201,169,110,0.2);
}

.faq-item:first-child {
  border-top: 1px solid rgba(201,169,110,0.2);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.3rem 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--dark);
  gap: 1rem;
  user-select: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: color 0.2s;
}

.faq-question:hover { color: var(--gold); }

.faq-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--gold);
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-answer { max-height: 600px; }

.faq-answer-inner {
  padding: 0 0 1.3rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #666;
}
