* {
  box-sizing: border-box;
}

/* Base Typography Foundation */
h1,
h2,
h3,
h4,
h5,
h6,
.script-title,
.section-script,
.serif-title,
.monogram,
.time-box,
.timeline-time,
.message-author,
.quote-author,
.rsvp-text {
  font-family: var(--font-primary);
}

p,
a,
span,
label,
input,
textarea,
select,
button,
.message-text,
.quote-text,
.rsvp-label,
.rsvp-submit-btn {
  font-family: var(--font-secondary);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-secondary);
  background: radial-gradient(circle at center, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
  animation: bgShift 18s ease-in-out infinite alternate;
  color: var(--text);
  overflow-x: hidden;
  transition: background-color .5s ease, color .5s ease;
}

body.locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 6px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--gold), #e9d7b9);
  z-index: 200;
  box-shadow: 0 0 16px rgba(197, 168, 128, .75);
  width: 0%;
}

.particles,
.sparkles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.particle,
.sparkle {
  position: absolute;
  border-radius: 999px;
  opacity: 0;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.particle {
  width: 6px;
  height: 6px;
  background: rgba(197, 168, 128, .4);
  animation-name: particleFloat;
}

.sparkle {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(230, 204, 128, .95) 25%, rgba(230, 204, 128, 0) 75%);
  filter: drop-shadow(0 0 10px rgba(230, 204, 128, .6));
  animation-name: sparkleFloat;
}

@keyframes particleFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(.2);
    opacity: 0;
  }

  10% {
    opacity: .5;
  }

  100% {
    transform: translate3d(var(--dx), calc(-180px - var(--dy)), 0) scale(1.2);
    opacity: 0;
  }
}

@keyframes sparkleFloat {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(.2);
    opacity: 0;
  }

  20% {
    opacity: .8;
  }

  100% {
    transform: translate3d(var(--dx), calc(-140px - var(--dy)), 0) rotate(180deg) scale(1);
    opacity: 0;
  }
}

.blob,
.blob-2 {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .18;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

.blob {
  top: -10rem;
  left: -10rem;
  background: var(--purple);
  animation: blobDrift 20s ease-in-out infinite alternate;
}

.blob-2 {
  right: -10rem;
  bottom: -10rem;
  background: var(--gold);
  animation: blobDrift 26s ease-in-out infinite alternate-reverse;
}

/* ===== LIGHT-THEME ONLY SPECIAL EFFECTS ===== */

/* Animated background gradient shift */
@keyframes bgShift {
  0% {
    background-position: 0% 0%;
  }

  33% {
    background-position: 100% 0%;
  }

  66% {
    background-position: 100% 100%;
  }

  100% {
    background-position: 0% 100%;
  }
}

/* Blob drift animation */
@keyframes blobDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(60px, 40px) scale(1.12);
  }

  100% {
    transform: translate(-40px, 80px) scale(.92);
  }
}

/* Rose petal canvas */
#petalCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity .5s ease;
}

html.dark #petalCanvas {
  opacity: 0;
}

/* Shimmer sweep on panels / gallery cards */
html:not(.dark) .panel,
html:not(.dark) .gallery-card,
html:not(.dark) .time-box,
html:not(.dark) .message-item {
  overflow: hidden;
}

html:not(.dark) .panel::after,
html:not(.dark) .gallery-card::after,
html:not(.dark) .time-box::after,
html:not(.dark) .message-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
      transparent 35%,
      rgba(255, 255, 255, .2) 50%,
      transparent 65%);
  transform: translateX(-120%);
  transition: transform .0s;
  pointer-events: none;
  border-radius: inherit;
  z-index: 10;
}

html:not(.dark) .panel:hover::after,
html:not(.dark) .gallery-card:hover::after,
html:not(.dark) .time-box:hover::after,
html:not(.dark) .message-item:hover::after {
  transform: translateX(220%);
  transition: transform .65s ease;
}

/* Glowing countdown time-boxes in light mode */
html:not(.dark) .time-box {
  animation: timeBoxGlow 3s ease-in-out infinite alternate;
  box-shadow: 0 0 20px var(--gold-glow), var(--shadow);
}

