/* ===== Ranglar: yorug' mavzu ===== */
:root {
  --bg: #faf5ee;
  --card: #fffdf9;
  --text: #2e231c;
  --muted: #74665b;
  --accent: #b5562b;
  --accent-dark: #8f4220;
  --accent-soft: #f7e9dc;
  --border: #eee2d4;
  --stripe: #f3e1d0;
  --header-bg: rgba(250, 245, 238, 0.92);
  --contact-bg: #b5562b;
  --shadow: rgba(181, 86, 43, 0.22);
  --hero-cta: #8f3a17;
  --hero-bg:
    radial-gradient(ellipse at 0% 0%, rgba(232, 150, 100, 0.35), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(240, 190, 140, 0.35), transparent 50%),
    #f6e9dc;
  --hero-text: #2e1a12;
  --hero-muted: #6b5446;
  --hero-faded: rgba(46, 26, 18, 0.4);
  --hero-photo-shadow: 0 30px 60px rgba(120, 60, 30, 0.22);
  color-scheme: light;
}

/* ===== Ranglar: qorong'i mavzu ===== */
:root[data-theme="dark"] {
  --bg: #1b1511;
  --card: #241c17;
  --text: #f3e9df;
  --muted: #b5a596;
  --accent: #e2814d;
  --accent-dark: #f0a776;
  --accent-soft: #3a2a1f;
  --border: #3a2e25;
  --stripe: #31241b;
  --header-bg: rgba(27, 21, 17, 0.9);
  --contact-bg: #a54c23;
  --shadow: rgba(0, 0, 0, 0.4);
  --hero-cta: #a8461d;
  --hero-bg:
    radial-gradient(ellipse at 0% 0%, rgba(160, 70, 30, 0.35), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(120, 50, 20, 0.25), transparent 50%),
    #2a140e;
  --hero-text: #f7ede4;
  --hero-muted: #e2d2c5;
  --hero-faded: rgba(247, 237, 228, 0.45);
  --hero-photo-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Qurilmada "harakatni kamaytirish" yoqilgan bo'lsa — silliq o'tish va animatsiyalar o'chadi */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  /* !important — pastdagi "paydo bo'lish" qoidasidan ustun turishi uchun */
  .js section.block > .container { opacity: 1 !important; transform: none !important; }
}
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .25s, color .25s;
}
a { color: inherit; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: "Merriweather", serif; line-height: 1.2; }

/* ===== Navigatsiya (suzuvchi oq panel) ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  padding: 14px 16px;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  max-width: 1120px; margin: 0 auto;
  height: 64px; padding: 0 12px 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: "Outfit", sans-serif; font-weight: 600; font-size: 19px;
  color: var(--accent-dark); text-decoration: none;
}
.logo-tag {
  font-family: "Inter", sans-serif; font-weight: 500; font-size: 12px;
  color: var(--muted);
  border: 1.5px solid var(--muted);
  border-radius: 999px; padding: 2px 10px;
}
.nav-right { display: flex; align-items: center; gap: 20px; }
.menu { display: flex; gap: 28px; list-style: none; }
.menu a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 15px; }
.menu a:hover, .menu a.active { color: var(--accent); }
.menu-contact { display: none; }
.nav-cta {
  background: var(--hero-cta); color: #fff;
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 11px 24px; border-radius: 999px;
  transition: filter .15s;
}
.nav-cta:hover { filter: brightness(1.12); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--accent); 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; }

/* Telefon menyusi tugmasi (☰) — faqat tor ekranlarda ko'rinadi */
.menu-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent; color: var(--text);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .icon-close { display: none; }
.site-header.open .menu-toggle .icon-open { display: none; }
.site-header.open .menu-toggle .icon-close { display: block; }

@media (max-width: 960px) {
  .nav-pill { position: relative; }
  .menu-toggle { display: flex; }
  .menu {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; gap: 2px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  }
  .site-header.open .menu { display: flex; }
  .menu a { display: block; padding: 12px 16px; border-radius: 10px; font-size: 16px; }
  .menu a:hover, .menu a.active { background: var(--accent-soft); }
}
@media (max-width: 480px) {
  .nav-cta { display: none; }
  .menu-contact { display: block; }
}

