/* ==========================================================
   WEDDING WEBSITE · Amelia & William
   style.css
   ========================================================== */

/* ---------- CSS VARIABLES ---------- */
:root {
  --burgundy:       #6B1A2A;
  --burgundy-dark:  #4E1020;
  --burgundy-mid:   #8B2535;
  --blush:          #FAF1F3;
  --blush-mid:      #F0D8DE;
  --cream:          #FDF8F4;
  --gold:           #C8A96E;
  --gold-light:     #E8D5AA;
  --muted:          #9B7A82;
  --text:           #2C1A1E;
  --text-light:     #6B4A52;
  --white:          #FFFFFF;
  --green:          #3D6B3A;

  --font-serif:     'Cormorant Garamond', Georgia, serif;
  --font-sans:      'Jost', 'Helvetica Neue', Arial, sans-serif;

  --max-width:      1100px;
  --section-pad:    80px 24px;
  --radius:         4px;
  --transition:     0.25s ease;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; border: 0; outline: none; background: var(--cream); }
body {
  font-family: var(--font-serif);
  background: var(--cream);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  border: 0;
  outline: none;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- UTILITY ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
}
.ornament {
  color: var(--gold);
  font-size: 18px;
  text-align: center;
  margin: 12px 0;
  display: block;
}
.ornament--light { color: #E8D5AA; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 13px 36px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border: 1px solid transparent;
}
.btn--ghost {
  border-color: rgba(255,255,255,0.6);
  color: var(--white);
  background: transparent;
  margin-top: 28px;
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
}
.btn--burgundy {
  background: var(--burgundy);
  color: var(--white);
  border-color: var(--burgundy);
}
.btn--burgundy:hover { background: var(--burgundy-dark); }
.btn--small {
  padding: 8px 20px !important;
  font-size: 9px !important;
  letter-spacing: 2px !important;
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: sticky;
  top: -1px;
  margin-top: -1px;
  z-index: 200;
  background: var(--cream);
  border-bottom: 1px solid var(--blush-mid);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 32px 16px;
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: 0 2px 16px rgba(107,26,42,0.08); }
.nav-logo {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(16px, 4.5vw, 20px);
  color: var(--burgundy);
  letter-spacing: clamp(1.5px, 0.6vw, 3px);
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--burgundy); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--burgundy);
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- HERO ---------- */
.hero {
  background-color: #661929;
  background-image: radial-gradient(circle at center, #862135 0%, #3d0b13 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 80px 24px;
}
.hero-content {
  position: relative;
  z-index: 10;
}

/* Animated Watercolor Flowers */
.hero-flower {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transform: scale(0);
}

.hero-flower img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-flower--left {
  --w: clamp(240px, 35vw, 420px);
  width: calc(2.3835 * var(--w));
  left: calc(-1.2155 * var(--w));
  bottom: calc(-0.5539 * var(--w));
  transform-origin: 51% 82.6%;
}

.hero-flower--right {
  --w: clamp(200px, 30vw, 360px);
  width: calc(1.8251 * var(--w));
  right: calc(-0.7078 * var(--w));
  bottom: calc(-0.0494 * var(--w));
  transform-origin: 61.2% 97.7%;
}

/* Trigger bloom and sway when invitation is opened */
body.invitation-opened .hero-flower--left {
  animation: bloom-left 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards,
             sway-left 8s ease-in-out 2s infinite alternate;
}

body.invitation-opened .hero-flower--right {
  animation: bloom-right 1.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards,
             sway-right 7s ease-in-out 2.2s infinite alternate;
}

/* Floating Sparkles */
.hero-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.sparkle {
  position: absolute;
  width: var(--s, 6px);
  height: var(--s, 6px);
  background-color: var(--gold-light);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold), 0 0 16px var(--white);
  opacity: 0;
  filter: blur(0.5px);
}

body.invitation-opened .sparkle {
  animation: float-sparkle var(--dur) linear var(--d) infinite;
}

/* KEYFRAMES */

