:root {
  --splash-duration: 20s;
  --splash-circumference: 327;
  --midnight: #0f2725;
  --pine: #183634;
  --ink: #091111;
  --champagne: #f3e5c6;
  --ivory: #fff8ec;
  --rose-gold: #cc935e;
  --wine: #672b2e;
  --glass: rgba(255, 248, 236, 0.16);
  --glass-border: rgba(255, 248, 236, 0.28);
  --text-light: #fff9f0;
  --text-deep: #16302d;
  --shadow-soft: 0 12px 30px rgba(7, 15, 14, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--text-light);
  background:
    radial-gradient(circle at 20% 20%, rgba(204, 147, 94, 0.24), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(243, 229, 198, 0.15), transparent 40%),
    linear-gradient(130deg, var(--midnight), var(--pine) 60%, #0e201f);
  min-height: 100vh;
  overflow-x: hidden;
}

body.splash-active {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
  opacity: 0.38;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.3;
  z-index: 1;
}

.ambient-glow {
  position: fixed;
  inset: -20vh -20vw auto;
  height: 80vh;
  background: radial-gradient(circle at center, rgba(204, 147, 94, 0.28), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
  animation: drift 10s ease-in-out infinite alternate;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: #0d1f1d;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-slideshow,
.splash-overlay {
  position: absolute;
  inset: 0;
}

.splash-slideshow {
  width: 100%;
  height: 100%;
}

.splash-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  filter: saturate(0.9) brightness(0.46);
  transform: scale(1.02);
  will-change: opacity, transform;
}

.splash-slide.active {
  opacity: 1;
  animation-duration: 3.8s;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  animation-fill-mode: forwards;
}

.splash-slide.active[data-kb="0"] { animation-name: kenBurns0; }
.splash-slide.active[data-kb="1"] { animation-name: kenBurns1; }
.splash-slide.active[data-kb="2"] { animation-name: kenBurns2; }
.splash-slide.active[data-kb="3"] { animation-name: kenBurns3; }
.splash-slide.active[data-kb="4"] { animation-name: kenBurns4; }

.slide.active {
  opacity: 1;
  animation-duration: 5s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

.slide.active[data-kb="0"] { animation-name: kenBurns0; }
.slide.active[data-kb="1"] { animation-name: kenBurns1; }
.slide.active[data-kb="2"] { animation-name: kenBurns2; }
.slide.active[data-kb="3"] { animation-name: kenBurns3; }

.splash-overlay {
  background:
    radial-gradient(circle at 50% 20%, rgba(243, 229, 198, 0.2), transparent 45%),
    linear-gradient(180deg, rgba(8, 16, 15, 0.38), rgba(8, 16, 15, 0.78));
}

.splash-content {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 2rem));
  text-align: center;
  color: var(--ivory);
  padding: 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 248, 236, 0.35);
  background: rgba(255, 248, 236, 0.08);
  backdrop-filter: blur(7px);
  box-shadow: 0 20px 38px rgba(6, 12, 11, 0.32);
}

.splash-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  color: rgba(255, 248, 236, 0.92);
}

.splash-content h2 {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
}

.splash-title {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.splash-title::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -120%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 248, 236, 0.7), transparent);
  animation: lightSweep 5s ease-in-out infinite;
}

.splash-text {
  margin: 0.6rem 0 0;
  color: rgba(255, 248, 236, 0.92);
}

.splash-ring {
  width: 124px;
  height: 124px;
  margin: 1rem auto 0;
  position: relative;
  display: grid;
  place-items: center;
}

.splash-ring svg {
  width: 124px;
  height: 124px;
  transform: rotate(-90deg);
}

.ring-track,
.ring-progress {
  fill: none;
  stroke-width: 6;
}

.ring-track {
  stroke: rgba(255, 248, 236, 0.2);
}

