/* Custom Wedding Typography: Agatho Caps & Ganisya Script */
@font-face {
  font-family: 'Agatho';
  src: url('assets/fonts/Agatho-RegularCAPS.otf') format('opentype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Ganisya';
  src: url('assets/fonts/Ganisya-FloralMonogram.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BrittanySignature';
  src: url('assets/fonts/BrittanySignature.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #fdfaf3;
  --ivory-warm: #f9f2e4;
  --cream-deep: #eddcc0;
  --gold: #b8912f;
  --gold-soft: #d9b969;
  --gold-dark: #8a6a2f;
  --gold-glow: rgba(217, 185, 105, 0.45);
  --maroon: #4a1119;
  --maroon-deep: #2a0a0e;
  --maroon-velvet: #5c1a22;
  --ink: #2b1408;
  --ink-muted: #5e452e;
  --max-w: 480px;
  --aspect-ratio: 845 / 1502;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--maroon-deep);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Cormorant Garamond', serif;
  background-color: var(--maroon-deep);
  background: radial-gradient(circle at 50% 35%, #421219 0%, #2a0a0e 70%, #170407 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===================== DESKTOP LUXURY AMBIENT BACKDROP ===================== */
.desktop-ambient {
  position: fixed;
  inset: -30px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: var(--maroon-deep);
}

@media (max-width: 768px) {
  .desktop-ambient {
    display: none;
  }
}

.desktop-ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/frame-cover.webp?v=10');
  background-size: cover;
  background-position: center;
  filter: blur(50px) brightness(0.35) saturate(1.3);
  transform: scale(1.15);
  opacity: 0.6;
}

.desktop-ambient-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(85, 20, 30, 0.5) 0%, rgba(42, 10, 14, 0.95) 75%);
}

/* ===================== CURTAIN INTRO ===================== */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
}

.curtain-panel {
  flex: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 35%),
    linear-gradient(180deg, var(--maroon-velvet), var(--maroon-deep) 70%);
  transition: transform 0.95s cubic-bezier(0.76, 0, 0.24, 1);
  position: relative;
}

.curtain-panel.left {
  margin-right: -3px;
}

.curtain-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--gold-soft);
  z-index: 2;
  width: 90%;
  max-width: 380px;
  padding: 0 16px;
}

.curtain-mandala {
  font-size: 1.15rem;
  color: var(--gold-soft);
  margin-bottom: 8px;
  text-shadow: 0 0 12px var(--gold-glow);
  animation: pulseMandala 3s ease-in-out infinite;
}

@keyframes pulseMandala {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

.curtain-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #c9a75d;
  margin: 0 0 10px;
  opacity: 0.9;
}

.curtain-couple {
  font-size: clamp(2.5rem, 8.5vw, 3.4rem);
  color: #f7eedb;
  margin: 0 0 8px;
  line-height: 1.15;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.6);
}

.curtain-sub {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.38em;
  font-size: 0.84rem;
  margin: 0 0 32px;
  color: var(--gold-soft);
  opacity: 0.85;
}

.curtain-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(30, 10, 12, 0.6);
  border: 1.5px solid var(--gold-soft);
  color: #f7eed7;
  padding: 14px 34px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(217, 185, 105, 0.3);
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}

.curtain-btn:hover, .curtain-btn:focus-visible {
  background: rgba(217, 185, 105, 0.25);
  transform: scale(1.04);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.6), 0 0 28px rgba(217, 185, 105, 0.45);
}

.curtain-btn:active {
  transform: scale(0.97);
}

.curtain.open .curtain-panel.left {
  transform: translateX(-100%);
}

.curtain.open .curtain-panel.right {
  transform: translateX(100%);
}