@keyframes timeBoxGlow {
  0% {
    box-shadow: 0 0 14px var(--gold-glow), var(--shadow);
    border-color: var(--gold-glow);
  }

  50% {
    box-shadow: 0 0 32px var(--purple-glow), 0 0 14px var(--gold-glow), var(--shadow);
    border-color: var(--purple-glow);
  }

  100% {
    box-shadow: 0 0 20px var(--gold-glow), var(--shadow);
    border-color: var(--gold-glow);
  }
}

/* Hero title shimmer / iridescent effect in light mode */
html:not(.dark) .hero .script-title {
  background: linear-gradient(90deg,
      var(--purple) 0%,
      var(--gold) 25%,
      #fff 45%,
      var(--purple) 60%,
      var(--gold) 75%,
      var(--purple) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 5s linear infinite;
  padding: 0.25em 0;
  margin: -0.25em 0;
}

@keyframes shimmerText {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* Animated timeline dots in light mode */
html:not(.dark) .timeline-dot {
  animation: dotPulse 2.8s ease-in-out infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 var(--gold-glow), var(--shadow);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(0, 0, 0, 0), var(--shadow);
  }
}

/* Section shimmer divider */
html:not(.dark) .glass-band {
  position: relative;
}

html:not(.dark) .glass-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(197, 168, 128, .05) 20%,
      rgba(255, 255, 255, .12) 50%,
      rgba(197, 168, 128, .05) 80%,
      transparent 100%);
  background-size: 200% 100%;
  animation: bandShimmer 6s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes bandShimmer {
  0% {
    background-position: -100% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Floating hearts / stars in light mode - extra decoration */
html:not(.dark) .floating-badge,
html:not(.dark) .floating-badge-2 {
  box-shadow: 0 0 22px rgba(197, 168, 128, .45), var(--shadow);
}

/* Portrait ring glow in light mode */
html:not(.dark) .ring {
  box-shadow: 0 0 18px rgba(197, 168, 128, .25);
  border-color: rgba(197, 168, 128, .5);
}

html:not(.dark) .ring-2 {
  border-color: rgba(139, 107, 142, .35);
}

/* Scroll progress bar shimmer */
html:not(.dark) .progress {
  background: linear-gradient(90deg, #c5a880, #e8c4c8, #a385a6, #c5a880);
  background-size: 200% 100%;
  animation: progressShimmer 2.5s linear infinite;
}

@keyframes progressShimmer {
  0% {
    background-position: 0% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Cursor trail canvas */
#cursorCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  transition: opacity .4s ease;
}

html.dark #cursorCanvas {
  opacity: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #f1f3f5 0%, #dee2e6 100%);
  transition: opacity 1s ease, visibility 1s ease, transform 1s ease;
  will-change: transform, opacity, visibility;
}

.overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
}

.intro {
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 2rem;
  width: min(100%, 540px);
}

.script-title {
  font-family: var(--font-primary);
  color: var(--purple);
  margin: 0;
  line-height: .95;
  letter-spacing: 1px;
  text-shadow: 0 8px 25px rgba(139, 107, 142, .15);
}

.intro .script-title {
  font-size: clamp(4rem, 10vw, 6rem);
}

.section-script {
  font-size: clamp(3rem, 7vw, 5rem);
}

.serif-title {
  font-family: var(--font-primary);
  color: var(--gold);
  font-weight: 600;
  margin: .3rem 0 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .72rem;
  color: var(--muted);
}

.envelope-wrap {
  margin: 2rem auto 0;
  width: min(72vw, 290px);
  height: calc(min(72vw, 290px) * .67);
  position: relative;
  perspective: 1200px;
  overflow: hidden;
}

.envelope {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 1.2s ease;
  will-change: transform;
}

.env-back,
.env-letter,
.env-front,
.env-flap,
.env-seal {
  position: absolute;
  border-radius: 16px;
}

.env-back {
  inset: 0;
  background: color-mix(in srgb, var(--bg) 90%, var(--gold));
  box-shadow: 0 20px 40px rgba(0, 0, 0, .15);
  z-index: 1;
}

.env-letter {
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: calc(100% - 16px);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(0, 0, 0, .05);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, .04);
  transition: transform .85s cubic-bezier(0.16, 1, 0.3, 1) .45s, opacity .85s ease .4s;
  opacity: .86;
  z-index: 2;
  will-change: transform, opacity;
}

.env-front {
  inset: 0;
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--bg) 95%, var(--gold)) 55%, color-mix(in srgb, var(--bg) 85%, var(--gold)));
  z-index: 3;
}

