/* =====================================================================
   Orbita · Новый год — a festive layer over the Orbita theme.
   Everything here sits on top of app.css; remove newyear.css/js and the
   theme is plain Orbita again.
   ===================================================================== */
:root {
  --ny-gold: #FFC94D; --ny-red: #FF5A5F; --ny-ice: #8FD3FF; --ny-pine: #3DD68C;
  --ny-snow: rgba(240, 246, 255, .92); --ny-aur-1: rgba(61, 214, 140, .16); --ny-aur-2: rgba(110, 160, 255, .14); --ny-aur-3: rgba(180, 110, 255, .10);
}
:root[data-mode="light"] { --ny-snow: rgba(120, 146, 190, .55); --ny-aur-1: rgba(61, 190, 140, .10); --ny-aur-2: rgba(90, 140, 240, .10); --ny-aur-3: rgba(170, 120, 240, .06); --ny-gold: #E0A100; }
@media (prefers-color-scheme: light) { :root[data-mode="auto"] { --ny-snow: rgba(120, 146, 190, .55); --ny-aur-1: rgba(61, 190, 140, .10); --ny-aur-2: rgba(90, 140, 240, .10); --ny-aur-3: rgba(170, 120, 240, .06); --ny-gold: #E0A100; } }

/* ---- northern lights over the night sky (cabinet + landing) ---- */
.glass-bg::after, .land::after {
  content: ""; position: absolute; inset: -10% -20% auto -20%; height: 70vh; pointer-events: none; z-index: 0;
  background:
    radial-gradient(40% 55% at 22% 40%, var(--ny-aur-1), transparent 70%),
    radial-gradient(35% 45% at 55% 25%, var(--ny-aur-2), transparent 70%),
    radial-gradient(30% 40% at 82% 45%, var(--ny-aur-3), transparent 70%);
  filter: blur(30px); transform-origin: 50% 0; animation: ny-aurora 26s ease-in-out infinite alternate;
}
.glass-bg::after { position: fixed; }
.land::after { position: absolute; }
@keyframes ny-aurora { 0% { transform: translateX(-4%) skewX(-6deg) scaleY(.92); } 100% { transform: translateX(5%) skewX(8deg) scaleY(1.08); } }

/* ---- snow ---- */
#ny-snow { position: fixed; inset: 0; z-index: 70; pointer-events: none; width: 100vw; height: 100vh; }

/* ---- garland along the top edge ---- */
#ny-garland { position: fixed; z-index: 71; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 30px; pointer-events: none; }
#ny-garland svg { position: absolute; inset: 0; width: 100%; height: 30px; overflow: visible; }
#ny-garland path { fill: none; stroke: color-mix(in srgb, var(--text) 35%, transparent); stroke-width: 1.2; }
#ny-garland i { position: absolute; width: 8px; height: 11px; margin-left: -4px; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: var(--c);
  box-shadow: 0 0 6px 1px color-mix(in srgb, var(--c) 70%, transparent), 0 0 16px 3px color-mix(in srgb, var(--c) 35%, transparent);
  animation: ny-twinkle var(--d, 2.4s) ease-in-out var(--dl, 0s) infinite; }
#ny-garland i::before { content: ""; position: absolute; left: 2px; top: -3px; width: 4px; height: 4px; border-radius: 1px; background: color-mix(in srgb, var(--text) 45%, transparent); }
@keyframes ny-twinkle { 0%, 100% { opacity: 1; filter: saturate(1.1); } 45% { opacity: .35; filter: saturate(.6); box-shadow: 0 0 2px 0 color-mix(in srgb, var(--c) 40%, transparent); } }
body.ny-garland .land-nav { padding-top: 30px; }
body.ny-garland .topbar { padding-top: calc(12px + 10px); }
body.ny-garland .side { padding-top: 34px; }

/* ---- brand: the satellite becomes a star ---- */
.mark .ny-star { fill: var(--ny-gold); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--ny-gold) 70%, transparent)); transform-origin: 49px 18px; animation: ny-spark 3.6s ease-in-out infinite; }
@keyframes ny-spark { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(18deg); } }

