/* ============================================================
   VINEX — ommaviy sayt uslublari (oq-qora, light/dark)
   ============================================================ */

:root {
  --font-head: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --w: 1200px;
  --radius: 14px;
  --radius-sm: 9px;
  --tr: .25s cubic-bezier(.4, 0, .2, 1);
}

html[data-theme='light'] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f1f1f1;
  --fg: #0a0a0a;
  --muted: #6d6d6d;
  --line: #e7e7e7;
  --line-strong: #cfcfcf;
  --inv-bg: #0a0a0a;
  --inv-fg: #fafafa;
  --inv-muted: #a8a8a8;
  --inv-line: #2a2a2a;
  --header-bg: rgba(250, 250, 250, .82);
  --shadow: 0 10px 40px rgba(0, 0, 0, .08);
}
html[data-theme='dark'] {
  --bg: #0a0a0a;
  --surface: #151515;
  --surface-2: #1e1e1e;
  --fg: #fafafa;
  --muted: #9c9c9c;
  --line: #242424;
  --line-strong: #383838;
  --inv-bg: #fafafa;
  --inv-fg: #0a0a0a;
  --inv-muted: #5c5c5c;
  --inv-line: #d9d9d9;
  --header-bg: rgba(10, 10, 10, .8);
  --shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--fg); color: var(--bg); }

.container { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--fg); color: var(--bg); padding: 8px 16px; z-index: 200; }
.skip:focus { left: 12px; top: 12px; }

.ic { flex: none; vertical-align: middle; }

/* ---------- tugmalar ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  border: 1.5px solid transparent;
  transition: transform var(--tr), background var(--tr), color var(--tr), border-color var(--tr), box-shadow var(--tr);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--lg { padding: 15px 28px; font-size: 1rem; }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.btn--ghost { border-color: var(--line-strong); color: var(--fg); }
.btn--ghost:hover { border-color: var(--fg); transform: translateY(-2px); }
.btn--invert { background: var(--inv-fg); color: var(--inv-bg); }
.btn--invert:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
html[data-theme='dark'] .btn--invert { box-shadow: 0 6px 24px rgba(0,0,0,.35); }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  transition: border-color var(--tr), transform var(--tr);
}
.iconbtn:hover { border-color: var(--fg); }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .3s ease, border-color .3s ease;
}
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }

.logo { display: inline-flex; align-items: center; }
.logo__text {
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem;
  letter-spacing: -.03em; line-height: 1;
}
.logo__img { height: 36px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__link { font-size: .93rem; font-weight: 500; color: var(--muted); position: relative; padding: 4px 0; transition: color var(--tr); }
.nav__link::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--fg); transition: width var(--tr); }
.nav__link:hover, .nav__link.is-active { color: var(--fg); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }
.nav__cta { padding: 10px 20px; font-size: .88rem; }

.hactions { display: flex; align-items: center; gap: 10px; }

/* til menyusi */
.langbox { position: relative; }
.langbtn { width: auto; padding: 0 12px; font-weight: 600; font-size: .85rem; }
.langbtn .ic { transition: transform var(--tr); }
.langbox.open .langbtn .ic { transform: rotate(180deg); }
.langmenu {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all var(--tr); z-index: 110;
}
.langbox.open .langmenu { opacity: 1; visibility: visible; transform: none; }
.langmenu__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 6px; font-size: .92rem; font-weight: 500;
}
.langmenu__item:hover { background: var(--surface-2); }
.langmenu__item.is-active { background: var(--fg); color: var(--bg); }
.langmenu__code { font-size: .72rem; letter-spacing: .08em; opacity: .7; font-weight: 700; }

/* tema tugmasi */
.themebtn .ic:first-child { display: none; }
html[data-theme='dark'] .themebtn .ic:first-child { display: block; }
html[data-theme='dark'] .themebtn .ic:last-child { display: none; }

.burger { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 100px 0 80px; overflow: hidden; }
.hero__in { position: relative; z-index: 2; max-width: 900px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 26px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--fg); position: relative; }
.pulse::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid var(--fg); animation: pulse 2s infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

.hero__title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.5rem, 6.4vw, 4.9rem);
  line-height: 1.04; letter-spacing: -.035em;
  margin-bottom: 26px; text-wrap: balance;
}
.hero__sub { font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 640px; margin-bottom: 38px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 60px; }

