/* ==========================================================================
   KARTIK CATERERS — Homepage Entrance Animation ("Wedding Welcome")
   Only present on the homepage. Plays on every visit; skips instantly for
   prefers-reduced-motion and for no-JS visitors (see inline head script +
   <noscript> fallback + assets/js/intro.js).
   ========================================================================== */

html.no-intro .intro-loader { display: none !important; }

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
  background: var(--color-primary);
  cursor: pointer;
}

/* -------------------- Bunting top bar -------------------- */
.intro-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  z-index: 5;
  background-color: #2a1c17;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='30'%3E%3Cline x1='0' y1='4' x2='80' y2='4' stroke='%23C9A227' stroke-width='2'/%3E%3Cpolygon points='6,4 26,4 16,24' fill='%238B1E23'/%3E%3Cpolygon points='46,4 66,4 56,24' fill='%23E29A3C'/%3E%3Ccircle cx='16' cy='24' r='2' fill='%23FBF5F0'/%3E%3Ccircle cx='56' cy='24' r='2' fill='%23FBF5F0'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 80px 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: transform 0.7s ease, opacity 0.7s ease;
}
.intro-loader.is-opening .intro-topbar { transform: translateY(-100%); opacity: 0; }

/* -------------------- Curtain panels -------------------- */
.intro-panel {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.14) 0 6px, transparent 6px 26px),
    linear-gradient(180deg, #7A171C 0%, #4A0E12 55%, #300a0c 100%);
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
  z-index: 3;
}
.intro-panel-left { left: 0; border-right: 3px solid #E29A3C; }
.intro-panel-right { right: 0; border-left: 3px solid #E29A3C; }

.intro-panel-left::after,
.intro-panel-right::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 16px;
  background-repeat: repeat-y;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='22'%3E%3Cpolygon points='0,0 16,0 8,18' fill='%23C9A227'/%3E%3Ccircle cx='8' cy='19' r='2' fill='%23FBF5F0'/%3E%3C/svg%3E");
  background-size: 16px 22px;
  opacity: 0.9;
}
.intro-panel-left::after { right: -8px; }
.intro-panel-right::after { left: -8px; }

.intro-loader.is-opening .intro-panel-left { transform: translateX(-100%); }
.intro-loader.is-opening .intro-panel-right { transform: translateX(100%); }

/* -------------------- Center brand reveal -------------------- */
.intro-center {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  padding: 1.5rem;
  transition: opacity 0.5s ease, transform 0.6s ease;
}
.intro-loader.is-opening .intro-center { opacity: 0; transform: scale(0.94); }

.intro-eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #E29A3C;
  opacity: 0;
  animation: introFadeUp 0.9s ease 0.3s forwards;
}
.intro-brand {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.3rem, 7vw, 4.2rem);
  margin-top: 0.5rem;
  color: #FBF5F0;
  opacity: 0;
  animation: introFadeUp 1s ease 0.55s forwards;
}
.intro-divider {
  width: 64px; height: 1px;
  background: #E29A3C;
  margin-block: 1rem;
  opacity: 0;
  animation: introFadeUp 1s ease 0.7s forwards;
}
.intro-tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.75);
  opacity: 0;
  animation: introFadeUp 1s ease 0.8s forwards;
}

