/* ==========================================================================
   YAT Portal — landing.css
   Ochiq bosh sahifa (templates/landing.html). Mustaqil: styles.css yuklanmaydi,
   tokenlar shu yerda — ichki sahifalar ranglari bilan bir xil.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --primary: #1f6feb;
  --primary-600: #1a5fd4;
  --primary-50: #eef4ff;
  --primary-100: #dce8fe;
  --bar: #0c4a8c;
  --brand-green: #1b7d2c;

  --bg: #ffffff;
  --surface-2: #f6f8fb;
  --line: #e7ebf2;
  --ink: #0f1b2d;
  --ink-2: #4a5873;
  --ink-3: #8b97ab;

  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1180px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Tugmalar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: 600 15px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--sm {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
}

.btn--primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 1px 2px rgb(31 111 235 / .3), 0 8px 24px -8px rgb(31 111 235 / .55);
}

.btn--primary:hover {
  background: var(--primary-600);
}

.btn--ghost {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: #cfd7e3;
  background: var(--surface-2);
}

.btn--dark {
  color: #fff;
  background: var(--ink);
}

.btn--dark:hover {
  background: #22324b;
}

.btn--light {
  color: var(--bar);
  background: #fff;
}

.btn--light:hover {
  background: var(--primary-50);
}

.btn__icon {
  flex: none;
  width: 18px;
  height: 18px;
}

.btn--sm .btn__icon {
  width: 16px;
  height: 16px;
}

.btn__arrow {
  transition: transform .2s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ---------- Navigatsiya ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / .8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgb(231 235 242 / .7);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.01em;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--bar));
}

.logo__mark svg {
  width: 18px;
  height: 18px;
}

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}

.nav__links a {
  transition: color .2s;
}

.nav__links a:hover {
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
}

/* Nuqtali to'r + yumshoq nur — chetlarga qarab so'nadi */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(15 27 45 / .09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 70%;
  height: 110%;
  background: radial-gradient(closest-side, rgb(31 111 235 / .12), transparent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.eyebrow__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 4px rgb(27 125 44 / .14);
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.accent {
  background: linear-gradient(90deg, var(--primary), var(--bar));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 500px;
  margin-top: 22px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* ---------- Xarita ---------- */
.hero__map {
  position: relative;
}

/* Panelsiz — to'g'ridan-to'g'ri fon ustida, yengil soya bilan */
.uz-map {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 18px 28px rgb(11 36 71 / .14));
}

/* Har hudud o'z tusida (--tone — skriptdan) — chegaralar ajralib turadi */
.uz-map path {
  fill: var(--primary);
  fill-opacity: var(--tone, .2);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill .25s var(--ease), fill-opacity .25s var(--ease), opacity .25s;
  animation: region-in .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.uz-map path:focus {
  outline: none;
}

.uz-map path.water {
  fill: #e3f0fb;
  fill-opacity: 1;
  stroke-dasharray: 3 3;
  stroke: #b9d6f2;
}

.uz-map path.foreign {
  fill: var(--surface-2);
  fill-opacity: 1;
  cursor: default;
  animation: none;
}

.has-active .uz-map path:not(.is-active):not(.foreign) {
  opacity: .55;
}

.uz-map path.is-active {
  fill: var(--primary);
  fill-opacity: 1;
}

.uz-map path.water.is-active {
  fill: #8ec0ec;
}

@keyframes region-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.map-readout {
  display: inline-flex;
  margin-top: 20px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.map-readout__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--primary-100);
  transition: background-color .25s;
}

.has-active .map-readout {
  color: var(--ink);
}

.has-active .map-readout__dot {
  background: var(--primary);
}

/* ---------- Bo'limlar ---------- */
.section {
  padding: 96px 0;
}

.section--tint {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section__head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section__head--left {
  margin: 0;
  text-align: left;
}

.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
}

.section h2 {
  margin-top: 12px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.section__head p {
  margin-top: 14px;
  font-size: 17px;
  color: var(--ink-2);
}

/* Imkoniyatlar — ingichka chiziqlar bilan ajratilgan to'r */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.feature {
  padding: 32px 30px 34px;
  background: #fff;
  transition: background-color .25s;
}

.feature:hover {
  background: #fbfcfe;
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-50);
  transition: color .25s, background-color .25s;
}

.feature:hover .feature__icon {
  color: #fff;
  background: var(--primary);
}

.feature__icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  margin-top: 22px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.feature p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Qatlamlar */
.layers {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 56px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}

.chip:hover {
  border-color: #cfd7e3;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px rgb(15 27 45 / .2);
}

.chip__swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 2px solid var(--c);
  background: color-mix(in srgb, var(--c) 22%, transparent);
}

/* Aloqa — gradient panel: chapda murojaat, o'ngda kontaktlar */
.contact {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 48px;
  padding: 56px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(120deg, var(--bar), var(--primary));
}

.contact::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(255 255 255 / .14) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000);
  mask-image: linear-gradient(90deg, transparent 20%, #000);
  pointer-events: none;
}

