/* =============================================================================
   HamzaBG Mods — Temporary Christmas / Winter Visual Layer
   -----------------------------------------------------------------------------
   Isolated strictly under html[data-winter="1"].
   Zero edits to void.css or app.js. Preserves 100% of original brand colors
   (#0B0C10 / #13141A / #2B9DF4) and typography (Outfit / DM Sans).
   ============================================================================= */

/* Keep navbar cleanly above snowfall canvas (z-index: 40) */
html[data-winter="1"] .nav {
  z-index: 50;
}

/* -----------------------------------------------------------------------------
   1. Delicate Header Fairy String Lights (Below Fixed Nav, Pointer-Safe)
   -------------------------------------------------------------------------- */
html[data-winter="1"] .xmas-nav-lights {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 1px);
  height: 26px;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

html[data-winter="1"] .xmas-nav-lights__svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes xmas-twinkle {
  0%, 100% {
    opacity: 0.44;
  }
  50% {
    opacity: 1;
  }
}

html[data-winter="1"] .xmas-bulb {
  animation: xmas-twinkle var(--t, 4.2s) ease-in-out var(--d, 0s) infinite;
}

/* -----------------------------------------------------------------------------
   2. Hero Christmas Scenery, Tree Twinkles & Frosted Pine Corner Garlands
   -------------------------------------------------------------------------- */
html[data-winter="1"] .hero {
  position: relative;
}

html[data-winter="1"] .hero > .container {
  position: relative;
  z-index: 3;
}

html[data-winter="1"] .hero__copy,
html[data-winter="1"] .hero__copy > * {
  min-width: 0;
  max-width: 100%;
}

html[data-winter="1"] .xmas-hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 72% center;
  opacity: 0.94;
}

html[data-winter="1"] .xmas-hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      var(--bg) 0%,
      rgba(11, 12, 16, 0.94) 30%,
      rgba(11, 12, 16, 0.56) 48%,
      rgba(11, 12, 16, 0.14) 72%,
      rgba(11, 12, 16, 0.22) 100%
    ),
    linear-gradient(
      to top,
      var(--bg) 0%,
      rgba(11, 12, 16, 0.72) 12%,
      transparent 34%
    ),
    linear-gradient(
      to bottom,
      rgba(11, 12, 16, 0.76) 0%,
      transparent 16%
    );
}

html[data-winter="1"][data-theme="light"] .xmas-hero-scene {
  opacity: 0.22;
}

/* Subtle warm-golden pinpoint twinkles over hero Christmas trees */
@keyframes xmas-sparkle {
  0%, 100% {
    opacity: 0.25;
    transform: scale(0.82);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.18);
  }
}

html[data-winter="1"] .xmas-spark {
  position: absolute;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 251, 235, 0.95) 0%, rgba(253, 230, 138, 0.45) 40%, transparent 74%);
  animation: xmas-sparkle 3.6s ease-in-out infinite;
}

html[data-winter="1"] .xmas-spark--1 { left: 58%; top: 34%; animation-delay: 0s; animation-duration: 3.4s; }
html[data-winter="1"] .xmas-spark--2 { left: 66%; top: 52%; animation-delay: 1.1s; animation-duration: 4.2s; }
html[data-winter="1"] .xmas-spark--3 { left: 74%; top: 26%; animation-delay: 2.0s; animation-duration: 3.8s; }
html[data-winter="1"] .xmas-spark--4 { left: 82%; top: 48%; animation-delay: 0.6s; animation-duration: 4.5s; }
html[data-winter="1"] .xmas-spark--5 { left: 89%; top: 64%; animation-delay: 1.7s; animation-duration: 3.5s; }
html[data-winter="1"] .xmas-spark--6 { left: 93%; top: 33%; animation-delay: 2.6s; animation-duration: 4.1s; }

/* Photorealistic frosted pine garlands framing top hero corners */
html[data-winter="1"] .xmas-hero-garland {
  position: absolute;
  top: calc(var(--nav-h) - 16px);
  width: clamp(155px, 16.5vw, 240px);
  height: auto;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  opacity: 0.92;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.68));
}

html[data-winter="1"] .xmas-hero-garland--left {
  left: -12px;
}

html[data-winter="1"] .xmas-hero-garland--right {
  right: -12px;
  transform: scaleX(-1);
}

html[data-winter="1"] .hero__chip {
  max-width: 100%;
  flex-wrap: nowrap;
}

html[data-winter="1"] .hero__chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   3. Section Kicker & Sculpted Snow-Covered Ledges on Cards / CTA / Footer
   -------------------------------------------------------------------------- */
html[data-winter="1"] .xmas-section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

html[data-winter="1"] .xmas-section-kicker svg {
  width: 12px;
  height: 12px;
  color: var(--accent-bright);
}

html[data-winter="1"] .xmas-card-snow {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  width: 100%;
  height: 10px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.9;
}

html[data-winter="1"] .cta-band {
  position: relative;
  overflow: hidden;
}

html[data-winter="1"] .cta-band > *:not(.xmas-band-snow):not(.xmas-cta-wreath) {
  position: relative;
  z-index: 3;
}

html[data-winter="1"] .xmas-band-snow {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  width: 100%;
  height: 14px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.92;
}

html[data-winter="1"] .xmas-cta-wreath {
  position: absolute;
  right: clamp(16px, 2.5vw, 32px);
  top: -12px;
  width: clamp(88px, 9.5vw, 124px);
  height: auto;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  opacity: 0.94;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.65));
}

/* -----------------------------------------------------------------------------
   4. Footer Snowy Horizon, Decorated Tree Silhouette & Accessible Snow Toggle
   -------------------------------------------------------------------------- */
html[data-winter="1"] .footer {
  position: relative;
  overflow: hidden;
}

html[data-winter="1"] .footer > .container {
  position: relative;
  z-index: 2;
}

html[data-winter="1"] .xmas-footer-snow {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  width: 100%;
  height: 16px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.85;
}

html[data-winter="1"] .xmas-footer-tree {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(190px, 20vw, 290px);
  height: auto;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: 0.32;
}

html[data-winter="1"] .footer__bottom {
  gap: 14px;
}

/* -----------------------------------------------------------------------------
   5. Snowfall Canvas Overlay (Above Backdrop & Cards, Below Navbar & Modals)
   -------------------------------------------------------------------------- */
.winter-snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
  transition: opacity 280ms ease;
}

.winter-snow-canvas.is-off {
  opacity: 0;
}

/* -----------------------------------------------------------------------------
   6. Responsive & Reduced Motion
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  html[data-winter="1"] .xmas-hero-scene {
    background-position: 64% bottom;
  }

  html[data-winter="1"] .xmas-hero-scene::after {
    background:
      linear-gradient(
        180deg,
        rgba(11, 12, 16, 0.88) 0%,
        rgba(11, 12, 16, 0.64) 44%,
        rgba(11, 12, 16, 0.28) 76%,
        var(--bg) 100%
      );
  }
}

@media (max-width: 900px) {
  html[data-winter="1"] .xmas-footer-tree {
    display: none;
  }
}

@media (max-width: 768px) {
  html[data-winter="1"] .xmas-hero-garland {
    width: 130px;
    opacity: 0.82;
  }

  html[data-winter="1"] .xmas-cta-wreath {
    width: 76px;
    top: -10px;
    right: 12px;
  }

  html[data-winter="1"] .xmas-nav-lights {
    height: 20px;
    opacity: 0.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .winter-snow-canvas {
    display: none;
  }

  html[data-winter="1"] .xmas-bulb,
  html[data-winter="1"] .xmas-spark {
    animation: none;
    opacity: 0.78;
  }
}
