/* ============================================
   WEDDING EXPRESS - Photorealistic 3D Royal Velvet Stage Curtain
   Crafted with pure warm ruby-crimson velvet drapery,
   anisotropic silk sheen, 24K Indian wedding Zari brocade,
   golden bullion tassel fringe, sculpted swag pelmet,
   and dynamic theatrical Opera-Drape cloth gather physics.
   Zero blue cast • 100% Rich Royal Wedding Aesthetics.
   ============================================ */

.curtain-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  pointer-events: all;
  overflow: hidden;
  perspective: 2000px;
  background: #0E0204;
  transition: background 1.6s ease;
}

.curtain-container.open {
  background: transparent;
  pointer-events: none;
}

.curtain-container.done {
  display: none !important;
}

/* ========================================================
   WARM VOLUMETRIC STAGE LIGHTS & GOLDEN REVEAL FLARE
   ======================================================== */
.curtain-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 48%, rgba(255, 222, 130, 0.55) 0%, rgba(212, 175, 55, 0.22) 42%, transparent 74%);
  opacity: 0.85;
  z-index: 5;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.curtain-container.open .curtain-spotlight {
  animation: spotlightFadeOut 2.6s ease forwards;
}

@keyframes spotlightFadeOut {
  0% { opacity: 0.95; }
  50% { opacity: 0.6; }
  100% { opacity: 0; }
}

/* Brilliant warm gold stage burst when curtain breaks center */
.curtain-flare {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 195, 0.95) 0%, rgba(245, 205, 80, 0.7) 35%, rgba(212, 175, 55, 0.3) 65%, transparent 100%);
  z-index: 8;
  opacity: 0;
  pointer-events: none;
}

.curtain-container.open .curtain-flare {
  animation: flareBurst 2.4s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

@keyframes flareBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  25% { opacity: 0.95; transform: translate(-50%, -50%) scale(5.5); }
  65% { opacity: 0.45; transform: translate(-50%, -50%) scale(9); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(12); }
}

.curtain-stage-lights {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}

.stage-beam {
  position: absolute;
  top: -12%;
  width: 48%;
  height: 125%;
  opacity: 0.28;
  filter: blur(28px);
  pointer-events: none;
}

.stage-beam.beam-left {
  left: 3%;
  background: radial-gradient(ellipse at 25% 0%, rgba(255, 225, 135, 0.65) 0%, rgba(190, 24, 28, 0.22) 50%, transparent 80%);
  transform: rotate(15deg);
}

.stage-beam.beam-right {
  right: 3%;
  background: radial-gradient(ellipse at 75% 0%, rgba(255, 225, 135, 0.65) 0%, rgba(190, 24, 28, 0.22) 50%, transparent 80%);
  transform: rotate(-15deg);
}

/* ========================================================
   HEAVY VELVET CURTAIN PANELS (Left & Right)
   Pure warm ruby & burgundy velvet tones • Zero cool/blue pixels
   ======================================================== */
.curtain-left,
.curtain-right {
  position: absolute;
  top: -2%;
  width: 51.5%;
  height: 106%;
  z-index: 10;
  will-change: transform, border-radius;
  transform-style: preserve-3d;
  background-color: #460307;
  /* Authentic 3D Velvet Cylindrical Fluting + Silk Specular Drapes */
  background-image:
    /* Specular light wash across upper drapery curve (warm champagne/rose) */
    radial-gradient(ellipse 95% 55% at 35% 18%, rgba(255, 205, 175, 0.22), transparent 65%),
    radial-gradient(ellipse 85% 50% at 75% 62%, rgba(255, 190, 160, 0.16), transparent 60%),
    /* Deep bottom ambient shadow grounding */
    radial-gradient(ellipse 100% 70% at 50% 95%, rgba(18, 1, 3, 0.88), transparent 60%),
    /* Natural 3D cylindrical velvet pleats with warm ruby crests & burgundy crevices */
    repeating-linear-gradient(
      90deg,
      #130103 0px,
      #240205 10px,
      #480408 22px,
      #7C080E 36px,
      #A81117 50px,
      #CB1C23 60px,
      #EE2B33 68px,
      #FF505A 73px,
      #EE2B33 78px,
      #CB1C23 86px,
      #A81117 96px,
      #7C080E 110px,
      #480408 124px,
      #240205 136px,
      #130103 146px
    );
  background-size: 100% 100%, 100% 100%, 100% 100%, 146px 100%;
  box-shadow: inset 0 0 110px rgba(0, 0, 0, 0.75);
}