.env-flap {
  inset: 0;
  background: linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg) 90%, var(--gold)));
  clip-path: polygon(0 0, 50% 60%, 100% 0);
  transform-origin: top center;
  transition: transform .75s ease, z-index 0s .375s;
  z-index: 4;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .08);
  will-change: transform;
}

.env-seal {
  width: 64px;
  height: 64px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -42%);
  background: radial-gradient(circle at 35% 35%, var(--bg), var(--gold));
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.8rem;
  box-shadow: 0 14px 28px rgba(197, 168, 128, .32);
  z-index: 5;
  animation: pulseSeal 2.2s ease-in-out infinite;
  will-change: transform;
}

@keyframes pulseSeal {

  0%,
  100% {
    transform: translate(-50%, -42%) scale(1);
  }

  50% {
    transform: translate(-50%, -42%) scale(1.08);
  }
}

.envelope-wrap.opening .env-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-wrap.opening .env-letter {
  transform: translateY(-110px);
  opacity: 1;
}

.envelope-wrap.opening .env-seal {
  transform: translate(-50%, -42%) scale(0);
  opacity: 0;
  transition: all .25s ease;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  padding: 1.25rem 1.2rem;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease, backdrop-filter .3s ease;
}

.site-nav.scrolled {
  background: color-mix(in srgb, var(--card) 94%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
  padding: .8rem 1.2rem;
}

.nav-inner,
.container,
.container-narrow {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.container-narrow {
  width: min(920px, calc(100% - 2rem));
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.monogram {
  font-family: var(--font-primary);
  font-size: 3rem;
  color: var(--purple);
  line-height: 1;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outline-btn,
.primary-btn,
.ghost-btn,
.icon-btn {
  border-radius: 999px;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-nav-btn {
  gap: 0.6rem;
  font-weight: 700;
}

.login-nav-btn i {
  font-size: 1.25rem;
}

.outline-btn {
  padding: .8rem 1.3rem;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
}

.outline-btn:hover,
.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.outline-btn:hover {
  background: var(--gold);
  color: white;
}

.primary-btn {
  padding: 1rem 1.6rem;
  background: linear-gradient(135deg, var(--gold), #b59048);
  color: white;
  box-shadow: 0 20px 40px rgba(197, 168, 128, .28);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
}

.ghost-btn {
  padding: .95rem 1.45rem;
  background: linear-gradient(135deg, var(--purple), #a385a6);
  color: white;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 700;
  box-shadow: 0 18px 38px rgba(139, 107, 142, .28);
}

.icon-btn {
  width: 54px;
  height: 54px;
  background: var(--card);
  color: var(--gold);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.icon-btn.active {
  background: var(--gold);
  color: white;
}

.controls {
  position: fixed;
  left: 1.2rem;
  bottom: 1.2rem;
  z-index: 130;
  display: none;
  gap: .8rem;
  flex-direction: column;
}

.controls.visible {
  display: flex;
}

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.equalizer span {
  width: 4px;
  border-radius: 999px;
  background: currentColor;
  animation: equalizer 1s ease-in-out infinite;
}

.equalizer span:nth-child(2) {
  animation-duration: .6s;
}

.equalizer span:nth-child(3) {
  animation-duration: .8s;
}

@keyframes equalizer {

  0%,
  100% {
    height: 4px;
  }

  50% {
    height: 18px;
  }
}

main {
  opacity: 0;
  transition: opacity 1s ease;
  position: relative;
  z-index: 2;
}

main.revealed {
  opacity: 1;
}

section {
  position: relative;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 2rem;
  overflow: hidden;
  z-index: 1;
}

.hero-bg-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-bg-video,
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: bgScale 20s infinite alternate linear;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 15%, rgba(255, 255, 255, 0.2) 50%, var(--bg) 85%),
    linear-gradient(to bottom, var(--bg) 5%, transparent 30%, var(--bg) 95%);
  z-index: 1;
  opacity: 0.85;
}

html.dark .hero-bg-overlay {
  background: linear-gradient(to right, var(--bg) 15%, rgba(0, 0, 0, 0.3) 50%, var(--bg) 85%),
    linear-gradient(to bottom, var(--bg) 5%, transparent 30%, var(--bg) 95%);
}

@keyframes bgScale {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.1);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: center;
  transition: all 0.5s ease;
}

.hero-grid.no-media {
  grid-template-columns: 1fr;
  text-align: center;
}

.hero p {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-grid.no-media .script-title {
  margin-left: auto;
  margin-right: auto;
}

.hero-grid.no-media p {
  margin: 1.5rem auto;
}

.hero-media {
  position: relative;
  width: min(100%, 470px);
  margin-left: auto;
  transition: opacity 0.6s ease;
}

.hero-media.no-rings .ring,
.hero-media.no-rings .ring-2 {
  opacity: 0;
  visibility: hidden;
}

.ring,
.ring-2 {
  position: absolute;
  inset: -24px;
  border-radius: 50%;
  border: 1px solid rgba(197, 168, 128, .3);
  animation: slowSpin 22s linear infinite;
}

.ring-2 {
  inset: -48px;
  border-color: rgba(139, 107, 142, .2);
  animation-direction: reverse;
  animation-duration: 28s;
}

@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.portrait-wrap {
  width: min(72vw, 450px);
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  /* Shapes */
}

.portrait-wrap.circle {
  border-radius: 50%;
}

.portrait-wrap.squircle {
  border-radius: 20%;
}

.portrait-wrap.arch {
  border-radius: 50% 50% 0 0;
}

.portrait-wrap.hexagon {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.portrait-wrap.diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.portrait-wrap.blob {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.portrait-wrap.star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.portrait-wrap.pinterest {
  border-radius: 12px;
  aspect-ratio: 2/3;
  width: 85%;
  margin: 0 auto;
}

.portrait-wrap {
  border: 4px solid rgba(255, 255, 255, .5);
  box-shadow: 0 0 40px rgba(197, 168, 128, .25);
  background: var(--card);
  z-index: 2;
}

.portrait-wrap img,
.portrait-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
  display: block;
}

.media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(197, 168, 128, .15) 100%),
    radial-gradient(circle at center, transparent 30%, rgba(139, 107, 142, .1) 100%);
  z-index: 1;
  pointer-events: none;
}

.portrait-wrap:hover img,
.portrait-wrap:hover video {
  transform: scale(1.08);
}

.floating-badge,
.floating-badge-2 {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: var(--shadow);
  z-index: 3;
  animation: floatY 4s ease-in-out infinite;
}

.floating-badge {
  right: -10px;
  top: 10px;
  background: rgba(197, 168, 128, .24);
  color: var(--gold);
  font-size: 2rem;
}

.floating-badge-2 {
  left: -6px;
  bottom: 8px;
  width: 56px;
  height: 56px;
  background: rgba(139, 107, 142, .22);
  color: var(--purple);
  animation-duration: 5s;
  animation-direction: reverse;
  font-size: 1.4rem;
}

@keyframes floatY {

  0%,
  100% {
    transform: translateY(-10px) rotate(0deg);
  }

  50% {
    transform: translateY(10px) rotate(10deg);
  }
}

.scroll-hint {
  margin-top: 2.5rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--gold);
  opacity: .55;
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(10px);
  }
}

.glass-section,
.soft-section {
  padding: 6rem 0;
}

.glass-band {
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(14px);
  border-block: 1px solid var(--border);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.time-card {
  min-width: 92px;
  text-align: center;
}

.time-box {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  background: var(--card);
  border-radius: 22px;
  border: 1px solid var(--border);
  margin: 0 auto .8rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  font-family: var(--font-primary);
  font-size: 2.2rem;
  color: var(--purple);
}

.timeline {
  position: relative;
  margin-top: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(197, 168, 128, .35);
  transform: translateX(-50%);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 68px 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.timeline-time {
  text-align: right;
  font-family: var(--font-primary);
  color: var(--gold);
  font-size: 1.2rem;
  padding-right: 1rem;
}

.timeline-dot {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  background: var(--card);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow);
  font-size: 1.2rem;
  color: var(--purple);
  z-index: 2;
}

.timeline-title {
  font-size: 1.06rem;
  color: var(--text);
  padding-left: 1rem;
}

.info-grid,
.guestbook-grid,
.location-grid {
  display: grid;
  gap: 1.5rem;
}

/* Carousel / Slideshow Styles */
.carousel-container {
  position: relative;
  width: min(100%, 380px);
  margin: 2rem auto 0;
  aspect-ratio: 3 / 4;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--card);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 1s ease-in-out;
  pointer-events: none;
  transform: scale(1.05);
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 40%, transparent);
  cursor: pointer;
  transition: background 0.4s ease, transform 0.4s ease;
}

.carousel-dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

.tilt-card {
  transform-style: preserve-3d;
  transition: transform .18s ease, box-shadow .25s ease;
  will-change: transform;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: pointer;
  background: var(--card);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(139, 107, 142, .28);
  color: white;
  font-size: 2rem;
  opacity: 0;
  transition: opacity .35s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.info-grid,
.location-grid,
.guestbook-grid {
  grid-template-columns: repeat(2, 1fr);
}

.guestbook-grid {
  gap: 2.5rem;
  align-items: start;
}

.location-grid {
  gap: 2.5rem;
  align-items: start;
}

.info-grid {
  gap: 2rem;
}

.panel {
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  height: 100%;
  position: relative;
}

.panel.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.panel-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(139, 107, 142, .12);
  color: var(--gold);
  font-size: 1.8rem;
  margin-bottom: .4rem;
}

.messages {
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .5rem 1rem .5rem .5rem;
  margin-right: -1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.message-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .04);
  animation: messagePop .4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.message-item::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 10px;
  font-family: var(--font-primary);
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.1;
  pointer-events: none;
}

.message-text {
  /* Removed hardcoded font-family to favor global rule */
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.message-author {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--purple);
  font-size: 0.95rem;
}

.message-author::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

@keyframes messagePop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.field,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--text);
  border-radius: 18px;
  padding: .95rem 1rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.field:focus,