/* ---- traffic meter: a star on the orbit ---- */
.meter-sat::after { width: 26px !important; height: 26px !important; right: -13px !important; top: -13px !important; border-radius: 0 !important;
  background: radial-gradient(circle at 50% 45%, #fff 0 18%, var(--ny-gold) 45%) !important;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  box-shadow: none !important; filter: drop-shadow(0 0 8px var(--ny-gold)); animation: ny-spark 3.6s ease-in-out infinite; }

/* ---- snow toggle button ---- */
.ny-snowbtn[aria-pressed="false"] svg { opacity: .45; }
.ny-snowbtn svg { transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .2s; }
.ny-snowbtn:hover svg { transform: rotate(60deg); }

/* ---- countdown chip ---- */
.ny-count { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 99px; font-size: 14px; color: var(--text);
  background: color-mix(in srgb, var(--ny-gold) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ny-gold) 40%, transparent); }
.ny-count .ny-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ny-gold); color: #2A1B00; flex: none; }
.ny-count .ny-ic svg { width: 15px; height: 15px; }
.ny-count b { font-variant-numeric: tabular-nums; font-weight: 600; }
.stage-copy .ny-count { margin-bottom: 22px; }

/* ---- promo (gift) card ---- */
.ny-promo { position: relative; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; padding: 22px 22px 20px; border-radius: 22px; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, color-mix(in srgb, var(--ny-red) 22%, var(--surface)), color-mix(in srgb, var(--ny-gold) 10%, var(--surface)) 60%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--ny-gold) 45%, transparent); box-shadow: 0 24px 60px -36px color-mix(in srgb, var(--ny-red) 70%, transparent); }
.ny-promo::before { /* ribbon across the card */
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 64px; width: 14px; background: linear-gradient(180deg, var(--ny-gold), color-mix(in srgb, var(--ny-gold) 60%, #8a5a00)); opacity: .5; }
.ny-promo::after { /* snow cap on the top edge */
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 12px; z-index: 1; pointer-events: none;
  background: radial-gradient(10px 7px at 10px 0, var(--ny-snow) 98%, transparent 100%) 0 0 / 22px 12px repeat-x; opacity: .85; }
.ny-gift { width: 56px; height: 56px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #2A1B00; background: radial-gradient(circle at 30% 25%, #FFE7A3, var(--ny-gold)); box-shadow: 0 12px 26px -12px var(--ny-gold); }
.ny-gift svg { width: 28px; height: 28px; }
.ny-promo-t { flex: 1 1 260px; min-width: 0; }
.ny-promo-t b { display: block; font-family: var(--display); font-weight: 500; font-size: 19px; line-height: 1.2; text-wrap: balance; }
.ny-promo-t span { display: block; color: var(--muted); margin-top: 4px; font-size: 14.5px; }
.ny-code { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ny-code code { font: 600 16px/1 var(--mono, ui-monospace, monospace); letter-spacing: .08em; padding: 11px 14px; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--ny-gold) 70%, transparent); background: color-mix(in srgb, var(--ny-gold) 8%, transparent); }
.land .ny-promo { max-width: 640px; margin: 30px 0 0; }

/* the landing headline gets a gentle gold shimmer on the first line only via background-clip */
.stage h1 { background: linear-gradient(100deg, var(--text) 0 40%, color-mix(in srgb, var(--ny-gold) 85%, var(--text)) 50%, var(--text) 60% 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ny-shine 7s ease-in-out 1s infinite; }
@keyframes ny-shine { 0%, 70% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (max-width: 860px) {
  body.ny-garland .topbar { padding-top: 26px; }
  .ny-promo { padding: 18px; gap: 14px; }
  .ny-promo::before { left: 46px; }
  .ny-gift { width: 46px; height: 46px; border-radius: 14px; }
  .ny-code, .ny-code .btn { width: 100%; }
  .ny-code code { flex: 1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .glass-bg::after, .land::after, #ny-garland i, .mark .ny-star, .meter-sat::after, .stage h1 { animation: none !important; }
  .stage h1 { color: var(--text); background: none; }
}
.ny-foot { display: flex; gap: 6px; }
.ny-foot .btn { flex: 1; }
@media (max-width: 520px) { .land-nav .ny-snowbtn { display: none; } }