@keyframes introFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-skip {
  position: absolute;
  bottom: 1.9rem; left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  background: transparent;
  opacity: 0;
  animation: introFadeUp 1s ease 1.05s forwards;
  transition: opacity 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.intro-skip:hover, .intro-skip:focus-visible {
  color: #FBF5F0;
  border-color: #E29A3C;
  outline: none;
}
.intro-loader.is-opening .intro-skip { opacity: 0; }

/* -------------------- Falling marigold petals -------------------- */
.intro-petals { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.intro-petals span {
  position: absolute;
  top: -8%;
  width: 9px; height: 9px;
  border-radius: 60% 0 60% 0;
  opacity: 0;
  animation: introPetalFall linear infinite;
}
@keyframes introPetalFall {
  0%   { transform: translate(0, -10vh) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.9; }
  100% { transform: translate(24px, 118vh) rotate(240deg); opacity: 0.55; }
}
.intro-petals span:nth-child(1)  { left: 4%;  background: #8B1E23; width: 8px;  height: 8px;  animation-duration: 6.4s; animation-delay: 0.0s; }
.intro-petals span:nth-child(2)  { left: 12%; background: #E29A3C; width: 10px; height: 10px; animation-duration: 5.6s; animation-delay: 0.5s; }
.intro-petals span:nth-child(3)  { left: 20%; background: #C97A1F; width: 7px;  height: 7px;  animation-duration: 7.1s; animation-delay: 1.1s; }
.intro-petals span:nth-child(4)  { left: 28%; background: #8B1E23; width: 9px;  height: 9px;  animation-duration: 5.9s; animation-delay: 0.2s; }
.intro-petals span:nth-child(5)  { left: 36%; background: #E29A3C; width: 8px;  height: 8px;  animation-duration: 6.8s; animation-delay: 0.8s; }
.intro-petals span:nth-child(6)  { left: 44%; background: #C97A1F; width: 11px; height: 11px; animation-duration: 5.3s; animation-delay: 1.4s; }
.intro-petals span:nth-child(7)  { left: 52%; background: #8B1E23; width: 7px;  height: 7px;  animation-duration: 6.2s; animation-delay: 0.35s; }
.intro-petals span:nth-child(8)  { left: 60%; background: #E29A3C; width: 9px;  height: 9px;  animation-duration: 7.4s; animation-delay: 1.0s; }
.intro-petals span:nth-child(9)  { left: 68%; background: #C97A1F; width: 8px;  height: 8px;  animation-duration: 5.7s; animation-delay: 0.65s; }
.intro-petals span:nth-child(10) { left: 76%; background: #8B1E23; width: 10px; height: 10px; animation-duration: 6.6s; animation-delay: 1.2s; }
.intro-petals span:nth-child(11) { left: 84%; background: #E29A3C; width: 7px;  height: 7px;  animation-duration: 5.4s; animation-delay: 0.15s; }
.intro-petals span:nth-child(12) { left: 92%; background: #C97A1F; width: 9px;  height: 9px;  animation-duration: 6.9s; animation-delay: 0.9s; }
.intro-petals span:nth-child(13) { left: 8%;  background: #E29A3C; width: 8px;  height: 8px;  animation-duration: 7.6s; animation-delay: 1.6s; }
.intro-petals span:nth-child(14) { left: 56%; background: #8B1E23; width: 9px;  height: 9px;  animation-duration: 6.1s; animation-delay: 1.8s; }

@media (max-width: 600px) {
  .intro-topbar { height: 22px; background-size: 60px 24px; }
  .intro-panel-left::after, .intro-panel-right::after { width: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-petals span { animation: none; opacity: 0; }
}

/* -------------------- Wedding ambience sound toggle -------------------- */
/* Bottom-left, deliberately opposite the header's hamburger/CTA cluster and
   the bottom-right floating call/WhatsApp buttons, so it never overlaps
   either at any viewport width. */
.sound-toggle {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 2500;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(26,18,16,0.6);
  border: 1px solid rgba(226,154,60,0.55);
  color: #FBF5F0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.sound-toggle.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.sound-toggle:hover, .sound-toggle:focus-visible {
  border-color: #E29A3C;
  outline: none;
}
.sound-toggle svg { width: 19px; height: 19px; }
.sound-toggle .icon-muted { display: none; }
.sound-toggle.is-muted .icon-on { display: none; }
.sound-toggle.is-muted .icon-muted { display: block; }

@media (max-width: 600px) {
  .sound-toggle { bottom: 1rem; left: 1rem; width: 40px; height: 40px; }
  .sound-toggle svg { width: 17px; height: 17px; }
}