.curtain-left {
  left: -1.5%;
  transform-origin: top left;
  animation: realClothSwayLeft 3.6s ease-in-out infinite alternate;
  box-shadow: 25px 0 85px rgba(0, 0, 0, 0.9), inset -40px 0 70px rgba(0, 0, 0, 0.65);
}

.curtain-right {
  right: -1.5%;
  transform-origin: top right;
  animation: realClothSwayRight 3.6s ease-in-out infinite alternate;
  box-shadow: -25px 0 85px rgba(0, 0, 0, 0.9), inset 40px 0 70px rgba(0, 0, 0, 0.65);
}

/* Organic Breeze Cloth Sway (Idle state before opening) */
@keyframes realClothSwayLeft {
  0% { transform: scaleX(1) skewY(0deg) rotateY(0deg) translateX(0); }
  50% { transform: scaleX(1.012) skewY(-0.5deg) rotateY(1.6deg) translateX(3px); }
  100% { transform: scaleX(0.992) skewY(0.35deg) rotateY(-1deg) translateX(-1px); }
}

@keyframes realClothSwayRight {
  0% { transform: scaleX(1) skewY(0deg) rotateY(0deg) translateX(0); }
  50% { transform: scaleX(1.012) skewY(0.5deg) rotateY(-1.6deg) translateX(-3px); }
  100% { transform: scaleX(0.992) skewY(-0.35deg) rotateY(1deg) translateX(1px); }
}

/* Realistic Silk-Velvet Lustrous Sheen Overlay (Pure warm golden-amber sweep) */
.curtain-velvet-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(255, 230, 180, 0.18) 0%,
    transparent 24%,
    rgba(255, 210, 160, 0.14) 50%,
    transparent 74%,
    rgba(20, 2, 4, 0.45) 100%
  );
  opacity: 0.85;
  animation: velvetSheenShimmer 4.8s ease-in-out infinite alternate;
}

@keyframes velvetSheenShimmer {
  0% { opacity: 0.72; transform: translateY(0); }
  100% { opacity: 0.95; transform: translateY(-8px); }
}

/* ========================================================
   EMBROIDERED GOLDEN ZARI BROCADE BORDER (Meeting Edge)
   Warm 24K Royal Indian Wedding Gold with Ruby Gems
   ======================================================== */
.curtain-edge-left,
.curtain-edge-right {
  position: absolute;
  top: 0;
  width: 36px;
  height: 100%;
  z-index: 15;
  background:
    linear-gradient(180deg, rgba(255, 248, 190, 0.75), rgba(180, 130, 20, 0.35), rgba(255, 248, 190, 0.75)),
    repeating-linear-gradient(
      180deg,
      #5C4008 0px,
      #D4AF37 9px,
      #FFF4B2 18px,
      #C8A951 27px,
      #7A540E 36px
    );
  box-shadow: 0 0 32px rgba(245, 222, 133, 0.6), inset 0 0 10px rgba(0, 0, 0, 0.55);
  border-left: 2.5px solid #380204;
  border-right: 2.5px solid #380204;
}

.curtain-edge-left { right: 0; }
.curtain-edge-right { left: 0; }

