/* =========================================================
   YANGI YIL / NEW YEAR LAYER — Residence Park
   Faqat 1-dekabrdan 20-yanvargacha yoqiladi (newyear.js `html.nye` qo'shadi).
   O'chirish uchun: index.html dan newyear.css va newyear.js qatorlarini olib tashlang.
   ========================================================= */

/* --- Chiroqlar gulchambari: navbar tagidan osilib turadi --- */
html.nye header::before,
html.nye header::after{
  content:'';position:absolute;left:0;right:0;top:100%;height:30px;
  pointer-events:none;background-repeat:repeat-x;background-size:120px 30px;
}
/* sim + oltin lampochkalar */
html.nye header::before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'><path d='M0 3Q30 21 60 3Q90 21 120 3' fill='none' stroke='%23FAF7F0' stroke-opacity='.28' stroke-width='1.2'/><g fill='%23E4CD98'><rect x='28' y='12.5' width='4' height='3' rx='1' fill='%23766b4a'/><ellipse cx='30' cy='19.5' rx='3.4' ry='4.8'/><rect x='88' y='12.5' width='4' height='3' rx='1' fill='%23766b4a'/><ellipse cx='90' cy='19.5' rx='3.4' ry='4.8'/></g></svg>");
  filter:drop-shadow(0 0 5px rgba(228,205,152,.85));
  animation:nyeTwinkleA 3.2s ease-in-out infinite;
}
/* muz-ko'k lampochkalar (navbat bilan miltillaydi) */
html.nye header::after{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'><g fill='%23BFE3FF'><rect x='-2' y='3.5' width='4' height='3' rx='1' fill='%23566b7d'/><ellipse cx='0' cy='10.5' rx='3.2' ry='4.4'/><rect x='58' y='3.5' width='4' height='3' rx='1' fill='%23566b7d'/><ellipse cx='60' cy='10.5' rx='3.2' ry='4.4'/><rect x='118' y='3.5' width='4' height='3' rx='1' fill='%23566b7d'/><ellipse cx='120' cy='10.5' rx='3.2' ry='4.4'/></g></svg>");
  filter:drop-shadow(0 0 5px rgba(191,227,255,.85));
  animation:nyeTwinkleB 3.2s ease-in-out infinite;
}
@keyframes nyeTwinkleA{0%,100%{opacity:1;}50%{opacity:.35;}}
@keyframes nyeTwinkleB{0%,100%{opacity:.35;}50%{opacity:1;}}

/* --- Hero: sovuq, qishki ohang --- */
html.nye .hero-shade{background:rgba(14,30,58,.46);}

/* --- Tabrik belgisi --- */
.nye-greet{display:none;}
html.nye .nye-greet{
  display:inline-flex;align-items:center;gap:10px;margin-bottom:22px;
  padding:10px 18px 10px 14px;border-radius:0;
  border:1px solid rgba(228,205,152,.55);
  background:rgba(9,15,26,.5);
  color:var(--gold-300);font-size:14px;font-weight:600;letter-spacing:.02em;
  animation:nyeIn .9s .3s both cubic-bezier(.2,.7,.3,1);
}
.nye-greet svg{width:20px;height:20px;flex:none;animation:nyeSpin 18s linear infinite;}
@keyframes nyeIn{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}
@keyframes nyeSpin{to{transform:rotate(360deg);}}

/* --- Qor kanvasi --- */
#nyeSnow{position:fixed;inset:0;width:100%;height:100%;z-index:150;pointer-events:none;}

/* --- Qorni yoqish/o'chirish tugmasi --- */
.nye-toggle{display:none;}
html.nye .nye-toggle{
  display:flex;align-items:center;justify-content:center;
  position:fixed;left:24px;bottom:28px;z-index:250;width:46px;height:46px;border-radius:0;
  border:1px solid rgba(228,205,152,.55);background:rgba(14,26,46,.92);color:var(--gold-300);
  backdrop-filter:blur(8px);cursor:pointer;transition:transform .25s ease,background .25s ease;
}
.nye-toggle:hover{transform:scale(1.08);}
.nye-toggle svg{width:22px;height:22px;}
.nye-toggle[aria-pressed="false"]{color:rgba(250,247,240,.5);background:rgba(10,18,29,.6);}
.nye-toggle[aria-pressed="false"]::after{
  content:'';position:absolute;width:26px;height:1.6px;background:currentColor;transform:rotate(-45deg);
}

/* --- Qorong'u bo'limlarga sezilar-sezilmas qor parchasi --- */
html.nye .contact{position:relative;overflow:hidden;}
html.nye .contact::after{
  content:'';position:absolute;right:-70px;top:-70px;width:340px;height:340px;pointer-events:none;opacity:.07;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E4CD98' stroke-width='.6' stroke-linecap='round'><path d='M12 2v20M3.34 7l17.32 10M3.34 17L20.66 7M9.5 3.8L12 6l2.5-2.2M9.5 20.2L12 18l2.5 2.2M4.2 9.2l3 .9-.6 3M19.8 14.8l-3-.9.6-3M19.8 9.2l-3 .9.6 3M4.2 14.8l3-.9-.6-3'/></svg>") no-repeat center/contain;
}
html.nye .contact > *{position:relative;z-index:1;}