.curtain.open .curtain-label {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.curtain.hidden {
  display: none;
}

/* ===================== TOP NAVIGATION ===================== */
.topnav {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.nav-toggle {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-soft);
  background: rgba(22, 9, 6, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  transition: border-color 0.2s, transform 0.2s;
}

.nav-toggle:hover, .nav-toggle:focus-visible {
  border-color: #f7eed7;
  transform: scale(1.05);
}

.nav-toggle span {
  width: 19px;
  height: 1.8px;
  background: var(--gold-soft);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.8px) rotate(-45deg);
}

.nav-menu {
  pointer-events: auto;
  position: absolute;
  top: 54px;
  right: 0;
  background: rgba(36, 16, 12, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(184, 145, 47, 0.5);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.nav-menu.open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.nav-link {
  font-family: 'Cinzel', serif;
  color: #f3e9d4;
  text-decoration: none;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover, .nav-link:focus-visible {
  background: rgba(184, 145, 47, 0.2);
  color: var(--gold-soft);
  outline: none;
}

.nav-link.active {
  color: var(--gold-soft);
  background: rgba(184, 145, 47, 0.15);
  font-weight: 600;
}

/* ===================== PINNED FRAME & 3D PARALLAX SYSTEM ===================== */
main {
  position: relative;
  z-index: 1;
  width: 100%;
}

.wedding-scroll-track {
  position: relative;
  width: 100%;
  height: 750vh;
  margin: 0 auto;
}

.frame-pin {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.frame-perspective-wrapper {
  perspective: 1200px;
  perspective-origin: 50% 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Fullscreen on mobile (zero black bars), luxury aspect-ratio on desktop */
.frame-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  margin: 0 auto;
  pointer-events: auto;
  transform-style: preserve-3d;
}

@media (min-width: 601px) {
  .frame-container {
    aspect-ratio: var(--aspect-ratio);
    max-width: min(var(--max-w), calc((100dvh - 24px) * (845 / 1502)));
    max-height: calc(100dvh - 24px);
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
  }
}

/* ===================== ATMOSPHERIC DYNAMIC SCENERY ===================== */
.arch-scenery {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

/* Smooth 4-Layer Dynamic Sky */
.scenery-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sky-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: opacity;
}

.sky-dawn {
  background: radial-gradient(circle at 50% 55%, #fff5e0 0%, #fae5cc 35%, #eed4b8 65%, #d9b898 100%);
  opacity: 1;
}

.sky-sunset {
  background: radial-gradient(circle at 50% 58%, #ffdda6 0%, #fca466 30%, #e0623a 65%, #7a231d 100%);
  opacity: 0;
}

.sky-twilight {
  background: radial-gradient(circle at 50% 60%, #fad1b6 0%, #cb7076 35%, #782947 70%, #381126 100%);
  opacity: 0;
}

.sky-night {
  background: radial-gradient(circle at 50% 45%, #4a1935 0%, #2b0c1e 40%, #15050f 75%, #0d020a 100%);
  opacity: 0;
}

/* Celestial Orb positioned low near horizon */
.scenery-celestial {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  pointer-events: none;
}

.sun-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe8 0%, #ffdf8c 50%, rgba(255, 190, 60, 0.3) 80%, transparent 100%);
  box-shadow: 0 0 24px rgba(255, 220, 130, 0.5);
  animation: sunFloat 6s ease-in-out infinite;
}

.sun-flare {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 215, 0.35) 0%, rgba(255, 210, 110, 0.12) 50%, transparent 75%);
  mix-blend-mode: screen;
  animation: flarePulse 4s ease-in-out infinite;
}

@keyframes sunFloat {
  0%, 100% { transform: translate(-50%, -50%) scale(0.96); }
  50% { transform: translate(-50%, -52%) scale(1.04); }
}

@keyframes flarePulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.9); }
  50% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.1); }
}

.moon-crescent {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: -6px 4px 0 2px #fff3d1;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* Silhouetted Birds */
.scenery-birds {
  position: absolute;
  top: 48%;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
  opacity: 0.6;
}

.scenery-birds .bird {
  position: absolute;
  color: #5c202a;
  font-size: 0.65rem;
  font-weight: bold;
  transform: rotate(-35deg) scaleX(1.4);
  animation: birdGlide 14s linear infinite;
}

.bird.b1 { left: -10%; top: 10px; animation-delay: 0s; }
.bird.b2 { left: -15%; top: 22px; animation-delay: 2.2s; font-size: 0.55rem; }
.bird.b3 { left: -20%; top: 4px; animation-delay: 4.5s; font-size: 0.5rem; }

@keyframes birdGlide {
  0% { transform: translate(0, 0) rotate(-35deg) scaleX(1.4); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translate(550px, -30px) rotate(-35deg) scaleX(1.4); opacity: 0; }
}

/* Kerala Horizon Silhouette at Y=70% */
.scenery-horizon {
  position: absolute;
  bottom: 22%;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
}

.horizon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Twilight Fairy Lights */
.scenery-fairylights {
  position: absolute;
  top: 13%;
  left: 18%;
  right: 18%;
  height: 35px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.scenery-fairylights.is-visible {
  opacity: 1;
}

.light-wire {
  position: absolute;
  inset: 0;
  border-bottom: 1.2px solid rgba(138, 106, 47, 0.5);
  border-radius: 50% / 100%;
  height: 18px;
}

.scenery-fairylights .bulb {
  position: absolute;
  width: 7px;
  height: 10px;
  border-radius: 50%;
  background: #fff8e0;
  box-shadow: 0 0 10px rgba(255, 220, 100, 0.9), 0 0 20px rgba(255, 180, 50, 0.6);
  animation: bulbFlicker 2.5s ease-in-out infinite alternate;
}

.bulb.bl1 { left: 4%; top: 3px; }
.bulb.bl2 { left: 18%; top: 12px; animation-delay: 0.3s; }
.bulb.bl3 { left: 34%; top: 17px; animation-delay: 0.7s; }
.bulb.bl4 { left: 50%; top: 18px; animation-delay: 1.1s; }
.bulb.bl5 { left: 66%; top: 17px; animation-delay: 0.5s; }
.bulb.bl6 { left: 82%; top: 12px; animation-delay: 0.9s; }
.bulb.bl7 { left: 96%; top: 3px; animation-delay: 0.2s; }

@keyframes bulbFlicker {
  0% { opacity: 0.8; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.12); }
}

/* Night Stars */
.scenery-stars {
  position: absolute;
  top: 8%;
  left: 18%;
  right: 18%;
  height: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.scenery-stars.is-visible {
  opacity: 1;
}

.scenery-stars .star {
  position: absolute;
  color: var(--gold-soft);
  font-size: 0.65rem;
  opacity: 0.8;
  animation: starTwinkle 3s ease-in-out infinite alternate;
}

.star.s1 { left: 15%; top: 20%; animation-delay: 0.2s; font-size: 0.55rem; }
.star.s2 { left: 75%; top: 15%; animation-delay: 0.8s; font-size: 0.75rem; }
.star.s3 { left: 30%; top: 55%; animation-delay: 1.4s; font-size: 0.45rem; }
.star.s4 { left: 82%; top: 60%; animation-delay: 1.9s; font-size: 0.6rem; }
.star.s5 { left: 52%; top: 25%; animation-delay: 2.3s; font-size: 0.5rem; }

@keyframes starTwinkle {
  0% { opacity: 0.3; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1.25); text-shadow: 0 0 8px var(--gold-glow); }
}

/* ===================== HANGING GOLDEN PENDANT ===================== */
.arch-pendant {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transform-origin: 50% 0;
  animation: pendantSway 5s ease-in-out infinite alternate;
}

.pendant-chain {
  width: 1.2px;
  height: 24px;
  background: linear-gradient(180deg, var(--gold), var(--gold-soft));
  box-shadow: 0 0 4px var(--gold-glow);
}

.pendant-gem {
  margin-top: -2px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

@keyframes pendantSway {
  0% { transform: translateX(-50%) rotate(-3.5deg); }
  100% { transform: translateX(-50%) rotate(3.5deg); }
}

/* ===================== ADAPTIVE DYNAMIC CONTENT WINDOW ===================== */
.content-window {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: auto;
  transform: translateZ(30px);
  transform-style: preserve-3d;
}

/* Arch Frame Illustration - Zooms smoothly inside the window during scroll */
.frame-visual {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transform-origin: 50% 28%;
  transform: translateZ(50px);
  will-change: transform, opacity;
}

.frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

/* ===================== SCENE COMMON & MOTION STYLES ===================== */
.cover-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 10px;
  line-height: 1.45;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  pointer-events: none;
}

.scene-0, .scene-1, .scene-2, .scene-3 {
  padding: 6% 12% 30% 12%;
}

@media (min-width: 601px) {
  .scene-0, .scene-1, .scene-2, .scene-3 {
    padding: 8% 16% 32% 16%;
  }
}

.scene-4, .scene-5, .scene-6, .scene-7 {
  padding: 14px 14px;
}

.cover-scene.is-active {
  pointer-events: auto;
}

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

.script {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
}

.mandala-accent {
  font-size: 0.95rem;
  color: var(--gold-dark);
  margin-bottom: 6px;
  opacity: 0.9;
  text-shadow: 0 0 6px var(--gold-glow);
}

.ornament-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 200px;
  width: 85%;
  margin: 0 auto 4%;
  color: var(--gold-dark);
}

.ornament-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
}

