/* scenes/wedding.css -- js/motion/scenes/wedding.js (Madhur Milan; ported from sanjana-sayyam +
 * atishay-shivani wedding-finale).
 * Every node here is created by wedding.js inside the wedding .stage. Overlays are
 * small (no node bigger than the stage), pointer-events:none except the pill; only
 * transform / opacity animate. "Before the entrance" states are scoped to
 * .scene:not(.is-entered) and the nodes only exist under html.motion, so reduced
 * motion / no JS is the exact PSD frame. */

/* ---------------------------------------------------------------- sky */
.wd-dusk, .wd-sky, .wd-bless { position: absolute; pointer-events: none; }
.wd-sky, .wd-bless { inset: 0; }
.wd-dusk, .wd-sky { z-index: 0; }           /* above the base plane, under every PSD layer */
.wd-dusk {                                  /* twilight lifting into the night (removed after) */
  left: 0;
  top: 0;
  width: 100%;
  height: calc(1500 * var(--u));
  background: linear-gradient(180deg, rgba(112, 98, 158, 0.62) 0%, rgba(122, 104, 160, 0.5) 45%, rgba(170, 120, 140, 0.34) 80%, rgba(170, 120, 140, 0) 100%);
}
.wd-star {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  background: radial-gradient(circle closest-side, #fffef6 0%, rgba(255, 248, 222, 0.85) 28%, rgba(255, 238, 200, 0.22) 62%, rgba(255, 238, 200, 0) 100%);
}
.scene:not(.is-entered) .wd-star { opacity: 0; }

/* ---------------------------------------------------------------- chandeliers */
.wd-swing { position: absolute; inset: 0; }
.wd-glow {                                  /* warm bloom behind the crystals (0 at rest = PSD) */
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle closest-side, rgba(255, 236, 190, 0.75) 0%, rgba(255, 214, 150, 0.38) 34%, rgba(255, 200, 130, 0.12) 66%, rgba(255, 200, 130, 0) 100%);
}
.wd-glint, .wd-spark {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.wd-glint::before, .wd-glint::after, .wd-spark::before, .wd-spark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 10%;
  margin: -5% 0 0 -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fffef6 0%, rgba(255, 246, 214, 0.85) 40%, rgba(255, 240, 200, 0) 100%);
}
.wd-glint::after, .wd-spark::after { transform: rotate(90deg); }
.wd-spark { background: radial-gradient(circle closest-side, rgba(255, 248, 220, 0.95) 0%, rgba(255, 214, 130, 0.55) 16%, rgba(255, 200, 110, 0) 42%); }
.wd-spark::before, .wd-spark::after { height: 14%; margin-top: -7%; }
.wd-spark::before, .wd-spark::after {
  background: radial-gradient(closest-side, #fffbe8 0%, rgba(255, 220, 130, 0.9) 38%, rgba(240, 190, 90, 0) 100%);
}

/* ---------------------------------------------------------------- agni, finial + bulb twinkles */
.wd-agni__vedi, .wd-agni__flame { position: absolute; display: block; }
.wd-agni__vedi { inset: 0; width: 100%; height: 100%; opacity: 0; }
.wd-agni__flame { opacity: 0; transform-origin: 50% 100%; }
.wd-agni__flame img { display: block; width: 100%; height: 100%; transform-origin: 50% 100%; }
.wd-agni.is-split > img:first-child { opacity: 0; }
.wd-agni.is-split .wd-agni__vedi, .wd-agni.is-split .wd-agni__flame { opacity: 1; }
.wd-firehalo {                               /* the light the fire throws (faint at rest) */
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.55;
  background: radial-gradient(circle closest-side,
    rgba(255, 196, 110, 0.5) 0%, rgba(255, 150, 70, 0.26) 34%, rgba(255, 120, 50, 0.1) 62%, rgba(255, 120, 50, 0) 100%);
}
.wd-embers, .wd-sparkle { position: absolute; inset: 0; pointer-events: none; }
.wd-sparkle { z-index: 27; }                 /* after chandelier-2 (27): above the art, below the text (28+) */
.wd-ember {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, #fff6d8 0%, #ffc45c 38%, rgba(255, 120, 40, 0.55) 62%, rgba(255, 100, 30, 0) 100%);
}
.wd-bulb {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle closest-side, rgba(255, 255, 250, 1) 0%, rgba(255, 242, 210, 0.75) 20%,
    rgba(255, 222, 165, 0.22) 52%, rgba(255, 222, 165, 0) 100%);
}

/* before the entrance (motion only): the pieces that arrive wait hidden; the agni's
 * flame + halo wait for the ignite */
html.motion [data-scene="wedding"]:not(.is-entered) :is(
  .ly:is([data-layer="stars"], [data-layer="drapes"], [data-layer^="string-lights-"], [data-layer^="chandelier-"],
    [data-layer="stage"], [data-layer="carpet"], [data-layer="hedge"], [data-layer="mandap"], [data-layer="couple"],
    [data-layer^="diya-tower-"], [data-layer^="lamp-stand-"], [data-layer^="kalash"]),
  .wd-agni__vedi, .wd-agni__flame, .wd-firehalo) { opacity: 0; }

