/* Diwali festive section (homepage, shown only around the festival). */

.diwali-3d {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 90px 0 30px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 45% at 50% 88%, rgba(255, 150, 20, 0.35), transparent 70%),
    radial-gradient(ellipse 40% 30% at 15% 10%, rgba(224, 33, 138, 0.25), transparent 70%),
    radial-gradient(ellipse 40% 30% at 85% 12%, rgba(123, 47, 247, 0.28), transparent 70%),
    linear-gradient(180deg, #12002b 0%, #2a0845 45%, #3a0d2e 75%, #1a0710 100%);
}
.dw-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- twinkling sparkles ---------- */
.dw-sparkles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffe08a;
  box-shadow: 0 0 8px 2px rgba(255, 210, 63, 0.8);
  opacity: 0;
  animation: dwTwinkle 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.37s);
  z-index: -1;
}
@keyframes dwTwinkle {
  0%, 100% { opacity: 0; scale: 0.4; }
  50% { opacity: 1; scale: 1.2; }
}

/* ---------- hanging 3D aakash kandils ---------- */
.dw-lantern {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  translate: -50% 0;
  transform-origin: 50% 0;
  perspective: 500px;
  animation: dwSway 4.5s ease-in-out infinite;
  animation-delay: var(--d);
  z-index: 0;
}
@keyframes dwSway {
  0%, 100% { rotate: -5deg; }
  50% { rotate: 5deg; }
}
.dw-string {
  width: 2px;
  height: var(--len);
  background: linear-gradient(#ffd23f, #b8860b);
}
.dw-kandil {
  position: relative;
  width: 54px;
  height: 74px;
  transform-style: preserve-3d;
  animation: dwSpin 9s linear infinite;
  filter: drop-shadow(0 0 18px var(--c));
}
@keyframes dwSpin { to { transform: rotateY(360deg); } }
.dw-kandil i {
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 100% 28%, 100% 72%, 50% 100%, 0 72%, 0 28%);
  background:
    radial-gradient(circle at 50% 50%, #fff6c8 0 10%, transparent 11%),
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(255, 255, 255, 0.35) 10px 12px),
    linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 60%, #000) 100%);
  opacity: 0.95;
  backface-visibility: visible;
}
.dw-kandil i:nth-child(1) { transform: rotateY(0deg) translateZ(27px); }
.dw-kandil i:nth-child(2) { transform: rotateY(90deg) translateZ(27px); }
.dw-kandil i:nth-child(3) { transform: rotateY(180deg) translateZ(27px); }
.dw-kandil i:nth-child(4) { transform: rotateY(270deg) translateZ(27px); }
.dw-tassel {
  width: 10px;
  height: 34px;
  margin-top: -2px;
  background: repeating-linear-gradient(90deg, #ffd23f 0 2px, #ff8a00 2px 4px);
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

/* ---------- copy ---------- */
.dw-copy { position: relative; z-index: 2; max-width: 760px; }
.dw-hindi {
  margin: 0 0 6px;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: #ffd23f;
  text-shadow: 0 0 18px rgba(255, 179, 0, 0.7);
}
.dw-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 9vw, 5.6rem);
  font-weight: 700;
  line-height: 1;
  color: #fff3c4;
  background: linear-gradient(180deg, #fffbe0 0%, #ffd23f 45%, #ff9a1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 1px 0 #e08a00) drop-shadow(0 2px 0 #c06a00) drop-shadow(0 3px 0 #9a4f00)
    drop-shadow(0 4px 0 #7a3c00) drop-shadow(0 0 22px rgba(255, 170, 0, 0.55))
    drop-shadow(0 12px 14px rgba(0, 0, 0, 0.5));
}
.dw-lede {
  max-width: 560px;
  margin: 18px auto 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 240, 220, 0.88);
}
.dw-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
}
.dw-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: translate 150ms ease, box-shadow 150ms ease;
}
.dw-btn--gold {
  color: #3a1400;
  background: linear-gradient(180deg, #fff1a8, #ffc928 50%, #ff9a1f);
  box-shadow: 0 5px 0 #a85a00, 0 0 24px rgba(255, 190, 40, 0.55), 0 14px 20px rgba(0, 0, 0, 0.35);
}
.dw-btn--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 220, 150, 0.45);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.45);
}
.dw-btn:hover { translate: 0 -3px; }
.dw-btn:active { translate: 0 3px; box-shadow: 0 1px 0 #a85a00; }

/* ---------- stage: 3D rangoli floor + row of diyas ---------- */
.dw-stage {
  position: relative;
  z-index: 1;
  height: 250px;
  margin-top: 10px;
  perspective: 700px;
}
.dw-floor {
  position: absolute;
  left: 50%;
  bottom: -70px;
  width: 420px;
  height: 420px;
  translate: -50% 0;
  transform: rotateX(68deg);
  transform-style: preserve-3d;
}
.dw-rangoli {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 16px rgba(255, 140, 0, 0.45));
}
.dw-rangoli-spin {
  transform-box: fill-box;
  transform-origin: center;
  animation: dwRangoli 40s linear infinite;
}
@keyframes dwRangoli { to { rotate: 360deg; } }

