0/* ============================================================
   WEDDING INVITATION — STYLE SHEET
   Design tokens: Cream / Ivory / Champagne / Gold Soft / Dusty Brown
   Heading: Cormorant Garamond | Body: Poppins | Accent: Great Vibes
============================================================ */

@font-face {
  font-family: 'Hello Jones';
  src: url('assets/font/Font Hello Jones Free Trial/Hello Jones Free Trial.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TheHeritageLegacyFancyLogo';
  src: url('assets/font/Font Hello Jones Free Trial/TheHeritageLegacyFancyLogo-xR2r8.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Color tokens ---------- */
  --color-cream: #f8f3ea;
  --color-ivory: #fffdf8;
  --color-champagne: #f0dfc0;
  --color-gold: #c9a667;
  --color-gold-light: #e3caa0;
  --color-dusty-brown: #8b7355;
  --color-text: #040300;
  --color-text-soft: #040300;
  --color-white: #ffffff;
  --background-color: #f8f3ea;

  /* ---------- Typography ---------- */
  --font-heading: 'TheHeritageLegacyFancyLogo', serif;
  --font-body: 'TheHeritageLegacyFancyLogo', sans-serif;
  --font-accent: 'TheHeritageLegacyFancyLogo', cursive;
  --font-couple-name: 'TheHeritageLegacyFancyLogo', var(--font-heading);

  /* ---------- Layout ---------- */
  --left-width: 40%;
  --right-width: 60%;
  --section-padding-y: clamp(4rem, 10vh, 8rem);
  --section-padding-x: clamp(1.5rem, 6vw, 5rem);
  --radius-soft: 4px;
  --transition-slow: 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-med: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-cream);
  background-image: var(--background-photo);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-gold);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   PRELOADER
============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--color-cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-ornament {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-gold);
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.preloader-amp { font-family: var(--font-accent); font-size: 2rem; }

.preloader-bar {
  width: 160px;
  height: 1px;
  background: rgba(139, 115, 85, 0.2);
  overflow: hidden;
}
.preloader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--color-gold);
  animation: preload-fill 1.6s ease-in-out infinite;
}
@keyframes preload-fill {
  0% { width: 0%; margin-left: 0%; }
  50% { width: 60%; margin-left: 20%; }
  100% { width: 0%; margin-left: 100%; }
}

/* ============================================================
   ENVELOPE / OPENING SCREEN
============================================================ */
#envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1400px;
}

.envelope-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.85) brightness(0.9);
  transform: scale(1.08);
}
.envelope-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248,243,234,0.45) 0%, rgba(240,223,192,0.35) 50%, rgba(248,243,234,0.5) 100%);
}

.envelope-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 560px;
}

.envelope-eyebrow {
  font-family: var(--font-body);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--color-dusty-brown);
  margin: 0 0 0.75rem;
}

.envelope-names {
  font-family: 'TheHeritageLegacyFancyLogo', var(--font-heading);
  font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  margin: 0;
  color: var(--color-text);
}
.envelope-names .amp {
  font-family: var(--font-accent);
  color: var(--color-gold);
  font-size: 1.1em;
  padding: 0 0.15em;
}

.envelope-divider {
  width: 70px;
  height: 1px;
  background: var(--color-gold);
  margin: 1.25rem auto;
}

.envelope-guest-label {
  font-size: 0.8rem;
  color: var(--color-text-soft);
  margin: 0;
}
.envelope-guest-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-gold);
  margin: 0.25rem 0 2rem;
}

.envelope-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2.25rem;
}

.envelope-box {
  position: relative;
  width: 180px;
  height: 120px;
  transform-style: preserve-3d;
}
.envelope-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-champagne), var(--color-gold-light));
  border-radius: 2px;
  box-shadow: 0 20px 40px -15px rgba(139, 115, 85, 0.5);
}
.envelope-letter {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 92px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,243,234,0.95));
  border: 1px solid rgba(201,166,103,0.35);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6), 0 18px 40px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#envelope-screen.is-opening .envelope-letter {
  opacity: 1;
}
.letter-monogram {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-gold);
}
.letter-date {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--color-text-soft);
}
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 90px solid transparent;
  border-right: 90px solid transparent;
  border-top: 62px solid var(--color-gold);
  transform-origin: top center;
  z-index: 2;
  filter: brightness(1.05);
}

