/* Ilmix Lite — ommaviy sayt uslublari.
   Brend: indigo (asosiy) + zumrad (kichik urgʻu), Lexend sarlavhalar, Work Sans matn.
   Naqsh tili: sakkiz burchakli yulduz (Ustoz bilan bir xil). Inline uslub YOʻQ (CSP). */

@font-face {
  font-family: 'Lexend';
  src: url('../fonts/lexend-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('../fonts/worksans-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
/* Work Sans'da oʻ/gʻ (U+02BB/02BC) atrofida boʻshliq katta — shu ikki belgi Lexend'dan */
@font-face {
  font-family: 'UzApos';
  src: url('../fonts/lexend-latin.woff2') format('woff2');
  font-weight: 400 700;
  unicode-range: U+02BB-02BC;
  font-display: swap;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #3f37c9;
  --primary-soft: #eef0ff;
  --accent: #047857;
  --accent-soft: #e6f5ee;
  --heading: #0d0b26;
  --ink: #1c1a3a;
  --muted: #5b6070;
  --bg: #f7f7fb;
  --bg-band: #efeff8;
  --surface: #ffffff;
  --line: #e6e5ef;
  --field: #918ea8;
  --danger: #b91c1c;
  --amber-bg: #fef3c7;
  --amber-fg: #92400e;
  --navy: #1e1b4b;

  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(30, 27, 75, .05), 0 6px 18px rgba(30, 27, 75, .05);
  --shadow-md: 0 2px 6px rgba(30, 27, 75, .06), 0 18px 40px rgba(55, 48, 163, .10);
  --shadow-lg: 0 8px 20px rgba(30, 27, 75, .08), 0 30px 60px rgba(55, 48, 163, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --font-display: 'Lexend', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'UzApos', 'Work Sans', 'Segoe UI', system-ui, sans-serif;

  /* Sakkiz burchakli yulduz naqshi (fon uchun, juda xira) */
  --naqsh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M32 18l4 9 9-4-4 9 9 4-9 4 4 9-9-4-4 9-4-9-9 4 4-9-9-4 9-4-4-9 9 4z' fill='none' stroke='%234f46e5' stroke-opacity='.13' stroke-width='1.2'/%3E%3C/svg%3E");
  --naqsh-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cpath d='M32 18l4 9 9-4-4 9 9 4-9 4 4 9-9-4-4 9-4-9-9 4 4-9-9-4 9-4-4-9 9 4z' fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.2'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* Qisqa sahifada footer ekran pastida turadi (ostida boʻsh tasma qolmaydi) */
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--heading);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.4vw + .5rem, 3.8rem); font-weight: 700; line-height: 1.08; letter-spacing: -.028em; }
h2 { font-size: clamp(1.65rem, 1.8vw + 1rem, 2.35rem); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
h3 { font-size: 1.18rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--primary); color: #fff; padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { left: 8px; color: #fff; }
.muted { color: var(--muted); }

/* Kichik yorliq: tabletka emas — zumrad yulduzcha + matn */
.kicker {
  display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 1.1rem;
  font-weight: 600; font-size: .95rem; color: var(--accent);
}
.kicker-mark {
  width: 12px; height: 12px; background: currentColor; flex: none;
  clip-path: polygon(50% 0, 62% 24%, 85% 15%, 76% 38%, 100% 50%, 76% 62%, 85% 85%, 62% 76%, 50% 100%, 38% 76%, 15% 85%, 24% 62%, 0 50%, 24% 38%, 15% 15%, 38% 24%);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 247, 251, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.site-header.is-scrolled { background: rgba(255, 255, 255, .92); border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(30, 27, 75, .06); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--heading); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -.03em; }
.brand-logo { height: 40px; width: auto; }
.brand:hover { color: var(--heading); }
.brand img { transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.05); }

.site-nav { display: flex; align-items: center; gap: .15rem; }
.site-nav a {
  position: relative; padding: .55rem .8rem; border-radius: var(--r-sm); text-decoration: none;
  color: var(--ink); font-weight: 500; font-size: .97rem; transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--primary); background: rgba(79, 70, 229, .06); }
.site-nav a.is-active { color: var(--primary); }
.site-nav a.is-active::after {
  content: ''; position: absolute; left: .8rem; right: .8rem; bottom: .2rem; height: 2px;
  border-radius: 2px; background: var(--primary);
}