.ring-progress {
  stroke: #f0c792;
  stroke-linecap: round;
  stroke-dasharray: var(--splash-circumference);
  stroke-dashoffset: var(--splash-circumference);
  transition: stroke-dashoffset 0.2s linear;
}

.splash-timer {
  margin: 0;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.atmosphere-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(32px);
  opacity: 0.24;
  animation: blobDrift 16s ease-in-out infinite alternate;
}

.blob-a {
  width: 320px;
  height: 320px;
  top: 8%;
  left: -80px;
  background: rgba(204, 147, 94, 0.58);
}

.blob-b {
  width: 260px;
  height: 260px;
  right: -70px;
  top: 42%;
  background: rgba(243, 229, 198, 0.38);
  animation-duration: 18s;
}

.blob-c {
  width: 210px;
  height: 210px;
  left: 42%;
  bottom: -80px;
  background: rgba(103, 43, 46, 0.32);
  animation-duration: 20s;
}

.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  mix-blend-mode: screen;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 252, 220, 1);
  box-shadow: 0 0 4px 1px rgba(255, 248, 200, 0.7);
  animation: twinkle linear infinite;
}

.hero,
main,
.footer {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 1.2rem clamp(1rem, 2.6vw, 2.4rem) 2.6rem;
  isolation: isolate;
}

.hero-media-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.parallax-layer {
  position: absolute;
  inset: -6%;
  z-index: 1;
  pointer-events: none;
  transition: transform 0.3s ease;
}

.layer-back {
  background:
    radial-gradient(circle at 20% 30%, rgba(243, 229, 198, 0.22), transparent 48%),
    radial-gradient(circle at 80% 20%, rgba(204, 147, 94, 0.18), transparent 42%);
}

.layer-front {
  z-index: 2;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 248, 236, 0.08), transparent 35%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 30%);
}

.hero-video,
.slideshow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-video {
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(0.72) contrast(1.06) brightness(0.54);
}

.slideshow {
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  filter: saturate(1.08) brightness(0.56);
  will-change: opacity, transform;
}

.slide.active {
  opacity: 1;
  animation-duration: 3.9s;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  animation-fill-mode: forwards;
}

.hero-vignette,
.hero-spotlight,
.hero-letterbox {
  position: absolute;
  pointer-events: none;
}

.hero-vignette {
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at center, transparent 28%, rgba(4, 8, 8, 0.28) 66%, rgba(4, 8, 8, 0.72) 100%),
    linear-gradient(90deg, rgba(3, 7, 7, 0.42), transparent 16%, transparent 84%, rgba(3, 7, 7, 0.42));
}

.hero-spotlight {
  inset: -10% -5% auto;
  height: 65%;
  z-index: 2;
  background: radial-gradient(circle at 50% 20%, rgba(244, 217, 173, 0.26), transparent 46%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.hero-letterbox {
  left: 0;
  right: 0;
  z-index: 4;
  height: clamp(28px, 5.2vh, 54px);
  background: linear-gradient(180deg, rgba(3, 5, 6, 0.96), rgba(3, 5, 6, 0.82));
  animation: letterboxIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-letterbox-top {
  top: 0;
  border-bottom: 1px solid rgba(255, 248, 236, 0.06);
}

.hero-letterbox-bottom {
  bottom: 0;
  border-top: 1px solid rgba(255, 248, 236, 0.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(5, 10, 11, 0.62), rgba(5, 10, 11, 0.24) 28%, rgba(5, 10, 11, 0.66) 100%),
    linear-gradient(115deg, rgba(22, 8, 7, 0.26), transparent 42%, rgba(243, 229, 198, 0.1) 62%, rgba(6, 12, 12, 0.46) 100%),
    radial-gradient(circle at 58% 28%, rgba(252, 233, 194, 0.14), transparent 36%);
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 3;
  padding-top: clamp(0.6rem, 1.5vh, 1rem);
}

.brand {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.08em;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  border: 1px solid rgba(255, 248, 236, 0.4);
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
  background: rgba(255, 248, 236, 0.16);
  transform: translateY(-1px);
}

.hero-content {
  align-self: center;
  max-width: 820px;
  position: relative;
  z-index: 3;
  padding: clamp(0.8rem, 3vw, 2rem) 0;
}

.scene-label {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: rgba(255, 248, 236, 0.56);
}

.eyebrow {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--champagne);
  margin: 0 0 0.75rem;
}

h1,
h2 {
  font-family: "Cinzel", Georgia, serif;
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.1rem, 6.2vw, 4.8rem);
  text-wrap: balance;
  max-width: 12ch;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.42);
}