.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-text);
  padding: 0.9rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background var(--transition-med), color var(--transition-med), transform var(--transition-med);
}
.btn-open:hover, .btn-open:focus-visible {
  background: var(--color-gold);
  color: var(--color-white);
  transform: translateY(-2px);
}
.btn-open-icon { color: var(--color-gold); transition: color var(--transition-med); }
.btn-open:hover .btn-open-icon { color: var(--color-white); }

#envelope-screen.is-opening .envelope-content > *:not(.envelope-wrap) {
  transition: opacity 0.5s ease;
  opacity: 0;
}
#envelope-screen.is-closing {
  pointer-events: none;
}

/* ============================================================
   SPLIT LAYOUT — MAIN APP
============================================================ */
.split-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

/* ---------- LEFT PANEL (sticky slideshow, desktop) ---------- */
.left-panel {
  position: relative;
  width: var(--left-width);
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.left-slideshow {
  position: absolute;
  inset: 0;
}
.left-slideshow .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.15);
  transition: opacity 1.6s ease, transform 8s ease;
}
.left-slideshow .slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.left-panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(62,47,35,0.05) 0%, rgba(62,47,35,0.12) 100%);
}

.left-panel-caption {
  position: absolute;
  left: 2.5rem;
  bottom: 2.5rem;
  color: var(--color-ivory);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-heading);
}
.caption-accent {
  font-family: 'TheHeritageLegacyFancyLogo', var(--font-heading);
  font-style: normal;
  font-size: 1.9rem;
  line-height: 1.1;
}
.caption-date {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.85;
  font-style: normal;
}

/* ---------- RIGHT PANEL (independent scroll) ---------- */
.right-panel {
  width: var(--right-width);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.right-panel::-webkit-scrollbar { width: 6px; }
.right-panel::-webkit-scrollbar-thumb { background: var(--color-gold-light); border-radius: 3px; }

/* ============================================================
   GENERIC SECTION
============================================================ */
.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--section-padding-y) var(--section-padding-x);
  text-align: center;
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
  z-index: 0;
}
/* fixed-bg (parallax) disabled: background-attachment:fixed sizes/positions
   the image against the whole viewport, not the right panel, which cropped
   the photo. Kept selector for compatibility but attachment stays scroll. */
.section-bg.fixed-bg { background-attachment: scroll; }

.section-bg-slideshow { position: absolute; inset: 0; z-index: 0; background: transparent; }
.section-bg-slideshow .slide {
  position: absolute; inset: 0;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0; transform: scale(1.12);
  transition: opacity 2.2s ease, transform 6s ease;
}
.section-bg-slideshow .slide.is-active { opacity: 1; transform: scale(1); }

.section-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.story-card {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.story-card .timeline {
  padding-top: 1.5rem;
}

.story-card .timeline-item {
  background: rgba(255, 253, 248, 0.85);
  border-radius: 20px;
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(201, 166, 103, 0.2);
}

.story-card .timeline-item + .timeline-item {
  margin-top: 1rem;
}

.story-card .timeline-year {
  display: inline-block;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0 0 2.5rem;
  color: var(--color-text);
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 1px;
  background: var(--color-gold);
  margin: 0.9rem auto 0;
}
.section-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-top: -1.75rem;
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-dusty-brown);
  margin: 0 0 1rem;
}

.accent-script {
  font-family: var(--font-accent);
  color: var(--color-gold);
  font-size: 1.15em;
  padding: 0 0.2em;
}

/* ============================================================
   HERO
============================================================ */
.hero-section { padding-top: 6rem; padding-bottom: 6rem; }
.hero-content { max-width: 640px; }
.hero-title {
  font-family: 'TheHeritageLegacyFancyLogo', var(--font-heading);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}
.hero-date {
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  color: var(--color-text-soft);
  margin: 0 0 2.5rem;
}