/* Blooming */
@keyframes bloom-left {
  0% {
    transform: scale(0) rotate(-15deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes bloom-right {
  0% {
    transform: scale(0) rotate(15deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes bloom-center {
  0% {
    transform: scale(0) translate(-30px, 20px) rotate(-10deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) translate(0, 0) rotate(0deg);
    opacity: 0.85;
  }
}

/* Swaying (Wind Effect) */
@keyframes sway-left {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.02) rotate(2deg) translateY(-2px);
  }
}

@keyframes sway-right {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.01) rotate(-2deg) translateY(-1px);
  }
}

@keyframes sway-center {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.02) rotate(3deg) translateY(-2px) translateX(1px);
  }
}

/* Floating Sparkle Particles */
@keyframes float-sparkle {
  0% {
    transform: translateY(100px) translateX(0) scale(0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-80vh) translateX(var(--drift, 30px)) scale(0.4);
    opacity: 0;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .hero-flower--left {
    --w: 180px;
    left: calc(-1.2155 * var(--w) - 20px);
  }
  .hero-flower--right {
    --w: 150px;
    right: calc(-0.7078 * var(--w) - 20px);
  }
  
  /* Reduce sparkles on mobile for better performance */
  .sparkle:nth-child(even) {
    display: none;
  }
}

.hero-floral {
  display: none;
  position: absolute;
  width: 220px;
  pointer-events: none;
  opacity: 0.85;
}
.hero-floral img { object-fit: contain; }
.hero-floral--tl { top: -10px; left: -10px; transform: rotate(0deg); }
.hero-floral--tr { top: -10px; right: -10px; transform: rotate(90deg); }
.hero-floral--bl { bottom: -10px; left: -10px; transform: rotate(270deg); }
.hero-floral--br { bottom: -10px; right: -10px; transform: rotate(180deg); }
.hero-content { position: relative; z-index: 10; }
.hero-logo {
  width: clamp(70px, 15vw, 90px);
  height: clamp(70px, 15vw, 90px);
  margin: 0 auto 24px;
  display: block;
  transition: transform var(--transition), filter var(--transition);
}
.hero-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 8px rgba(200, 169, 110, 0.4));
}
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #D4A8B0;
  margin-bottom: 16px;
}
.hero-names {
  font-size: clamp(52px, 10vw, 88px);
  font-style: italic;
  font-weight: 400;
  color: var(--cream);
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero-amp {
  font-size: clamp(28px, 5vw, 42px);
  color: var(--gold);
  font-style: italic;
}
.hero-divider {
  margin: 24px auto;
  width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-divider span {
  display: block;
  width: 80px;
  height: 1px;
  background: var(--gold);
}
.hero-date {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #D4A8B0;
}
.hero-location {
  font-size: 15px;
  font-style: italic;
  color: rgba(253,248,244,0.75);
  margin-top: 6px;
}
.hero-hashtag {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 2px;
  color: #D4A8B0;
  margin-top: 24px;
  opacity: 0.85;
}

/* ---------- SPLIT COUPLE SECTIONS ---------- */
.couple-section-split {
  padding: 100px 0;
  overflow: hidden;
}

.couple-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.couple-img-col {
  display: flex;
  justify-content: center;
}

.couple-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.couple-shape-mask {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.5;
  border-radius: 1000px; /* Stadium/capsule shape */
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(107, 26, 42, 0.05);
  border: 1px solid var(--gold-light);
  background: var(--cream);
}

.couple-shape-mask img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

#bride .couple-shape-mask img {
  object-position: 75% center;
}

.couple-img-wrapper:hover .couple-shape-mask img {
  transform: scale(1.05);
}

.couple-info-col {
  display: flex;
  align-items: center;
}

.couple-info-content {
  max-width: 440px;
}

.couple-role-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 500;
}

.couple-split-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 400;
  color: var(--burgundy);
  line-height: 1.1;
  margin-bottom: 12px;
}

.couple-parents {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--text-light);
  margin-top: 10px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.couple-parents-title {
  margin-right: 5px;
}

.couple-split-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 24px;
}

.couple-split-bio {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.85;
  margin-bottom: 28px;
}

.couple-social-link .social-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--burgundy);
  border: 1px solid var(--blush-mid);
  padding: 10px 20px;
  border-radius: 4px;
  transition: all var(--transition);
}

.couple-social-link .social-link-btn:hover {
  background: var(--burgundy);
  color: var(--white);
  border-color: var(--burgundy);
}

.couple-social-link svg {
  stroke: currentColor;
}