.textarea:focus,
.select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(139, 107, 142, .12);
}

.map-frame {
  width: 100%;
  height: 500px;
  border: 0;
  border-radius: var(--radius-xl);
  filter: none;
  transition: box-shadow .5s ease;
  box-shadow: var(--shadow-strong);
}

.map-frame:hover {
  box-shadow: 0 30px 60px rgba(0, 0, 0, .18);
}

.cta {
  padding: 7rem 0;
  text-align: center;
  overflow: hidden;
}

.cta .container-narrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 760px;
  height: 360px;
  transform: translate(-50%, -50%);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  filter: blur(60px);
  border-radius: 50%;
  z-index: -1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(100%, 520px);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-strong);
  animation: modalIn .35s ease;
  overflow: hidden;
}

.modal-card.small {
  width: min(100%, 430px);
}

.modal-card::before,
.modal-card::after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  filter: blur(36px);
  opacity: .28;
  pointer-events: none;
}

.modal-card::before {
  top: -80px;
  left: -80px;
  background: var(--purple);
}

.modal-card::after {
  right: -80px;
  bottom: -80px;
  background: var(--gold);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: var(--text);
  display: grid;
  place-items: center;
  z-index: 2;
}

.login-avatar {
  width: 82px;
  height: 82px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(139, 107, 142, .2), rgba(197, 168, 128, .22));
  border: 1px solid rgba(255, 255, 255, .25);
  color: var(--purple);
  font-size: 2rem;
  position: relative;
  z-index: 1;
}