.countdown-inline, .countdown-grid {
  display: flex;
  gap: clamp(1rem, 4vw, 2.5rem);
  justify-content: center;
  margin-bottom: 2.5rem;
}
.cd-item { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.cd-number {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--color-gold);
  min-width: 2ch;
}
.cd-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.scroll-down-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.scroll-down-line {
  width: 1px;
  height: 34px;
  background: var(--color-gold);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

/* ============================================================
   QUOTE
============================================================ */
.quote-section { min-height: 60vh; background: transparent; }
.quote-text {
  max-width: 620px;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
  position: relative;
}
.quote-mark {
  display: block;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  color: var(--color-gold-light);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.quote-source {
  margin-top: 1.5rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-dusty-brown);
}

/* ============================================================
   BRIDE / GROOM PROFILE
============================================================ */
.profile-content {
  max-width: 420px;
  text-align: right;
  position: absolute;
  z-index: 2;
  top: 2rem;
  right: 5rem;
  margin-right: 2rem;
  overflow: hidden;
}
.profile-flourish {
  display: block;
  color: var(--color-gold);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-family: 'TheHeritageLegacyFancyLogo', var(--font-heading);
}
.profile-name {
  font-family: 'TheHeritageLegacyFancyLogo', var(--font-heading);
  font-size: clamp(1.5rem, 2.7vw, 1.7rem);
  font-weight: 400;
  margin: 0 0 1rem;
  transform: translateY(-10px);
  padding: 0;
  text-align: right;
}
.profile-parents {
  font-family: 'TheHeritageLegacyFancyLogo', var(--font-heading);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-soft);
  margin: 0 0 1.25rem;
  text-align: right;
  padding: 0;
  display: block;
}
/* Force couple name and parents' names to stay on a single line;
   font-size is auto-shrunk to fit by initFitText() in script.js */
.fit-line {
  display: inline-block;
  white-space: nowrap;
  transform-origin: right center;
}
.profile-socials a {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  padding-bottom: 2px;
  font-family: 'TheHeritageLegacyFancyLogo', var(--font-heading);
}

/* Position profiles at center of section */
.profile-bride,
.profile-groom {
  position: relative;
}

/* Mobile responsive for profile content */
@media (max-width: 900px) {
  .profile-content {
    right: 1.5rem;
    left: 1.5rem;
    margin-right: 0;
    max-width: none;
    top: 2.5rem;
  }
}

@media (max-width: 600px) {
  .profile-content {
    right: 1rem;
    left: 1rem;
    max-width: none;
    top: 2rem;
  }
}

/* Custom AOS animations for slide-in */
[data-aos="slide-in-right"] {
  opacity: 0;
  transform: translateX(100px);
}
[data-aos="slide-in-right"].aos-animate {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos="slide-in-left"] {
  opacity: 0;
  transform: translateX(-100px);
}
[data-aos="slide-in-left"].aos-animate {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* ============================================================
   LOVE STORY TIMELINE
============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: left;
  border-left: 1px solid var(--color-gold-light);
  padding-left: 2rem;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.4rem;
  top: 0.4rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-gold);
}
.timeline-year {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--color-gold);
  letter-spacing: 0.1em;
}
.timeline-item h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0.25rem 0 0.5rem;
}
.timeline-item p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--color-text-soft);
  margin: 0;
}

/* ============================================================
   EVENT
============================================================ */
.countdown-block { margin-bottom: 1rem; }
.event-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 700px;
}
.event-card {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(201, 166, 103, 0.3);
  padding: 2.25rem 1.75rem;
  width: 280px;
  border-radius: var(--radius-soft);
}
.event-icon { font-size: 1.6rem; display: block; margin-bottom: 0.75rem; }
.event-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}
.event-day, .event-time, .event-place {
  font-size: 0.82rem;
  color: var(--color-text);
  margin: 0.2rem 0;
}
.btn-outline {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.65rem 1.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--color-gold);
  color: var(--color-text);
  background: transparent;
  border-radius: 999px;
  transition: background var(--transition-med), color var(--transition-med);
}
.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--color-gold);
  color: var(--color-white);
}

