/* ============================================
   Новогодний декор (изолированный модуль)
   Подключается одной строкой в templates/base_web.html.twig
   ============================================ */

/* --- 1. Деликатный снегопад (canvas) --- */
.ny-snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 75;
}

/* --- 2. Гирлянда под шапкой (десктоп) --- */
.site-header .header-inner {
  position: relative;
}

.ny-garland {
  position: absolute;
  left: 26px;
  right: 26px;
  top: calc(100% - 2px);
  height: 24px;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.ny-garland__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ny-garland__wire {
  fill: none;
  stroke: rgba(46, 125, 74, 0.34);
  stroke-width: 1.25;
  stroke-linecap: round;
}

[data-theme="dark"] .ny-garland__wire {
  stroke: rgba(168, 221, 181, 0.28);
}

.ny-garland__cap {
  fill: #2E5E3E;
}

[data-theme="dark"] .ny-garland__cap {
  fill: #4B7D5B;
}

.ny-garland__bulb {
  --ny-bulb-color: #F5C451;
  --ny-bulb-glow: rgba(245, 196, 81, 0.55);
  --ny-bulb-duration: 4.2s;
  --ny-bulb-delay: 0s;
  fill: var(--ny-bulb-color);
  filter: drop-shadow(0 0 3px var(--ny-bulb-glow));
  animation: ny-bulb-breathe var(--ny-bulb-duration) ease-in-out var(--ny-bulb-delay) infinite;
}

[data-theme="dark"] .ny-garland__bulb {
  filter: drop-shadow(0 0 6px var(--ny-bulb-glow)) drop-shadow(0 0 2px var(--ny-bulb-color));
}

.ny-garland__bulb--gold {
  --ny-bulb-color: #F4C44E;
  --ny-bulb-glow: rgba(244, 196, 78, 0.65);
}

.ny-garland__bulb--red {
  --ny-bulb-color: #E35D5B;
  --ny-bulb-glow: rgba(227, 93, 91, 0.58);
}

.ny-garland__bulb--green {
  --ny-bulb-color: #34B35B;
  --ny-bulb-glow: rgba(52, 179, 91, 0.58);
}

.ny-garland__bulb--ice {
  --ny-bulb-color: #6EC3F4;
  --ny-bulb-glow: rgba(110, 195, 244, 0.62);
}

.ny-garland__bulb--warm {
  --ny-bulb-color: #FFE4A0;
  --ny-bulb-glow: rgba(255, 228, 160, 0.72);
}

.ny-garland__glint {
  fill: rgba(255, 255, 255, 0.75);
}

@keyframes ny-bulb-breathe {
  0%, 100% {
    opacity: 0.96;
  }
  50% {
    opacity: 0.42;
  }
}

/* --- 3. Тонкая гирлянда сверху на мобильных (< 1024px) --- */
.ny-garland-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  pointer-events: none;
  z-index: 88;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .ny-garland-mobile {
    display: none;
  }
}

/* --- 4. Аккуратная новогодняя шапочка на логотипе --- */
.site-header .logo {
  position: relative;
}

.ny-logo-hat {
  position: absolute;
  top: -16px;
  left: 2px;
  width: 44px;
  height: 34px;
  pointer-events: none;
  transform: rotate(-10deg);
  transform-origin: bottom center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.16));
  z-index: 2;
}

[data-theme="dark"] .ny-logo-hat {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

/* --- 5. Уважение к настройкам доступности и печати --- */
@media (prefers-reduced-motion: reduce) {
  .ny-snow {
    display: none !important;
  }

  .ny-garland__bulb {
    animation: none !important;
    opacity: 0.92;
  }
}

html[data-a11y-contrast="high"] .ny-snow,
html[data-a11y-contrast="high"] .ny-garland,
html[data-a11y-contrast="high"] .ny-garland-mobile,
html[data-a11y-contrast="high"] .ny-logo-hat,
html[data-a11y-contrast="mono"] .ny-snow,
html[data-a11y-contrast="mono"] .ny-garland,
html[data-a11y-contrast="mono"] .ny-garland-mobile,
html[data-a11y-contrast="mono"] .ny-logo-hat,
html[data-a11y-images="off"] .ny-snow,
html[data-a11y-images="off"] .ny-garland,
html[data-a11y-images="off"] .ny-garland-mobile,
html[data-a11y-images="off"] .ny-logo-hat {
  display: none !important;
}

@media print {
  .ny-snow,
  .ny-garland,
  .ny-garland-mobile,
  .ny-logo-hat {
    display: none !important;
  }
}
