/* ============================================================================
 * ZIVOX — Diwali festive theme layer
 * ----------------------------------------------------------------------------
 * Loaded AFTER base.css + site.css, so it re-tints the existing design system
 * rather than replacing it. Nothing here changes layout, grid or behaviour:
 * it only overrides colour tokens and adds festive decoration + the 20% off
 * announcement bar. Removing the <link> reverts the site to its normal look.
 * ==========================================================================*/

/* --------------------------------------------------------------- 1. Tokens */
:root {
  /* Warm the neutral surfaces slightly — cream instead of cool grey. */
  --bg: #fdf8f1;
  --bg-2: #fbeedd;
  --ink: #2a1108;
  --ink-2: #4a2a1c;
  --muted: #6d5245;
  --faint: #9c8577;
  --line: rgba(120, 53, 15, 0.12);
  --line-2: rgba(120, 53, 15, 0.07);

  /* Festive accents: marigold, saffron, deep maroon. */
  --fest-gold: #f0a91b;
  --fest-gold-2: #ffd166;
  --fest-saffron: #ea7317;
  --fest-maroon: #7a1029;
  --fest-maroon-2: #a5142f;
  --fest-cream: #fffaf3;

  /* Re-tint the shared brand gradients so every CTA follows the theme. */
  --grad: linear-gradient(120deg, #ea7317 0%, #c2881a 45%, #a5142f 100%);
  --grad-soft: linear-gradient(120deg, rgba(240, 169, 27, 0.14), rgba(165, 20, 47, 0.10));
  --grad-text: linear-gradient(100deg, #b8600c, #a5142f);
  --cta-grad: linear-gradient(125deg, #8a1226 0%, #c2410c 52%, #e8a317 100%);
  --accent-stat: linear-gradient(140deg, #b45309, #c2410c 55%, #a5142f);
  --sh-brand: 0 10px 24px -8px rgba(165, 20, 47, 0.42);
}

/* Headings and section eyebrows pick up the festive ink. */
body { background: var(--bg); }
h1, h2, h3, h4 { color: var(--ink); }

/* Eyebrow labels: gold with a small diya dot. */
.eyebrow, .section-eyebrow, .zx-eyebrow {
  color: #a8620a !important;
}

/* Links inside prose get a warm accent, not blue. */
.section a:not(.btn):not(.zx-cbtn):hover { color: #a5142f; }

/* ------------------------------------------------------- 2. Festive aura bg */
.zx-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background:
    radial-gradient(680px 380px at 12% -6%, rgba(240, 169, 27, 0.20), transparent 68%),
    radial-gradient(620px 360px at 92% 4%, rgba(165, 20, 47, 0.12), transparent 70%),
    radial-gradient(760px 420px at 50% 104%, rgba(234, 115, 23, 0.13), transparent 72%);
}

/* Fine rangoli-inspired lattice, extremely subtle, so text stays readable. */
.zx-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%237a1029' stroke-width='1'%3E%3Ccircle cx='60' cy='60' r='26'/%3E%3Ccircle cx='60' cy='60' r='40'/%3E%3Cpath d='M60 20v80M20 60h80M32 32l56 56M88 32L32 88'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
}

/* --------------------------------------------------- 3. Announcement ribbon */
.zx-fest-bar {
  position: relative;
  z-index: 61;
  background: linear-gradient(100deg, #7a1029 0%, #a5142f 34%, #c2410c 68%, #d99a12 100%);
  color: #fff8ec;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 14px -6px rgba(122, 16, 41, 0.55);
}
.zx-fest-bar__in {
  max-width: 1240px;
  margin: 0 auto;
  padding: 9px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  text-align: center;
}
.zx-fest-bar strong { font-weight: 800; }
.zx-fest-bar .zx-fest-off {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  color: #fff;
}
.zx-fest-bar .zx-fest-off b { font-size: 16px; letter-spacing: -0.01em; }
.zx-fest-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff8ec;
  color: #8a1226 !important;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.zx-fest-bar__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -3px rgba(0, 0, 0, 0.42);
  color: #6d0e20 !important;
}
.zx-fest-diya {
  width: 15px;
  height: 15px;
  flex: none;
  display: inline-block;
  vertical-align: -2px;
}

/* Dismiss control. Kept visually quiet so it never competes with the CTA. */
.zx-fest-bar__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: transparent;
  color: #fff8ec;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.zx-fest-bar__x:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.16);
}

/* ---------------------------------------------------------- 4. Diya accents */
.zx-diya-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 26px;
  margin: 4px 0 2px;
  pointer-events: none;
}
.zx-diya-row svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 10px rgba(240, 169, 27, 0.75));
  animation: zx-flame 2.6s ease-in-out infinite;
}
.zx-diya-row svg:nth-child(2) { animation-delay: 0.45s; width: 42px; height: 42px; }
.zx-diya-row svg:nth-child(3) { animation-delay: 0.9s; }
@keyframes zx-flame {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(240, 169, 27, 0.6)); }
  50%      { filter: drop-shadow(0 0 18px rgba(255, 196, 61, 0.95)); }
}