.zari-embroidery-pattern {
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='36' height='72' viewBox='0 0 36 72' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 4 C28 18 34 25 18 36 C2 25 8 18 18 4 Z M18 40 C28 54 34 61 18 72 C2 61 8 54 18 40 Z' fill='%23FFF6C2' stroke='%238B6914' stroke-width='1.2'/%3E%3Ccircle cx='18' cy='22' r='4' fill='%238B1A1A' stroke='%23FFF4B2' stroke-width='0.8'/%3E%3Ccircle cx='18' cy='58' r='4' fill='%238B1A1A' stroke='%23FFF4B2' stroke-width='0.8'/%3E%3C/svg%3E");
  background-size: 36px 72px;
  background-repeat: repeat-y;
  opacity: 0.95;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
}

/* ========================================================
   GOLDEN BULLION TASSEL FRINGE (Bottom Hem)
   ======================================================== */
.curtain-fringe-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  z-index: 14;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='44' viewBox='0 0 24 44' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%238A6510'/%3E%3Cstop offset='50%25' stop-color='%23FFF4B8'/%3E%3Cstop offset='100%25' stop-color='%23A47814'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='1' y='0' width='22' height='8' rx='2' fill='url(%23g)'/%3E%3Crect x='4' y='8' width='16' height='4' fill='%238B1A1A'/%3E%3Cpath d='M7 12 L7 40 M9 12 L9 43 M11 12 L11 44 M13 12 L13 44 M15 12 L15 43 M17 12 L17 40' stroke='url(%23g)' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 24px 44px;
  background-repeat: repeat-x;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.85));
}

/* Outer Proscenium Wing Tiebacks (Anchored on Outer Stage Walls) */
.curtain-tieback {
  position: absolute;
  top: 50%;
  width: 85px;
  height: 32px;
  z-index: 18;
  opacity: 0;
  pointer-events: none;
}

.curtain-tieback.tieback-left {
  left: 20px;
  transform: translateX(-35px) rotate(-10deg);
}

.curtain-tieback.tieback-right {
  right: 20px;
  transform: translateX(35px) rotate(10deg);
}

.curtain-container.open .curtain-tieback.tieback-left {
  animation: tiebackSweepLeft 2.55s ease forwards;
}

.curtain-container.open .curtain-tieback.tieback-right {
  animation: tiebackSweepRight 2.55s ease forwards;
}

@keyframes tiebackSweepLeft {
  0% { opacity: 0; transform: translateX(-30px) rotate(-10deg); }
  22% { opacity: 0.95; transform: translateX(0px) rotate(0deg); }
  72% { opacity: 0.95; transform: translateX(0px) rotate(0deg); }
  100% { opacity: 0; transform: translateX(-25px) rotate(-5deg); }
}

@keyframes tiebackSweepRight {
  0% { opacity: 0; transform: translateX(30px) rotate(10deg); }
  22% { opacity: 0.95; transform: translateX(0px) rotate(0deg); }
  72% { opacity: 0.95; transform: translateX(0px) rotate(0deg); }
  100% { opacity: 0; transform: translateX(25px) rotate(5deg); }
}

.tieback-cord {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #7A540E 0px, #FCE881 8px, #C8A951 16px, #7A540E 24px);
  border: 1.5px solid #FFF8D6;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75);
}

.tieback-tassel {
  width: 28px;
  height: 38px;
  margin: 3px auto 0;
  background: linear-gradient(180deg, #FFE885 0%, #D4AF37 35%, #8B6914 100%);
  clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.65));
}

/* ========================================================
   ROYAL PROSCENIUM ARCH PELMET & SCALLOPED SWAG VALANCE
   ======================================================== */
.curtain-valance {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 105px;
  z-index: 22;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 215, 175, 0.25), transparent 72%),
    repeating-linear-gradient(
      90deg,
      #160103 0px,
      #3A0306 20px,
      #7F090D 42px,
      #B5151A 62px,
      #7F090D 82px,
      #160103 104px
    );
  border-bottom: 5px solid #D4AF37;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.92);
  transition: transform 2.4s cubic-bezier(0.72, 0, 0.2, 1) 0.3s;
}