.ornament-rule i {
  font-style: normal;
  font-size: 0.55rem;
}

.ornament-rule.small {
  max-width: 140px;
  margin-bottom: 3.5%;
}

.section-heading {
  font-family: 'Cinzel', serif;
  color: var(--maroon);
  font-size: clamp(1.1rem, 4.8vw, 1.35rem);
  letter-spacing: 0.08em;
  margin: 0 0 3%;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* ===================== SCENE 0: INVITATION ===================== */
.scene-0 .eyebrow {
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(0.563rem, 2.425vw, 0.698rem);
  color: var(--gold-dark);
  margin: 0 0 3%;
  font-weight: 700;
  white-space: nowrap;
}

.scene-0 .bismillah {
  font-family: 'Amiri', serif;
  color: var(--maroon);
  font-size: clamp(1.25rem, 5.5vw, 1.6rem);
  margin: 0 0 2%;
  line-height: 1.4;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.scene-0 .bismillah-translation {
  font-style: italic;
  color: var(--ink);
  font-size: clamp(0.72rem, 3.2vw, 0.88rem);
  margin: 0 0 4%;
  line-height: 1.5;
  max-width: 250px;
  font-weight: 500;
}

/* ===================== SCENE 1: NAMES ===================== */
.scene-1 .cover-names {
  margin: 0 0 2%;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cover-names-line {
  display: block;
  font-family: 'Agatho', 'Cinzel', serif;
  color: #382e14;
  font-size: clamp(2.0rem, 9vw, 2.85rem);
  letter-spacing: 0.12em;
  font-weight: 400;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  line-height: 1.05;
}

.cover-names-weds {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #382e14;
  margin: 1.5% 0;
}

.cover-names-weds .weds-text {
  font-family: 'Ganisya', 'Cormorant Garamond', cursive, serif;
  font-size: clamp(1.2rem, 5.2vw, 1.65rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 0 2px;
}

.weds-swash {
  width: clamp(30px, 7.5vw, 55px);
  height: clamp(8px, 2vw, 14px);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  opacity: 0.9;
  overflow: visible;
}

.names-date-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(184, 145, 47, 0.55);
  border-radius: 999px;
  padding: 4px 14px;
  margin: 1% 0 3%;
  box-shadow: 0 2px 8px rgba(74, 17, 25, 0.06);
}

.cover-date {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.18em;
  font-size: clamp(0.68rem, 3.2vw, 0.84rem);
  color: var(--maroon);
  margin: 0;
  font-weight: 600;
}

/* ===================== SCENE 2: HERO MESSAGE ===================== */
.scene-2 .hero-quote {
  font-style: italic;
  color: var(--maroon);
  font-size: clamp(1.05rem, 4.6vw, 1.3rem);
  line-height: 1.45;
  margin: 0 0 4%;
  font-weight: 600;
  max-width: 260px;
}

.scene-2 .hero-warmth {
  font-size: clamp(0.78rem, 3.4vw, 0.94rem);
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
  max-width: 255px;
  font-weight: 500;
}

/* ===================== SCENE 3: COUNTDOWN (MUGHAL CUSPED PODS) ===================== */
.scene-3 .surah-arabic {
  font-family: 'Amiri', serif;
  font-size: clamp(1.05rem, 4.6vw, 1.3rem);
  color: #3b160e;
  margin: 0 0 1%;
  line-height: 1.35;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.scene-3 .surah-translation {
  font-family: 'Cinzel', 'Agatho', serif;
  font-size: clamp(0.58rem, 2.5vw, 0.72rem);
  letter-spacing: 0.12em;
  line-height: 1.6;
  color: #2b0b10;
  margin: 0 auto 1.5%;
  text-transform: uppercase;
  font-weight: 700;
  max-width: 320px;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.85), 0 0 10px rgba(255, 255, 255, 0.75);
}

.scene-3 .surah-cite {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.46rem, 2.0vw, 0.54rem);
  letter-spacing: 0.18em;
  color: var(--gold-dark);
  margin: 0 0 1.5%;
  text-transform: uppercase;
  font-weight: 600;
}

.scene-3 .countdown-heading {
  font-family: 'Agatho', 'Cinzel', serif;
  font-size: clamp(1.1rem, 4.8vw, 1.38rem);
  letter-spacing: 0.28em;
  color: #3b2c17;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0.5% 0 1.5%;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 2%;
}

.cd-arch-pod {
  flex: 1;
  max-width: 68px;
  aspect-ratio: 100 / 140;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(74, 17, 25, 0.08));
}

.cd-pod-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cd-pod-fill {
  fill: rgba(252, 248, 240, 0.78);
  stroke: rgba(194, 159, 104, 0.75);
  stroke-width: 1.2px;
}

.cd-pod-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 0 2px;
}