/* Reverse section layout on desktop */
.couple-section-split--reverse .couple-img-col {
  order: 2;
}

.couple-section-split--reverse .couple-info-col {
  order: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .couple-section-split {
    padding: 60px 0;
  }
  
  .couple-split-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .couple-info-col {
    justify-content: center;
  }

  .couple-split-divider {
    margin: 0 auto 20px;
  }

  .couple-section-split--reverse .couple-img-col {
    order: 0; /* image on top on mobile */
  }

  .couple-section-split--reverse .couple-info-col {
    order: 1; /* text at bottom on mobile */
  }
}

/* ---------- SECTION SHARED ---------- */
.section { padding: var(--section-pad); }
.section--white { background: var(--white); }
.section--blush  { background: var(--blush); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(28px, 5vw, 40px);
  font-style: italic;
  font-weight: 400;
  color: var(--burgundy);
  line-height: 1.2;
}
.section-intro {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.7;
}
.section-intro strong { color: var(--burgundy); font-weight: 400; }

/* ---------- TIMELINE ---------- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--blush-mid);
  transform: translateX(-50%);
}
.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding: 0 calc(50% + 32px) 40px 0;
  position: relative;
}
.timeline-item--right {
  justify-content: flex-start;
  padding: 0 0 40px calc(50% + 32px);
}
.timeline-item--center {
  justify-content: center;
  padding: 0 0 0 0;
  flex-direction: column;
  align-items: center;
}
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--white);
  transform: translateX(-50%);
  z-index: 1;
}
.timeline-dot--large {
  width: 18px;
  height: 18px;
  background: var(--burgundy);
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  margin-bottom: 16px;
}
.timeline-card {
  background: var(--cream);
  border: 0.5px solid var(--blush-mid);
  border-radius: var(--radius);
  padding: 20px 24px;
  max-width: 320px;
}
.timeline-card--featured {
  max-width: 420px;
  border-color: var(--burgundy);
  background: var(--blush);
  text-align: center;
}
.timeline-year {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}
.timeline-event {
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  color: var(--burgundy);
  margin-bottom: 8px;
}
.timeline-card p {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.75;
}

/* ---------- GALLERY SLIDER ---------- */
.gallery-slider-wrapper {
  position: relative;
  width: 100%;
  margin: 40px auto 0;
}

.gallery-slider-container {
  overflow: hidden;
  width: 100%;
  border-radius: var(--radius);
}

.gallery-slider {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  gap: 24px;
}

.gallery-slider .gallery-item {
  flex: 0 0 calc(33.333% - 16px);
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--blush-mid);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.gallery-slider .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-slider .gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(107,26,42,0);
  transition: background var(--transition);
  z-index: 1;
}

.gallery-slider .gallery-item:hover .gallery-overlay {
  background: rgba(107,26,42,0.12);
}

/* Slider Controls */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--cream);
  border: 1px solid var(--blush-mid);
  color: var(--burgundy);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(107,26,42,0.08);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  z-index: 10;
}

.gallery-arrow:hover {
  background: var(--burgundy);
  color: var(--white);
  border-color: var(--burgundy);
}

.gallery-arrow--prev {
  left: -22px;
}

.gallery-arrow--next {
  right: -22px;
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.gallery-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.gallery-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--burgundy);
  opacity: 0.2;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-indicator.active {
  opacity: 1;
  transform: scale(1.3);
}

@media (max-width: 900px) {
  .gallery-slider .gallery-item {
    flex: 0 0 calc(50% - 12px);
  }
  .gallery-arrow--prev {
    left: -12px;
  }
  .gallery-arrow--next {
    right: -12px;
  }
}

@media (max-width: 480px) {
  .gallery-slider-wrapper {
    margin-top: 24px;
  }
  .gallery-slider {
    gap: 16px;
  }
  .gallery-slider .gallery-item {
    flex: 0 0 100%;
  }
  .gallery-arrow {
    display: none;
  }
}

