/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --olive: #5C6B45;
  --olive-dark: #3E4A2E;
  --olive-darker: #2C351F;
  --olive-light: #7A8C5E;
  --olive-pale: #A3B18A;
  --cream: #F5F1E8;
  --cream-dark: #E8E0D0;
  --gold: #C9A84C;
  --gold-light: #D4B96A;
  --white: #FFFFFF;
  --text-dark: #2C2C2C;
  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Cormorant Garamond', serif;
  --font-accent: 'EB Garamond', serif;
  --content-max: 520px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at 15% 30%, rgba(163,177,138,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 60%, rgba(201,168,76,0.04) 0%, transparent 50%);
  color: var(--text-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ========== MUSIC CONTROLS ========== */
.music-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(92, 107, 69, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.music-toggle:hover { background: var(--olive-dark); transform: scale(1.05); }
.music-toggle svg { width: 20px; height: 20px; fill: var(--white); }
.music-toggle.muted svg.unmuted,
.music-toggle:not(.muted) svg { display: none; }

.music-eq {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 16px;
}
.music-toggle:not(.muted) .music-eq { display: flex; }
.music-eq span {
  display: block;
  width: 3px;
  background: var(--white);
  border-radius: 1px;
}
.music-eq span:nth-child(1) { height: 4px; animation: eqBar1 0.8s ease-in-out infinite; }
.music-eq span:nth-child(2) { height: 8px; animation: eqBar2 0.6s ease-in-out infinite; }
.music-eq span:nth-child(3) { height: 6px; animation: eqBar3 0.7s ease-in-out infinite; }

/* ========== HERO / INTRO ========== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--olive-dark);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 50px 20px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  background-attachment: fixed;
  opacity: 0.45;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(44,53,31,0.3) 0%, rgba(44,53,31,0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  width: 100%;
}

.hero-ornament {
  width: 50px;
  margin: 0 auto 20px;
  opacity: 0;
  animation: fadeInHalf 1s ease-out 0.2s both;
}

.hero-photo {
  width: 200px;
  height: 270px;
  border-radius: 100px 100px 8px 8px;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  margin: 0 auto 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  opacity: 0;
  animation: fadeInScale 1.2s ease-out 0.4s both;
}

.hero-names {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--white);
  letter-spacing: 3px;
  line-height: 1.3;
  margin-bottom: 12px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1s both;
}

.hero-ampersand {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: 0.7em;
  display: block;
  margin: 4px 0;
  opacity: 0.7;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.8);
  letter-spacing: 1px;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.7s both;
}

.hero-date {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 12px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 1.3s both, shimmerGold 3s ease-in-out 2.1s infinite;
}

.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  animation: fadeIn 0.6s ease-out 1.8s both, bounceDown 2s 2.4s infinite;
}
.hero-scroll svg { width: 22px; height: 22px; stroke: rgba(255,255,255,0.4); fill: none; stroke-width: 2; }

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInHalf {
  from { opacity: 0; }
  to { opacity: 0.5; }
}
@keyframes shimmerGold {
  0%, 100% { text-shadow: 0 0 4px rgba(201,168,76,0.15); }
  50% { text-shadow: 0 0 18px rgba(201,168,76,0.45), 0 0 36px rgba(201,168,76,0.12); }
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
  50% { transform: scale(1.05); box-shadow: 0 6px 25px rgba(92,107,69,0.35); }
}
@keyframes gentleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes dotGlow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,0.04); }
  50% { box-shadow: 0 0 10px 3px rgba(201,168,76,0.25); }
}
@keyframes eqBar1 {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}
@keyframes eqBar2 {
  0%, 100% { height: 8px; }
  50% { height: 4px; }
}
@keyframes eqBar3 {
  0%, 100% { height: 6px; }
  50% { height: 12px; }
}

/* Decorative section ornaments */
.section-ornament {
  text-align: center;
  padding: 8px 0;
  color: var(--olive);
  line-height: 0;
}

/* ========== SECTIONS COMMON ========== */
.section {
  padding: 70px 20px;
  max-width: var(--content-max);
  margin: 0 auto;
  text-align: center;
}

.section-olive {
  background: linear-gradient(to bottom, rgba(0,0,0,0.04) 0%, transparent 6%, transparent 94%, rgba(0,0,0,0.04) 100%), var(--olive);
  color: var(--white);
  max-width: 100%;
  padding: 70px 20px;
}
.section-olive .section-inner { max-width: var(--content-max); margin: 0 auto; text-align: center; }

.section-olive-dark {
  background: linear-gradient(to bottom, rgba(0,0,0,0.04) 0%, transparent 6%, transparent 94%, rgba(0,0,0,0.04) 100%), var(--olive-dark);
  color: var(--white);
  max-width: 100%;
  padding: 70px 20px;
}
.section-olive-dark .section-inner { max-width: var(--content-max); margin: 0 auto; text-align: center; }

.section-inner,
.section .reveal {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 3px;
  margin-bottom: 12px;
  line-height: 1.15;
  text-wrap: balance;
}

.section-divider {
  width: 0;
  height: 1px;
  background: currentColor;
  opacity: 0;
  margin: 14px auto 28px;
  transition: width 0.8s ease-out, opacity 0.8s ease-out;
  transition-delay: 0.3s;
}
.reveal.visible .section-divider {
  width: 50px;
  opacity: 0.3;
}

.section-text {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.8;
  font-weight: 300;
  max-width: 100%;
  margin: 0 auto;
  text-wrap: pretty;
}

/* ========== PLACES SCROLLER ========== */
.places-section {
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, transparent 8%, transparent 92%, rgba(0,0,0,0.05) 100%), var(--olive-darker);
  color: var(--white);
  max-width: 100%;
  padding: 70px 20px;
  overflow: hidden;
}

.places-shell {
  width: min(100%, calc(var(--content-max) + 120px));
  margin: 0 auto;
}

.places-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(86%, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,168,76,0.5) rgba(255,255,255,0.08);
}

