/* ═══════════════════════════════════════════════════════════
   FX — animatsiyalar va hero logosi (v1.2)
   O'chirish kerak bo'lsa: index.html dan fx.css va fx.js ni olib tashlang.
   "Harakatni kamaytirish" yoqilgan qurilmalarda hammasi o'chadi.
   ═══════════════════════════════════════════════════════════ */

/* ═══ Hero: o'ng ustun — logo "medal", ostida sertifikat kartasi ═══ */

.hero__side {
  position: relative; display: flex; flex-direction: column;
  align-items: center; padding-top: 285px;
}
.hero__side .hero__card { position: relative; z-index: 3; width: 100%; }

.hero__logo {
  position: absolute; top: -10px; left: 50%; z-index: 1;
  width: 370px; height: 370px; margin-left: -185px;
  display: grid; place-items: center; pointer-events: none;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.hero__logo > * { position: absolute; border-radius: 50%; }

.hero__logo-img {
  width: 62%; height: 62%; z-index: 3;
  filter: drop-shadow(0 18px 40px rgba(16, 96, 184, .55));
  animation: fx-float 7s ease-in-out infinite;
}
@keyframes fx-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

/* Orqadagi yorug'lik — "nafas oladi" */
.hero__logo-glow {
  inset: 12%; z-index: 1;
  background: radial-gradient(circle, rgba(61,130,214,.65), rgba(16,96,184,.18) 55%, transparent 72%);
  filter: blur(18px);
  animation: fx-breathe 5s ease-in-out infinite;
}
@keyframes fx-breathe { 50% { transform: scale(1.14); opacity: .75; } }

/* Oltin-ko'k aylanuvchi halqa */
.hero__logo-ring {
  inset: 6%; z-index: 2;
  background: conic-gradient(from 0deg, transparent 0 8%, var(--gold-400) 18%,
              transparent 32% 52%, var(--brand-300) 64%, transparent 78% 100%);
  -webkit-mask: radial-gradient(circle, transparent 66.5%, #000 67.5%, #000 69%, transparent 70%);
          mask: radial-gradient(circle, transparent 66.5%, #000 67.5%, #000 69%, transparent 70%);
  animation: fx-spin 9s linear infinite;
}

/* Orbitalar — ustida aylanib yuruvchi nuqtalar */
.hero__logo-orbit {
  inset: -4%; z-index: 2;
  border: 1px dashed rgba(255,255,255,.16);
  animation: fx-spin 26s linear infinite;
}
.hero__logo-orbit--2 {
  inset: 14%; border: 1px solid rgba(212,179,85,.20);
  animation-duration: 17s; animation-direction: reverse;
}
.hero__logo-orbit i {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold-400); box-shadow: 0 0 14px 3px rgba(212,179,85,.65);
}
.hero__logo-orbit i:nth-child(1) { top: -4.5px; left: calc(50% - 4.5px); }
.hero__logo-orbit i:nth-child(2) { bottom: 14%; right: 3%; width: 6px; height: 6px;
  background: var(--brand-300); box-shadow: 0 0 12px 3px rgba(125,176,232,.7); }
.hero__logo-orbit i:nth-child(3) { bottom: 14%; left: 3%; width: 5px; height: 5px;
  background: #fff; box-shadow: 0 0 10px 2px rgba(255,255,255,.6); }
.hero__logo-orbit--2 i:nth-child(1) { top: auto; bottom: -4.5px; }

@keyframes fx-spin { to { transform: rotate(360deg); } }

/* Zarrachalar (canvas) — hero orqasida */
.hero__fx { position: absolute; inset: 0; width: 100%; height: 100%;
            z-index: 1; pointer-events: none; opacity: .9; }

/* Sertifikat kartasi — aylanib yuruvchi oltin chegara nuri */
/* Fon rangi style.css dan (yorug'/qorong'i mavzu) — bu yerda faqat soya */
.hero__side .hero__card { box-shadow: 0 30px 70px rgba(1,13,31,.45); }

/* Qorong'i mavzu: karta oq qolib, matn och rangda — o'qilmas edi (eski xato).
   Endi to'q "shisha" karta. */
[data-theme="dark"] .hero__card {
  background: rgba(8, 22, 44, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
[data-theme="dark"] .check-form input {
  background: rgba(255,255,255,.05); color: var(--ink); border-color: rgba(255,255,255,.14);
}
.hero__side .hero__card::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit;
  padding: 2px; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  background: conic-gradient(from var(--fx-a, 0deg), var(--gold-400), var(--brand-400),
              transparent 40%, transparent 60%, var(--brand-400), var(--gold-400));
  animation: fx-border 6s linear infinite;
}
@property --fx-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes fx-border { to { --fx-a: 360deg; } }

/* ═══ Hero: kirish animatsiyasi (sahifa ochilganda bir marta) ═══ */

.hero .eyebrow, .hero__text, .hero__cta, .hero__stats .stat-box {
  animation: fx-up .9s cubic-bezier(.2,.8,.2,1) backwards;
}
.hero .eyebrow          { animation-delay: .05s; }
.hero__text             { animation-delay: .55s; }
.hero__cta              { animation-delay: .7s; }
.hero__stats .stat-box:nth-child(1) { animation-delay: .85s; }
.hero__stats .stat-box:nth-child(2) { animation-delay: .95s; }
.hero__stats .stat-box:nth-child(3) { animation-delay: 1.05s; }
@keyframes fx-up { from { opacity: 0; transform: translateY(28px); } }

/* Sarlavha qatorlari "pardadan" chiqadi */
.hero h1 > span { display: inline-block; animation: fx-clip 1s cubic-bezier(.2,.8,.2,1) backwards; }
.hero h1 > span:first-child { animation-delay: .15s; }
.hero h1 > span.accent      { animation-delay: .32s; }
@keyframes fx-clip {
  from { clip-path: inset(0 0 100% 0); transform: translateY(40%); opacity: 0; }
  to   { clip-path: inset(-10% -5% -20% -5%); transform: none; opacity: 1; }
}

/* Oltin so'zlar ustida yaltiroq nur yuradi */
.hero h1 .accent {
  background: linear-gradient(110deg, var(--gold-500) 20%, #fff1c2 40%,
              var(--gold-400) 50%, var(--gold-500) 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fx-clip 1s cubic-bezier(.2,.8,.2,1) .32s backwards, fx-shine 5.5s ease-in-out 1.4s infinite;
}
@keyframes fx-shine { 0% { background-position: 100% 0; } 60%, 100% { background-position: -50% 0; } }

.hero__side { animation: fx-zoom 1.2s cubic-bezier(.2,.8,.2,1) .3s backwards; }
@keyframes fx-zoom { from { opacity: 0; transform: scale(.88) translateY(20px); } }

.stat-box { transition: transform .25s, border-color .25s, background .25s; }
.stat-box:hover { transform: translateY(-3px); border-color: rgba(212,179,85,.45);
                  background: rgba(255,255,255,.10); }

/* ═══ Tugmalar: yaltiroq nur o'tadi ═══════════════════════ */

.btn--gold, .btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.btn--gold::after, .btn--primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  z-index: -1; pointer-events: none; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: fx-sweep 4.2s ease-in-out infinite;
}
.btn--primary::after { animation-delay: 1.6s; background:
  linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); }
@keyframes fx-sweep { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }

/* Asosiy CTA atrofida yumshoq to'lqin */
.hero__cta .btn--gold { animation: fx-pulse 2.8s ease-out 2s infinite; }
@keyframes fx-pulse {
  0%   { box-shadow: 0 6px 20px rgba(184,145,47,.30), 0 0 0 0 rgba(212,179,85,.55); }
  70%  { box-shadow: 0 6px 20px rgba(184,145,47,.30), 0 0 0 16px rgba(212,179,85,0); }
  100% { box-shadow: 0 6px 20px rgba(184,145,47,.30), 0 0 0 0 rgba(212,179,85,0); }
}

/* ═══ Kartochkalar: 3D egilish + sichqoncha ortidan nur ═══ */

.card, .course, .news { position: relative; transform-style: preserve-3d; will-change: transform; }
.card::after, .course::after, .news::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(61,130,214,.13), transparent 45%);
}
.card:hover::after, .course:hover::after, .news:hover::after { opacity: 1; }
.fx-tilt { transition: transform .12s ease-out, box-shadow .2s, border-color .2s !important; }

/* Ikonkalar hover'da biroz ko'tariladi va aylanadi */
.card__icon, .course__icon { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.card:hover .card__icon, .course:hover .course__icon { transform: translateY(-3px) rotate(-6deg) scale(1.08); }

/* Bosqichma-bosqich paydo bo'lish (to'rdagi o'rniga qarab) */
.grid > .reveal:nth-child(3n+2) { transition-delay: .08s; }
.grid > .reveal:nth-child(3n+3) { transition-delay: .16s; }
.grid > .reveal.fx-done { transition-delay: 0s; }

/* Bo'lim sarlavhasi tagida oltin chiziq chiziladi */
.section__head h2 { position: relative; padding-bottom: 14px; }
.section__head h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; height: 3px; width: 64px;
  margin-left: -32px; border-radius: 3px; background: var(--grad-gold);
  transform: scaleX(0); transition: transform .9s cubic-bezier(.2,.8,.2,1) .2s;
}
.section__head.fx-in h2::after { transform: scaleX(1); }

/* Menyu havolalari tagida chiziq */
.nav__link { position: relative; }
.nav__link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px;
  border-radius: 2px; background: var(--gold-400); transform: scaleX(0);
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.nav__link:hover::after { transform: scaleX(1); }

/* Yuqorida o'qish progressi */
.fx-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120;
  background: linear-gradient(90deg, var(--brand-400), var(--gold-400));
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* Kurs kartochkasi tepasida hover'da ko'k-oltin chiziq */
.course::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--brand-400), var(--gold-400));
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.course:hover::before { transform: scaleX(1); }

/* ═══ Moslashuvchanlik ═══════════════════════════════════ */

@media (max-width: 980px) {
  /* Bitta ustun: logo sarlavha orqasida yirik "suv belgisi" bo'lib turadi */
  .hero__side { position: static; padding-top: 0; }
  .hero__logo {
    top: -70px; left: auto; right: -110px; margin-left: 0;
    width: 360px; height: 360px; opacity: .33; z-index: 0;
  }
  .hero__inner > div:first-child { position: relative; z-index: 2; }
}
@media (max-width: 560px) {
  .hero__logo { width: 300px; height: 300px; right: -120px; top: -60px; opacity: .28; }
}

/* Sensorli ekranlarda 3D egilish yo'q (barmoq bilan ma'nosiz) */
@media (hover: none) {
  .card::after, .course::after { display: none; }
}

/* ═══ "Harakatni kamaytirish" — hammasi to'xtaydi ═════════ */
@media (prefers-reduced-motion: reduce) {
  .hero__logo *, .hero__side, .hero h1 > span, .btn::after,
  .hero__side .hero__card::before { animation: none !important; }
  .hero__fx, .fx-progress { display: none; }
}