.cd-num {
  font-family: 'Agatho', 'Cinzel', serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 5.6vw, 1.7rem);
  color: #3b160e;
  line-height: 1;
}

.cd-lbl {
  font-family: 'Agatho', 'Cinzel', serif;
  font-size: clamp(0.38rem, 1.6vw, 0.46rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #735939;
  margin-top: 3px;
  font-weight: 400;
}

.cd-sep {
  font-size: 0.58rem;
  color: #b8912f;
  opacity: 0.9;
  flex-shrink: 0;
  padding: 0 1px;
}

.until-forever-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1%;
}

.countdown-tagline {
  font-family: 'BrittanySignature', 'Ganisya', cursive;
  font-size: clamp(1.05rem, 4.5vw, 1.45rem);
  color: #3b2c17;
  margin: 1% 0 0;
  line-height: 1.1;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

.until-forever-swoop {
  width: clamp(60px, 16vw, 90px);
  height: clamp(5px, 1.4vw, 8px);
  color: #5c4322;
  margin-top: -2px;
  overflow: visible;
  opacity: 0.85;
}

/* ===================== ROYAL EVENT CARDS (Scenes 4, 5, 7) ===================== */
.royal-event-card {
  position: relative;
  width: 94%;
  max-width: 380px;
  margin: auto;
  background: linear-gradient(170deg, rgba(255, 253, 248, 0.98) 0%, rgba(252, 246, 235, 0.96) 100%);
  border: 1.5px solid rgba(184, 145, 47, 0.7);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow:
    0 14px 34px rgba(42, 10, 14, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 0 18px rgba(247, 235, 212, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Double hairline inner border */
.royal-event-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(184, 145, 47, 0.35);
  border-radius: 10px;
  pointer-events: none;
}

/* Ornate Corner Accents */
.card-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border-color: var(--gold);
  border-style: solid;
}

.card-corner.corner-tl {
  top: 7px;
  left: 7px;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 4px;
}

.card-corner.corner-tr {
  top: 7px;
  right: 7px;
  border-width: 2px 2px 0 0;
  border-top-right-radius: 4px;
}

.card-corner.corner-bl {
  bottom: 7px;
  left: 7px;
  border-width: 0 0 2px 2px;
  border-bottom-left-radius: 4px;
}

.card-corner.corner-br {
  bottom: 7px;
  right: 7px;
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 4px;
}

/* Royal Arch Crest */
.card-crest {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(184, 145, 47, 0.3));
}

/* Event Date Badge */
.event-date-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 4px 14px;
  margin-bottom: 12px;
  background: rgba(184, 145, 47, 0.09);
  border: 1px solid rgba(184, 145, 47, 0.35);
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.72rem, 3.2vw, 0.85rem);
  font-weight: 700;
  color: var(--maroon);
  letter-spacing: 0.08em;
}