.places-scroller::-webkit-scrollbar {
  height: 8px;
}

.places-scroller::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
}

.places-scroller::-webkit-scrollbar-thumb {
  background: rgba(201,168,76,0.55);
  border-radius: 999px;
}

.place-panel {
  scroll-snap-align: start;
  min-width: 0;
}

.place-panel .location-card {
  margin: 0;
  min-height: 100%;
}

.place-kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.85;
}

.places-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

.place-tab {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

.place-tab:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
}

.place-tab.active {
  background: rgba(201,168,76,0.25);
  border-color: rgba(201,168,76,0.5);
  color: var(--gold-light);
}

/* ========== LOTR JOURNEY TRACKER ========== */
.journey-tracker {
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.journey-tracker.visible {
  opacity: 1;
  pointer-events: auto;
}

.journey-tracker.is-scrubbing {
  opacity: 1;
}

.journey-path {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
}

.journey-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  left: 50%;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    to bottom,
    rgba(201,168,76,0.18) 0px,
    rgba(201,168,76,0.18) 4px,
    transparent 4px,
    transparent 8px
  );
}

.journey-progress {
  position: absolute;
  top: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--gold-light));
  left: 50%;
  transform: translateX(-50%);
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 8px rgba(201,168,76,0.3);
  border-radius: 1px;
}

.journey-ring {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  z-index: 3;
  transition: top 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.journey-ring svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.5));
  animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(201,168,76,0.3)); }
  50% { filter: drop-shadow(0 0 10px rgba(201,168,76,0.7)); }
}

.journey-waypoint {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  cursor: pointer;
  z-index: 2;
  margin: 16px 0;
  transition: transform 0.3s ease;
}
.journey-waypoint:first-of-type { margin-top: 0; }
.journey-waypoint:last-of-type { margin-bottom: 0; }

.journey-waypoint::after {
  content: attr(data-name);
  position: absolute;
  top: 50%;
  right: calc(100% + 14px);
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: 0.55rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  background: rgba(44,53,31,0.85);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(201,168,76,0.2);
}

.journey-tracker:focus-within .journey-waypoint::after,
.journey-tracker.is-interacting .journey-waypoint::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.journey-waypoint.active::after {
  font-size: 0.64rem;
  letter-spacing: 1.8px;
  color: var(--white);
  border-color: rgba(212,185,106,0.45);
  background: rgba(62,74,46,0.94);
}