/* ============================================================
   LOCATION
============================================================ */
.location-section {
  min-height: 100vh;
  justify-content: center;
}
.location-address {
  max-width: 480px;
  width: 100%;
  max-width: 480px;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 253, 248, 0.22);
  border: 1px solid rgba(201, 166, 103, 0.18);
  border-radius: var(--radius-soft);
  box-shadow: 0 6px 16px rgba(60, 42, 20, 0.05);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
/* Pin trigger that opens the map modal */
.map-trigger {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(201, 166, 103, 0.18);
  border-radius: var(--radius-soft);
  background: rgba(255, 253, 248, 0.22);
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  box-shadow: 0 6px 16px rgba(60, 42, 20, 0.05);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: background var(--transition-med), transform var(--transition-med);
}
.map-trigger:hover, .map-trigger:focus-visible {
  background: rgba(255, 253, 248, 0.3);
}
.map-trigger-icon {
  display: inline-flex;
  color: var(--color-gold);
  transition: transform var(--transition-med);
}
.map-trigger:hover .map-trigger-icon {
  transform: translateY(-3px);
}
.map-trigger-label {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.location-section .btn-outline {
  border-color: rgba(201, 166, 103, 0.18);
  background: rgba(255, 253, 248, 0.22);
  box-shadow: 0 6px 16px rgba(60, 42, 20, 0.05);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.location-section .btn-outline:hover,
.location-section .btn-outline:focus-visible {
  background: rgba(255, 253, 248, 0.3);
  color: var(--color-text);
}

/* Modal that reveals the full embedded map */
.map-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
}
.map-modal[hidden] { display: none; }
.map-modal-content {
  position: relative;
  width: 100%;
  max-width: 760px;
  background: var(--color-white, #fff);
  border-radius: var(--radius-soft);
  padding: 2.5rem 1rem 1rem;
}
.map-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
}
.map-embed {
  width: 100%;
  min-height: 380px;
  height: 60vh;
  max-height: 450px;
  border-radius: var(--radius-soft);
  overflow: hidden;
  border: 1px solid rgba(201, 166, 103, 0.35);
  background: #f6f3ef; /* subtle background while tiles load */
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }
/* Ensure iframe receives pointer events and displays as block to avoid click-to-activate issues */
.map-embed iframe { display: block; pointer-events: auto; }

/* ============================================================
   GALLERY
============================================================ */
.gallery-swiper { width: 100%; max-width: 640px; padding-bottom: 3rem; }
.gallery-swiper .swiper-slide {
  border-radius: var(--radius-soft);
  overflow: hidden;
  aspect-ratio: 4/5;
  cursor: zoom-in;
}
.gallery-swiper .swiper-slide img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery-swiper .swiper-slide:hover img { transform: scale(1.06); }
.gallery-swiper .swiper-button-next, .gallery-swiper .swiper-button-prev { color: var(--color-gold); }
.gallery-swiper .swiper-pagination-bullet-active { background: var(--color-gold); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(62, 47, 35, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 2px; }
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--color-ivory);
  font-size: 2rem;
  line-height: 1;
}

/* ============================================================
   GIFT
============================================================ */
.gift-intro {
  max-width: 520px;
  font-size: 0.88rem;
  color: var(--color-text-soft);
  line-height: 1.7;
  margin-bottom: 2rem;
  padding: 1.2rem 1.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-soft);
  box-shadow: 0 12px 30px rgba(82, 62, 45, 0.04);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.gift-tabs {
  width: 100%;
  max-width: 460px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-soft);
  box-shadow: 0 12px 30px rgba(82, 62, 45, 0.04);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.gift-tab-buttons { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.gift-tab-btn {
  background: transparent;
  border: 1px solid rgba(201,166,103,0.28);
  padding: 0.55rem 1.1rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  color: var(--color-text-soft);
  transition: all var(--transition-med);
}
.gift-tab-btn.active { background: rgba(201,166,103,0.22); color: var(--color-text); border-color: rgba(201,166,103,0.38); }

.gift-tab-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201,166,103,0.15);
  border-radius: var(--radius-soft);
  padding: 1rem;
}

.qris-image { width: 220px; margin: 0 auto 1rem; border: 1px solid rgba(201,166,103,0.2); }
.gift-note { font-size: 0.8rem; color: var(--color-text-soft); }