.dw-diyas {
  position: absolute;
  left: 50%;
  bottom: 34px;
  translate: -50% 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.dw-diya {
  width: 92px;
  translate: 0 calc(var(--arc) * -14px);
  scale: calc(1 - var(--arc) * 0.08);
}
.dw-diya svg { width: 100%; height: auto; display: block; overflow: visible; }
.dw-flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  opacity: 0;
  scale: 0.2;
  transition: opacity 400ms ease, scale 400ms cubic-bezier(.2, 1.6, .4, 1);
}
.dw-diya.is-lit .dw-flame {
  opacity: 1;
  scale: 1;
  animation: dwFlicker 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.23s);
}
.dw-diya.is-lit svg { filter: drop-shadow(0 -6px 16px rgba(255, 170, 0, 0.75)); }
@keyframes dwFlicker {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  25% { transform: scale(0.94, 1.06) skewX(2deg); }
  50% { transform: scale(1.04, 0.96) skewX(-2deg); }
  75% { transform: scale(0.97, 1.04) skewX(1deg); }
}
.dw-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 230, 190, 0.7);
}

/* ---------- fireworks (spawned by diwali.js) ---------- */
.dw-burst {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 3;
  pointer-events: none;
}
.dw-burst span {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px 2px var(--c);
  animation: dwBurst 1.1s cubic-bezier(.1, .8, .3, 1) forwards;
}
@keyframes dwBurst {
  0% { transform: rotate(var(--a)) translateY(0); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) translateX(0); opacity: 0; scale: 0.3; }
}

@media (max-width: 640px) {
  .diwali-3d { padding-top: 70px; }
  .dw-lantern { scale: 0.7; }
  .dw-lantern:nth-child(2), .dw-lantern:nth-child(3) { display: none; }
  .dw-stage { height: 200px; }
  .dw-floor { width: 300px; height: 300px; bottom: -50px; }
  .dw-diyas { bottom: 34px; gap: 0; }
  .dw-diya { width: 48px; }
  .dw-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .dw-sparkles span, .dw-lantern, .dw-kandil, .dw-rangoli-spin, .dw-diya.is-lit .dw-flame { animation: none; }
  .dw-sparkles span { opacity: 0.7; }
}

/* ---------- ground crackers: anaar fountains + chakri spinners ---------- */
.dw-crackers { position: absolute; inset: 0; pointer-events: none; }
.dw-anar, .dw-chakri {
  position: absolute;
  bottom: 44px;
  translate: -50% 0;
}

