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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p, li { text-wrap: pretty; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

img, svg, video { display: block; max-width: 100%; height: auto; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: color-mix(in srgb, var(--turquoise) 30%, transparent); }

/* ── Layout yordamchilari ── */
.wrap { width: min(100% - var(--gutter) * 2, var(--content)); margin-inline: auto; }
.wrap-narrow { width: min(100% - var(--gutter) * 2, var(--content-narrow)); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 9vw, 7rem); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.stack > * + * { margin-top: var(--flow, 1rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--text-soft); }
.muted { color: var(--text-soft); }
.mono { font-family: var(--font-mono); font-size: var(--step--1); }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--surface); color: var(--text);
  padding: 0.7rem 1.1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ══ Signature: abr maydoni ══════════════════════════════════════════════ */
.field {
  position: fixed; inset: -25vh -10vw auto; height: 120vh;
  z-index: -2; pointer-events: none;
  opacity: var(--field-opacity);
  transition: opacity var(--dur-slow) var(--ease);
}
.field__blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.field__blob--a {
  width: 52vw; height: 52vw; min-width: 380px; min-height: 380px;
  left: 2%; top: 8%;
  background: radial-gradient(circle at 35% 35%,
              var(--turquoise) 0%,
              color-mix(in srgb, var(--turquoise) 45%, transparent) 45%,
              transparent 72%);
  animation: drift-a 34s var(--ease) infinite alternate;
}
.field__blob--b {
  width: 46vw; height: 46vw; min-width: 340px; min-height: 340px;
  right: 4%; top: 22%;
  background: radial-gradient(circle at 60% 40%,
              var(--indigo) 0%,
              color-mix(in srgb, var(--indigo) 40%, transparent) 48%,
              transparent 74%);
  animation: drift-b 41s var(--ease) infinite alternate;
}

/* JS ishga tushgach harakatni field.js boshqaradi —
   CSS keyframe'lari bilan to'qnashmasligi uchun o'chiriladi */
.field[data-js="true"] .field__blob { animation: none; }

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 7vh, 0) scale(1.14); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(-7vw, 5vh, 0) scale(0.92); }
}

/* Don qatlami — gradient "arzon" ko'rinmasligi uchun */
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Reveal holati motion.css da — u yerda JS bilan birga boshqariladi */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .field__blob { animation: none; }
}