.event-date-badge .badge-star {
  font-size: 0.65rem;
  color: var(--gold);
}

/* Event Meta Blocks */
.event-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.event-meta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meta-label {
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 2px;
}

.meta-value {
  font-size: clamp(0.92rem, 3.8vw, 1.05rem);
  font-weight: 700;
  color: var(--maroon-deep);
  margin: 0;
  line-height: 1.3;
}

.meta-value.venue-name {
  color: var(--maroon);
  font-family: 'Cinzel', serif;
  font-size: clamp(0.85rem, 3.6vw, 0.98rem);
  letter-spacing: 0.04em;
}

.meta-city {
  font-size: clamp(0.78rem, 3.2vw, 0.88rem);
  color: var(--ink-muted);
  margin: 2px 0 0;
}

.event-sub {
  font-style: italic;
  font-size: clamp(0.74rem, 3.2vw, 0.86rem);
  color: var(--ink-muted);
  margin: 0 0 12px;
  font-weight: 500;
}

/* Action Buttons */
.event-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
}

.cusp-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.2px solid rgba(184, 145, 47, 0.6);
  color: var(--maroon);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.55rem, 2.3vw, 0.66rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: background 0.2s, border-color 0.2s, transform 0.18s, box-shadow 0.18s;
}

.cusp-btn:hover, .cusp-btn:focus-visible {
  background: #ffffff;
  border-color: var(--maroon);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(74, 17, 25, 0.12);
  outline: none;
}

.cusp-btn.btn-highlight {
  background: linear-gradient(135deg, #caa44c, #9d7524);
  color: #ffffff;
  border-color: var(--gold-dark);
  box-shadow: 0 3px 10px rgba(184, 145, 47, 0.35);
}

.cusp-btn.btn-highlight:hover, .cusp-btn.btn-highlight:focus-visible {
  background: linear-gradient(135deg, #dfbc65, #b88e2c);
  box-shadow: 0 5px 14px rgba(184, 145, 47, 0.45);
  transform: translateY(-2px);
}

/* ===================== CEREMONY & RECEPTION REFERENCE UI (INSIDE ROYAL EVENT CARD) ===================== */
.royal-event-card .event-info-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  margin: 8px 0 12px;
  gap: 2px;
}

.royal-event-card .event-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 3px;
}

.royal-event-card .event-info-icon {
  color: var(--gold-dark);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.royal-event-card .event-info-col .info-label {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.52rem, 2.1vw, 0.64rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 3px;
}

.royal-event-card .event-info-col .info-val {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(0.78rem, 3.1vw, 0.92rem);
  font-weight: 700;
  color: var(--maroon-deep);
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0.01em;
}

.royal-event-card .event-info-col .info-val.venue-title {
  font-size: clamp(0.72rem, 2.7vw, 0.84rem);
  line-height: 1.2;
}

.royal-event-card .event-info-col .info-sub {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.66rem, 2.5vw, 0.78rem);
  color: var(--ink-muted);
  margin: 2px 0 0;
  line-height: 1.18;
}

