/* Bridge AI — umumiy uslublar (index va /demo sahifalari uchun) */

:root {
    --ink: #06041a;
    --panel: #0d0a24;
    --line: #231d45;
    --magenta: #e23bff;
    --violet: #7c5cff;
    --teal: #5eead4;
}

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
    background:
        radial-gradient(900px 600px at 85% -10%, rgba(124, 92, 255, 0.16), transparent 60%),
        radial-gradient(700px 500px at -10% 30%, rgba(94, 234, 212, 0.07), transparent 60%),
        var(--ink);
    background-attachment: fixed;
}

::selection { background: rgba(226, 59, 255, 0.35); }

/* ---------- Navigatsiya ---------- */
.site-nav {
    transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
    border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
    background: rgba(6, 4, 26, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}
.nav-link {
    position: relative;
    color: #e7e5f5;
    transition: color .2s ease;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: var(--magenta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--magenta); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* ---------- Tugmalar ---------- */
.btn-glow {
    display: inline-block;
    background: linear-gradient(90deg, var(--magenta) 0%, #a23bff 45%, #2a1a6e 100%);
    background-size: 160% 100%;
    color: #fff;
    border-radius: 9999px;
    box-shadow: 0 0 28px rgba(226, 59, 255, 0.35);
    transition: background-position .5s ease, box-shadow .3s ease, transform .2s ease;
}
.btn-glow:hover {
    background-position: 100% 0;
    box-shadow: 0 0 40px rgba(226, 59, 255, 0.55);
    transform: translateY(-2px);
}
.btn-ghost {
    display: inline-block;
    border: 1px solid rgba(231, 229, 245, 0.25);
    border-radius: 9999px;
    color: #e7e5f5;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero-visual {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 64%;
    pointer-events: none;
}
.hero-visual canvas { width: 100%; height: 100%; display: block; }
.hero-text > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > *:nth-child(1) { animation-delay: .25s; }
.hero-text > *:nth-child(2) { animation-delay: .4s; }
.hero-text > *:nth-child(3) { animation-delay: .55s; }
.hero-text > *:nth-child(4) { animation-delay: .7s; }
@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}
.scroll-hint span {
    display: block;
    width: 1px; height: 44px;
    background: linear-gradient(var(--magenta), transparent);
    animation: hint 2.2s ease-in-out infinite;
    transform-origin: top;
}
@keyframes hint {
    0% { transform: scaleY(0); opacity: 0; }
    40% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1) translateY(22px); opacity: 0; }
}
@media (max-width: 767px) {
    .hero-visual {
        width: 100%;
        top: 56px; bottom: auto;
        height: 52vh;
        -webkit-mask-image: linear-gradient(#000 75%, transparent);
        mask-image: linear-gradient(#000 75%, transparent);
    }
}

/* ---------- Bo'limlar ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-size: .78rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--teal);
}
.eyebrow::before {
    content: "";
    width: 28px; height: 1px;
    background: var(--teal);
}
.grad-text {
    background: linear-gradient(90deg, #fff 0%, #f0b6ff 45%, var(--magenta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.card {
    position: relative;
    background: linear-gradient(180deg, rgba(20, 15, 52, 0.85), rgba(13, 10, 36, 0.85));
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.card:hover {
    transform: translateY(-6px);
    border-color: rgba(226, 59, 255, 0.5);
    box-shadow: 0 18px 50px -20px rgba(226, 59, 255, 0.45);
}
.chip {
    display: inline-block;
    font-size: .75rem;
    padding: .25rem .7rem;
    border-radius: 9999px;
    border: 1px solid var(--line);
    background: rgba(124, 92, 255, 0.1);
    color: #cfc9f5;
}
.avatar {
    width: 56px; height: 56px;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--magenta), var(--violet));
    box-shadow: 0 0 24px rgba(226, 59, 255, 0.35);
}

/* Muammo -> Yechim o'rtasidagi o'q */
.flow-arrow {
    width: 56px; height: 56px;
    border-radius: 9999px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(226, 59, 255, 0.5);
    color: var(--magenta);
    background: var(--ink);
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(226, 59, 255, 0.35); }
    50% { box-shadow: 0 0 0 14px rgba(226, 59, 255, 0); }
}

/* Yo'l xaritasi */
.road { position: relative; }
.road-track, .road-fill {
    position: absolute;
    top: 13px; left: 0;
    height: 2px;
}
.road-track { right: 0; background: var(--line); }
.road-fill {
    width: 0;
    background: linear-gradient(90deg, var(--teal), var(--magenta));
    transition: width 1.6s cubic-bezier(.2, .7, .2, 1) .3s;
}
.road.in .road-fill { width: var(--progress, 12.5%); }
.road-dot {
    width: 28px; height: 28px;
    border-radius: 9999px;
    border: 2px solid var(--line);
    background: var(--ink);
    position: relative;
    z-index: 1;
}
.road-dot.current {
    border-color: var(--magenta);
    background: var(--magenta);
    animation: pulse 2.4s ease-in-out infinite;
}
@media (max-width: 767px) {
    .road-track, .road-fill { display: none; }
}

/* ---------- Skroll paytida paydo bo'lish ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .hero-text > *, .scroll-hint span, .flow-arrow, .road-dot.current { animation: none; }
    .road-fill { transition: none; }
}

/* ---------- Til almashtirgich ---------- */
.lang-switch { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 9999px; background: rgba(6, 4, 26, 0.6); }
.lang-switch button { background: none; border: 0; cursor: pointer; padding: .3rem .65rem; border-radius: 9999px; font: inherit; font-size: .75rem; letter-spacing: .06em; color: #94a3b8; transition: color .2s ease, background-color .2s ease; }
.lang-switch button:hover { color: #fff; }
.lang-switch button.active { background: linear-gradient(90deg, rgba(226, 59, 255, 0.35), rgba(124, 92, 255, 0.3)); color: #fff; }