.hero-text {
  margin: 1.15rem 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(255, 248, 236, 0.84);
}

.hero-meta {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 248, 236, 0.18);
  background: rgba(7, 14, 15, 0.38);
  backdrop-filter: blur(8px);
  color: rgba(255, 248, 236, 0.82);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-cta-row {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 0.78rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-primary {
  background: linear-gradient(120deg, var(--rose-gold), #e2b67f);
  color: #1e1a16;
  box-shadow: 0 10px 24px rgba(204, 147, 94, 0.34);
}

.btn-ghost {
  border: 1px solid rgba(255, 248, 236, 0.42);
  color: var(--text-light);
  background: rgba(255, 248, 236, 0.08);
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 2.6rem;
}

.details-section {
  margin-top: -90px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  position: relative;
}

.details-section::before,
.rsvp-section::before,
.video-section::before,
.gallery-section::before {
  content: "✦";
  position: absolute;
  font-size: 1rem;
  color: rgba(243, 229, 198, 0.75);
}

.details-section::before {
  top: -1.4rem;
  right: 0.35rem;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.glass-card h2 {
  font-size: 1.16rem;
  margin-bottom: 0.65rem;
  color: var(--champagne);
}

.glass-card p {
  margin: 0.2rem 0;
  color: rgba(255, 248, 236, 0.95);
}

.rsvp-section {
  margin-top: 2.4rem;
  background: linear-gradient(
    145deg,
    rgba(255, 248, 236, 0.95),
    rgba(246, 235, 211, 0.9)
  );
  border-radius: 22px;
  color: var(--text-deep);
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: 0 18px 34px rgba(5, 11, 10, 0.25);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  position: relative;
}

.rsvp-section::before {
  top: 0.65rem;
  right: 1rem;
  color: rgba(103, 43, 46, 0.4);
}

.rsvp-intro h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-top: 0.1rem;
}

.rsvp-intro .eyebrow {
  color: var(--wine);
}

.rsvp-intro p {
  color: #2f4744;
  max-width: 46ch;
}

.rsvp-form {
  display: grid;
  gap: 0.85rem;
}

.field {
  position: relative;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(19, 50, 47, 0.22);
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  font: inherit;
  color: #102a28;
  background: rgba(255, 252, 246, 0.98);
}

.field label {
  position: absolute;
  left: 0.78rem;
  top: 0.72rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(22, 48, 45, 0.74);
  pointer-events: none;
  transition: transform 0.2s ease, font-size 0.2s ease, opacity 0.2s ease;
  background: rgba(255, 252, 246, 0.94);
  padding: 0 0.25rem;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field select:focus + label,
.field select:valid + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.16rem);
  font-size: 0.72rem;
  opacity: 0.95;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(204, 147, 94, 0.42);
  border-color: rgba(204, 147, 94, 0.62);
}

.seat-picker {
  border: 1px solid rgba(19, 50, 47, 0.2);
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.98);
  padding: 0.72rem;
}

.seat-label {
  margin: 0 0 0.52rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(22, 48, 45, 0.76);
}