.journey-waypoint::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.3);
  transition: all 0.4s ease;
}

.journey-waypoint.visited::before {
  background: var(--gold);
  border-color: var(--gold-light);
  box-shadow: 0 0 4px rgba(201,168,76,0.4);
  width: 7px;
  height: 7px;
}

.journey-waypoint.active::before {
  width: 9px;
  height: 9px;
  background: var(--gold);
  border-color: var(--gold-light);
  box-shadow: 0 0 10px rgba(201,168,76,0.6), 0 0 20px rgba(201,168,76,0.2);
}

@media (hover: hover) and (pointer: fine) {
  .journey-tracker:hover .journey-waypoint::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  .journey-waypoint:hover { transform: scale(1.4); }
}

@media (hover: none) and (pointer: coarse) {
  .journey-tracker {
    right: 4px;
    padding: 14px 10px 14px 18px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .journey-path::before {
    content: '';
    position: absolute;
    inset: -16px -12px -16px -26px;
  }

  .journey-tracker.is-scrubbing .journey-progress,
  .journey-tracker.is-scrubbing .journey-ring {
    transition-duration: 0.08s;
  }

  .journey-tracker.is-scrubbing .journey-waypoint::after,
  .journey-tracker.is-interacting .journey-waypoint::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Parchment border frame */
.parchment-border {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  border: 2px solid transparent;
  border-image: linear-gradient(
    to bottom,
    rgba(201,168,76,0.06) 0%,
    rgba(201,168,76,0.18) 15%,
    rgba(201,168,76,0.06) 35%,
    rgba(201,168,76,0.18) 65%,
    rgba(201,168,76,0.06) 85%,
    rgba(201,168,76,0.18) 100%
  ) 1;
}

.parchment-corner {
  position: fixed;
  width: 36px;
  height: 36px;
  z-index: 51;
  pointer-events: none;
  opacity: 0.4;
}
.parchment-corner svg { width: 100%; height: 100%; }
.parchment-corner.top-left { top: 4px; left: 4px; }
.parchment-corner.top-right { top: 4px; right: 4px; transform: scaleX(-1); }
.parchment-corner.bottom-left { bottom: 4px; left: 4px; transform: scaleY(-1); }
.parchment-corner.bottom-right { bottom: 4px; right: 4px; transform: scale(-1); }

/* ========== CEREMONY & RECEPTION ========== */
.location-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 30px 20px;
  margin: 24px auto;
  width: 100%;
  backdrop-filter: blur(6px);
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.location-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
  border-color: rgba(201,168,76,0.3);
}

.location-card h3 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.location-card .venue-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--gold-light);
  margin-bottom: 12px;
  animation: shimmerGold 3s ease-in-out infinite;
}

.location-card address {
  font-style: normal;
  font-size: 1rem;
  opacity: 0.75;
  line-height: 1.6;
  margin-bottom: 16px;
}

.location-media {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 16px;
}

.location-video {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  margin-bottom: 16px;
  object-fit: cover;
}

.gmaps-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 50px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  transition: all 0.3s ease;
}
.gmaps-btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,255,255,0.1); }
.gmaps-btn svg { width: 14px; height: 14px; fill: currentColor; }

/* ========== TIMELINE ========== */
.timeline {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 0 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.15);
}

.timeline-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 18px;
  align-items: start;
  margin-bottom: 34px;
  position: relative;
  opacity: 0;
  transform: translateX(-15px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.timeline-time {
  grid-column: 2;
  font-family: var(--font-heading);
  font-size: 1.9rem;
  letter-spacing: 1px;
  line-height: 1;
  text-align: left;
  opacity: 0.95;
  margin-bottom: 6px;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--olive-dark);
  grid-column: 1;
  grid-row: 1 / span 2;
  justify-self: center;
  margin-top: 7px;
  z-index: 1;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
  animation: dotGlow 2.5s ease-in-out infinite;
}

