/* microhub.uz — Microhub Electronics bosh sahifasi.
   Ranglar UIKit'dagi tokens.css (delfin) dan. Tashqi shrift va CDN yo'q. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--mh-bg); color: var(--mh-fg);
  font: 400 16px/1.65 var(--mh-font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--mh-accent-2); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--mh-accent-2); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--mh-accent); color: var(--mh-on-accent);
  padding: 10px 14px; border-radius: var(--mh-radius); text-decoration: none;
}
.skip:focus { top: 12px; }

/* --- tugmalar --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 550; text-decoration: none; white-space: nowrap;
  padding: 11px 20px; border-radius: var(--mh-radius);
  border: 1px solid var(--mh-border); background: var(--mh-surface); color: var(--mh-fg);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--mh-accent-2); }
.btn--primary { background: var(--mh-accent); border-color: var(--mh-accent); color: var(--mh-on-accent); }
.btn--primary:hover { background: var(--mh-accent-2); border-color: var(--mh-accent-2); }
.btn--light { background: #fff; border-color: #fff; color: #0e1316; }
.btn--light:hover { background: #e4ebef; border-color: #e4ebef; }
.btn--ghost { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.32); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--icon { padding: 9px 10px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* --- yuqori chiziq --- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--mh-surface) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--mh-border);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }
.logo { display: flex; align-items: center; gap: 11px; color: var(--mh-fg); text-decoration: none; }
.logo .mark { width: 36px; height: 36px; flex: none; }
.logo .name { display: flex; flex-direction: column; font-weight: 650; font-size: 17px; line-height: 1.1; letter-spacing: -.01em; }
.logo .name small {
  font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--mh-muted); margin-top: 3px;
}
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  color: var(--mh-fg); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--mh-surface-2); }
.nav .only-mobile { display: none; }
.menu-btn { display: none; }

@media (max-width: 900px) {
  .topbar .cta { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; gap: 2px; margin: 0; padding: 10px 16px 18px;
    background: var(--mh-surface); border-bottom: 1px solid var(--mh-border);
    box-shadow: 0 18px 30px -18px rgba(14, 19, 22, .35);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .nav .only-mobile { display: block; color: var(--mh-accent-2); }
}

/* --- hero --- */
.hero { position: relative; overflow: hidden; color: #fff; background: #0b1114; isolation: isolate; }
/* Rasm faqat o'ng qismni egallaydi: 960px rasm keng ekranda ham cho'zilib xiralashmaydi. */
.hero .bg { position: absolute; top: 0; right: 0; bottom: 0; left: 32%; z-index: -2; }
.hero .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 65% 60%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, #0b1114 0%, #0b1114 32%, rgba(11,17,20,.82) 46%, rgba(11,17,20,.35) 74%, rgba(11,17,20,.15) 100%),
    linear-gradient(0deg, rgba(11,17,20,.65) 0%, rgba(11,17,20,0) 40%);
}
@media (max-width: 900px) {
  .hero .bg { left: 0; }
  .hero::before { background: linear-gradient(180deg, rgba(11,17,20,.78) 0%, rgba(11,17,20,.9) 55%, rgba(11,17,20,.96) 100%); }
}
.hero .wrap { padding-top: clamp(76px, 13vh, 136px); padding-bottom: clamp(64px, 11vh, 120px); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font: 600 12.5px/1 var(--mh-mono); letter-spacing: .16em; text-transform: uppercase; color: #9cc3d5;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hero h1 {
  font-size: clamp(36px, 5.8vw, 64px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700;
  margin: 22px 0 20px; max-width: 800px;
}
.hero .lead { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.6; color: #c6d4da; max-width: 650px; margin: 0 0 34px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 52px 0 0; padding: 0; list-style: none; }
.chips li {
  font: 500 13px/1 var(--mh-mono); color: #d8e4e9; padding: 9px 13px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* --- bo'limlar --- */
.block { padding: clamp(68px, 9vw, 112px) 0; }
.block--alt { background: var(--mh-surface); border-top: 1px solid var(--mh-border); border-bottom: 1px solid var(--mh-border); }
.section-head { max-width: 740px; margin-bottom: 44px; }
.kicker {
  display: inline-block; font: 600 12px/1 var(--mh-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--mh-accent-2);
}
.section-head h2, .learn h2, .contact h2 {
  font-size: clamp(29px, 3.8vw, 42px); line-height: 1.12; letter-spacing: -.03em; font-weight: 700; margin: 14px 0 14px;
}
.section-head p { color: var(--mh-muted); font-size: 17.5px; margin: 0; }

/* --- faoliyat --- */
.services { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.service {
  grid-column: span 2; display: flex; flex-direction: column; overflow: hidden;
  background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: var(--mh-radius-lg);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.service:hover { border-color: var(--mh-border-2); box-shadow: 0 22px 40px -28px rgba(14,19,22,.45); transform: translateY(-2px); }
.service:nth-child(n+4) { grid-column: span 3; }
.service figure { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--mh-surface-2); }
.service:nth-child(n+4) figure { aspect-ratio: 16 / 8; }
.service figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.service:hover figure img { transform: scale(1.035); }
.service .body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 22px 24px 24px; }
.num { font: 600 12px/1 var(--mh-mono); letter-spacing: .12em; color: var(--mh-accent-2); }
.service h3 { margin: 0; font-size: 20.5px; line-height: 1.25; letter-spacing: -.015em; font-weight: 650; }
.service .en { margin: -6px 0 0; font-size: 13px; color: var(--mh-muted); font-style: italic; }
.service p { margin: 0; color: var(--mh-muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: auto 0 0; padding: 8px 0 0; }
.tags li {
  font: 500 12px/1 var(--mh-mono); padding: 6px 9px; border-radius: 6px;
  background: var(--mh-accent-soft); color: var(--mh-accent-2);
}

@media (max-width: 980px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .service, .service:nth-child(n+4) { grid-column: span 1; }
  .service:nth-child(n+4) figure { aspect-ratio: 16 / 10; }
  .service:last-child { grid-column: span 2; }
  .service:last-child figure { aspect-ratio: 16 / 7; }
}
@media (max-width: 640px) {
  .services { grid-template-columns: 1fr; }
  .service:last-child { grid-column: auto; }
  .service:last-child figure { aspect-ratio: 16 / 10; }
}

/* --- loyihalar --- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project {
  display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 22px;
  background: var(--mh-bg); border: 1px solid var(--mh-border); border-radius: var(--mh-radius-lg);
}
.project .top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--mh-accent-soft); color: var(--mh-accent-2);
}
.project .icon svg { width: 22px; height: 22px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--mh-muted); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mh-ok); }
.status--dev::before { background: var(--mh-warn); }
.status--proto::before { background: var(--mh-accent-2); }
.project h3 { margin: 4px 0 0; font-size: 19px; line-height: 1.3; letter-spacing: -.01em; font-weight: 650; }
.project p { margin: 0; color: var(--mh-muted); font-size: 15.5px; }
.project .more { margin-top: 2px; font-weight: 550; font-size: 15px; text-decoration: none; }
.project .more:hover { text-decoration: underline; }
@media (max-width: 980px) { .projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .projects { grid-template-columns: 1fr; } }

/* --- yutuqlar --- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 56px;
  background: var(--mh-border); border: 1px solid var(--mh-border); border-radius: var(--mh-radius-lg); overflow: hidden;
}
.stat { background: var(--mh-surface); padding: 28px 26px; }
.stat b { display: block; font-size: clamp(32px, 3.6vw, 44px); line-height: 1; letter-spacing: -.035em; font-weight: 700; white-space: nowrap; }
.stat span { display: block; margin-top: 10px; color: var(--mh-muted); font-size: 15px; line-height: 1.45; }
@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 22px 18px; }
  .stat b { font-size: 28px; }
  .stat span { font-size: 14px; }
}

.achieve { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: start; }
.achieve h3.sub { margin: 0 0 22px; font-size: 14px; font: 600 12px/1 var(--mh-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mh-muted); }
.timeline { list-style: none; margin: 0 0 0 7px; padding: 0; border-left: 2px solid var(--mh-border); }
.timeline li { position: relative; padding: 0 0 30px 30px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -9px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--mh-bg); border: 3px solid var(--mh-accent-2);
}
.timeline time { font: 600 12.5px/1 var(--mh-mono); letter-spacing: .06em; color: var(--mh-accent-2); text-transform: uppercase; }
.timeline h4 { margin: 9px 0 5px; font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
.timeline p { margin: 0; color: var(--mh-muted); font-size: 15.5px; }
.stack { display: grid; gap: 22px; }
.stack div { padding: 22px 22px 20px; background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: var(--mh-radius-lg); }
.stack h4 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.stack .tags { margin: 0; padding: 0; }
@media (max-width: 900px) { .achieve { grid-template-columns: 1fr; gap: 44px; } }

/* --- darslar --- */
.learn { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.learn p { color: var(--mh-muted); font-size: 17px; margin: 0 0 26px; }
.learn figure { margin: 0; border-radius: var(--mh-radius-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--mh-surface-2); }
.learn figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .learn { grid-template-columns: 1fr; gap: 36px; } .learn figure { order: -1; aspect-ratio: 16 / 9; } }

/* --- jarayon --- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative; padding: 24px 22px 22px;
  background: var(--mh-surface); border: 1px solid var(--mh-border); border-radius: var(--mh-radius-lg);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  font: 650 14px/1 var(--mh-mono); background: var(--mh-accent); color: var(--mh-on-accent);
}
.steps h3 { margin: 18px 0 8px; font-size: 17px; line-height: 1.3; font-weight: 650; }
.steps p { margin: 0; color: var(--mh-muted); font-size: 15px; line-height: 1.55; }
@media (max-width: 1040px) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* --- aloqa (har doim qorong'i) --- */
.contact { background: #0e1316; color: #e7ecef; }
.contact .grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.contact .kicker { color: #86aec2; }
.contact h2 { color: #fff; }
.contact p { color: #a9bac2; font-size: 17.5px; margin: 0; max-width: 560px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: #161d21; border: 1px solid #273238; border-radius: 12px;
}
.contact-list .ic { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #1d2a31; color: #86aec2; }
.contact-list .ic svg { width: 20px; height: 20px; }
.contact-list .k { display: block; font-size: 13px; color: #91a4ad; line-height: 1.3; }
.contact-list .v { display: block; font-size: 17px; color: #fff; line-height: 1.4; text-decoration: none; }
.contact-list a.v:hover { text-decoration: underline; }
.todo { color: #d6a45c !important; border-bottom: 1px dashed #d6a45c; }
@media (max-width: 900px) { .contact .grid { grid-template-columns: 1fr; gap: 36px; } }

/* --- pastki qism --- */
.footer { background: #0a0f12; color: #8a9da6; font-size: 14px; border-top: 1px solid #1d262b; }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; padding-top: 26px; padding-bottom: 26px; }
.footer a { color: #c6d4da; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* --- paydo bo'lish (JS yoqilgan bo'lsa) --- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

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