.nav-toggle {
  display: none; border: 0; background: transparent; color: var(--heading);
  width: 44px; height: 44px; border-radius: var(--r-sm); cursor: pointer; place-items: center;
}
.nav-toggle-close { display: none; }

@media (max-width: 900px) {
  .js .nav-toggle { display: grid; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem 1rem 1rem; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(30, 27, 75, .1);
  }
  .js .site-nav a { padding: .85rem .9rem; font-size: 1.05rem; }
  .js .site-nav a.is-active { background: var(--primary-soft); }
  .js .site-nav a.is-active::after { display: none; }
  .js .nav-open .site-nav { display: flex; }
  .js .nav-open .nav-toggle-open { display: none; }
  .js .nav-open .nav-toggle-close { display: block; }
  :root:not(.js) .header-row { flex-wrap: wrap; padding-block: .5rem; }
  :root:not(.js) .site-nav { flex-wrap: wrap; }
}

/* ---------- Tugmalar va havolalar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 12px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s, border-color .2s, transform .15s;
}
.btn:active { transform: scale(.98); }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; border-radius: 14px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(79, 70, 229, .26); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 12px 28px rgba(79, 70, 229, .32); }
.btn-primary .icon { transition: transform .2s var(--ease); }
.btn-primary:hover .icon { transform: translateX(3px); }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn-soft:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border-color: #c7d2fe; }
.btn-ghost:hover { border-color: var(--primary); background: #fff; color: var(--primary-dark); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--primary-soft); color: var(--navy); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-soon { background: var(--amber-bg); color: var(--amber-fg); cursor: default; }
.btn-soon:active { transform: none; }
.btn-outline-light:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none;
  color: var(--primary); white-space: nowrap;
}
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--primary-dark); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4.5rem); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42rem 30rem at 82% 40%, rgba(99, 102, 241, .11), transparent 70%),
    radial-gradient(30rem 20rem at 8% 0%, rgba(5, 150, 105, .06), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero-lead { font-size: 1.2rem; line-height: 1.6; color: var(--muted); max-width: 44ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }

.hero-stats { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 0; margin: 2.4rem 0 0; padding: 0; }
.hero-stats li { display: flex; align-items: center; }
.hero-stats li + li::before { content: ''; width: 1px; height: 1.6rem; background: var(--line); margin: 0 1.3rem; }
.hero-stats a { display: inline-flex; align-items: baseline; gap: .4rem; text-decoration: none; color: var(--muted); }
.hero-stats b {
  font: 600 1.75rem/1 var(--font-display); color: var(--heading); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; transition: color .2s;
}
.hero-stats a:hover b { color: var(--primary); }
/* Statistikadan keyingi ijtimoiy tarmoqlar (lib/social.php). Ustoz bilan bir xil:
   monoxrom va tinch — rang faqat sichqoncha ustiga kelganda chiqadi. */
.hero-social { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: 1.8rem; }
.hero-social > span { font-size: .9rem; color: var(--muted); }
.hero-social ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.hero-social a {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px;
  border: 1px solid var(--line); color: var(--muted);
  transition: background .2s, color .2s, border-color .2s, translate .2s var(--ease);
}
.hero-social a:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); translate: 0 -2px; }
.hero-social a:active { translate: 0 0; }

.hero-art svg, .hero-art img { width: 100%; height: auto; max-height: 460px; margin-inline: auto; }
.hero-art img { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); object-fit: cover; aspect-ratio: 5 / 4; }

/* Hero: haqiqiy kurslardan 3 ta kartochka, biroz qiyshiq taxlangan.
   Qiyshiqlik `rotate`, koʻtarilish `translate` xususiyatida — paydo boʻlish
   animatsiyasi (`transform`) bilan toʻqnashmaydi. Doimiy harakat yoʻq. */
