/* ================ Amsativ — App (Dark Theme, base + MudBlazor glue) ================ */

/* -------- CSS Reset (мягкий) -------- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body, h1, h2, h3, h4, p, ul, ol, figure {
    margin: 0;
}

img, svg, video {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul[role="list"], ol[role="list"] {
    list-style: none;
    padding: 0;
}

/* -------- Design Tokens -------- */
:root {
    /* Тёмная палитра */
    --bg: #19214d; /* базовый фон */
    --bg-soft: #1b2242; /* мягкий фон */
    --surface: #2a1d59; /* поверхности/карточки */
    --text: #f3f6ff; /* основной текст */
    --muted: #8f98c2; /* вторичный текст */
    --brand: #7dd3fc; /* бирюзовый акцент */
    --brand-2: #22d3ee; /* вторичный бирюзовый */
    --ok: #22c55e;
    --warn: #f59e0b;
    --danger: #ef4444;
    --border: rgba(255,255,255,.10);
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --blur: saturate(120%) blur(10px);
    --radius: 16px;
    --radius-lg: 22px;
    --gap: 20px;
    --max: 1200px;
    --hdr-h: 72px;
    --z-hdr: 1000;
    --z-menu: 1100;
    --font-sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    /* Утилитарные цвета для совместимости с da-* классами (перенастроены под тёмную) */
    --primary: var(--brand);
    --accent: #00B8A9;
    --secondary: #22d3ee;
    --light: #121835; /* «светлый» в рамках тёмной темы */
    --header-gradient: linear-gradient(87deg, rgba(18,24,53,.85) 0%, rgba(11,15,36,.75) 100%);
    --box-shadow: 0 2px 16px rgba(0,0,0,0.35);
}