.seat-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.seat-btn {
  border: 1px solid rgba(19, 50, 47, 0.24);
  color: #183634;
  background: #fffaf1;
  min-width: 44px;
  height: 38px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.seat-btn:hover {
  transform: translateY(-1px);
}

.seat-btn.active {
  background: linear-gradient(120deg, var(--rose-gold), #e2b67f);
  border-color: rgba(204, 147, 94, 0.8);
  color: #241e18;
  box-shadow: 0 8px 16px rgba(204, 147, 94, 0.22);
}

.seat-picker.invalid {
  outline: 2px solid rgba(143, 47, 47, 0.28);
}

.petals-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 9px;
  height: 14px;
  border-radius: 12px 12px 12px 2px;
  background: linear-gradient(150deg, #f5d4b3, #cc935e);
  opacity: 0;
  animation: petalFall 1100ms ease-out forwards;
}

.hand-divider {
  margin: 1.8rem 0;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hand-divider span {
  flex: 1;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(243, 229, 198, 0.9), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.8s ease;
}

.hand-divider i {
  display: block;
  font-style: normal;
  color: var(--rose-gold);
  font-size: 0.88rem;
  opacity: 0;
  transition: opacity 0.5s ease 0.4s;
  animation: rotateStar 9s linear infinite;
}

.hand-divider.visible span {
  transform: scaleX(1);
}

.hand-divider.visible i {
  opacity: 1;
}

.video-section {
  margin-top: 1.4rem;
  position: relative;
}

.video-section::before {
  top: -0.9rem;
  right: 0.5rem;
}

.video-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-top: 0.2rem;
}

.video-card {
  margin: 1rem auto 0;
  max-width: 760px;
  padding: clamp(0.6rem, 1.2vw, 0.9rem);
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.featured-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 430px;
  border-radius: 12px;
  background: rgba(9, 19, 18, 0.9);
}

.video-card figcaption {
  margin-top: 0.65rem;
  text-align: center;
  letter-spacing: 0.03em;
  color: rgba(255, 248, 236, 0.88);
  font-size: 0.9rem;
}

.gallery-section {
  margin-top: 1.2rem;
  position: relative;
}

.gallery-section::before {
  top: -0.9rem;
  left: 0.5rem;
}

.gallery-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-top: 0.2rem;
}

.gallery-grid {
  margin-top: 1rem;
  column-count: 3;
  column-gap: 0.9rem;
}

.gallery-item {
  break-inside: avoid;
  margin: 0 0 0.9rem;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transform-style: preserve-3d;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-item::after {
  content: attr(data-caption);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #fff7ea;
  background: linear-gradient(180deg, transparent, rgba(10, 20, 19, 0.85));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.01);
  transition: transform 0.4s ease;
}

.gallery-item:hover {
  box-shadow: 0 24px 40px rgba(7, 15, 14, 0.33);
  transform: translateY(-4px) rotateX(2deg) rotateY(-2deg);
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(9, 19, 18, 0.9);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-figure {
  margin: 0;
  text-align: center;
}

.lightbox-figure img {
  max-width: min(900px, 88vw);
  max-height: 76vh;
  border-radius: 14px;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.4);
}

.lightbox-figure figcaption {
  margin-top: 0.75rem;
  color: rgba(255, 248, 236, 0.92);
  letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255, 248, 236, 0.4);
  background: rgba(255, 248, 236, 0.08);
  color: #fff8eb;
  border-radius: 999px;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.42rem 0.82rem;
}

.lightbox-nav {
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 1.5rem;
  margin-top: 0.2rem;
  font-weight: 600;
  color: var(--pine);
}

.countdown-section {
  margin-top: 2rem;
  text-align: center;
  position: relative;
}

.countdown-section .eyebrow {
  color: var(--champagne);
}

.countdown-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-top: 0.2rem;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.countdown-unit {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.4rem 2rem;
  min-width: 110px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

.countdown-num {
  display: block;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--champagne);
  line-height: 1;
}

.countdown-num.flip {
  animation: flipNum 0.35s ease;
}

.countdown-label {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 248, 236, 0.7);
}