.royal-event-card .event-col-divider {
  width: 1px;
  height: 52px;
  align-self: center;
  background: linear-gradient(to bottom, rgba(184, 145, 47, 0.1), rgba(184, 145, 47, 0.55) 30%, rgba(184, 145, 47, 0.55) 70%, rgba(184, 145, 47, 0.1));
  flex-shrink: 0;
}

/* 3 Ornate Action Cards */
.royal-event-card .event-actions-grid {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-bottom: 8px;
}

.royal-event-card .action-card-btn {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 8px 3px 6px;
  min-height: 68px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.royal-event-card .action-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.royal-event-card .action-card-shape {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(184, 145, 47, 0.75);
  stroke-width: 1.15px;
  filter: drop-shadow(0 2px 5px rgba(42, 10, 14, 0.06));
  transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
}

.royal-event-card .action-card-btn:hover .action-card-shape,
.royal-event-card .action-card-btn:focus-visible .action-card-shape {
  fill: #ffffff;
  stroke: var(--maroon);
  filter: drop-shadow(0 3px 8px rgba(74, 17, 25, 0.14));
}

.royal-event-card .action-card-btn:hover,
.royal-event-card .action-card-btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.royal-event-card .action-card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  pointer-events: none;
  gap: 2px;
}

.royal-event-card .action-card-inner .action-icon {
  color: var(--maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.royal-event-card .action-card-inner .action-label {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.48rem, 1.9vw, 0.58rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon-deep);
  text-align: center;
  line-height: 1.15;
}

.royal-event-card .action-card-inner .action-arrow {
  color: var(--maroon);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  margin-top: 1px;
  transition: transform 0.2s ease;
}

.royal-event-card .action-card-btn:hover .action-arrow {
  transform: translateX(3px);
}

.royal-event-card .event-divider-bottom {
  width: 75%;
  margin: 2px auto 0;
  opacity: 0.8;
}

/* Thank You Section Logo */
.thank-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px auto 14px;
}

.thank-logo {
  max-width: 165px;
  width: 56%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
  opacity: 0.94;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.thank-logo:hover {
  opacity: 1;
  transform: scale(1.03);
}



/* ===================== SCENE 6: RSVP FORM CARD ===================== */
.scene-6 {
  padding: 0;
  align-items: center;
  justify-content: center;
}

.rsvp-card {
  position: relative;
  width: 94%;
  max-width: 380px;
  max-height: min(560px, 90dvh);
  height: auto;
  margin: auto;
  background: linear-gradient(170deg, rgba(255, 253, 248, 0.98) 0%, rgba(252, 246, 235, 0.96) 100%);
  border: 1.5px solid rgba(184, 145, 47, 0.7);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow:
    0 14px 34px rgba(42, 10, 14, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 0 18px rgba(247, 235, 212, 0.6);
  display: flex;
  flex-direction: column;
}

.rsvp-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(184, 145, 47, 0.35);
  border-radius: 10px;
  pointer-events: none;
}

.rsvp-card-header {
  flex-shrink: 0;
  text-align: center;
  padding-bottom: 2px;
}

.rsvp-header {
  margin-bottom: 1%;
}

.rsvp-deadline {
  font-style: italic;
  font-size: clamp(0.68rem, 3vw, 0.8rem);
  color: var(--ink-muted);
  margin: 0 0 2%;
  font-weight: 500;
}

.rsvp-fields-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(184, 145, 47, 0.5) transparent;
}

.rsvp-fields-body::-webkit-scrollbar {
  width: 4px;
}

.rsvp-fields-body::-webkit-scrollbar-thumb {
  background: rgba(184, 145, 47, 0.5);
  border-radius: 4px;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.68rem;
  color: var(--ink);
  font-weight: 700;
}

.field input[type="text"],
.field input[type="tel"],
.field select,
.field textarea {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.92rem;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1.2px solid rgba(184, 145, 47, 0.6);
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(94, 69, 46, 0.5);
  font-size: 0.85rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 2px rgba(74, 17, 25, 0.15);
}

.field-radio {
  border: none;
  padding: 0;
  margin: 0;
}

.field-radio legend {
  padding: 0;
  margin-bottom: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
}

.radio-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.radio-pill, .checkbox-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(184, 145, 47, 0.5);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.68rem;
  color: var(--ink);
  cursor: pointer;
  flex: 1;
  justify-content: center;
  user-select: none;
}