.hero__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg); padding: 22px 20px; }
.stat__v { font-family: var(--font-head); font-weight: 700; font-size: 2rem; letter-spacing: -.03em; line-height: 1.1; }
.stat__l { font-size: .84rem; color: var(--muted); margin-top: 4px; }

.hero__grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 20%, black 0%, transparent 65%);
  mask-image: radial-gradient(ellipse 90% 70% at 70% 20%, black 0%, transparent 65%);
  opacity: .7;
}

/* ---------- marquee ---------- */
.marquee {
  background: var(--fg); color: var(--bg);
  overflow: hidden; padding: 16px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.marquee__track { display: flex; gap: 0; width: max-content; animation: mq 30s linear infinite; }
.marquee__track span {
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; padding-right: 48px;
}
.mq-star { opacity: .5; font-size: .8em; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- bo'limlar ---------- */
.section { padding: 100px 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.sec-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 44px; }
.sec-num {
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  padding: 6px 12px; letter-spacing: .12em; margin-top: 8px; color: var(--muted);
}
.sec-title { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.03em; line-height: 1.15; }
.sec-sub { color: var(--muted); margin-top: 8px; max-width: 560px; }

/* ---------- filtrlar ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent;
  font-size: .88rem; font-weight: 500;
  transition: all var(--tr);
}
.chip:hover { border-color: var(--fg); }
.chip.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip__n { font-size: .72rem; opacity: .55; font-weight: 700; }

/* ---------- loyiha kartalari ---------- */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pcard {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; position: relative;
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr), opacity var(--tr);
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.pcard.is-hidden { display: none; }
.pcard--big { grid-column: span 2; }
.pcard__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.pcard--big .pcard__img { aspect-ratio: 16 / 8.2; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.6,.2,1), filter var(--tr); }
.pcard:hover .pcard__img img { transform: scale(1.05); }
html[data-theme='dark'] .pcard__img img { filter: brightness(.92); }
.pcard__flag {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--fg); color: var(--bg);
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.pcard__body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.pcard__meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pcard__cat { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pcard__year { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pcard__title { font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.pcard__desc { font-size: .9rem; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__go {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .86rem; font-weight: 600; margin-top: 6px;
}
.pcard__go .ic { transition: transform var(--tr); }
.pcard:hover .pcard__go .ic { transform: translate(3px, -3px); }

.empty-filter { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- xizmatlar ---------- */
.sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.scard {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}
.section--alt .scard { background: var(--surface); }
.scard:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.scard__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--fg); color: var(--bg); margin-bottom: 20px;
}
.scard__title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.scard__text { font-size: .92rem; color: var(--muted); }

/* ---------- biz haqimizda ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: start; }
.about__text .sec-num { display: inline-block; margin-bottom: 18px; }
.about__text .sec-title { margin-bottom: 18px; }
.about__text p { color: var(--muted); font-size: 1.02rem; }
.about__side {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  min-height: 320px; background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.about__img { width: 100%; height: 100%; object-fit: cover; }
.about__side::after { content: 'VINEX'; font-family: var(--font-head); font-weight: 700; font-size: 2rem; letter-spacing: -.03em; color: var(--line-strong); position: absolute; }
.about__side { position: relative; }
.about__side:has(img)::after { content: none; }

/* ---------- ariza bo'limi (invert) ---------- */
.section--invert { background: var(--inv-bg); color: var(--inv-fg); }
.section--invert .sec-num { color: var(--inv-muted); border-color: var(--inv-line); }
.section--invert .sec-sub { color: var(--inv-muted); }
.apply { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.apply__left .sec-title { margin-bottom: 16px; }
.apply__text { color: var(--inv-muted); font-size: 1.04rem; margin-bottom: 34px; max-width: 460px; }
.apply__directl { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--inv-muted); margin-bottom: 14px; }

.socials { display: flex; gap: 10px; }
.social {
  width: 44px; height: 44px; border-radius: 999px;
  border: 1.5px solid var(--inv-line); color: var(--inv-fg);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--tr);
}
.social:hover { background: var(--inv-fg); color: var(--inv-bg); border-color: var(--inv-fg); transform: translateY(-3px); }
.socials--dark .social, .footer .social { border-color: var(--line-strong); color: var(--fg); }
.socials--dark .social:hover, .footer .social:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.aform {
  background: var(--surface); color: var(--fg);
  border-radius: var(--radius); padding: 34px;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.aform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__l { font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.field__i {
  width: 100%; padding: 13px 15px;
  background: var(--bg); color: var(--fg);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  outline: none; transition: border-color var(--tr), box-shadow var(--tr);
}
.field__i:focus { border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 12%, transparent); }
.field__i.err { border-color: #c0392b; }
select.field__i { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
textarea.field__i { resize: vertical; min-height: 100px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.aform__submit { justify-content: center; width: 100%; }
.aform__submit[disabled] { opacity: .6; cursor: wait; }
.aform__note { font-size: .9rem; min-height: 1.4em; font-weight: 500; }
.aform__note.ok { color: #1e8e3e; }
.aform__note.err { color: #c0392b; }
html[data-theme='dark'] .aform__note.ok { color: #57bb7f; }

/* ---------- kontaktlar ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.crow {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: border-color var(--tr), transform var(--tr);
}
.crow:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.crow > .ic { margin-top: 3px; color: var(--muted); }
.crow__l { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.crow__v { font-weight: 600; font-size: 1.02rem; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer__in { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding: 60px 24px 44px; }
.footer__text { color: var(--muted); font-size: .92rem; margin-top: 14px; max-width: 340px; }
.footer__nav { display: flex; flex-direction: column; gap: 12px; }
.footer__nav .nav__link { padding: 0; width: fit-content; }
.footer__nav .nav__link::after { display: none; }
.footer__contacts { display: flex; flex-direction: column; gap: 10px; font-weight: 500; }
.footer__contacts .socials { margin-top: 8px; }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .85rem;
}
.footer__admin { opacity: .6; font-size: .82rem; }
.footer__admin:hover { opacity: 1; }

/* ---------- floating tugmalar ---------- */
.fabs { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 12px; z-index: 90; }
.fab {
  width: 52px; height: 52px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  transition: transform var(--tr), opacity var(--tr);
}
.fab:hover { transform: translateY(-4px) scale(1.04); }
.fab--top { position: fixed; right: 22px; bottom: 22px; z-index: 89; opacity: 0; pointer-events: none; transition: opacity var(--tr), transform var(--tr); background: var(--surface); color: var(--fg); border: 1.5px solid var(--line-strong); box-shadow: none; }
body.fabshift .fab--top { bottom: 170px; }
.fab--top.show { opacity: 1; pointer-events: auto; }

/* ---------- reveal animatsiya ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.6,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- 404 ---------- */
.page404 { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.e404 { text-align: center; padding: 40px; }
.e404 h1 { font-family: var(--font-head); font-size: clamp(5rem, 18vw, 10rem); letter-spacing: -.05em; line-height: 1; margin-bottom: 12px; }
.e404 p { color: var(--muted); margin-bottom: 28px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px);
  background: var(--fg); color: var(--bg);
  padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: all var(--tr); z-index: 300; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsiv ---------- */
@media (max-width: 1024px) {
  .pgrid, .sgrid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .apply { grid-template-columns: 1fr; gap: 40px; }
  .footer__in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 68px 0; }
  .hero { padding: 64px 0 56px; }
  .hero__cta { margin-bottom: 40px; }
  .pgrid, .sgrid { grid-template-columns: 1fr; }
  .pcard--big { grid-column: span 1; }
  .pcard--big .pcard__img { aspect-ratio: 4 / 3; }
  .aform { padding: 24px 20px; }
  .aform__row { grid-template-columns: 1fr; }

  /* mobil menyusi */
  .nav {
    position: fixed; inset: 0 0 0 auto; right: 0; top: 0;
    width: min(320px, 86vw); height: 100vh; height: 100dvh;
    background: var(--bg); border-left: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 10px; padding: 90px 32px 32px;
    transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
    z-index: 99; box-shadow: var(--shadow);
  }
  body.nav-open .nav { transform: none; }
  .nav__link { font-size: 1.35rem; font-family: var(--font-head); font-weight: 600; }
  .nav__cta { margin-top: 18px; }
  .burger { display: inline-flex; z-index: 101; position: relative; }
  body.nav-open .burger { border-color: var(--line-strong); }
  .nav__link::after { display: none; }
  .footer__in { grid-template-columns: 1fr; gap: 28px; padding-top: 44px; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