.timeline-desc {
  grid-column: 2;
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.15;
  text-align: left;
  max-width: none;
  text-wrap: pretty;
}

.timeline-desc strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.9);
}

/* Timeline stagger reveal */
.reveal.visible .timeline-item { opacity: 1; transform: translateX(0); }
.reveal.visible .timeline-item:nth-child(1) { transition-delay: 0.15s; }
.reveal.visible .timeline-item:nth-child(2) { transition-delay: 0.3s; }
.reveal.visible .timeline-item:nth-child(3) { transition-delay: 0.45s; }
.reveal.visible .timeline-item:nth-child(4) { transition-delay: 0.6s; }
.reveal.visible .timeline-item:nth-child(5) { transition-delay: 0.75s; }

/* ========== INVITATION FLIP CARD ========== */
.flip-card {
  --card-rotate-x: 0deg;
  --card-rotate-y: 0deg;
  --pointer-x: 50%;
  --pointer-y: 50%;
  --shadow-x: 0px;
  --shadow-y: 30px;
  --card-float-y: 0px;
  width: min(86vw, 340px);
  aspect-ratio: 5 / 7;
  perspective: 1800px;
  margin: 0 auto;
  cursor: pointer;
  flex: 0 0 auto;
  scroll-snap-align: center;
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  outline: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.flip-card:focus-visible {
  outline: 2px solid rgba(201,168,76,0.9);
  outline-offset: 10px;
}

.flip-card-shadow {
  position: absolute;
  inset: 8% 5% -7%;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 45%),
    radial-gradient(circle at 50% 60%, rgba(44,53,31,0.28) 0%, rgba(44,53,31,0) 72%);
  filter: blur(24px);
  opacity: 0.9;
  transform: translate3d(var(--shadow-x), var(--shadow-y), -70px) scale(0.94);
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.invite-scroll {
  overflow: visible;
  overflow-y: visible;
  padding: 20px 0 28px;
  scroll-snap-type: none;
}

.invite-scroll-inner {
  width: 100%;
  min-width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  padding: 0;
}

.flip-card-tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: translateY(var(--card-float-y)) rotateX(var(--card-rotate-x)) rotateY(var(--card-rotate-y));
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 26px 45px rgba(0,0,0,0.28));
  will-change: transform;
}

.flip-card:hover .flip-card-tilt,
.flip-card:focus-visible .flip-card-tilt {
  filter: drop-shadow(0 34px 55px rgba(0,0,0,0.34));
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 24px;
  overflow: hidden;
  background: #d7d0c2;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -18px 40px rgba(0,0,0,0.12);
  transform-style: preserve-3d;
}

.flip-card-front::before,
.flip-card-back::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(255,255,255,0.34) 0%, rgba(255,255,255,0.12) 12%, rgba(255,255,255,0) 36%),
    linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 34%, rgba(0,0,0,0.16) 100%);
  mix-blend-mode: screen;
  opacity: 0.9;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 2;
}

.flip-card-front::after,
.flip-card-back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0) 20%, rgba(255,255,255,0.28) 42%, rgba(255,255,255,0) 56%);
  transform: translateX(-130%) skewX(-18deg);
  opacity: 0;
  transition: transform 0.75s ease, opacity 0.35s ease;
  pointer-events: none;
  z-index: 3;
}

.flip-card:hover .flip-card-front::after,
.flip-card:hover .flip-card-back::after,
.flip-card:focus-visible .flip-card-front::after,
.flip-card:focus-visible .flip-card-back::after {
  transform: translateX(130%) skewX(-18deg);
  opacity: 1;
}

.flip-card-front img,
.flip-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(1px) scale(1.01);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.flip-hint {
  font-family: var(--font-body);
  font-size: 0.95rem;
  opacity: 0.58;
  margin-top: 6px;
  font-style: italic;
}

/* ========== DRESS CODE COLOR SWATCH ========== */
.color-swatch {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--olive);
  margin: 20px auto;
  border: 3px solid var(--white);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  animation: pulseGlow 3s ease-in-out infinite;
}

.color-name {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 8px;
}