/* ---------------------------------------------------------------- the blessing */
.wd-bless { z-index: 27; }                   /* above the couple (14) and every art layer, below the text (28+) */
.wd-petal { position: absolute; opacity: 0; pointer-events: none; }
.wd-petal img { display: block; width: 100%; height: 100%; }
.wd-cglow {                                  /* behind the couple: same z, earlier in paint order */
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle closest-side, rgba(255, 244, 214, 0.95) 0%, rgba(255, 220, 150, 0.62) 32%, rgba(250, 190, 110, 0.22) 64%, rgba(250, 186, 110, 0) 100%);
}
.wd-cglow.is-on { opacity: 0.75; }          /* reduced motion: a still answer to the tap */

/* "Tap to shower blessings" -- night-toned pill with the gesture in miniature
 * (from suryanshu-rajvi wedding-finale). */
.wd-pill {
  position: absolute;
  z-index: 50;
  translate: -50% -50%;
  display: inline-flex;
  align-items: center;
  gap: calc(16 * var(--u));
  margin: 0;
  padding: calc(10 * var(--u)) calc(34 * var(--u)) calc(10 * var(--u)) calc(18 * var(--u));
  border: 0;
  border-radius: 999px;
  background: rgba(14, 24, 60, 0.78);
  box-shadow: inset 0 0 0 calc(2.6 * var(--u)) rgba(232, 210, 162, 0.62), 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(3, 8, 28, 0.5);
  color: #fbf4e4;
  font: 400 max(12px, calc(33 * var(--u)))/1.2 "Quattrocento", Georgia, serif;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(calc(14 * var(--u)));
  transition: opacity 450ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 600ms;
}
.wd-pill::before {                           /* >= 44 px tap target round a ~26 px pill */
  content: "";
  position: absolute;
  inset: -10px -6px;
  border-radius: 999px;
}
.wd-pill::after {                            /* a slow gold breath round the rim */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 calc(30 * var(--u)) rgba(240, 206, 140, 0.55);
  opacity: 0;
}
html.motion .wd-pill.is-on {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity 450ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
  animation: wd-pill-float 2.6s ease-in-out 0.7s infinite;
}
html.motion .wd-pill.is-on::after { animation: wd-pill-breath 2.6s ease-in-out 0.7s infinite; }
/* used once (or reduced motion): out of sight, still reachable by keyboard */
html.motion .wd-pill.is-used, html:not(.motion) .wd-pill { visibility: visible; transition: opacity 450ms ease, transform 600ms ease; }
html:not(.motion) .wd-pill { transform: none; transition: none; }
.wd-pill:focus-visible { opacity: 1; outline: 2px solid #f1d9a4; outline-offset: 4px; }
.wd-pill:active { scale: 0.96; }
.wd-pill__t { position: relative; }
@keyframes wd-pill-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc(-8 * var(--u))); } }
@keyframes wd-pill-breath { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }

/* the tap gesture: a resting ring, two rings breaking outward, a beating core */
.wd-tap {
  position: relative;
  flex: none;
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
}
.wd-tap::before {
  content: "";
  position: absolute;
  inset: 16%;
  border: calc(3 * var(--u)) solid currentColor;
  border-radius: 50%;
  opacity: 0.4;
}
.wd-tap > span {
  position: absolute;
  inset: 0;
  border: calc(3.5 * var(--u)) solid currentColor;
  border-radius: 50%;
  opacity: 0;
}
html.motion .wd-pill.is-on .wd-tap > span { animation: wd-ring-out 2.2s cubic-bezier(0.33, 1, 0.68, 1) infinite; }
html.motion .wd-pill.is-on .wd-tap > span + span { animation-delay: 300ms; }
.wd-tap > i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  height: 34%;
  margin: -17% 0 0 -17%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #fffdf7 0%, #fbf4e4 52%, rgba(201, 163, 92, 0.6) 100%);
  box-shadow: 0 0 calc(10 * var(--u)) rgba(255, 246, 220, 0.75);
}
html.motion .wd-pill.is-on .wd-tap > i { animation: wd-core-beat 2.2s cubic-bezier(0.33, 1, 0.68, 1) infinite; }
@keyframes wd-ring-out {
  0% { opacity: 0; transform: scale(0.3); }
  6% { opacity: 1; }
  32%, 100% { opacity: 0; transform: scale(1.16); }
}
@keyframes wd-core-beat {
  0% { transform: scale(1); }
  4% { transform: scale(1.26); }
  11% { transform: scale(1); }
  18% { transform: scale(1.22); }
  26%, 100% { transform: scale(1); }
}

/* status line: announced to screen readers; shown as a caption only with reduced motion */
.wd-status {
  position: absolute;
  z-index: 50;
  translate: -50% -50%;
  padding: calc(14 * var(--u)) calc(34 * var(--u));
  border-radius: 999px;
  background: rgba(14, 24, 60, 0.78);
  box-shadow: inset 0 0 0 calc(2.6 * var(--u)) rgba(232, 210, 162, 0.62);
  color: #fbf4e4;
  font: 400 max(12px, calc(33 * var(--u)))/1.2 "Quattrocento", Georgia, serif;
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
html:not(.motion) .wd-status.is-on { opacity: 1; }
html:not(.motion) .stage:has(.wd-status.is-on) .wd-pill { opacity: 0; }
