/* ============================================
   ILMWAY — Design System
   Zamonaviy ko'k-yashil (bilim / ishonch)
   ============================================ */

:root {
  /* Brand ranglari */
  --blue-500: #0ea5e9;
  --blue-600: #0284c7;
  --blue-700: #0369a1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --emerald-500: #10b981;
  --amber-500: #f59e0b;
  --violet-500: #8b5cf6;

  --grad: linear-gradient(120deg, #0ea5e9 0%, #14b8a6 100%);
  --grad-soft: linear-gradient(120deg, rgba(14,165,233,.12), rgba(20,184,166,.12));

  /* Neytral (light) */
  --bg: #f4f8fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5edf3;
  --border-strong: #d5e2ec;
  --text: #0b1b2b;
  --text-2: #46617a;
  --text-3: #7d93a8;

  --shadow-sm: 0 1px 2px rgba(11, 27, 43, .05);
  --shadow: 0 8px 24px -12px rgba(11, 43, 66, .18);
  --shadow-lg: 0 24px 60px -24px rgba(11, 43, 66, .30);
  --ring: 0 0 0 4px rgba(14, 165, 233, .14);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --sidebar-w: 264px;
  --content-max: 1120px;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --bg: #070f18;
  --surface: #0e1a26;
  --surface-2: #0b1420;
  --border: #1c2c3b;
  --border-strong: #263a4d;
  --text: #eaf2f8;
  --text-2: #9db4c7;
  --text-3: #6b8298;

  --grad-soft: linear-gradient(120deg, rgba(14,165,233,.16), rgba(20,184,166,.16));
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 12px 30px -12px rgba(0, 0, 0, .55);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .7);
  --ring: 0 0 0 4px rgba(14, 165, 233, .22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3, h4, h5 { font-family: "Plus Jakarta Sans", sans-serif; line-height: 1.15; letter-spacing: -.02em; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { width: 22px; height: 22px; fill: currentColor; }

/* ============ LAYOUT ============ */
.layout { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  z-index: 40;
  transition: transform .3s var(--ease), background .3s var(--ease);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px; margin-bottom: 22px; }
.brand__logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px -8px rgba(14, 165, 233, .6);
}
.brand__name { font-family: "Plus Jakarta Sans"; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.brand__name span { color: var(--teal-600); }
[data-theme="dark"] .brand__name span { color: var(--teal-500); }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.nav__label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); padding: 14px 12px 6px;
}
.nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 600; font-size: 14.5px;
  position: relative; transition: all .18s var(--ease);
}
.nav__item:hover { background: var(--surface-2); color: var(--text); }
.nav__item.is-active { background: var(--grad-soft); color: var(--blue-700); }
[data-theme="dark"] .nav__item.is-active { color: var(--blue-500); }
.nav__item.is-active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 20px; border-radius: 0 4px 4px 0; background: var(--grad);
}
.nav__item .badge { margin-left: auto; }

.badge {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  letter-spacing: .02em;
}
.badge--hot { background: rgba(239,68,68,.12); color: #ef4444; display: inline-flex; align-items: center; gap: 4px; }
.badge--hot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.sidebar__foot { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.promo {
  background: var(--grad); color: #fff; border-radius: var(--r);
  padding: 16px; position: relative; overflow: hidden;
  box-shadow: 0 16px 34px -16px rgba(14,165,233,.7);
}
.promo::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,.14);
}
.promo__icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.2); display: grid; place-items: center; margin-bottom: 10px; }
.promo__title { font-family: "Plus Jakarta Sans"; font-weight: 800; font-size: 15px; }
.promo__text { font-size: 12.5px; opacity: .92; margin: 4px 0 12px; }

.sidebar__controls { display: flex; gap: 8px; }
.chip {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px; border-radius: 11px; border: 1px solid var(--border);
  color: var(--text-2); font-weight: 600; font-size: 13px; background: var(--surface);
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }

/* Theme icon toggle */
.ic-moon { display: none; }
[data-theme="dark"] .ic-sun { display: none; }
[data-theme="dark"] .ic-moon { display: block; }

/* ============ MAIN ============ */
.main { flex: 1; min-width: 0; padding: 40px clamp(20px, 5vw, 56px) 60px; }
.main > * { max-width: var(--content-max); margin-inline: auto; }

/* ============ HERO ============ */
.hero { padding: 24px 0 44px; text-align: center; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--blue { background: var(--blue-500); }
.dot--green { background: var(--emerald-500); }
.dot--amber { background: var(--amber-500); }

.hero__title { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; max-width: 800px; margin: 0 auto; }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block;
}
.hero__sub { font-size: clamp(1rem, 2.2vw, 1.18rem); color: var(--text-2); max-width: 640px; margin: 20px auto 0; }
.hero__sub strong { color: var(--text); font-weight: 700; }

.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 18px; min-width: 300px;
  box-shadow: var(--shadow-sm); transition: all .2s var(--ease);
}
.search:focus-within { border-color: var(--blue-500); box-shadow: var(--ring); }
.search .ic { color: var(--text-3); }
.search input { flex: 1; border: none; outline: none; background: none; padding: 13px 0; font-size: 14.5px; color: var(--text); }
.search input::placeholder { color: var(--text-3); }

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 44px; max-width: 720px; margin-inline: auto;
}
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 12px; box-shadow: var(--shadow-sm); }
.stat__num { font-family: "Plus Jakarta Sans"; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__suf { font-family: "Plus Jakarta Sans"; font-weight: 800; font-size: 1.3rem; color: var(--teal-600); }
.stat p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; font-weight: 500; }