/* ATM-style bank card */
.atm-card {
  position: relative;
  background: linear-gradient(135deg, #5a1a1e 0%, #3c0f12 55%, #2a0a0c 100%);
  border: 1px solid rgba(201,166,103,0.35);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
  text-align: left;
  color: var(--color-white);
  box-shadow: 0 14px 30px rgba(30, 5, 5, 0.35);
  overflow: hidden;
}
.atm-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(201,166,103,0.14), transparent 55%);
  pointer-events: none;
}
.atm-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.atm-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  width: 130px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
}
.atm-card-logo {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.atm-card-badge-text {
  color: #1a3a8f;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}
.atm-card-chip {
  width: 34px;
  height: 26px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold) 60%, #a3813f);
  position: relative;
}
.atm-card-chip::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(58, 38, 10, 0.45);
  border-radius: 3px;
}
.atm-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1.25rem;
  position: relative;
}
.atm-card-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
.atm-card-number {
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-white);
}
.atm-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}
.atm-card-holder { display: flex; flex-direction: column; gap: 0.2rem; }
.atm-card-name { font-style: italic; font-size: 0.9rem; color: var(--color-gold-light); }
.atm-copy {
  align-self: flex-end;
  margin-top: 0;
  background: var(--color-white);
  color: var(--color-white);
  -webkit-text-fill-color: var(--color-white);
  -webkit-appearance: none;
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
}
.atm-copy.copied { background: var(--color-gold); color: var(--color-white); }

.bank-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201,166,103,0.18);
  border-radius: var(--radius-soft);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.bank-name { font-family: var(--font-heading); font-size: 1.1rem; }
.bank-number { font-size: 1.1rem; letter-spacing: 0.06em; color: var(--color-gold); }
.bank-holder { font-size: 0.75rem; color: var(--color-text-soft); }
.btn-copy {
  align-self: flex-start;
  margin-top: 0.5rem;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--color-gold);
  padding: 0.4rem 0.9rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  color: var(--color-white);
  -webkit-text-fill-color: var(--color-white);
}
.btn-copy.copied { background: var(--color-gold); color: var(--color-white); }