/* Anaar: a striped clay cone with a fountain of sparks */
.dw-anar { width: 46px; height: 54px; }
.dw-anar-body {
  position: absolute;
  inset: 0;
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 35%, rgba(255, 255, 255, 0.35) 55%, rgba(0, 0, 0, 0.4)),
    repeating-linear-gradient(180deg, #d81b3c 0 9px, #ffd23f 9px 12px, #2a7de1 12px 21px, #ffd23f 21px 24px);
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.5));
}
.dw-fountain {
  position: absolute;
  left: 50%;
  top: 2px;
  width: 0;
  height: 0;
}
.dw-fountain::before {
  content: "";
  position: absolute;
  left: -26px;
  top: -40px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 200, 0.95), rgba(255, 190, 40, 0.5) 40%, transparent 70%);
  animation: dwGlow 0.25s ease-in-out infinite alternate;
}
@keyframes dwGlow { to { scale: 1.25; opacity: 0.8; } }
.dw-fountain i {
  position: absolute;
  width: 4px;
  height: 4px;
  margin: -2px;
  border-radius: 50%;
  background: #fff6c8;
  box-shadow: 0 0 6px 2px var(--c);
  animation: dwFountain 1.3s cubic-bezier(.2, .7, .4, 1) infinite;
  animation-delay: var(--dl);
}
@keyframes dwFountain {
  0% { translate: 0 0; opacity: 1; scale: 1; }
  55% { translate: calc(var(--x) * 0.6) calc(var(--h) * -1); opacity: 1; }
  100% { translate: var(--x) calc(var(--h) * -0.45); opacity: 0; scale: 0.4; }
}

/* Chakri: a spinning coil throwing a ring of sparks */
.dw-chakri { width: 40px; height: 40px; bottom: 40px; }
.dw-chakri-wheel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff6c8 0 16%, transparent 18%),
    repeating-conic-gradient(#d81b3c 0 30deg, #ffd23f 30deg 45deg, #2e9e4f 45deg 75deg, #ffd23f 75deg 90deg);
  box-shadow: 0 0 0 3px #7a1020, 0 0 18px 6px var(--c);
  transform: rotateX(55deg);
  animation: dwChakri 0.45s linear infinite;
}
.dw-chakri-wheel::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 3px dotted #ffe58a;
  filter: drop-shadow(0 0 6px var(--c));
  opacity: 0.9;
}
@keyframes dwChakri { to { transform: rotateX(55deg) rotate(360deg); } }

/* ---------- sky rockets (launched by diwali.js, then burst) ---------- */
.dw-rocket {
  position: absolute;
  z-index: 3;
  width: 6px;
  height: 18px;
  margin-left: -3px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #ffd23f 0 28%, #d81b3c 28%);
  pointer-events: none;
  animation: dwLaunch var(--t) cubic-bezier(.3, .6, .5, 1) forwards;
}
.dw-rocket::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 4px;
  height: 70px;
  margin-left: -2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff6c8, rgba(255, 170, 0, 0.6) 30%, transparent);
  filter: blur(1px);
}
@keyframes dwLaunch {
  to { translate: 0 calc(var(--rise) * -1); }
}

@media (max-width: 640px) {
  .dw-chakri { display: none; }
  .dw-anar { scale: 0.62; bottom: 64px; transform-origin: 50% 100%; }
  .dw-anar:nth-child(1) { left: 7% !important; }
  .dw-anar:nth-child(3) { left: 93% !important; }
}
@media (prefers-reduced-motion: reduce) {
  .dw-fountain i, .dw-fountain::before, .dw-chakri-wheel { animation: none; }
  .dw-fountain i { opacity: 0; }
}