/* ---------- DETAILS ---------- */
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.detail-card {
  background: var(--cream);
  border: 0.5px solid var(--blush-mid);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.detail-icon {
  width: 48px;
  height: 48px;
  background: var(--blush);
  border: 0.5px solid var(--blush-mid);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.detail-card h3 {
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  color: var(--burgundy);
  margin-bottom: 6px;
}
.detail-card p {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.detail-sub {
  color: var(--muted) !important;
  margin-top: 4px;
  font-size: 12px !important;
}

/* ---------- COUNTDOWN ---------- */
.countdown-section {
  background: var(--burgundy);
  padding: 60px 24px;
  text-align: center;
}
.countdown-label {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #D4A8B0;
  margin-bottom: 28px;
}
.countdown-boxes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cd-box {
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 18px 24px;
  min-width: 88px;
  text-align: center;
}
.cd-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 44px;
  font-style: italic;
  color: var(--cream);
  line-height: 1;
}
.cd-unit {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #D4A8B0;
  margin-top: 6px;
}
.cd-sep {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--gold);
  font-style: italic;
  margin-bottom: 20px;
}

/* ---------- RSVP FORM ---------- */
.rsvp-success {
  background: var(--white);
  border: 0.5px solid var(--blush-mid);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  font-style: italic;
  font-size: 17px;
  color: var(--burgundy);
}
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.req { color: var(--burgundy); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 0.5px solid var(--blush-mid);
  border-radius: var(--radius);
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239B7A82' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--burgundy); }
.form-group textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.form-footer { margin-top: 8px; }
.form-footer .btn { width: 100%; }
.form-error {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #A32D2D;
  text-align: center;
  padding: 10px;
  background: #FCEBEB;
  border-radius: var(--radius);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--burgundy-dark);
  padding: 60px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.footer-floral {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  opacity: 0.12;
  pointer-events: none;
}
.footer-floral img { object-fit: contain; height: 200px; }
.footer-content { position: relative; z-index: 1; }
.footer-names {
  font-size: 30px;
  font-style: italic;
  color: var(--cream);
  margin-bottom: 4px;
}
.footer-date {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #9B7A82;
}
.footer-hashtag {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 2px;
  color: #6B4A52;
  margin-top: 4px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .details-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  :root { --section-pad: 60px 20px; }
  .nav { padding: 15px 20px 14px; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--blush-mid);
    padding: 16px 24px 20px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .timeline::before { left: 16px; }
  .timeline-item,
  .timeline-item--right {
    justify-content: flex-start;
    padding: 0 0 32px 48px;
  }
  .timeline-dot { left: 16px; }
  .timeline-item--center { align-items: flex-start; padding-left: 48px; }
  .timeline-dot--large { position: absolute; left: 16px; transform: translateX(-50%); margin: 0; top: 8px; }
  .timeline-card, .timeline-card--featured { max-width: 100%; text-align: left; }
  .form-row { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hero-floral { width: 140px; }
}

@media (max-width: 480px) {
  .details-grid { grid-template-columns: 1fr; }
  .countdown-boxes { gap: 4px; }
  .cd-box { min-width: 64px; padding: 14px 12px; }
  .cd-num { font-size: 32px; }
  .cd-sep { font-size: 24px; }
}

/* ---------- MESSAGES CAROUSEL ---------- */
.carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 40px auto 0;
  overflow: hidden;
}
.messages-carousel {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.messages-carousel .message-card {
  min-width: 100%;
  box-sizing: border-box;
}
.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 32px;
  gap: 20px;
}
.carousel-btn {
  background: none;
  border: none;
  color: var(--burgundy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.carousel-btn:hover { 
  opacity: 0.7; 
  transform: scale(1.1);
}
.carousel-indicators {
  display: flex;
  gap: 12px;
}
.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--burgundy);
  opacity: 0.2;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.indicator.active {
  opacity: 1;
  transform: scale(1.3);
}
.message-card {
  background: var(--cream);
  padding: 32px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  text-align: center;
}
.message-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.5;
  color: #4A4A4A;
  margin-bottom: 16px;
}
.message-author {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--burgundy);
  font-weight: 500;
}

/* ---------- MUSIC PLAYER ---------- */
.music-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--burgundy);
  color: var(--white);
  border: none;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(107, 26, 42, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.music-toggle:hover {
  transform: scale(1.1);
  background-color: #5A1523;
}

@keyframes floatAndSpin {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(180deg); }
  100% { transform: translateY(0px) rotate(360deg); }
}

.music-toggle.is-playing .music-icon {
  animation: floatAndSpin 4s linear infinite;
}