.password-wrap {
  position: relative;
}

.toggle-pass {
  position: absolute;
  right: .85rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  padding: .2rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 420;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .4);
  animation: modalIn .35s ease;
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: white;
  font-size: 1.2rem;
}

.reveal-delay-1 {
  transition-delay: .12s;
}

.reveal-delay-2 {
  transition-delay: .24s;
}

.reveal-delay-3 {
  transition-delay: .36s;
}

.reveal-delay-4 {
  transition-delay: .48s;
}

.centered {
  text-align: center;
}

.muted {
  color: var(--muted);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: .5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.hidden-mobile {
  display: inline-flex;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--purple);
}

@media (max-width: 980px) {

  .hero-grid,
  .info-grid,
  .guestbook-grid,
  .location-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 8rem;
  }

  .hero-media {
    margin: 0 auto;
    display: flex;
    justify-content: center;
  }

  .hero .center-sm {
    text-align: center;
    margin-inline: auto;
  }

  .hidden-mobile {
    display: none;
  }
}

@media (max-width: 760px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline::before {
    left: 24px;
    transform: none;
  }

  .timeline-item {
    grid-template-columns: 48px 1fr;
    gap: .8rem;
    align-items: start;
  }

  .timeline-time {
    grid-column: 2;
    text-align: left;
    padding: 0;
    margin-bottom: .2rem;
  }

  .timeline-dot {
    grid-row: span 2;
    width: 48px;
    height: 48px;
  }

  .timeline-title {
    grid-column: 2;
    padding: 0;
  }

  .countdown-grid {
    gap: .7rem;
  }

  .time-box {
    width: 76px;
    height: 76px;
    font-size: 1.9rem;
  }

  .panel,
  .modal-card {
    padding: 1.4rem;
  }
}