/* ---------- Diwali offer coupon (3D ticket with a live countdown) ---------- */
.dw-coupon {
  position: relative;
  display: flex;
  max-width: 640px;
  margin: 26px auto 0;
  text-align: left;
  border-radius: 18px;
  background: linear-gradient(120deg, #fff8e1, #ffe7b0);
  color: #3a1400;
  /* ticket notches on the top and bottom, in line with the perforation */
  -webkit-mask: radial-gradient(circle 13px at 190px 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 13px at 190px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 13px at 190px 0, #0000 98%, #000) top / 100% 51% no-repeat,
        radial-gradient(circle 13px at 190px 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  filter: drop-shadow(0 4px 0 #a85a00) drop-shadow(0 0 26px rgba(255, 190, 40, 0.45)) drop-shadow(0 18px 22px rgba(0, 0, 0, 0.45));
  transform: perspective(900px) rotateX(6deg);
  transition: transform 400ms cubic-bezier(.16, 1, .3, 1);
  overflow: hidden;
}
.dw-coupon:hover { transform: perspective(900px) rotateX(0deg) translateY(-4px); }
/* light sweep across the ticket */
.dw-coupon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.65) 50%, transparent 65%);
  translate: -120% 0;
  animation: dwShine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes dwShine { 0%, 55% { translate: -120% 0; } 100% { translate: 120% 0; } }

.dw-coupon-left {
  flex: 0 0 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 10px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.25), transparent 50%),
    linear-gradient(160deg, #e0218a, #b3125f 55%, #7a0b40);
  border-right: 3px dashed rgba(255, 235, 200, 0.85);
  color: #fff;
}
.dw-coupon-big {
  font-family: var(--font-heading);
  font-size: 4.6rem;
  font-weight: 700;
  line-height: 0.9;
  color: #ffe58a;
  text-shadow: 0 1px 0 #f2b600, 0 2px 0 #d99200, 0 3px 0 #b87400, 0 4px 0 #8a5200, 0 10px 14px rgba(0, 0, 0, 0.45);
}
.dw-coupon-big small { font-size: 0.5em; vertical-align: top; margin-left: 2px; }
.dw-coupon-off {
  margin-top: 4px;
  padding: 3px 16px;
  border-radius: 999px;
  background: #ffd23f;
  color: #7a0b40;
  font-weight: 800;
  letter-spacing: 0.25em;
  box-shadow: 0 3px 0 #a85a00;
}
.dw-coupon-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
}
.dw-coupon-tag {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b3125f;
}
.dw-coupon-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  line-height: 1.2;
}
.dw-coupon-valid { font-size: 0.88rem; font-weight: 600; color: #8a4a12; }
.dw-countdown { display: flex; gap: 8px; margin: 8px 0 4px; }
.dw-countdown span {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
  padding: 6px 4px 5px;
  border-radius: 10px;
  background: linear-gradient(180deg, #3a0d2e, #12002b);
  color: rgba(255, 230, 190, 0.8);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.dw-countdown b {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.1;
  color: #ffd23f;
  font-variant-numeric: tabular-nums;
}
.dw-coupon .dw-cta-row { justify-content: flex-start; margin-top: 10px; gap: 10px; }
.dw-coupon .dw-btn { padding: 11px 18px; font-size: 0.92rem; }
.dw-coupon .dw-btn--ghost {
  color: #3a1400;
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(168, 90, 0, 0.35);
  box-shadow: 0 4px 0 rgba(168, 90, 0, 0.45);
}

@media (max-width: 640px) {
  .dw-coupon {
    flex-direction: column;
    text-align: center;
    -webkit-mask: none;
    mask: none;
  }
  .dw-coupon-left { flex-basis: auto; flex-direction: row; gap: 12px; border-right: 0; border-bottom: 3px dashed rgba(255, 235, 200, 0.85); }
  .dw-coupon-big { font-size: 3.4rem; }
  .dw-coupon-right { align-items: center; padding: 16px 14px; }
  .dw-countdown span { min-width: 48px; }
  .dw-coupon .dw-cta-row { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .dw-coupon::after { animation: none; display: none; }
  .dw-coupon { transition: none; }
}

/* Offer note on the Get Quote form */
.dw-offer-note {
  margin-bottom: var(--space-4);
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(120deg, #fff8e1, #ffe7b0);
  border: 1px solid #f2c46a;
  border-left: 5px solid #e0218a;
  color: #3a1400;
  font-size: 0.92rem;
  box-shadow: 0 3px 0 #f2c46a;
}
.dw-coupon[hidden] { display: none; }