/* ============ BLOCK ============ */
.block { margin-top: 56px; }
.block__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 18px; margin-bottom: 26px; }
.block__title { display: flex; gap: 14px; align-items: flex-start; }
.block__icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.block__icon--blue { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.block__icon--green { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.block__title h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; }
.block__title p { color: var(--text-2); font-size: 14.5px; margin-top: 3px; max-width: 460px; }

.tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); padding: 4px; border-radius: 14px; box-shadow: var(--shadow-sm); }
.tab { padding: 8px 15px; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--text-2); transition: all .18s var(--ease); }
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px -8px rgba(14,165,233,.7); }

/* ============ GRID (fanlar) ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  display: block; color: inherit; text-decoration: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad-soft); opacity: 0; transition: opacity .25s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }

.card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.card__ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; box-shadow: 0 10px 22px -12px rgba(11,43,66,.55); }
.card__ic svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card__tag { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.tag-blue { background: rgba(14,165,233,.12); color: var(--blue-600); }
.tag-green { background: rgba(16,185,129,.14); color: var(--teal-600); }
.tag-amber { background: rgba(245,158,11,.14); color: #d97706; }
.tag-violet { background: rgba(139,92,246,.14); color: var(--violet-500); }

.card h3 { font-size: 1.15rem; font-weight: 700; }
.card p {
  color: var(--text-2); font-size: 13.5px; margin-top: 6px; line-height: 1.55;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; min-height: calc(3 * 1.55em);
}
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.card__meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.card__meta .ic { width: 15px; height: 15px; }
.card__go {
  width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2);
  color: var(--text-2); display: grid; place-items: center; transition: all .2s var(--ease);
}
.card:hover .card__go { background: var(--grad); color: #fff; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 14px; }
.progress span { display: block; height: 100%; border-radius: 999px; background: var(--grad); }

/* ============ FEATURES ============ */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; transition: all .25s var(--ease); box-shadow: var(--shadow-sm); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; margin-bottom: 16px; }
.feature__ic--blue { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.feature__ic--green { background: linear-gradient(135deg, #14b8a6, #10b981); }
.feature__ic--amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.feature__ic--violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.feature h3 { font-size: 1.1rem; font-weight: 700; }
.feature p { color: var(--text-2); font-size: 13.5px; margin-top: 7px; }

/* ============ STEPS ============ */
.steps { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 40px; box-shadow: var(--shadow-sm); }
.tagline { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--teal-600); background: rgba(20,184,166,.12); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.steps__intro h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.steps__intro p { color: var(--text-2); margin: 12px 0 22px; font-size: 15px; }
.steps__list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; gap: 16px; padding: 16px; border-radius: var(--r); transition: background .2s var(--ease); }
.step:hover { background: var(--surface-2); }
.step__n { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; font-family: "Plus Jakarta Sans"; font-weight: 800; color: #fff; background: var(--grad); }
.step h4 { font-size: 1.02rem; font-weight: 700; }
.step p { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }

/* ============ CTA ============ */
.cta {
  margin-top: 56px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #0369a1, #0d9488);
  border-radius: var(--r-xl); padding: 56px 30px; position: relative; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(3,105,161,.7);
}
.cta__glow { position: absolute; inset: 0; background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.18), transparent 40%), radial-gradient(circle at 90% 90%, rgba(20,184,166,.4), transparent 45%); }
.cta > *:not(.cta__glow) { position: relative; }
.cta h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 800; max-width: 640px; margin: 0 auto; }
.cta p { opacity: .92; margin-top: 12px; font-size: 15.5px; }
.cta__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ============ BUTTONS ============ */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border-radius: 13px; font-weight: 700; font-size: 14.5px; transition: all .2s var(--ease); white-space: nowrap; }
.btn .ic { width: 18px; height: 18px; }
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 12px 26px -12px rgba(14,165,233,.8); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(14,165,233,.9); }
.btn--light { background: #fff; color: var(--blue-700); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn--ghost:hover { background: rgba(255,255,255,.24); }

/* ============ FOOTER ============ */
.footer { margin-top: 60px; padding-top: 36px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1.4fr 2fr; gap: 30px; }
.footer__brand p { color: var(--text-2); font-size: 14px; margin-top: 12px; max-width: 280px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer__cols h5 { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.footer__cols a { display: block; color: var(--text-2); font-size: 13.5px; padding: 5px 0; transition: color .18s; }
.footer__cols a:hover { color: var(--blue-600); }
.footer__copy { grid-column: 1 / -1; color: var(--text-3); font-size: 13px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ============ MOBILE BAR ============ */
.mobile-bar { display: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.scrim { display: none; }

/* ============ REVEAL ANIM ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .steps { grid-template-columns: 1fr; gap: 26px; padding: 30px; }
  .footer { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 30;
    padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .brand--mobile { margin: 0; padding: 0; }
  .main { padding: 26px 20px 50px; }
  .scrim.is-show { display: block; position: fixed; inset: 0; background: rgba(4,15,24,.5); z-index: 35; backdrop-filter: blur(2px); }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .block__head { align-items: flex-start; }
}

@media (max-width: 460px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .search { min-width: 0; width: 100%; }
  .hero__actions .btn--primary { width: 100%; justify-content: center; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}