.contact > * {
  position: relative;
  z-index: 1;
}

.contact .kicker {
  color: rgb(255 255 255 / .7);
}

.contact__intro p {
  margin: 14px 0 30px;
  font-size: 17px;
  color: rgb(255 255 255 / .82);
  text-wrap: pretty;
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 12px;
  background: rgb(255 255 255 / .08);
  transition: background-color .2s, border-color .2s;
}

.socials a:hover {
  background: rgb(255 255 255 / .18);
  border-color: rgb(255 255 255 / .4);
}

.socials svg {
  width: 19px;
  height: 19px;
}

.contact__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-item {
  display: flex;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: var(--radius);
  background: rgb(255 255 255 / .08);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.contact-item__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--bar);
  background: #fff;
}

.contact-item__icon svg {
  width: 18px;
  height: 18px;
}

.contact-item > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-item__label {
  font-size: 13px;
  color: rgb(255 255 255 / .68);
}

.contact-item__label--sub {
  margin-top: 10px;
}

.contact-item__value {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

a.contact-item__value:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-item__note {
  margin-top: 2px;
  font-size: 14px;
  color: rgb(255 255 255 / .82);
}

/* Footer */
.footer {
  padding: 28px 0 36px;
  font-size: 14px;
  color: var(--ink-2);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer__muted {
  color: var(--ink-3);
  transition: color .2s;
}

a.footer__muted:hover {
  color: var(--ink);
}

/* ---------- 404 (templates/404.html) ---------- */
.error {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 65px);
  padding: 48px 0;
  text-align: center;
  overflow: hidden;
}

.error::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgb(15 27 45 / .09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 10%, transparent 70%);
  pointer-events: none;
}

.error .wrap {
  position: relative;
}

.error__code {
  display: block;
  font-size: clamp(96px, 18vw, 160px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
}

.error h1 {
  margin-top: 16px;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 750;
  letter-spacing: -.025em;
}

.error p {
  max-width: 440px;
  margin: 12px auto 0;
  font-size: 17px;
  color: var(--ink-2);
}

.error .actions {
  justify-content: center;
}

/* ---------- Moslashuvchanlik ---------- */
@media (max-width: 980px) {
  .hero {
    padding: 56px 0 72px;
  }

  .hero__inner,
  .layers {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding: 40px 32px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .nav__links {
    display: none;
  }

  .nav__inner > .btn {
    margin-left: auto;
  }

  .lead {
    font-size: 17px;
  }

  .actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .section {
    padding: 72px 0;
  }

  .section__head {
    margin-bottom: 40px;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature {
    padding: 26px 22px 28px;
  }

  .contact {
    padding: 32px 20px 20px;
    border-radius: 18px;
  }

  .contact__intro .btn {
    width: 100%;
    justify-content: center;
  }

  .contact__list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