/* ============================================================
   RSVP & WISH FORMS
============================================================ */
.rsvp-form, .wish-form {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
  margin-top: 2rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.rsvp-form input, .rsvp-form select, .rsvp-form textarea,
.wish-form input, .wish-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(139,115,85,0.3);
  background: rgba(255,253,248,0.9);
  border-radius: var(--radius-soft);
  color: var(--color-text);
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus,
.wish-form input:focus, .wish-form textarea:focus {
  border-color: var(--color-gold);
}
.form-error { font-size: 0.72rem; color: #a94442; min-height: 1em; }

.btn-submit {
  position: relative;
  background: var(--color-gold);
  color: var(--color-white);
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: transform var(--transition-med), background var(--transition-med);
}
.btn-submit:hover, .btn-submit:focus-visible { background: var(--color-dusty-brown); transform: translateY(-2px); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-status { font-size: 0.8rem; min-height: 1.2em; }
.form-status.success { color: #4c7a4c; }
.form-status.error { color: #a94442; }

/* ============================================================
   WISHES LIST
============================================================ */
.wishes-list-wrap { width: 100%; max-width: 480px; margin-top: 2.5rem; }
.wishes-sort {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: var(--color-text-soft);
}
.wishes-sort select {
  border: 1px solid rgba(139,115,85,0.3);
  background: var(--color-ivory);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-soft);
}
.wishes-list { display: flex; flex-direction: column; gap: 1rem; text-align: left; max-height: 420px; overflow-y: auto; padding-right: 0.5rem; }
.wish-item {
  display: flex;
  gap: 0.9rem;
  background: rgba(255,253,248,0.9);
  border: 1px solid rgba(201,166,103,0.25);
  border-radius: var(--radius-soft);
  padding: 1rem 1.2rem;
}
.wish-avatar {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--color-gold-light);
  color: var(--color-white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.95rem;
}
.wish-body { flex: 1; }
.wish-name { font-weight: 500; font-size: 0.85rem; margin: 0 0 0.2rem; }
.wish-message { font-size: 0.82rem; color: var(--color-text-soft); margin: 0 0 0.3rem; line-height: 1.5; }
.wish-time { font-size: 0.65rem; color: var(--color-dusty-brown); }
.wishes-empty { font-size: 0.85rem; color: var(--color-text-soft); text-align: center; }

/* ============================================================
   CLOSING
============================================================ */
.closing-section {
  padding-bottom: 5rem;
}
.closing-content {
  max-width: 500px;
  width: 100%;
  padding-bottom: 1rem;
  min-height: 83vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* start slightly below with zero opacity; `.in-view` will bring it up */
  transform: translateY(28px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}
.closing-content.in-view {
  transform: translateY(0);
  opacity: 1;
}
.closing-flourish { display: block; font-size: 1.6rem; color: var(--color-gold); margin-bottom: 1rem; }
.closing-title {
  color: var(--color-gold);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.6rem);
  margin: 0 0 1.25rem;
}
.closing-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
  max-width: 640px;
  width: 100%;
  /* auto top-margin pushes this element (and everything after it) to the
     bottom of .closing-content, leaving the title in its original spot */
  margin-top: auto;
  /* Constrain height for internal auto-scroll animation */
  max-height: 260px;
  overflow: hidden;
}
.closing-text { font-size: 0.95rem; line-height: 1.85; color: var(--color-text-soft); margin: 0; }
.closing-signature {
  margin: 1.75rem auto 0;
  font-family: var(--font-couple-name);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--color-gold);
  letter-spacing: 0.05em;
  text-transform: none;
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--color-text-soft);
  background: var(--color-cream);
}

/* ============================================================
   FLOATING UI
============================================================ */
.floating-music {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 500;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-ivory);
  border: 1px solid var(--color-gold-light);
  box-shadow: 0 8px 24px -8px rgba(62,47,35,0.3);
  display: flex; align-items: center; justify-content: center;
}
.music-disc {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--color-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-white);
  animation: disc-spin 5s linear infinite;
  animation-play-state: paused;
}
.floating-music[aria-pressed="true"] .music-disc { animation-play-state: running; }
@keyframes disc-spin { to { transform: rotate(360deg); } }

.floating-back-top {
  position: fixed;
  bottom: 1.75rem;
  right: 5.75rem;
  z-index: 500;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-ivory);
  border: 1px solid var(--color-gold-light);
  color: var(--color-gold);
  box-shadow: 0 8px 24px -8px rgba(62,47,35,0.3);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition-med), transform var(--transition-med);
}
.floating-back-top.is-visible { opacity: 1; transform: translateY(0); }

.floating-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
}
.floating-nav ul { display: flex; flex-direction: column; gap: 0.85rem; }
.floating-nav a span {
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(139,115,85,0.3);
  transition: all var(--transition-med);
}
.floating-nav a.is-active span {
  background: var(--color-gold);
  transform: scale(1.6);
}

/* magnetic / ripple helper classes applied via JS */
.magnetic-btn { will-change: transform; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(3); opacity: 0; } }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  :root { --left-width: 42%; --right-width: 58%; }
}

@media (max-width: 900px) {
  .split-layout { display: block; height: auto; }
  .left-panel { display: none; }
  .right-panel {
    width: 100%;
    height: auto;
    overflow: visible;
  }
  .section {
    min-height: 100vh;
    min-height: 100svh;
  }
  .section-bg,
  .section-bg-slideshow .slide {
    background-size: cover;
    background-position: center;
  }
  body { overflow-x: hidden; overflow-y: auto; }
  .floating-nav { display: none; } /* replaced by simplified mobile dots if desired */
}

@media (max-width: 600px) {
  .event-cards { flex-direction: column; align-items: center; }
  .floating-music { right: 1.1rem; bottom: 1.1rem; }
  .floating-back-top { right: 1.1rem; bottom: 4.6rem; }
}

@media (max-width: 900px) {
  .location-section {
    min-height: 100svh;
  }
  .location-address {
    max-width: 480px;
  }
  .location-section .map-trigger,
  .location-section .btn-outline {
    flex-shrink: 0;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .hero-title { font-size: clamp(2.2rem, 6vw, 3.2rem); }
}