/* Mute indication when paused */
.music-toggle:not(.is-playing)::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 28px;
  background-color: var(--white);
  transform: rotate(45deg);
  border-radius: 2px;
}

/* ========== ENVELOPE SPLASH COVER ========== */
:root {
  --env-w: 460px;
  --env-h: 300px;
}

@media (max-width: 480px) {
  :root {
    --env-w: 320px;
    --env-h: 210px;
  }
}

body.lock-scroll {
  overflow: hidden;
  height: 100vh;
}

.envelope-cover {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--blush);
  background-image: radial-gradient(circle at center, var(--cream) 0%, var(--blush) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.envelope-cover.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 2;
  transform: translateY(-90px);
  transition: transform 0.5s ease;
}

.envelope-cover.open .envelope-wrapper {
  transform: translateY(10px);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.5s;
}

@media (max-width: 768px) {
  .envelope-wrapper {
    transform: translateY(-60px);
  }
  .envelope-cover.open .envelope-wrapper {
    transform: translateY(20px);
  }
}

@media (max-width: 480px) {
  .envelope-wrapper {
    transform: translateY(-40px);
  }
  .envelope-cover.open .envelope-wrapper {
    transform: translateY(35px);
  }
  .envelope-card {
    padding: 16px 20px;
  }
  .card-names {
    font-size: 18px;
  }
  .card-btn {
    padding: 8px 20px !important;
  }
  .hero-flower--left {
    --w: 120px;
    left: calc(-1.2155 * var(--w) - 40px);
    bottom: calc(-0.5539 * var(--w) - 30px);
  }
  .hero-flower--right {
    --w: 100px;
    right: calc(-0.7078 * var(--w) - 30px);
    bottom: calc(-0.0494 * var(--w) - 30px);
  }
  .couple-parents span {
    display: block;
  }
  .couple-parents-title {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 2px;
    margin-right: 0;
  }
  .couple-parents-names {
    font-size: 16px;
  }
}

.envelope-instruction {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--muted);
  opacity: 0.8;
}

.envelope-tap-hint {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  opacity: 0.7;
  animation: hintPulse 2.5s infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(2px); }
}

.envelope {
  position: relative;
  width: var(--env-w);
  height: var(--env-h);
  background-color: #3E0F18; /* Dark interior shadow */
  box-shadow: 0 16px 40px rgba(107, 26, 42, 0.15);
  border-radius: var(--radius);
  perspective: 1000px;
}

/* Flap with 3D Rotate */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  transform-origin: top;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), z-index 0s ease 0.4s;
  z-index: 4;
}

.flap-outer {
  position: absolute;
  inset: 0;
  background-color: var(--burgundy-mid);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.flap-inner {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blush) 0%, var(--cream) 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  backface-visibility: hidden;
  transform: rotateX(180deg);
  z-index: 1;
  box-shadow: inset 0 0 15px rgba(200, 169, 110, 0.15);
}

/* Adding a gold floral outline to inner flap lining */
.flap-inner::before {
  content: '✦';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 16px;
}

/* Invitation Card (Slides Up) */
.envelope-card {
  position: absolute;
  bottom: 5%;
  left: 5%;
  width: 90%;
  height: 86%;
  background: var(--white);
  background-image: radial-gradient(var(--cream) 35%, transparent 35%);
  background-size: 4px 4px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  z-index: 2;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px solid var(--blush-mid);
  box-sizing: border-box;
}

.card-content {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-eyebrow {
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.card-names {
  font-size: clamp(20px, 3.5vw, 25px);
  font-style: italic;
  font-weight: 400;
  color: var(--burgundy);
  line-height: 1.15;
  margin-bottom: 2px;
}

.card-divider {
  color: var(--gold);
  font-size: 11px;
  margin: 4px 0;
}

.card-date {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 400;
}

.card-location {
  font-size: 12px;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 12px;
}

.card-btn {
  padding: 10px 24px !important;
  font-size: 9px !important;
  letter-spacing: 2.5px !important;
}

/* Folds (Left, Right, Bottom) */
.envelope-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 51%;
  height: 100%;
  background-color: var(--burgundy-dark);
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  z-index: 3;
}

.envelope-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 51%;
  height: 100%;
  background-color: #430E1B; /* Dark shadow variant */
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  z-index: 3;
}