.valance-swags {
  position: absolute;
  bottom: -36px;
  left: 0;
  width: 100%;
  height: 36px;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='36' viewBox='0 0 120 36' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='vg' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%238A6510'/%3E%3Cstop offset='50%25' stop-color='%23FFF4B8'/%3E%3Cstop offset='100%25' stop-color='%23A47814'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 0 Q60 40 120 0 Z' fill='%236A0609' stroke='url(%23vg)' stroke-width='4'/%3E%3Ccircle cx='60' cy='20' r='5' fill='url(%23vg)'/%3E%3C/svg%3E");
  background-size: 120px 36px;
  background-repeat: repeat-x;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.85));
}

.curtain-container.open .curtain-valance {
  transform: translateY(-135%);
}

/* ========================================================
   ORNATE ROYAL GOLD MEDALLION CENTERPIECE (Royal Crest)
   Pure warm ruby & 24K gold cartouche • Zero cool/blue filters
   ======================================================== */
.curtain-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 28;
  text-align: center;
  padding: 38px 58px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 32%, #48050B 0%, #200204 70%, #0C0102 100%);
  border: 3px double #F3D372;
  box-shadow:
    0 0 0 5px #5A0409,
    0 0 0 9px #C8A951,
    0 28px 85px rgba(0, 0, 0, 0.95),
    0 0 70px rgba(212, 175, 55, 0.45);
  transition: opacity 0.45s ease, transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.curtain-logo img {
  width: 138px;
  height: 138px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid #D4AF37;
  object-fit: cover;
  box-shadow: 0 0 50px rgba(212, 175, 55, 0.8);
  animation: crestPulse 2.6s ease-in-out infinite;
}

@keyframes crestPulse {
  0%, 100% { box-shadow: 0 0 35px rgba(212, 175, 55, 0.5); transform: scale(1); }
  50% { box-shadow: 0 0 75px rgba(255, 230, 140, 0.95); transform: scale(1.045); }
}