@media (max-width: 520px) {

  .container,
  .container-narrow,
  .nav-inner {
    width: min(100% - 1.25rem, 1120px);
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
  }

  .countdown-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: .75rem;
  }

  .time-card {
    width: auto;
    min-width: 0;
  }

  .time-box {
    width: 68px;
    height: 68px;
    font-size: 1.6rem;
  }

  .outline-btn,
  .primary-btn,
  .ghost-btn {
    width: 100%;
    justify-content: center;
  }

  .nav-inner .login-nav-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    gap: 0;
  }

  .login-nav-btn .desktop-text {
    display: none;
  }

  .login-nav-btn i {
    font-size: 1.4rem;
  }

  .nav-inner {
    gap: .5rem;
  }

  .monogram {
    font-size: 2.2rem;
    max-width: 150px;
  }

  .controls {
    left: .8rem;
    bottom: .8rem;
  }
}

/* RSVP Modal Specific Styles */
.rsvp-card {
  background: #fffdfb;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 4px solid #ede4db;
  max-width: 400px;
}

.rsvp-card .close-btn {
  top: 0.8rem;
  right: 0.8rem;
  background: transparent;
  color: #777;
  border: 1px solid #ddd;
}

.rsvp-header-img {
  width: 100%;
  margin-top: -1rem;
}

.rsvp-content {
  padding: 0 2rem 2.5rem;
}

.rsvp-text {
  color: #c5a880;
  font-family: var(--font-primary);
  font-size: 1.05rem;
  text-align: center;
  margin: 1.5rem 0 1.2rem;
  line-height: 1.4;
}

.rsvp-label {
  display: block;
  color: #ab8eaf;
  /* Removed hardcoded font-family to favor global rule */
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  text-align: left;
}

.rsvp-field {
  width: 100%;
  background: #fdfaf6;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #666;
  border-radius: 4px;
  outline: none;
  transition: background 0.3s ease;
}

.rsvp-field:focus {
  background: #f5eedf;
}

.rsvp-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ab8eaf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

.rsvp-submit-btn {
  background: #b68ec4;
  color: white;
  border: none;
  padding: 0.6rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  /* Removed hardcoded font-family to favor global rule */
}

.rsvp-submit-btn:hover {
  background: #9d77aa;
  transform: translateY(-2px);
}

.rsvp-hidden {
  display: none !important;
}

/* ==========================================================================
   QUOTE SECTION
   ========================================================================== */
.quote-section {
  padding: 6rem 1rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.quote-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 2rem;
}

.quote-text {
  /* Removed hardcoded font-family to favor global rule */
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-style: italic;
  color: var(--purple);
  line-height: 1.6;
  font-weight: 500;
  position: relative;
  z-index: 2;
  text-align: center;
}

.quote-author {
  margin-top: 1.5rem;
  font-family: var(--font-primary);
  font-size: 1.1rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  text-align: center;
}

.quote-icon-top,
.quote-icon-bottom {
  position: absolute;
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.15;
  z-index: 1;
}

.quote-icon-top {
  top: -1rem;
  left: -1rem;
}

.quote-icon-bottom {
  bottom: -1rem;
  right: -1rem;
  transform: rotate(180deg);
}

/* ==========================================================================
   STORY SECTION
   ========================================================================== */
.story-section {
  padding: 8rem 1rem;
  background: color-mix(in srgb, var(--bg), transparent 40%);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.story-image-wrap {
  position: relative;
  padding: 1rem;
}

.story-img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
  border: 4px solid var(--card);
}

.story-img-decoration {
  position: absolute;
  top: -2rem;
  left: -2rem;
  width: 100%;
  height: 100%;
  border: 2px solid var(--gold);
  border-radius: 2rem;
  z-index: 1;
  opacity: 0.3;
}

.story-content {
  padding: 1rem;
}

.story-text-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text);
  margin-top: 2rem;
  text-align: justify;
  opacity: 0.9;
}

@media (max-width: 868px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .story-content h3 {
    text-align: center !important;
  }

  .story-text-body {
    text-align: center;
  }

  .story-image-wrap {
    max-width: 500px;
    margin: 0 auto;
  }
}