/* Thin gold rule with a lotus glyph, used to open the offer block. */
.zx-fest-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 18px;
  max-width: 420px;
  color: #c2881a;
}
.zx-fest-rule::before,
.zx-fest-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194, 136, 26, 0.75), transparent);
}

/* ------------------------------------------------------- 5. Offer showcase */
.zx-fest-offer {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg, 20px);
  border: 1px solid rgba(194, 136, 26, 0.42);
  background:
    radial-gradient(560px 260px at 88% 12%, rgba(255, 209, 102, 0.30), transparent 66%),
    linear-gradient(135deg, #fffaf1 0%, #fdf1de 52%, #fbe4cd 100%);
  box-shadow: 0 2px 4px rgba(120, 53, 15, 0.05), 0 22px 48px -22px rgba(122, 16, 41, 0.32);
  padding: clamp(20px, 3.2vw, 34px);
}
.zx-fest-offer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cg fill='none' stroke='%23a5142f' stroke-width='1.2'%3E%3Ccircle cx='75' cy='75' r='30'/%3E%3Ccircle cx='75' cy='75' r='48'/%3E%3Cpath d='M75 27v96M27 75h96'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 150px 150px;
}
.zx-fest-offer > * { position: relative; }

.zx-fest-offer__grid {
  display: grid;
  gap: clamp(18px, 3vw, 34px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .zx-fest-offer__grid { grid-template-columns: 1.15fr 0.85fr; }
}

.zx-fest-offer h2 {
  margin: 0 0 10px;
  font-family: 'Sora', sans-serif;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: #6d0e20;
}
.zx-fest-offer h2 .zx-fest-accent {
  background: linear-gradient(100deg, #c2410c, #a5142f 60%, #7a1029);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.zx-fest-offer p {
  margin: 0 0 16px;
  color: #6d5245;
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 56ch;
}

/* The big 20% badge. */
.zx-fest-badge {
  justify-self: center;
  text-align: center;
  padding: 22px 30px;
  border-radius: 22px;
  background: linear-gradient(150deg, #7a1029 0%, #a5142f 46%, #c2410c 100%);
  color: #fff8ec;
  box-shadow: 0 18px 40px -18px rgba(122, 16, 41, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 209, 102, 0.45);
}
.zx-fest-badge__num {
  font-family: 'Sora', sans-serif;
  font-size: clamp(44px, 7vw, 62px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fffdf7, #ffd166);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}
.zx-fest-badge__lbl {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffe6b8;
}
.zx-fest-badge__sub {
  display: block;
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(255, 248, 236, 0.86);
}

/* Benefit chips. */
.zx-fest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}
.zx-fest-chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(194, 136, 26, 0.32);
  color: #7a4535;
  font-size: 13px;
  font-weight: 600;
}
.zx-fest-chips svg { width: 14px; height: 14px; color: #c2410c; }

/* Coupon code chip. */
.zx-fest-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px dashed rgba(165, 20, 47, 0.45);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  color: #8a1226;
  letter-spacing: 0.06em;
}
.zx-fest-code span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a86a2c;
}

/* Offer CTAs reuse the site's button system with festive tinting. */
.zx-fest-offer .btn-primary {
  background: linear-gradient(125deg, #8a1226 0%, #c2410c 55%, #e8a317 100%);
  box-shadow: 0 10px 24px -10px rgba(138, 18, 38, 0.6);
}

/* --------------------------------------------- 6. Nav/header festive touch */
.zx-header .zx-bar {
  background: rgba(255, 250, 243, 0.86);
  border-color: rgba(194, 136, 26, 0.28);
}
.zx-nav a[aria-current="page"] { color: #a5142f; }
.zx-cbtn, .btn-primary {
  box-shadow: 0 8px 20px -10px rgba(138, 18, 38, 0.55);
}

/* --------------------------------------------------- 7. Reduced motion off */
@media (prefers-reduced-motion: reduce) {
  .zx-diya-row svg { animation: none; }
  .zx-fest-bar__cta { transition: none; }
}

/* ------------------------------------------------------------ 8. Print off */
@media print {
  .zx-fest-bar, .zx-diya-row { display: none !important; }
  .zx-bg::before, .zx-bg::after { display: none !important; }
}


/* ============================================================================
 * 9. Entrance celebration (once per browser session, first page view only)
 * ----------------------------------------------------------------------------
 * Decorative Diwali "opening": marigold flowers and petals drift down while
 * diyas rise with a flickering flame, all behind a soft golden flash.
 *
 * Safety properties:
 *   - pointer-events: none  -> can never intercept a click, tap or scroll
 *   - aria-hidden="true"    -> invisible to assistive technology
 *   - display: none first   -> the JS gate below decides whether it ever
 *                              runs, so there is no flash on later page views
 *   - only transform/opacity animate -> composited, no layout thrash
 *   - prefers-reduced-motion disables it completely
 * ==========================================================================*/

.zx-fest-fx {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint;
}

/* The gate adds .is-on for ~7s, then removes it. */
.zx-fest-fx.is-on {
  display: block;
  animation: zx-fx-fade 1000ms ease 6400ms forwards;
}

@keyframes zx-fx-fade {
  to { opacity: 0; visibility: hidden; }
}

/* Warm golden bloom at the very start. */
.zx-fest-fx__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(255, 209, 102, 0.45) 0%,
    rgba(240, 169, 27, 0.18) 34%,
    rgba(240, 169, 27, 0) 70%
  );
  opacity: 0;
  animation: zx-fx-flash 2200ms ease-out 60ms forwards;
}

@keyframes zx-fx-flash {
  0%   { opacity: 0; }
  14%  { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Falling petals ------------------------------------------------------- */
.zx-petal {
  position: absolute;
  top: -8vh;
  left: var(--x, 50%);
  width: var(--sz, 14px);
  height: var(--sz, 14px);
  background: radial-gradient(
    circle at 32% 26%,
    #fff6df 0%,
    var(--c, #f0a91b) 52%,
    var(--c2, #c2410c) 100%
  );
  border-radius: 100% 0 100% 0;
  opacity: 0;
  animation: zx-petal-fall var(--dur, 6.5s) cubic-bezier(.32, .08, .5, 1) var(--delay, 0s) forwards;
}

@keyframes zx-petal-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8vh, 0) rotate(0deg) scale(.55);
  }
  10% { opacity: var(--op, .9); }
  50% {
    transform: translate3d(var(--drift, 44px), 46vh, 0) rotate(190deg) scale(1);
  }
  90% { opacity: var(--op, .9); }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--drift, 44px) * -.7), 110vh, 0) rotate(370deg) scale(.85);
  }
}