/* ========== GIFT / IBAN ========== */
.iban-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px auto;
  max-width: 100%;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  letter-spacing: 1px;
  word-break: break-all;
  cursor: pointer;
  transition: background 0.3s;
  position: relative;
}
.iban-box:hover { background: rgba(255,255,255,0.12); }
.iban-box .copy-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.8rem;
  background: var(--gold);
  color: var(--olive-darker);
  padding: 4px 12px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.iban-box.copied .copy-tooltip { opacity: 1; }

/* ========== MENU ========== */
.menu-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 30px 20px;
  margin: 24px auto;
  width: 100%;
  text-align: center;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.menu-card:hover {
  border-color: rgba(201,168,76,0.25);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.menu-course {
  margin-bottom: 24px;
}

.menu-course h4 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.menu-course p {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.85;
}

.dietary-note {
  background: linear-gradient(135deg, rgba(245,241,232,0.96), rgba(232,224,208,0.92));
  border: 1px solid rgba(201,168,76,0.45);
  border-radius: 14px;
  padding: 20px 24px;
  margin-top: 30px;
  font-size: 1rem;
  font-style: normal;
  color: var(--olive-darker);
  opacity: 1;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.dietary-note strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--olive-dark);
  margin-bottom: 8px;
}

.dietary-note span {
  display: block;
  line-height: 1.6;
}