.footer {
  text-align: center;
  padding: 1rem 0 1.5rem;
  color: rgba(255, 248, 236, 0.9);
  letter-spacing: 0.04em;
}

.footer-heart {
  display: inline-block;
  color: var(--rose-gold);
  animation: heartbeat 1.8s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger {
  opacity: 0;
  transform: translateY(12px);
}

.reveal.visible .reveal-stagger,
.reveal.reveal-stagger.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

@keyframes drift {
  from {
    transform: translateX(-3%) translateY(-2%);
  }
  to {
    transform: translateX(3%) translateY(2%);
  }
}

@keyframes splashProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes lightSweep {
  0% {
    left: -120%;
  }
  55% {
    left: 130%;
  }
  100% {
    left: 130%;
  }
}

/* 0 — Photo 1: center — gentle zoom, subtle right drift */
@keyframes kenBurns0 {
  from { transform: scale(1.0)  translate3d(-0.5%, 0%, 0); }
  to   { transform: scale(1.09) translate3d( 0.5%, 0%, 0); }
}
/* 1 — Photo 2: lower middle — zoom in, gentle left drift */
@keyframes kenBurns1 {
  from { transform: scale(1.0)  translate3d( 0.6%, 0%, 0); }
  to   { transform: scale(1.09) translate3d(-0.6%, 0%, 0); }
}
/* 2 — Photo 3: lower middle — zoom in, gentle right drift */
@keyframes kenBurns2 {
  from { transform: scale(1.0)  translate3d(-0.6%, 0%, 0); }
  to   { transform: scale(1.09) translate3d( 0.6%, 0%, 0); }
}
/* 3 — Photo 4: much lower middle — deeper zoom, minimal drift */
@keyframes kenBurns3 {
  from { transform: scale(1.0)  translate3d( 0.3%, 0%, 0); }
  to   { transform: scale(1.1)  translate3d(-0.3%, 0%, 0); }
}
/* 4 — Photo 5: upper middle — zoom in, subtle drift */
@keyframes kenBurns4 {
  from { transform: scale(1.0)  translate3d(-0.4%, 0%, 0); }
  to   { transform: scale(1.09) translate3d( 0.4%, 0%, 0); }
}

@keyframes blobDrift {
  from {
    transform: translate3d(-10px, -8px, 0);
  }
  to {
    transform: translate3d(14px, 10px, 0);
  }
}

@keyframes petalFall {
  from {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate3d(var(--x, 0px), 90px, 0) rotate(230deg);
  }
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.75; transform: scale(1.15); }
}

@keyframes flipNum {
  0% { opacity: 1; transform: translateY(0); }
  35% { opacity: 0; transform: translateY(-10px); }
  65% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.35); }
  30% { transform: scale(1); }
  45% { transform: scale(1.18); }
  60% { transform: scale(1); }
}