/* -------- Base -------- */
html {
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(1200px 720px at 85% -20%, rgba(34,211,238,.06), transparent 60%), radial-gradient(900px 600px at 12% 18%, rgba(125,211,252,.05), transparent 65%), var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* -------- Header (стеклянный) -------- */
.hdr {
    position: sticky;
    top: 0;
    inset-inline: 0;
    height: var(--hdr-h);
    z-index: var(--z-hdr);
}

.hdr__inner {
    height: var(--hdr-h);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    backdrop-filter: var(--blur);
}

.hdr__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12,16,32,.36);
    border-bottom: 1px solid var(--border);
    pointer-events: none;
    transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.hdr.is-scrolled .hdr__backdrop {
    background: rgba(18,24,53,.6);
    box-shadow: 0 10px 30px rgba(0,0,0,.28);
    border-bottom-color: rgba(255,255,255,.14);
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.brand__logo {
    width: 34px;
    height: 34px;
    border-radius: 35px;
    background: #030e12;
    display: grid;
    place-items: center;
    color: #0b1020;
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(34,211,238,.45);
}

.brand__text {
    font-size: 1.05rem;
}
/* ===== Поповер меню ===== */
.mud-popover.lang-menu-popover {
    min-width: 100px !important;
    max-width: 150px !important;
    border-radius: 12px;
    
    color: rgb(17, 19, 38,0.92);
    padding: 4px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    z-index: 2000;
}

    /* ===== Элементы меню ===== */
    .mud-popover.lang-menu-popover .mud-list-item {
        border-radius: 10px;
        padding: 8px 12px;
        font-weight: 500;
        white-space: nowrap;
        align-items: center;
    }

        .mud-popover.lang-menu-popover .mud-list-item:hover {
            background: rgba(0,0,0,0.05);
        }

        /* Флаги и текст в одну линию */
        .mud-popover.lang-menu-popover .mud-list-item > *:first-child {
            width: 1.5em;
            text-align: center;
        }
.lang-icon .mud-icon-button {
    color: lightgray !important;
}
/* -------- Nav Desktop -------- */
.nav--desktop {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.nav__list {
    display: flex;
    gap: 16px;
}

.nav__link {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
}

    .nav__link:hover, .nav__link:focus-visible {
        color: var(--text);
        background: rgba(125,211,252,.08);
        outline: none;
    }

.nav__cta {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* -------- Buttons (бирюзовые) -------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
    will-change: transform;
}

.btn--primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #0b1020; /* светлая кнопка, читаемый тёмный текст */
}

    .btn--primary:hover {
        transform: translateY(-1px);
    }

.btn--outline {
    background: transparent;
    border-color: rgba(125,211,252,.28);
    color: var(--text);
}

    .btn--outline:hover {
        background: rgba(125,211,252,.12);
        border-color: rgba(125,211,252,.45);
    }

.btn--ghost {
    background: rgba(255,255,255,.02);
    color: var(--text);
    border: 1px solid transparent;
}

    .btn--ghost:hover {
        background: rgba(125,211,252,.10);
        border-color: rgba(125,211,252,.22);
    }

.btn--lg {
    padding: 14px 18px;
    border-radius: 14px;
}

/* -------- Burger -------- */
.burger {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(11,15,36,.4); /* тёмный фон */
    backdrop-filter: var(--blur);
    position: relative;
}

.burger__bar {
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    background: var(--text);
    transition: transform .2s ease, opacity .2s ease;
}

    .burger__bar:nth-child(1) {
        top: 14px;
    }

    .burger__bar:nth-child(2) {
        top: 21px;
    }

    .burger__bar:nth-child(3) {
        top: 28px;
    }

/* -------- Mobile Menu (тёмный) -------- */
.nav--mobile[hidden] {
    display: none !important;
}

.nav--mobile {
    position: fixed;
    inset: calc(var(--hdr-h)) 0 0 0;
    z-index: var(--z-menu);
    background: #0e1e2d;
    
    backdrop-filter: var(--blur);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border-top: 1px solid var(--border);
}

.navm__list {
    display: grid;
    gap: 10px;
    background: #070b1a;
    padding: 0 20px 20px 20px !important;
    border-radius: 0 0 10px 10px;
    border-left: 1px solid #54c5df;
    border-right: 1px solid #54c5df;
    border-bottom: 1px solid #54c5df;
}

.navm__link {
    padding: 12px 10px;
    border-radius: 12px;
    color: var(--text);
}

    .navm__link:hover {
        background: rgba(125,211,252,.08);
    }

.navm__cta {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

/* -------- MudBlazor glue (app bar, fab) -------- */
.mud-appbar, .da-appbar {
    background: rgba(18, 24, 53, 0.88) !important; /* слегка прозрачный #121835 */
    backdrop-filter: blur(10px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(120%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    
   
    border-bottom: 1px solid var(--border);
   
    margin-bottom: 2rem;
}

.mud-fab-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #33f1a2;
    color: #0b1020;
    box-shadow: 0 4px 10px rgba(0,0,0,.3);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    padding: 5px !important;
}

    .mud-fab-fixed:hover {
        background: #3da257;
        box-shadow: 0 6px 14px rgba(0,0,0,.4);
        transform: scale(1.05);
    }

/* -------- Utilities (subset) -------- */
.da-bg-white {
    background: var(--surface) !important;
}

.da-bg-light {
    background: var(--bg-soft) !important;
}

.da-bg-primary {
    background: var(--primary) !important;
    color: #0b1020 !important;
}

.da-bg-secondary {
    background: var(--secondary) !important;
    color: #0b1020 !important;
}

.da-text-primary {
    color: var(--primary) !important;
}

.da-text-gray-600 {
    color: #9aa3c9 !important;
}

.da-text-gray-500 {
    color: #8f98c2 !important;
}

.da-alert {
    border-radius: 16px;
    padding: 1.1rem 1.3rem;
    font-size: 1.08rem;
    font-weight: 500;
    box-shadow: 0 4px 22px rgba(34,211,238,.25);
    background: rgba(18,24,53,.7);
    color: var(--text);
}

/* -------- A11y focus -------- */
:focus-visible {
    outline: 2px dashed var(--brand);
    outline-offset: 3px;
}

/* -------- Responsive -------- */
@media (max-width:1100px) {
    .container {
        padding: 0 16px;
    }
}

@media (max-width:860px) {
    .nav--desktop {
        display: none;
    }

    .burger {
        display: inline-block;
    }

    .hdr {
        height: 64px;
    }

    .hdr__inner {
        height: 64px;
        padding: 0 12px;
    }
}

@media (max-width:480px) {
    .btn {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .btn--lg {
        padding: 12px 14px;
    }

    .nav--mobile {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .btn {
        transition: none;
    }
}


/* wwwroot/css/app.css (или в MainLayout.razor в <style>) */
.sub-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20,20,20,.55);
    backdrop-filter: saturate(120%) blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.sub-gate-card {
    max-width: 560px;
    width: 92%;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    text-align: center;
}

    .sub-gate-card .btns {
        display: flex;
        gap: 12px;
        justify-content: center;
    }

    .sub-gate-card .hint {
        opacity: .75;
        display: block;
        margin-top: 8px;
    }
/* ===== Laptop density tuning (1024–1536px) ===== */
@media (min-width: 1024px) and (max-width: 1536px) {
    html {
        /* ???? ?????????? ??????? ????? ?? ????????? */
        font-size: 15px; /* ???? ~16px */
    }

    :root {
        /* ???? ?????? «???????» ? ???????? */
        --hdr-h: 60px; /* ???? 72px */
        --gap: 16px; /* ???? 20px */
        --radius: 12px; /* ???? 16px */
        --radius-lg: 16px; /* ???? 22px */
    }

    /* ?????????? ?????? ? ????????? */
    .btn {
        padding: 8px 12px;
        border-radius: 10px;
    }

    .btn--lg {
        padding: 10px 14px;
        border-radius: 12px;
    }

    .nav__link {
        padding: 8px 10px;
    }

    /* ???? ? ????? ???? ?????? */
    .brand__logo {
        width: 28px;
        height: 28px;
        border-radius: 35px;
    }

    .hdr__inner {
        gap: 10px;
    }

    .mud-appbar, .da-appbar {
        margin-bottom: 1.2rem !important;
    }

    /* ????????/?????? — ?????????? ???????????? ??????? */
    .sec {
        padding: clamp(28px, 5vw, 60px) 0;
    }

    .cards .card, .grid--solutions .sol, .price {
        padding: 14px;
        border-radius: var(--radius);
    }

    /* ????????? ????-??????/???? — ?? ??????? ?????? */
    .hero__title {
        font-size: clamp(22px, 2.6vw, 36px);
    }

    .price__value {
        font-size: 24px;
    }
    /* ???? 28px */

    /* ????????? ????? ??????? ???? ??? ??? ??????????? ???????? (???????? ??? landing.css) */
    .container {
        max-width: 1000px;
    }
}

/* ===== High-DPI ???????? (Retina, 2Ч) — ??? ?? 0.5px ?????? ===== */
@media (min-resolution: 2dppx) and (min-width: 1024px) and (max-width: 1536px) {
    html {
        font-size: 14.5px;
    }
}