/* ========== SONG REQUEST ========== */
.song-form {
  max-width: 100%;
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.song-form input {
  padding: 14px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.3s;
}
.song-form input::placeholder { color: rgba(255,255,255,0.4); }
.song-form input:focus { border-color: var(--gold); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: 50px;
  background: var(--gold);
  color: var(--olive-darker);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(201,168,76,0.4); }

/* ========== RSVP SECTION ========== */
.rsvp-form {
  max-width: 100%;
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid rgba(92, 107, 69, 0.3);
  background: var(--white);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.3s;
}
.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus { border-color: var(--olive); }
.rsvp-form textarea { resize: vertical; min-height: 80px; border-radius: 8px; }

.rsvp-deadline {
  display: inline-block;
  background: var(--olive);
  color: var(--white);
  padding: 8px 24px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 16px;
}

/* ========== B&B ========== */
.bb-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 24px 20px;
  margin: 24px auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  text-align: center;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.bb-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,168,76,0.25);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.bb-card img {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.bb-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.bb-card p {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0.8;
  line-height: 1.6;
}

/* ========== PETS ========== */
.pets-icon { font-size: 3rem; margin-bottom: 16px; }

/* ========== QR SAVE THE DATE ========== */
.qr-container {
  width: 160px;
  height: 160px;
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  margin: 24px auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.qr-container img { width: 100%; height: 100%; object-fit: contain; }

/* ========== FOOTER ========== */
.footer {
  background: var(--olive-darker);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

.footer .couple-tag {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RING BEARER DECORATION ========== */
.ring-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px auto;
  opacity: 0.4;
}
.ring-ornament .line { width: 50px; height: 1px; background: currentColor; }
.ring-ornament svg { width: 20px; height: 20px; fill: currentColor; }

/* ========== TABLET+ (min-width: 600px) ========== */
@media (min-width: 600px) {
  .music-toggle { bottom: 20px; right: 20px; width: 48px; height: 48px; }

  .hero-photo { width: 240px; height: 320px; border-radius: 120px 120px 8px 8px; }
  .hero-names { font-size: 2.8rem; letter-spacing: 4px; }
  .hero-date { font-size: 1.05rem; letter-spacing: 6px; }

  .section, .section-olive, .section-olive-dark { padding: 90px 30px; }
  .section-title { font-size: 1.8rem; }

  .location-card { padding: 36px 28px; }
  .location-media, .location-video { height: 280px; }
  .places-scroller { grid-auto-columns: minmax(420px, 1fr); gap: 22px; }

  /* Timeline desktop layout */
  .timeline::before { left: 92px; }
  .timeline-item {
    grid-template-columns: 92px 28px minmax(0, 1fr);
    column-gap: 28px;
    margin-bottom: 40px;
  }
  .timeline-time {
    grid-column: auto;
    text-align: right;
    font-size: 2.1rem;
    margin-bottom: 0;
  }
  .timeline-dot {
    grid-column: auto;
    grid-row: auto;
    width: 18px;
    height: 18px;
    border: 4px solid var(--olive-dark);
    margin-top: 8px;
  }
  .timeline-desc {
    grid-column: auto;
    font-size: 1.35rem;
  }
  .timeline-desc strong { font-size: 0.85rem; letter-spacing: 4px; }

  .flip-card { width: min(70vw, 400px); }

  .bb-card {
    flex-direction: row;
    text-align: left;
    padding: 28px;
    gap: 24px;
  }
  .bb-card img { width: 200px; height: 200px; }

  .iban-box { font-size: 1rem; letter-spacing: 2px; padding: 20px 28px; }

  .qr-container { width: 200px; height: 200px; }
}

/* ========== DESKTOP (min-width: 900px) ========== */
@media (min-width: 900px) {
  .hero-photo { width: 280px; height: 370px; border-radius: 140px 140px 10px 10px; }
  .hero-names { font-size: 3.2rem; letter-spacing: 5px; }

  .section, .section-olive, .section-olive-dark { padding: 100px 40px; }
  .section-title { font-size: 2rem; }

  .location-media, .location-video { height: 320px; }
  .flip-card { width: min(50vw, 440px); }

  .bb-card img { width: 220px; height: 220px; }
}

/* ========== ENVELOPE LANDING ========== */
.envelope {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--olive-dark);
  background-image:
    radial-gradient(ellipse at 30% 40%, rgba(163,177,138,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(201,168,76,0.06) 0%, transparent 50%);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.envelope.opened {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.envelope-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  letter-spacing: 3px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.envelope .flip-card {
  opacity: 0;
  animation: fadeInScale 1s ease-out 0.6s both;
}

.envelope .flip-hint {
  color: rgba(255,255,255,0.5);
  margin-top: 18px;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 1.2s both;
}

.main-site {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease 0.3s;
}

.main-site.revealed {
  opacity: 1;
  pointer-events: auto;
}

body.envelope-active {
  overflow: hidden;
}

/* ========== JOURNEY TRACKER RESPONSIVE ========== */
@media (max-width: 599px) {
  .journey-tracker {
    right: 4px;
  }
  .journey-waypoint {
    margin: 10px 0;
    width: 14px;
    height: 14px;
  }
  .journey-waypoint::before { width: 5px; height: 5px; }
  .journey-waypoint.visited::before { width: 6px; height: 6px; }
  .journey-waypoint.active::before { width: 7px; height: 7px; }
  .journey-ring { width: 16px; height: 16px; }
  .journey-waypoint::after {
    right: calc(100% + 10px);
    font-size: 0.5rem;
    padding: 3px 8px;
  }
  .journey-waypoint.active::after {
    font-size: 0.58rem;
    letter-spacing: 1.6px;
  }
  .parchment-border { border-width: 1px; }
  .parchment-corner { width: 20px; height: 20px; opacity: 0.25; }
}

@media (min-width: 600px) {
  .journey-tracker { right: 16px; }
  .journey-waypoint { margin: 20px 0; }
  .journey-ring { width: 24px; height: 24px; }
  .parchment-corner { width: 44px; height: 44px; }
  .journey-waypoint::after { font-size: 0.55rem; }
  .journey-waypoint.active::after { font-size: 0.64rem; }
}

@media (min-width: 900px) {
  .journey-tracker { right: 24px; }
  .journey-waypoint { margin: 24px 0; }
  .journey-waypoint::after { font-size: 0.6rem; letter-spacing: 2px; }
  .journey-waypoint.active::after { font-size: 0.7rem; }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-photo, .hero-names, .hero-subtitle, .hero-date,
  .hero-ornament, .hero-scroll { opacity: 1 !important; }
  .section-divider { width: 50px !important; opacity: 0.3 !important; }
  .timeline-item { opacity: 1 !important; transform: none !important; }
  .flip-card-shadow,
  .flip-card-tilt,
  .flip-card-front::after,
  .flip-card-back::after {
    transform: none !important;
    transition: none !important;
  }
}