.hero-grid.is-solo { grid-template-columns: 1fr; }
.hero-stack { position: relative; height: 510px; }
.stack-card {
  position: absolute; width: 55%; padding: 9px; border-radius: 22px;
  background: var(--surface); color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: rotate .45s var(--ease), translate .45s var(--ease), box-shadow .3s;
}
/* Ustma-ust tushish faqat rasm qismida: oldingi kartochkaning matni orqadagining rasmi ustida */
.stack-1 { left: 0; top: 0; rotate: -4deg; z-index: 3; }
.stack-2 { right: 0; top: 25%; rotate: 3.5deg; z-index: 2; }
.stack-3 { left: 15%; bottom: 0; rotate: -1.5deg; z-index: 1; }
.stack-card:hover, .stack-card:focus-visible { rotate: 0deg; translate: 0 -8px; z-index: 4; box-shadow: 0 12px 28px rgba(30, 27, 75, .12), 0 40px 70px rgba(55, 48, 163, .2); color: var(--ink); }
.stack-media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--primary-soft); }
.stack-media img, .stack-media svg { width: 100%; height: 100%; object-fit: cover; }
.stack-body { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: .75rem .55rem .35rem; }
.stack-title {
  font: 600 1rem/1.3 var(--font-display); letter-spacing: -.01em; color: var(--heading);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.stack-price { flex: none; font: 600 .92rem/1 var(--font-display); color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.stack-price.price-free { padding: .25rem .55rem; font-size: .85rem; }
.js .hero-stack.is-in > .stack-2 { animation-delay: .12s; }
.js .hero-stack.is-in > .stack-3 { animation-delay: .24s; }

/* Birinchi kirishda kartochkalar "osmondan tushadi" (site.js .is-falling qoʻshadi).
   Pastdagi kartochka birinchi tushadi, ustidagisi oxirida — xuddi taxlanayotgandek.
   Tushish tezlanib (ease-in), yerga tekkach ikki marta kichik sakraydi.
   Faqat `transform` animatsiya qilinadi: joyidagi qiyshiqlik `rotate` xususiyatida, unga tegilmaydi.
   .hero overflow:hidden — kartochka hero chetidan kirib keladi, sahifa tepasidan emas. */
@keyframes skyfall {
  0%   { opacity: 1; transform: translateY(-120vh) rotate(var(--fall-tilt, -12deg)); animation-timing-function: cubic-bezier(.5, 0, .9, .45); }
  58%  { transform: translateY(0) rotate(0) scale(1.02, .97); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  72%  { transform: translateY(-22px) rotate(calc(var(--fall-tilt, -12deg) * -.12)); animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  84%  { transform: translateY(0) scale(1.01, .99); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  92%  { transform: translateY(-6px); }
  100% { opacity: 1; transform: none; }
}
.js .hero-stack.is-falling.is-in > .stack-card { animation: skyfall 1.25s both; }
.js .hero-stack.is-falling.is-in > .stack-3 { --fall-tilt: 14deg; animation-delay: .1s; }
.js .hero-stack.is-falling.is-in > .stack-2 { --fall-tilt: -18deg; animation-delay: .45s; }
.js .hero-stack.is-falling.is-in > .stack-1 { --fall-tilt: 10deg; animation-delay: .8s; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { display: none; }
  .hero-art.has-photo img { max-height: 300px; }
}

/* ---------- Boʻlimlar ---------- */
.block { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.block-tight { padding-top: 0; }
.block-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.block-head h2 { margin-bottom: .3em; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 58ch; margin: 0; }

.page-head { position: relative; padding: clamp(2.6rem, 6vw, 4.5rem) 0 clamp(1.8rem, 4vw, 2.8rem); overflow: hidden; }
.page-head::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--naqsh);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 90%);
}
.page-head h1 { margin-bottom: .3em; }

/* ---------- Kurs kartochkasi ---------- */
.card {
  background: var(--surface); border-radius: 22px; padding: 10px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: box-shadow .3s var(--ease), translate .3s var(--ease);
}
.card:hover { translate: 0 -4px; box-shadow: var(--shadow-md); }
.card-media { position: relative; aspect-ratio: 8 / 5; border-radius: 14px; overflow: hidden; background: var(--primary-soft); }
.card-media img, .card-media svg { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img, .card:hover .card-media svg { transform: scale(1.04); }
.card-body { padding: 1rem .75rem .75rem; display: flex; flex-direction: column; flex: 1; }
.card-title { margin-bottom: .4em; }
/* Ichki kursi bor kartochka butunlay bosiladi (sarlavha havolasi butun kartochkani qoplaydi) */
.card.has-course { position: relative; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.card.has-course .card-foot .btn { position: relative; z-index: 1; }
.card-text { color: var(--muted); font-size: .98rem; line-height: 1.6; }
.card-text p:last-child { margin-bottom: 0; }
.card-foot { margin-top: auto; padding-top: 1.1rem; display: grid; gap: .75rem; }
.card-foot .btn { width: 100%; }

.price { margin: 0; font: 600 1.2rem/1.3 var(--font-display); color: var(--heading); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price-free { justify-self: start; padding: .2rem .7rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 1rem; }

/* "Tez orada" — tabletka emas, burchakli bayroqcha */
.flag-soon {
  position: absolute; top: 12px; left: 12px; padding: .28rem .65rem; border-radius: 6px;
  background: var(--amber-bg); color: var(--amber-fg); font-weight: 600; font-size: .82rem;
  box-shadow: 0 2px 10px rgba(30, 27, 75, .15);
}
.flag-inline { position: static; display: inline-block; vertical-align: middle; margin-left: .35rem; box-shadow: none; font-family: var(--font-body); }

/* Katalog toʻri */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

/* Bosh sahifadagi lenta: suriladi, chekkasi xiralashadi */
.rail-wrap { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 310px); gap: 1.25rem;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
  padding: 6px 2px 14px; margin: -6px -2px 0;
  scrollbar-width: thin; scrollbar-color: #c7c6dd transparent;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent);
}
.rail.at-end { -webkit-mask-image: none; mask-image: none; }
.rail > .card { scroll-snap-align: start; }
/* Lentada tavsif 4 qator — kartochkalar bir xil boʻyli, toʻliq matn katalog sahifasida */
.rail .card-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.rail .card-text p { margin: 0; }
.rail .card-text p + p::before { content: " "; }
.rail .card-text p { display: inline; }
.rail:focus-visible { outline-offset: 6px; }
.rail-nav { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .6rem; }
.rail-nav[hidden] { display: none; }
.rail-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--heading);
  transition: border-color .2s, color .2s, background .2s, opacity .2s;
}
.rail-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.rail-btn:disabled { opacity: .4; cursor: default; }

/* ---------- Yoʻnalishlar: raqamlangan plitkalar ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 1rem; }
.tile {
  display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.3rem 1.4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.tile:hover { border-color: #c7d2fe; background: #fbfbff; box-shadow: var(--shadow-sm); }
.tile-num {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  font: 600 1.05rem/1 var(--font-display); font-variant-numeric: tabular-nums; transition: background .25s, color .25s;
}
.tile:hover .tile-num { background: var(--primary); color: #fff; }
.tile-thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.tile-title { font-size: 1.12rem; margin-bottom: .3em; }
.tile-text { color: var(--muted); font-size: .97rem; line-height: 1.55; }
.tile-text p:last-child { margin-bottom: 0; }

/* ---------- Xizmatlar: navbatma-navbat qatorlar ---------- */
.rows { display: grid; gap: clamp(1.75rem, 4vw, 2.75rem); }
.row-item { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(1.5rem, 4vw, 3.25rem); align-items: center; }
.row-item:nth-child(even) { grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); }
.row-item:nth-child(even) .row-media { order: 2; }
.row-media {
  position: relative; aspect-ratio: 3 / 2; border-radius: var(--r-lg); overflow: hidden;
  background: var(--primary-soft); box-shadow: var(--shadow-md);
}
.row-media img, .row-media svg { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.row-item:hover .row-media img, .row-item:hover .row-media svg { transform: scale(1.03); }
.row-title { font-size: clamp(1.35rem, 1vw + 1rem, 1.7rem); letter-spacing: -.02em; }
.row-text { color: var(--muted); max-width: 54ch; }
.row-text p:last-child { margin-bottom: 0; }
.row-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.4rem; }
@media (max-width: 760px) {
  .row-item, .row-item:nth-child(even) { grid-template-columns: 1fr; }
  .row-item:nth-child(even) .row-media { order: 0; }
}

/* ---------- Qanday boshlanadi ---------- */
.steps-block { background: var(--bg-band); }
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; counter-reset: step; }
.steps::before {
  content: ''; position: absolute; top: 23px; left: 46px; right: calc(33.3% - 46px); height: 2px;
  background: repeating-linear-gradient(to right, #c7d2fe 0 8px, transparent 8px 16px);
}
.step { position: relative; }
.step-num {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1.1rem; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); color: var(--accent);
  font: 700 1.15rem/1 var(--font-display); position: relative; z-index: 1;
}
.step h3 { margin-bottom: .35em; }
.step p { color: var(--muted); margin: 0; max-width: 34ch; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .steps::before { top: 24px; bottom: 24px; left: 23px; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(to bottom, #c7d2fe 0 8px, transparent 8px 16px); }
  .step { padding-left: 4.2rem; }
  .step-num { position: absolute; left: 0; top: 0; }
}

.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--r-md); }

/* ---------- CTA ---------- */
.cta { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem); }
.cta-inner {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; flex-wrap: wrap;
  padding: clamp(1.8rem, 5vw, 3.2rem); border-radius: 28px; color: #e0e7ff;
  background: var(--navy);
}
.cta-inner::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(26rem 18rem at 100% 0%, rgba(5, 150, 105, .28), transparent 70%),
    radial-gradient(24rem 18rem at 0% 100%, rgba(99, 102, 241, .35), transparent 70%),
    var(--naqsh-light);
}
.cta-inner h2 { color: #fff; margin-bottom: .3em; }
.cta-inner p { margin: 0; max-width: 50ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Biz haqimizda ---------- */
.about-grid { display: grid; gap: 2.5rem; }
.about-grid.has-image { grid-template-columns: 1.2fr .8fr; align-items: start; }
@media (max-width: 860px) { .about-grid.has-image { grid-template-columns: 1fr; } }
.prose { font-size: 1.12rem; line-height: 1.75; max-width: 66ch; }
#main { flex: 1 0 auto; }

/* "Sarlavha — matn" qatorlari roʻyxat boʻlib chiqadi (feature_list(), view.php) */
.features { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 1.1rem; }
.features li { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; align-items: start; }
.features .feat-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.features b { display: block; font: 600 1.08rem/1.35 var(--font-display); color: var(--heading); letter-spacing: -.01em; margin: .1rem 0 .15rem; }
.features span { display: block; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.about-image img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.about-stats { position: sticky; top: 96px; padding: 1.6rem 1.7rem; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-md); }
.about-stats ul { list-style: none; margin: 0; padding: 0; }
.about-stats li + li { border-top: 1px solid var(--line); }
.about-stats a { display: flex; align-items: baseline; gap: .6rem; padding: .9rem 0; text-decoration: none; color: var(--muted); }
.about-stats b { font: 600 2.4rem/1 var(--font-display); color: var(--heading); letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 1.3ch; }
.about-stats .icon { margin-left: auto; align-self: center; color: var(--primary); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s var(--ease); }
.about-stats a:hover b { color: var(--primary); }
.about-stats a:hover .icon { opacity: 1; transform: none; }
@media (max-width: 860px) { .about-stats { position: static; } }
.mission {
  position: relative; overflow: hidden; margin-top: 2.2rem; padding: 1.6rem 1.8rem; border-radius: var(--r-md);
  background: var(--accent-soft); color: #064e3b;
}
.mission::after {
  content: ''; position: absolute; right: -24px; bottom: -24px; width: 120px; height: 120px; opacity: .12;
  background: var(--accent);
  clip-path: polygon(50% 0, 62% 24%, 85% 15%, 76% 38%, 100% 50%, 76% 62%, 85% 85%, 62% 76%, 50% 100%, 38% 76%, 15% 85%, 24% 62%, 0 50%, 24% 38%, 15% 15%, 38% 24%);
}
.mission h2 { font-size: 1.3rem; color: #064e3b; }
.mission p:last-child { margin-bottom: 0; }

/* ---------- Kontaktlar ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: .8rem; }
.tg-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  padding: 1.15rem 1.25rem; border-radius: var(--r-lg); text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 10px 26px rgba(79, 70, 229, .28);
  transition: box-shadow .25s, translate .25s var(--ease);
}
.tg-card:hover { color: #fff; translate: 0 -2px; box-shadow: 0 14px 32px rgba(79, 70, 229, .36); }
.tg-card-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, .16); }
.tg-card-body b { display: block; font: 600 1.12rem/1.3 var(--font-display); }
.tg-card-body span { display: block; margin-top: .15rem; font-size: .95rem; line-height: 1.5; color: #e0e7ff; }
.tg-card-go { transition: transform .25s var(--ease); }
.tg-card:hover .tg-card-go { transform: translateX(4px); }
.info-card {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
  background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.info-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); flex: none; }
.info-label { font-size: .88rem; color: var(--muted); }
.info-value { font-weight: 500; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; }
a.info-value:hover { color: var(--primary); text-decoration: underline; }
.info-socials { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink);
  transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }

.form-card { background: var(--surface); border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: var(--shadow-md); }
.form-card h2 { font-size: 1.45rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .96rem; }
.field input, .field textarea {
  width: 100%; padding: .8rem .95rem; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--field); border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79, 70, 229, .16); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.error { color: var(--danger); font-size: .9rem; margin: .35rem 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1.1rem; font-weight: 500; }
.alert-ok { background: var(--accent-soft); color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ---------- Xato sahifasi ---------- */
.error-page { text-align: center; padding-block: clamp(3rem, 8vw, 6rem); }
.error-page .lead { margin: 0 auto 1.6rem; }
.error-code { font-family: var(--font-display); font-size: 5.5rem; font-weight: 700; color: #c7d2fe; line-height: 1; margin: 0; letter-spacing: -.04em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c7d2fe; position: relative; isolation: isolate; }
.site-footer::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--naqsh-light); opacity: .6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; padding: 3.5rem 0 2.2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; } }
.brand-light, .brand-light:hover { color: #fff; }
.footer-text { margin: 1rem 0 0; max-width: 38ch; color: #c7d2fe; font-size: .98rem; }
.footer-title { font-size: .95rem; color: #fff; font-family: var(--font-body); font-weight: 600; margin-bottom: 1rem; letter-spacing: 0; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-list a { color: #c7d2fe; text-decoration: none; transition: color .2s; }
.footer-list a:hover { color: #fff; text-decoration: underline; }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; color: #e0e7ff; }
.footer-contact .icon { margin-top: .3rem; flex: none; color: #a5b4fc; }
.socials { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.socials a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s; }
.socials a:hover { background: var(--primary); }
.footer-bottom { padding: 1.2rem 0 1.6rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; color: #a5b4fc; }

/* ---------- Bizni kuzatib boring (bosh sahifa oxiri) ----------
   CTA dan KEYIN turadi: yuqorida boʻlsa, odamni saytdan erta olib chiqib ketardi. */
.follow { padding: 0 0 clamp(3rem, 7vw, 5rem); text-align: center; }
.cta:has(+ .follow) { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.follow h2 { font-size: clamp(1.2rem, 2.4vw, 1.45rem); margin-bottom: .25em; }
.follow p { margin: 0 auto; color: var(--muted); max-width: 48ch; }
.follow-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin: 1.3rem 0 0; padding: 0; list-style: none; }
.follow-links a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); color: var(--muted);
  transition: background .2s, color .2s, border-color .2s, translate .2s var(--ease);
}
.follow-links a:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); translate: 0 -2px; }
.follow-links a:active { translate: 0 0; }

/* ---------- Paydo boʻlish animatsiyasi ----------
   Faqat JS ishlaganda yashiriladi (.js), aks holda kontent darhol koʻrinadi.
   Hover uchun `translate` xususiyati ishlatiladi — animatsiya `transform` bilan toʻqnashmaydi. */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.js .reveal:not(.is-in), .js .reveal-group:not(.is-in) > * { opacity: 0; }
.js .reveal.is-in, .js .reveal-group.is-in > * { animation: rise .7s var(--ease) both; }
.js .reveal-group.is-in > :nth-child(2) { animation-delay: .06s; }
.js .reveal-group.is-in > :nth-child(3) { animation-delay: .12s; }
.js .reveal-group.is-in > :nth-child(4) { animation-delay: .18s; }
.js .reveal-group.is-in > :nth-child(5) { animation-delay: .24s; }
.js .reveal-group.is-in > :nth-child(n+6) { animation-delay: .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal:not(.is-in), .js .reveal-group:not(.is-in) > * { opacity: 1; }
}