/* Menyu bosilganda bo'lim panel ostida qolib ketmasin */
section[id] { scroll-margin-top: 96px; }

/* ===== Hero (ranglari mavzuga qarab o'zgaradi) ===== */
.hero {
  background: var(--hero-bg);
  color: var(--hero-text);
  padding: 150px 0 90px;
}
.hero-grid {
  max-width: 1120px;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center;
}
.hero-badge {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--hero-muted);
  margin-bottom: 22px;
}
.hero-stars { display: flex; gap: 2px; }
.hero-badge svg { width: 18px; height: 18px; color: #e8961f; }
.hero h1 {
  font-family: "Outfit", sans-serif; font-weight: 400;
  font-size: 64px; line-height: 1.1; letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero p {
  color: var(--hero-muted); font-size: 19px; line-height: 1.6;
  max-width: 540px; margin-bottom: 36px;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 16px;
  background: var(--hero-cta); color: #fff;
  text-decoration: none; font-weight: 600; font-size: 17px;
  padding: 10px 10px 10px 26px; border-radius: 999px;
  transition: transform .15s, filter .15s;
}
.hero-cta:hover { transform: translateY(-2px); filter: brightness(1.12); }
.hero-cta-icon {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
}
.hero-cta-icon svg { width: 18px; height: 18px; }

.hero-areas { margin-top: 56px; }
.hero-areas-label { font-size: 16px; color: var(--hero-muted); margin-bottom: 16px; }
.hero-areas ul { display: flex; flex-wrap: wrap; gap: 32px; list-style: none; }
.hero-areas li {
  display: flex; align-items: center; gap: 8px;
  font-family: "Outfit", sans-serif; font-size: 20px; font-weight: 500;
  color: var(--hero-faded);
}
.hero-areas svg { width: 24px; height: 24px; }

.hero-photo {
  aspect-ratio: 3 / 4; border-radius: 28px;
  background: linear-gradient(135deg, #b5562b, #d98a4e);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: "Outfit", sans-serif; font-size: 72px;
  max-width: 400px; width: 100%; justify-self: end;
  box-shadow: var(--hero-photo-shadow);
  position: relative; overflow: hidden;
}
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }

/* Sahifa ochilganda hero elementlari ketma-ket yumshoq chiqadi.
   "backwards" — animatsiya tugagach hover effektlariga xalaqit bermaydi. */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.hero-badge, .hero h1, .hero p, .hero-cta, .hero-areas, .hero-photo {
  animation: heroIn .6s ease backwards;
}
.hero h1     { animation-delay: .1s; }
.hero p      { animation-delay: .2s; }
.hero-cta    { animation-delay: .3s; }
.hero-photo  { animation-delay: .25s; }
.hero-areas  { animation-delay: .35s; }

/* ===== Tugmalar ===== */
.buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 10px;
  text-decoration: none; font-weight: 600;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px var(--shadow); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { border: 2px solid var(--accent); color: var(--accent); }

/* ===== Bo'lim sarlavhalari ===== */
section.block { padding: 88px 0; }
.section-head { text-align: center; max-width: 600px; margin: 0 auto 48px; }
.section-head .label {
  font-size: 13px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); font-weight: 600; margin-bottom: 10px;
}
.section-head h2 { font-size: 34px; margin-bottom: 12px; }
.section-head p { color: var(--muted); }

/* ===== Xizmatlar ===== */
.service {
  display: grid; grid-template-columns: 120px 1fr; gap: 32px; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 36px;
  margin-bottom: 20px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.service:hover { transform: translateY(-4px); box-shadow: 0 14px 30px var(--shadow); }
.service-icon {
  width: 120px; height: 120px; border-radius: 24px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.service-icon svg { width: 52px; height: 52px; }
.service .num { color: var(--accent); font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.service h3 { font-size: 24px; margin-bottom: 10px; }
.service p { color: var(--muted); margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tags li { background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }

/* ===== Loyihalar ===== */
.projects-bg, .alt-bg { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 24px; }
.project {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.project:hover { transform: translateY(-4px); box-shadow: 0 14px 30px var(--shadow); }
.thumb {
  aspect-ratio: 16 / 10; position: relative;
  background: repeating-linear-gradient(45deg, var(--accent-soft), var(--accent-soft) 12px, var(--stripe) 12px, var(--stripe) 24px);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark); font-weight: 600; font-size: 14px;
}
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 22px; }
.project-body .cat { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.project-body h3 { font-size: 19px; margin-bottom: 8px; }
.project-body p { color: var(--muted); font-size: 15px; }

/* ===== Jonlanish: bo'limlar pastdan yumshoq chiqadi ===== */
.js section.block > .container {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.js section.block > .container.visible { opacity: 1; transform: none; }

/* ===== Mijozlar fikri ===== */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.review {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  display: flex; flex-direction: column; gap: 20px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.review:hover { transform: translateY(-4px); box-shadow: 0 14px 30px var(--shadow); }
.review-quote { width: 32px; height: 32px; color: var(--accent); }
.review blockquote { color: var(--text); font-size: 16px; line-height: 1.65; flex: 1; }
.review figcaption { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.review-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.review strong { display: block; font-size: 15px; }
.review small { color: var(--muted); font-size: 13px; }

/* ===== Savol-javob ===== */
.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  font-weight: 600; font-size: 17px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 500;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] p { animation: faqIn .3s ease; }
@keyframes faqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.faq-item summary:hover { color: var(--accent); }
.faq-item p { padding: 0 24px 22px; color: var(--muted); }
.faq-item a { color: var(--accent); }

/* ===== Aloqa ===== */
.contact-box {
  background: var(--contact-bg); color: #fff;
  border-radius: 20px; padding: 56px 32px; text-align: center;
}
.contact-box h2 { font-size: 34px; margin-bottom: 12px; }
.contact-box p { opacity: .9; margin-bottom: 28px; }
.contact-box .buttons { justify-content: center; }
.contact-box .btn-primary { background: #fff; color: var(--contact-bg); }
.contact-box .btn-outline { border-color: #fff; color: #fff; }
.contact-box .note { margin: 24px 0 0; font-size: 15px; }

footer { padding: 32px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ===== Telefon ekranlari ===== */
@media (max-width: 760px) {
  .nav-pill { padding: 0 8px 0 16px; height: 58px; }
  .logo { font-size: 16px; }
  .logo-tag { display: none; }
  .nav-right { gap: 10px; }
  .nav-cta { padding: 9px 16px; font-size: 14px; }
  .hero { padding: 112px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 17px; }
  .hero-areas { margin-top: 40px; }
  .hero-areas ul { gap: 20px; }
  .hero-areas li { font-size: 17px; }
  .hero-photo { max-width: 360px; justify-self: center; font-size: 52px; }
  section.block { padding: 64px 0; }
  .section-head h2, .contact-box h2 { font-size: 28px; }
  .service { grid-template-columns: 1fr; gap: 20px; padding: 28px 22px; }
  .service-icon { width: 80px; height: 80px; border-radius: 18px; }
  .service-icon svg { width: 36px; height: 36px; }
  .btn { flex: 1 1 200px; }
}

/* ===== Kichik telefonlar (400px va undan tor) ===== */
@media (max-width: 400px) {
  .logo { padding: 8px 0; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 16px; }
  .hero-cta { font-size: 16px; }
  section.block { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2, .contact-box h2 { font-size: 25px; }
  .service { padding: 24px 18px; }
  .service h3 { font-size: 21px; }
  .project-body { padding: 18px; }
  .review { padding: 22px; }
  .faq-item summary { padding: 16px 18px; font-size: 16px; }
  .faq-item p { padding: 0 18px 18px; }
  .contact-box { padding: 40px 20px; border-radius: 16px; }
  .btn { min-height: 48px; }
}