/* --- Mobil --- */
@media (max-width:700px){
  html.nye header::before,html.nye header::after{height:24px;background-size:96px 24px;}
  html.nye .nye-greet{font-size:13px;margin-bottom:16px;}
  html.nye .nye-toggle{left:16px;bottom:20px;width:42px;height:42px;}
}

/* --- Harakatni kamaytirishni so'ragan foydalanuvchilar uchun --- */
@media (prefers-reduced-motion:reduce){
  html.nye header::before,html.nye header::after{animation:none;opacity:.9;}
  .nye-greet,.nye-greet svg{animation:none !important;}
  #nyeSnow,.nye-toggle{display:none !important;}
}

/* ===== Kuchaytirilgan bayram qatlami ===== */
html.nye .words i{color:var(--red);}
html.nye .hero-shade{background:rgba(14,30,58,.5);}

/* osilgan shar-bezaklar */
.nye-balls{display:none;}
html.nye .nye-balls{display:block;position:absolute;left:0;right:0;top:100%;height:0;pointer-events:none;z-index:3;}
.nye-balls i{position:absolute;top:0;width:0;height:0;transform-origin:50% 0;animation:nyeSwing 4s ease-in-out infinite;}
.nye-balls i::before{content:'';position:absolute;left:0;top:0;width:1px;height:var(--len);background:rgba(246,241,231,.55);}
.nye-balls i::after{content:'';position:absolute;left:-13px;top:var(--len);width:26px;height:26px;border-radius:50%;
  background:radial-gradient(circle at 32% 30%,rgba(255,255,255,.95) 0 9%,transparent 24%),var(--c);
  box-shadow:0 6px 16px rgba(0,0,0,.28),inset -4px -5px 8px rgba(0,0,0,.25);}
@keyframes nyeSwing{0%,100%{transform:rotate(5deg);}50%{transform:rotate(-5deg);}}

/* qor uyumlari */
html.nye .hero::after{
  content:'';position:absolute;left:0;right:0;bottom:-1px;height:clamp(40px,6vw,86px);z-index:3;pointer-events:none;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'><path d='M0 90V52C80 30 150 22 240 40S400 70 520 48 700 8 840 30 1030 72 1160 46 1340 18 1440 44V90Z' fill='%23F6F1E7'/></svg>") center bottom/100% 100% no-repeat;
}
html.nye .hero-inner{padding-bottom:clamp(70px,11vh,130px);}
html.nye .contact::before{
  content:'';position:absolute;left:0;right:0;top:-1px;height:clamp(30px,4.5vw,64px);pointer-events:none;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'><path d='M0 0H1440V22C1340 44 1250 52 1140 34S930 4 800 28 560 58 430 34 190 6 0 30Z' fill='%23F6F1E7'/></svg>") center top/100% 100% no-repeat;
}

/* sanoq */
.nye-count{display:none;}
html.nye .nye-count{display:flex;align-items:stretch;gap:0;margin-top:34px;width:max-content;max-width:100%;border:1px solid rgba(228,205,152,.5);background:rgba(9,15,26,.5);}
.nye-count .cl{padding:14px 20px;font:700 11.5px/1.3 var(--sans);letter-spacing:.16em;text-transform:uppercase;color:var(--gold-300);display:flex;align-items:center;border-right:1px solid rgba(228,205,152,.35);max-width:130px;}
.nye-count .cu{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 18px;min-width:76px;border-right:1px solid rgba(228,205,152,.2);}
.nye-count .cu:last-child{border-right:0;}
.nye-count b{font:500 clamp(30px,3.4vw,46px)/1 var(--serif);color:var(--paper);font-variant-numeric:tabular-nums;}
.nye-count i{font:700 10px/1 var(--sans);font-style:normal;letter-spacing:.14em;text-transform:uppercase;color:rgba(246,241,231,.65);margin-top:6px;}
@media (max-width:640px){
  html.nye .nye-count{flex-wrap:wrap;width:100%;}
  .nye-count .cl{max-width:none;width:100%;border-right:0;border-bottom:1px solid rgba(228,205,152,.35);padding:10px 14px;}
  .nye-count .cu{flex:1;min-width:0;padding:10px 6px;}
  .nye-balls i::after{width:20px;height:20px;left:-10px;}
  .nye-balls i:nth-child(even){display:none;}
}
@media (prefers-reduced-motion:reduce){.nye-balls i{animation:none !important;}}
html.nye .hero h1{font-size:clamp(44px,5.9vw,94px);max-width:18ch;}
html.nye .hero .lead{margin-bottom:26px;}
html.nye .nye-count{margin-top:26px;}
html.nye .nye-greet{margin-bottom:16px;}
html.nye .hero .eyebrow{margin-bottom:20px;}
@media (max-height:760px){html.nye .hero .lead{display:none;}}