.envelope-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background-color: var(--burgundy);
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  z-index: 3;
}

/* Organic Textured Wax Seal */
.envelope-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: radial-gradient(circle at 35% 35%, #EEDCAE 0%, var(--gold) 65%, #A18141 100%);
  border-radius: 50% 48% 52% 49% / 49% 51% 48% 52%; /* Irregular organic edges */
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 
              inset 0 2px 3px rgba(255, 255, 255, 0.35), 
              inset -2px -2px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              opacity 0.4s ease, 
              visibility 0.4s ease;
}

.envelope-seal:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.seal-inner {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 500;
  color: var(--burgundy-dark);
  letter-spacing: 0.5px;
  border: 1px double rgba(107, 26, 42, 0.35);
  border-radius: 50% 49% 51% 48% / 48% 52% 49% 51%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  user-select: none;
}

.seal-logo {
  width: 28px;
  height: 28px;
  fill: var(--burgundy-dark);
  opacity: 0.8;
  filter: drop-shadow(0 -0.5px 0.5px rgba(0, 0, 0, 0.5)) drop-shadow(0 0.5px 0.5px rgba(255, 255, 255, 0.35));
  transition: transform 0.25s ease;
}

/* BOTANICAL BACKGROUND ILLUSTRATION (BOUQUET) */
.cover-bg-flowers {
  position: absolute;
  bottom: -30px; /* Hide bottom flat edge off-screen */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  min-width: 1200px; /* Maintain height and layout details */
  max-width: 1920px;
  pointer-events: none;
  z-index: 1; /* behind envelope but in front of background gradient */
  opacity: 0.95;
  transition: transform 2.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.2s ease;
}

.cover-bg-flowers img {
  width: 100%;
  height: auto;
  display: block;
  transform-origin: bottom center;
  animation: flowerSway 14s ease-in-out infinite; /* Slower, more natural breeze sway */
}

@keyframes flowerSway {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1.02); /* Slight scale to guarantee bottom bleed */
  }
  50% {
    transform: translateY(-6px) rotate(0.4deg) scale(1.025);
  }
}

/* Parallax dispersion on envelope open */
.envelope-cover.open .cover-bg-flowers {
  transform: translateX(-50%) translateY(40px) scale(0.98);
  opacity: 0.6;
}

@media (max-width: 1024px) {
  .cover-bg-flowers {
    min-width: 1300px;
  }
}

@media (max-width: 768px) {
  .cover-bg-flowers {
    min-width: 1100px;
    bottom: -30px;
  }
}

@media (max-width: 480px) {
  .cover-bg-flowers {
    min-width: 900px;
    bottom: -30px;
  }
}


/* OPEN ANIMATION TRIGGERS */
.envelope.open .envelope-flap {
  transform: rotateX(-180deg);
  z-index: 1;
}

.envelope.open .envelope-card {
  transform: translateY(-72%);
}

.envelope.open .envelope-seal {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.7);
  pointer-events: none;
}

/* ---------- SCROLL REVEAL & OPEN ENTRANCE ANIMATIONS ---------- */
.hero-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s,
              transform 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

body.invitation-opened .hero-content {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll Direction Variations */
.scroll-reveal--left {
  transform: translateX(-40px);
}
.scroll-reveal--left.revealed {
  transform: translateX(0);
}

.scroll-reveal--right {
  transform: translateX(40px);
}
.scroll-reveal--right.revealed {
  transform: translateX(0);
}

/* Staggered Delay Utilities */
.scroll-delay-100 { transition-delay: 0.1s; }
.scroll-delay-200 { transition-delay: 0.2s; }
.scroll-delay-300 { transition-delay: 0.3s; }
.scroll-delay-400 { transition-delay: 0.4s; }
.scroll-delay-500 { transition-delay: 0.5s; }

/* Responsive adjustments for reveal transitions */
@media (max-width: 768px) {
  /* On mobile, prefer pure fade-up over horizontal slides for cleaner flow */
  .scroll-reveal--left,
  .scroll-reveal--right {
    transform: translateY(30px);
  }
}

/* Reduced motion preference compliance */
@media (prefers-reduced-motion: reduce) {
  .hero-content {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