.radio-pill:has(input:checked),
.checkbox-pill:has(input:checked) {
  border-color: var(--maroon);
  background: rgba(74, 17, 25, 0.1);
  color: var(--maroon);
  font-weight: 700;
}

.radio-pill input,
.checkbox-pill input {
  accent-color: var(--maroon);
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-dark));
  color: #fff;
  border: 1px solid var(--gold-dark);
  box-shadow: 0 4px 12px rgba(184, 145, 47, 0.35);
}

.btn-block {
  width: 100%;
}

.rsvp-hint {
  font-size: 0.62rem;
  color: var(--ink-muted);
  text-align: center;
  margin: 2px 0 0;
  line-height: 1.3;
}

.rsvp-success {
  max-width: 275px;
  margin: 10px auto 0;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--gold-dark);
  color: var(--maroon);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(74, 17, 25, 0.1);
}

.rsvp-error {
  max-width: 275px;
  margin: 8px auto 4px;
  background: #fff5f5;
  border: 1.2px solid #e53e3e;
  color: #c53030;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 3px 10px rgba(229, 62, 62, 0.15);
  animation: rsvpShake 0.3s ease;
}

@keyframes rsvpShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  border-color: #e53e3e !important;
  background: #fffafa !important;
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2) !important;
}

.field-radio.is-invalid {
  outline: 1.5px dashed #e53e3e;
  outline-offset: 4px;
  border-radius: 6px;
  background: rgba(229, 62, 62, 0.04);
  padding: 2px 4px;
}

/* ===================== SCENE 7: THANK YOU ===================== */
.scene-7 .thank-heading {
  margin-bottom: 2%;
}

.thank-msg {
  font-size: clamp(0.78rem, 3.4vw, 0.92rem);
  color: var(--ink);
  line-height: 1.5;
  margin: 0 0 3%;
  max-width: 290px;
  font-weight: 500;
}

.thank-sign {
  font-style: italic;
  font-size: clamp(0.72rem, 3.2vw, 0.86rem);
  color: var(--ink-muted);
  margin: 0 0 1%;
}

.thank-couple {
  font-size: clamp(1.4rem, 6.5vw, 1.85rem);
  color: var(--maroon);
  margin: 0 0 4%;
  font-weight: 600;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #31150c;
  border: 1.5px solid var(--gold-soft);
  border-radius: 999px;
  color: #f7eedb;
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.58rem, 2.5vw, 0.7rem);
  letter-spacing: 0.1em;
  padding: 9px 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: background 0.2s, transform 0.15s;
}

.contact-btn:hover, .contact-btn:focus-visible {
  background: #4a1f12;
  border-color: #fff;
  transform: translateY(-2px);
  outline: none;
}

.contact-btn em {
  font-style: normal;
}

.thank-credit {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 4% 0 0;
  opacity: 0.8;
}

/* ===================== AMBIENT LIGHTING & PARTICLES ===================== */
.ambient-flames {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.deco-flame {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Left & Right Pillar Flame Glows - Disabled since no lanterns exist on top pillars */
.flame-pillar-left,
.flame-pillar-right {
  display: none !important;
}

/* Primary Table Lamp Flame (inside taller lantern on book stack) */
.flame-table-main {
  left: 1.42%;
  top: 80.03%;
  width: 14px;
  height: 20px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(255, 255, 245, 1) 0%, rgba(255, 215, 120, 0.9) 25%, rgba(255, 140, 35, 0.5) 55%, rgba(240, 90, 10, 0.1) 75%, transparent 85%);
  animation: flameFlicker 2.1s ease-in-out infinite 0.3s;
}

/* Secondary Table Lamp Flame (inside smaller lantern on table) */
.flame-table-sub {
  left: 9.47%;
  top: 81.69%;
  width: 12px;
  height: 16px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at center, rgba(255, 255, 240, 0.95) 0%, rgba(255, 210, 110, 0.85) 25%, rgba(255, 135, 30, 0.45) 55%, rgba(240, 85, 10, 0.08) 75%, transparent 85%);
  animation: flameFlicker 2.6s ease-in-out infinite 1.2s;
}

@keyframes lanternPulse {
  0%, 100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(0.92);
    filter: drop-shadow(0 0 6px rgba(255, 190, 60, 0.65)) blur(0.6px);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18);
    filter: drop-shadow(0 0 16px rgba(255, 210, 80, 0.98)) blur(0.3px);
  }
  65% {
    opacity: 0.78;
    transform: translate(-50%, -50%) scale(0.98);
    filter: drop-shadow(0 0 9px rgba(255, 180, 50, 0.75)) blur(0.6px);
  }
  85% {
    opacity: 1.05;
    transform: translate(-50%, -50%) scale(1.12);
    filter: drop-shadow(0 0 13px rgba(255, 215, 85, 0.92)) blur(0.4px);
  }
}