/* --- Whole marigold blooms, spinning slowly ------------------------------- */
.zx-flower {
  position: absolute;
  top: -10vh;
  left: var(--x, 50%);
  width: var(--sz, 26px);
  height: var(--sz, 26px);
  opacity: 0;
  filter: drop-shadow(0 2px 6px rgba(165, 20, 47, .22));
  animation: zx-flower-fall var(--dur, 8s) linear var(--delay, 0s) forwards;
}

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

.zx-flower svg g { fill: var(--c, #ea7317); }

@keyframes zx-flower-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -10vh, 0) rotate(0deg) scale(.5);
  }
  12% { opacity: var(--op, .95); }
  50% {
    transform: translate3d(var(--drift, 60px), 50vh, 0) rotate(180deg) scale(1);
  }
  88% { opacity: var(--op, .95); }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--drift, 60px) * -.5), 112vh, 0) rotate(340deg) scale(.8);
  }
}

/* --- Diyas rising with a flickering flame --------------------------------- */
.zx-fest-diya {
  position: absolute;
  bottom: -16vh;
  left: var(--x, 50%);
  width: var(--sz, 44px);
  height: var(--sz, 44px);
  opacity: 0;
  filter: drop-shadow(0 0 14px rgba(255, 186, 55, .8));
  animation: zx-diya-rise var(--dur, 7.4s) ease-in-out var(--delay, 0s) forwards;
}

.zx-fest-diya svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.zx-fest-diya__flame {
  transform-box: fill-box;
  transform-origin: 50% 96%;
  animation: zx-flame-flicker 1.15s ease-in-out infinite;
}

@keyframes zx-flame-flicker {
  0%, 100% { transform: scale(1); opacity: 1; }
  34%      { transform: scale(1.1, .9); opacity: .9; }
  68%      { transform: scale(.92, 1.12); opacity: 1; }
}

@keyframes zx-diya-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(.55) rotate(-7deg);
  }
  16% { opacity: 1; }
  50% {
    transform: translate3d(var(--drift, 20px), -50vh, 0) scale(1) rotate(5deg);
  }
  86% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--drift, 20px) * -1), -106vh, 0) scale(.8) rotate(-5deg);
  }
}

/* Lighter on phones: fewer petals, fewer blooms, same feel. */
@media (max-width: 560px) {
  i.zx-petal:nth-of-type(n + 11) { display: none; }
  b.zx-flower:nth-of-type(n + 4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .zx-fest-fx { display: none !important; }
}

@media print {
  .zx-fest-fx { display: none !important; }
}
