.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.container--wide { max-width: 1400px; }

.app-main {
    min-height: calc(100vh - var(--navbar-height));
    padding-top: var(--navbar-height);
    position: relative;
    z-index: 2;
}

/* === FON ===
   Kunduzgi qog'oz + taqdimot fonidagi naqsh: yengil ko'k nur, ikki nuqta
   matritsasi va ingichka halqa. Har biri kichik qatlam — chizish arzon. */
.fon {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(1100px 520px at 88% -12%, rgba(29, 95, 214, 0.12), transparent 70%),
        radial-gradient(900px 460px at -6% 6%, rgba(29, 95, 214, 0.07), transparent 70%),
        var(--qogoz);
}

.fon__nuqta {
    position: absolute;
    width: 360px;
    height: 260px;
    background-image: radial-gradient(rgba(29, 95, 214, 0.32) 1.1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(closest-side, #000, transparent 72%);
    mask-image: radial-gradient(closest-side, #000, transparent 72%);
}

.fon__nuqta--1 { left: 4vw; top: 22vh; }
.fon__nuqta--2 { right: 8vw; bottom: 14vh; width: 300px; height: 220px; }

/* Ingichka halqalar — taqdimot fonidagi aylanalar (bitta gradient) */
.fon__halqa {
    position: absolute;
    right: -18vw;
    top: 2vh;
    width: 52vw;
    height: 52vw;
    border-radius: 50%;
    background: radial-gradient(closest-side,
        transparent 0 55%,
        rgba(29, 95, 214, 0.10) 55% 55.5%,
        rgba(29, 95, 214, 0.03) 55.5% 74%,
        rgba(29, 95, 214, 0.10) 74% 74.4%,
        transparent 74.4% 100%);
}

/* === NAQSH YORDAMCHILARI ===
   `data-naqsh` bo'lgan blokka nuqta matritsasi va halqa qo'shadi.
   Ranglar --naqsh-* tokenlari orqali sozlanadi. */
[data-naqsh] { position: relative; overflow: hidden; }
[data-naqsh] > * { position: relative; z-index: 1; }

[data-naqsh]::before,
[data-naqsh]::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

/* nuqtalar — yuqori o'ng burchakdan so'niladi */
[data-naqsh]::before {
    inset: 0;
    background-image: radial-gradient(var(--naqsh-nuqta, rgba(255, 255, 255, 0.28)) 1.1px, transparent 1.2px);
    background-size: 18px 18px;
    -webkit-mask-image: radial-gradient(58% 110% at 100% 0%, #000, transparent 72%);
    mask-image: radial-gradient(58% 110% at 100% 0%, #000, transparent 72%);
}

/* halqa — pastki o'ng burchakda */
[data-naqsh]::after {
    right: -6%;
    bottom: -72%;
    width: 46%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side,
        transparent 0 62%,
        var(--naqsh-halqa, rgba(255, 255, 255, 0.22)) 62% 62.6%,
        var(--naqsh-halqa-ich, rgba(255, 255, 255, 0.05)) 62.6% 100%);
}

/* === YO'LAK CHIZIG'I ===
   Yugurish yo'lagining ikki parallel chizig'i — bo'limlar orasidagi ajratgich. */
.yolak-chiziq {
    height: 7px;
    border-top: 1px solid var(--chiziq-2);
    border-bottom: 1px solid var(--chiziq-2);
    margin: 0;
}

/* === YUKLANMOQDA === */
.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 0;
}

.loader__spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--chiziq);
    border-top-color: var(--kok);
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === YUQORIGA ===
   Chat vidjeti mavjud bo'lsa (`.chat-ochish`), bu tugma uning tepasiga chiqadi —
   aks holda ikkalasi bir joyda ustma-ust tushadi. */
.scroll-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--qogoz-2);
    border: 1px solid var(--chiziq-2);
    color: var(--siyoh);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--duration-base) var(--ease-out),
                transform var(--duration-base) var(--ease-out),
                visibility var(--duration-base);
    z-index: 60;
    box-shadow: var(--shadow-md);
}

body:has(.chat-ochish) .scroll-top { bottom: 5.75rem; }

.scroll-top svg { width: 18px; height: 18px; }

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--kok);
    color: #fff;
    border-color: var(--kok);
}

/* === BO'LIM YORDAMCHILARI === */
.section {
    padding: clamp(3rem, 6vw, 5.5rem) 0;
    position: relative;
}

/* Oxirgi bo'lim footerga tegib turmasin, lekin katta bo'shliq ham qolmasin */
.app-main > .section:last-child { padding-bottom: clamp(2rem, 3.5vw, 3.25rem); }

.section-head {
    max-width: 720px;
    margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.section-head .eyebrow { margin-bottom: 1rem; }
.section-head h2 { margin-bottom: 0.75rem; }
.section-head p { font-size: 1.08rem; }

/* === KO'RINISH ANIMATSIYASI === */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === NON USHLAGICH (breadcrumb) === */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--siyoh-3);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--siyoh-3);
    border-bottom: 1px solid transparent;
    transition: color var(--duration-fast), border-color var(--duration-fast);
}

.breadcrumb a:hover { color: var(--kok); border-color: var(--kok); }
.breadcrumb a svg { width: 14px; height: 14px; }
.breadcrumb__sep { display: inline-flex; color: var(--chiziq-2); }
.breadcrumb__sep svg { width: 12px; height: 12px; }
.breadcrumb__current { color: var(--siyoh); font-weight: 500; }
.breadcrumb--tight { margin-bottom: 1rem; }

@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;
    }
    .reveal { opacity: 1; transform: none; }
}