@keyframes flameFlicker {
  0%, 100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.88) translateY(0);
    filter: drop-shadow(0 0 5px rgba(255, 175, 45, 0.6));
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15) translateY(-1px);
    filter: drop-shadow(0 0 14px rgba(255, 215, 80, 0.95));
  }
  50% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(0.94) translateY(0.5px);
    filter: drop-shadow(0 0 7px rgba(255, 180, 50, 0.72));
  }
  75% {
    opacity: 1.1;
    transform: translate(-50%, -50%) scale(1.12) translateY(-0.8px);
    filter: drop-shadow(0 0 11px rgba(255, 205, 70, 0.9));
  }
}

.particles-3d-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
  transform: translateZ(40px);
}

.cover-sparkle {
  position: absolute;
  inset: 0;
}

.cover-sparkle span {
  position: absolute;
  color: var(--gold-soft);
  font-size: 0.75rem;
  opacity: 0;
  animation: sparkleDrift 5s ease-in-out infinite;
  text-shadow: 0 0 8px var(--gold-glow);
}

.cover-sparkle span:nth-child(1) { left: 16%; top: 60%; animation-delay: 0s; }
.cover-sparkle span:nth-child(2) { left: 80%; top: 52%; animation-delay: 1.3s; }
.cover-sparkle span:nth-child(3) { left: 26%; top: 22%; animation-delay: 2.5s; }
.cover-sparkle span:nth-child(4) { left: 74%; top: 16%; animation-delay: 3.6s; }

@keyframes sparkleDrift {
  0% { opacity: 0; transform: translateY(0) scale(0.5) rotate(0deg); }
  18% { opacity: 0.95; }
  82% { opacity: 0.25; }
  100% { opacity: 0; transform: translateY(-70px) scale(1.15) rotate(110deg); }
}

.jasmine-petal {
  position: absolute;
  display: block;
  color: #fff9ee;
  text-shadow: 0 1px 4px rgba(74, 17, 25, 0.25);
  pointer-events: none;
  opacity: 0;
  animation-name: jasmineFall;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes jasmineFall {
  0% { top: -8%; opacity: 0; transform: translateX(0) rotate(0deg) rotateY(0deg); }
  12% { opacity: 0.95; }
  85% { opacity: 0.8; }
  100% { top: 110%; opacity: 0; transform: translateX(var(--drift, 30px)) rotate(360deg) rotateY(180deg); }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scroll-cue i {
  font-style: normal;
  font-size: 0.65rem;
  color: var(--gold-soft);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.scroll-cue-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(22, 9, 6, 0.85);
  border: 1.5px solid var(--gold-soft);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cueBounce 1.8s ease-in-out infinite;
}

.scroll-cue-badge svg {
  width: 17px;
  height: 17px;
  color: #f7eed7;
}

@keyframes cueBounce {
  0%, 50%, 100% { transform: translateY(0); }
  25% { transform: translateY(6px); }
}

.scroll-cue.is-hidden {
  opacity: 0;
}

/* ===================== FLOATING CONTROLS: SHARE & MUTE ===================== */
.fab {
  position: fixed;
  left: 50%;
  transform: translateX(calc(-50% + min(46vw, 205px)));
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(30, 14, 10, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1.5px solid var(--gold-soft);
  color: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  z-index: 150;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.fab:hover, .fab:focus-visible {
  transform: translateX(calc(-50% + min(46vw, 205px))) scale(1.08);
  border-color: #fff;
  background: rgba(48, 20, 14, 0.98);
  outline: none;
}

.fab svg {
  width: 17px;
  height: 17px;
}

.fab-mute {
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
}

.fab-share {
  bottom: calc(max(20px, env(safe-area-inset-bottom, 20px)) + 48px);
}

.fab-mute .icon-off { display: none; }
.fab-mute.is-muted .icon-on { display: none; }
.fab-mute.is-muted .icon-off { display: block; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(max(20px, env(safe-area-inset-bottom, 20px)) + 98px);
  transform: translateX(-50%) translateY(8px);
  background: rgba(36, 16, 12, 0.96);
  border: 1px solid var(--gold-soft);
  color: var(--ivory);
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100vw - 48px);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===================== ACCESSIBILITY & PREFERS-REDUCED-MOTION ===================== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .curtain-panel, .curtain-label, .nav-menu, .toast { transition: none !important; }
  .deco-flame, .cover-sparkle span, .scroll-cue-badge, .arch-pendant, .scenery-birds .bird, .sun-orb, .sun-flare { animation: none !important; }
  .cover-scene { transform: none !important; }
  .frame-container { transform: none !important; }
}