@keyframes letterboxIn {
  from {
    opacity: 0;
    transform: scaleY(0.35);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ── Story Book ──────────────────────────────────── */
.story-section {
  margin-top: 2rem;
  position: relative;
  text-align: center;
}

.story-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-top: 0.2rem;
}

.book-wrap {
  margin-top: 1.8rem;
  width: min(98vw, 1060px);
  margin-left: auto;
  margin-right: auto;
}

.book-spread {
  display: flex;
  max-width: 1040px;
  height: 540px;
  margin: 0 auto;
  filter: drop-shadow(0 24px 44px rgba(7, 15, 14, 0.6));
}

.book-page {
  flex: 1;
  background: linear-gradient(150deg, #fefae8, #f6ecce);
  color: var(--text-deep);
  overflow: hidden;
  position: relative;
}

.book-left {
  border-radius: 5px 0 0 5px;
  box-shadow: inset -10px 0 22px rgba(0, 0, 0, 0.1);
}

.book-right {
  border-radius: 0 5px 5px 0;
}

.book-spine {
  width: 24px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #b08040 0%, #deb96a 40%, #c49050 60%, #a07040 100%);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.book-page-inner {
  padding: 2.15rem 2rem 2.6rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
  position: relative;
}

.bk-chap-num {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rose-gold);
}

.bk-chap-title {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  color: var(--text-deep);
  line-height: 1.2;
}

.bk-chap-date {
  margin: 0;
  font-size: 0.78rem;
  font-style: italic;
  color: rgba(22, 48, 45, 0.5);
}

.bk-body {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.68;
  color: rgba(22, 48, 45, 0.85);
}

.bk-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center center;
  border-radius: 10px;
  background: linear-gradient(145deg, #f8efd8, #eadcbc);
  border: 2px solid rgba(176, 128, 64, 0.45);
  box-shadow: 0 8px 18px rgba(7, 15, 14, 0.18);
}

.bk-ornament {
  color: var(--rose-gold);
  font-size: 0.9rem;
  opacity: 0.5;
  margin-top: auto;
}

.bk-pg-num {
  position: absolute;
  bottom: 0.9rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(22, 48, 45, 0.3);
}

.bk-pg-left {
  right: 1.4rem;
}

.bk-pg-right {
  right: 1.4rem;
}

.bk-quote {
  font-family: "Cinzel", Georgia, serif;
  font-size: 5rem;
  line-height: 0.5;
  color: rgba(204, 147, 94, 0.18);
  margin-bottom: 0.4rem;
}

/* Flipper */
.book-flipper {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: left center;
}

.book-flipper-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

.book-flipper-front {
  background: linear-gradient(150deg, #fefae8, #f6ecce);
  border-radius: 0 5px 5px 0;
}

.book-flipper-back {
  background: linear-gradient(150deg, #f2e8d2, #ece3c2);
  transform: rotateY(180deg);
  border-radius: 0 5px 5px 0;
  box-shadow: inset 10px 0 22px rgba(0, 0, 0, 0.12);
}

.book-flipper.flipping {
  animation: pageFlip 0.9s cubic-bezier(0.445, 0.05, 0.55, 0.95) forwards;
}

.book-flipper.unflipping {
  animation: pageUnflip 0.9s cubic-bezier(0.445, 0.05, 0.55, 0.95) forwards;
}

@keyframes pageFlip {
  0%   { transform: perspective(1400px) rotateY(0deg); }
  50%  { transform: perspective(1400px) rotateY(-90deg); box-shadow: -8px 0 28px rgba(0, 0, 0, 0.3); }
  100% { transform: perspective(1400px) rotateY(-180deg); }
}

@keyframes pageUnflip {
  0%   { transform: perspective(1400px) rotateY(-180deg); }
  50%  { transform: perspective(1400px) rotateY(-90deg); box-shadow: -8px 0 28px rgba(0, 0, 0, 0.3); }
  100% { transform: perspective(1400px) rotateY(0deg); }
}

.book-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.2rem;
}

.bk-nav-btn {
  min-width: 130px;
  padding: 0.6rem 1rem;
}

.bk-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.bk-indicator {
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: rgba(255, 248, 236, 0.65);
  min-width: 14ch;
  text-align: center;
}

/* ── Scroll Progress Bar ─────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--rose-gold), #f0c792, var(--champagne));
  z-index: 9999;
  box-shadow: 0 0 8px rgba(204, 147, 94, 0.6);
  transition: width 0.12s linear;
}

/* ── Fireflies ──────────────────────── */
.fireflies-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.firefly {
  position: absolute;
  border-radius: 50%;
  background: rgba(243, 222, 150, 0.9);
  box-shadow: 0 0 7px 2px rgba(240, 195, 100, 0.65);
  animation: fireflyFloat linear infinite;
}

@keyframes fireflyFloat {
  0%   { opacity: 0;    transform: translateY(0) translateX(0) scale(0.7); }
  12%  { opacity: 0.9;  }
  82%  { opacity: 0.6;  }
  100% { opacity: 0;    transform: translateY(-68vh) translateX(var(--fx, 0px)) scale(1.3); }
}

/* ── Sticky Glass Navbar ──────────────── */
@keyframes navSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.top-nav.scrolled {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  background: rgba(11, 29, 27, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 22px rgba(7, 15, 14, 0.5);
  padding: 0.65rem clamp(1rem, 2.6vw, 2.4rem);
  animation: navSlideDown 0.38s ease forwards;
}

/* ── Divider Spinning Ornament ──────────── */
@keyframes rotateStar {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Hero Word Entrance ───────────────── */
h1.words-split {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.35ch;
  row-gap: 0;
}

h1.words-split.reveal-stagger {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.reveal.visible h1.words-split .hero-word {
  opacity: 1;
  transform: translateY(0);
}

/* ── Button Click Ripple ──────────────── */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 248, 236, 0.28);
  transform: scale(0);
  animation: rippleExpand 0.65s linear forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@media (max-width: 960px) {
  .video-card {
    max-width: 100%;
  }

  .book-spread {
    max-width: 920px;
    height: 500px;
  }

  .book-page-inner {
    padding: 1.85rem 1.45rem 2.3rem;
  }

  .bk-photo {
    aspect-ratio: 3 / 4;
  }

  .details-section {
    grid-template-columns: 1fr;
    margin-top: -70px;
  }

  .rsvp-section {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 94vh;
    padding-top: 0.95rem;
  }

  .hero-letterbox {
    height: 24px;
  }

  .nav-link,
  .btn {
    width: 100%;
  }

  .top-nav {
    gap: 0.8rem;
    flex-wrap: wrap;
  }

  .hero-cta-row {
    width: 100%;
  }

  .hero-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .gallery-grid {
    column-count: 1;
  }

  .lightbox {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .lightbox-nav {
    justify-self: center;
  }

  .countdown-unit {
    padding: 1rem 1.4rem;
    min-width: 80px;
  }

  .book-spread {
    flex-direction: column;
    height: auto;
    min-height: 640px;
  }

  .book-spine {
    width: 100%;
    height: 18px;
    background: linear-gradient(180deg, #b08040 0%, #deb96a 40%, #c49050 60%, #a07040 100%);
  }

  .book-left {
    border-radius: 5px 5px 0 0;
    box-shadow: inset 0 -10px 22px rgba(0, 0, 0, 0.08);
  }

  .book-right {
    border-radius: 0 0 5px 5px;
    min-height: 260px;
  }

  .book-page-inner {
    padding: 1.4rem 1.15rem 2rem;
    gap: 0.55rem;
  }

  .bk-photo {
    aspect-ratio: 4 / 3;
  }

  .book-flipper {
    transform-origin: top center;
  }

  .book-flipper.flipping {
    animation: pageFlipMobile 0.9s cubic-bezier(0.445, 0.05, 0.55, 0.95) forwards;
  }

  .book-flipper.unflipping {
    animation: pageUnflipMobile 0.9s cubic-bezier(0.445, 0.05, 0.55, 0.95) forwards;
  }

  @keyframes pageFlipMobile {
    0%   { transform: perspective(900px) rotateX(0deg); }
    50%  { transform: perspective(900px) rotateX(90deg); }
    100% { transform: perspective(900px) rotateX(180deg); }
  }

  @keyframes pageUnflipMobile {
    0%   { transform: perspective(900px) rotateX(180deg); }
    50%  { transform: perspective(900px) rotateX(90deg); }
    100% { transform: perspective(900px) rotateX(0deg); }
  }

  .book-flipper-back {
    transform: rotateX(180deg);
    border-radius: 0 0 5px 5px;
    box-shadow: inset 0 10px 22px rgba(0, 0, 0, 0.1);
  }

  .book-flipper-front {
    border-radius: 0 0 5px 5px;
  }

  .book-controls {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .bk-nav-btn {
    min-width: 110px;
  }
}
