:root {
  --bg: #f7efe3;
  --bg-alt: #f1e6d6;
  --card: #fffaf3;
  --text: #2e2620;
  --muted: #6e6258;
  --accent: #a5552a;
  --accent-soft: #f3e1d3;
  --border: #eadcc9;
  color-scheme: light;
}
/* Qorong'i rejim: tizim sozlamasi bo'yicha (agar foydalanuvchi yorug'ni tanlamagan bo'lsa) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1714;
    --bg-alt: #211b17;
    --card: #26201b;
    --text: #f0e8df;
    --muted: #b0a397;
    --accent: #e0956a;
    --accent-soft: #3a2a20;
    --border: #3a3029;
    color-scheme: dark;
  }
}
/* Qorong'i rejim: tugma orqali tanlanganda */
:root[data-theme="dark"] {
  --bg: #1c1714;
  --bg-alt: #211b17;
  --card: #26201b;
  --text: #f0e8df;
  --muted: #b0a397;
  --accent: #e0956a;
  --accent-soft: #3a2a20;
  --border: #3a3029;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
/* "Harakatni kamaytirish" yoqilgan bo'lsa — silliq aylanish va o'tishlar o'chadi */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  line-height: 1.6;
}
a { color: inherit; }

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Yuqori menyu ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.logo {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.nav { display: flex; gap: 24px; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}
.nav a:hover { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 24px; }

/* ---------- Tema tugmasi ---------- */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: color .1s ease, border-color .1s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 12px 12px 0; }
.hero-panel {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #f6eee6;
  background:
    radial-gradient(circle at 78% 42%, rgba(224, 149, 106, 0.28), transparent 45%),
    linear-gradient(110deg, #17110e 0%, #211813 45%, #33221a 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 32px;
  padding: 64px 48px 40px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: rgba(246, 238, 230, 0.9);
}
.pill-mark { color: #e8a072; font-weight: 700; }
h1 {
  margin-top: 24px;
  font-size: 56px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -1.5px;
}
.hl { color: #e8a072; }
.about {
  margin: 24px 0 36px;
  max-width: 520px;
  color: rgba(246, 238, 230, 0.78);
  font-size: 17px;
}
.about strong { color: #fff; font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.arrow-circle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.arrow-circle svg { width: 18px; height: 18px; }
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 7px 7px 7px 24px;
  border-radius: 999px;
  background: #fffaf3;
  color: #2e2620;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .1s ease;
}
.btn-pill .arrow-circle { width: 42px; height: 42px; background: #a5552a; color: #fff; }
.btn-pill:hover { opacity: .92; }
.call {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f6eee6;
  text-decoration: none;
}
.call-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e0956a;
  color: #1d1612;
}
.call-icon svg { width: 20px; height: 20px; }
.call-text { font-size: 17px; font-weight: 600; line-height: 1.3; }
.call-text small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.7;
}

/* O'ng tomon: rasm va bezaklar */
.hero-visual {
  position: relative;
  height: 440px;
  display: grid;
  place-items: center;
}
.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: translate(-50%, -50%);
}
.ring-1 { width: 420px; height: 420px; }
.ring-2 { width: 330px; height: 330px; border-color: rgba(232, 160, 114, 0.35); }
.hero-photo {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  background: #3a2a20;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Rasm tik (portret) — doiraga yuz qismi tushishi uchun yuqoriroqdan kesiladi */
  object-position: 50% 30%;
}
.float-card {
  position: absolute;
  top: 28px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px 10px 10px;
  border-radius: 14px;
  background: #fffaf3;
  color: #2e2620;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.float-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #a5552a;
  color: #fff;
  font-weight: 700;
}
.float-card b { display: block; font-size: 15px; line-height: 1.2; }
.float-card small { display: block; font-size: 12px; color: #6e6258; }
.mono-tag {
  position: absolute;
  padding: 6px 14px;
  background: #1d1612;
  border: 1px solid rgba(246, 238, 230, 0.6);
  color: #f6eee6;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  letter-spacing: 2px;
}
.mono-tag::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 1px;
  height: 56px;
  background: rgba(246, 238, 230, 0.5);
}
.tag-1c { left: 4%; bottom: 18%; }
.tag-si { right: 10%; bottom: 40%; }
.tag-si::before { height: 120px; }

/* Pastki uchta karta */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 32px 32px;
}
.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f6eee6;
  text-decoration: none;
  transition: background .1s ease;
}
.hero-card:hover { background: rgba(255, 255, 255, 0.1); }
.hero-card small {
  display: block;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}
.hero-card b { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; }
.hero-card .arrow-circle { background: #fffaf3; color: #2e2620; }
.hero-card-accent { background: #e0956a; border-color: #e0956a; color: #1d1612; }
.hero-card-accent:hover { background: #e8a072; }
.hero-card-accent .arrow-circle { background: #1d1612; color: #fffaf3; }

/* ---------- Bo'limlar ---------- */
.section { padding: 72px 0; scroll-margin-top: 64px; }
.section-alt { background: var(--bg-alt); }
h2 { font-size: 32px; font-weight: 700; line-height: 1.2; }
.section-lead {
  margin: 8px 0 36px;
  color: var(--muted);
  font-size: 17px;
}
h3 { font-size: 19px; font-weight: 650; line-height: 1.3; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service,
.project {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
}
.service p,
.project p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}
.num {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}
.tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* Loyiha kartasidagi rasm o'rni */
.project-img {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin-bottom: 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
}
.project-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Yutuqlarim ---------- */
.achievement {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
}
.achievement-big {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
}
.achievement p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Savol-javob ---------- */
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 22px;
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq details p {
  padding-bottom: 18px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Tugmalar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .1s ease;
}
.btn:hover { opacity: .92; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-primary { background: var(--accent); color: var(--card); }
.btn-outline {
  border: 1.5px solid var(--accent);
  color: var(--accent);
}

/* ---------- Aloqa ---------- */
.contact { text-align: center; }
.contact .buttons {
  display: grid;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.footer {
  padding: 28px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Planshet va telefon ---------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* Menyu: logotip ostida ikkinchi qator, sig'masa barmoq bilan suriladi */
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 0 16px; }
  .topbar-right { display: contents; }
  .nav {
    order: 3;
    width: calc(100% + 32px);
    margin: 0 -16px;
    padding: 0 16px;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { display: flex; align-items: center; min-height: 44px; flex-shrink: 0; white-space: nowrap; font-size: 15px; }
  .section { scroll-margin-top: 104px; }

  .hero { padding: 8px 8px 0; }
  .hero-panel { border-radius: 18px; }
  .hero-inner { padding: 40px 20px 24px; }
  h1 { font-size: 36px; letter-spacing: -0.5px; }
  .hero-visual { height: 304px; }
  .ring-1 { width: 270px; height: 270px; }
  .ring-2 { width: 215px; height: 215px; }
  .hero-photo { width: 170px; height: 170px; }
  .float-card { top: 0; right: 0; }
  .tag-1c { left: 2%; bottom: 12%; }
  .tag-si { right: 0; bottom: 24%; }
  .tag-si::before { height: 80px; }
  .tag-1c::before { height: 40px; }
  .hero-cards { padding: 0 16px 16px; }
  h2 { font-size: 26px; }
  .section { padding: 48px 0; }
  .section-lead { font-size: 16px; margin-bottom: 28px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .service, .project, .achievement { padding: 22px 20px; }
  .faq details { padding: 0 18px; }
  .faq summary { font-size: 16px; }
}