.curtain-logo h2 {
  font-family: 'Great Vibes', 'Playfair Display', cursive;
  font-size: clamp(2.3rem, 4.5vw, 3.4rem);
  font-weight: 400;
  margin-top: 14px;
  padding: 4px 14px;
  background: linear-gradient(135deg, #FFF9D9, #D4AF37, #FFE896, #C8A951);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
}

.curtain-logo p {
  color: #F8E38C;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  margin: 6px 0 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.curtain-container.open .curtain-logo {
  opacity: 0;
  transform: translate(-50%, -60%) scale(0.92);
  pointer-events: none;
}

/* Skip / Enter Button */
.curtain-skip {
  position: absolute;
  bottom: 32px;
  right: 32px;
  z-index: 32;
  padding: 12px 26px;
  border-radius: 999px;
  background: #1A0306;
  border: 1.8px solid #E5C158;
  color: #FCE881;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition: all 0.28s ease;
}

.curtain-skip:hover {
  background: #D4AF37;
  color: #1A0306;
  box-shadow: 0 12px 35px rgba(212, 175, 55, 0.6);
  transform: translateY(-2px);
}

.curtain-container.open .curtain-skip {
  opacity: 0;
  pointer-events: none;
}

/* ========================================================
   THEATRICAL OPERA-DRAPE CLOTH GATHER PHYSICS
   Dynamic curved gather with bottom hem lifting upward & pleats bunching
   ======================================================== */
.curtain-container.open .curtain-left {
  animation: operaDrapeGatherLeft 2.55s cubic-bezier(0.65, -0.02, 0.22, 1) forwards;
}

.curtain-container.open .curtain-right {
  animation: operaDrapeGatherRight 2.55s cubic-bezier(0.65, -0.02, 0.22, 1) forwards;
}

@keyframes operaDrapeGatherLeft {
  0% {
    transform: translate3d(0, 0, 0) scaleX(1) skewY(0deg) rotateZ(0deg);
    border-bottom-right-radius: 0% 0%;
    filter: brightness(1);
  }
  14% {
    /* Initial tension pull */
    transform: translate3d(5px, 0, 0) scaleX(1.01) skewY(-0.4deg) rotateZ(0.5deg);
    border-bottom-right-radius: 4% 6%;
    filter: brightness(1.02);
  }
  38% {
    /* Dynamic upward curve as cords pull bottom inner hem */
    transform: translate3d(-35%, -2%, 0) scaleX(0.78) skewY(-3.5deg) rotateZ(-3deg);
    border-bottom-right-radius: 28% 45%;
    filter: brightness(0.94);
  }
  68% {
    /* Deep accordion bunching into wing */
    transform: translate3d(-78%, -3.5%, 0) scaleX(0.48) skewY(-5.5deg) rotateZ(-5.5deg);
    border-bottom-right-radius: 42% 62%;
    filter: brightness(0.86);
  }
  88% {
    transform: translate3d(-102%, -4.5%, 0) scaleX(0.28) skewY(-7deg) rotateZ(-7deg);
    border-bottom-right-radius: 48% 68%;
    filter: brightness(0.78);
  }
  100% {
    transform: translate3d(-112%, -5%, 0) scaleX(0.22) skewY(-8deg) rotateZ(-8deg);
    border-bottom-right-radius: 50% 70%;
    filter: brightness(0.72);
  }
}

@keyframes operaDrapeGatherRight {
  0% {
    transform: translate3d(0, 0, 0) scaleX(1) skewY(0deg) rotateZ(0deg);
    border-bottom-left-radius: 0% 0%;
    filter: brightness(1);
  }
  14% {
    /* Initial tension pull */
    transform: translate3d(-5px, 0, 0) scaleX(1.01) skewY(0.4deg) rotateZ(-0.5deg);
    border-bottom-left-radius: 4% 6%;
    filter: brightness(1.02);
  }
  38% {
    /* Dynamic upward curve as cords pull bottom inner hem */
    transform: translate3d(35%, -2%, 0) scaleX(0.78) skewY(3.5deg) rotateZ(3deg);
    border-bottom-left-radius: 28% 45%;
    filter: brightness(0.94);
  }
  68% {
    /* Deep accordion bunching into wing */
    transform: translate3d(78%, -3.5%, 0) scaleX(0.48) skewY(5.5deg) rotateZ(5.5deg);
    border-bottom-left-radius: 42% 62%;
    filter: brightness(0.86);
  }
  88% {
    transform: translate3d(102%, -4.5%, 0) scaleX(0.28) skewY(7.5deg) rotateZ(7.5deg);
    border-bottom-left-radius: 48% 68%;
    filter: brightness(0.78);
  }
  100% {
    transform: translate3d(112%, -5%, 0) scaleX(0.22) skewY(8deg) rotateZ(8deg);
    border-bottom-left-radius: 50% 70%;
    filter: brightness(0.72);
  }
}
  }
}

/* ========================================================
   MOBILE RESPONSIVENESS
   ======================================================== */
@media (max-width: 768px) {
  .curtain-valance { height: 65px; }
  .valance-swags { height: 24px; bottom: -24px; background-size: 80px 24px; }
  .curtain-edge-left, .curtain-edge-right { width: 22px; }
  .zari-embroidery-pattern { background-size: 22px 44px; }
  .curtain-fringe-bottom { height: 30px; background-size: 18px 30px; }
  .curtain-logo { padding: 24px 28px; width: 88%; max-width: 320px; border-radius: 28px; }
  .curtain-logo img { width: 92px; height: 92px; }
  .curtain-skip { bottom: 20px; right: 20px; padding: 10px 20px; font-size: 0.78rem; }
}
