/* =========================================================
   Архонт — визуальный каркас
   Тёмная премиум-тема: фон, стекло, золото
   ========================================================= */

:root {
    --bg: #07080A;
    --surface: #0E1116;
    --text: #F5F2EA;
    --muted: #9AA3B2;
    --gold: #D4AF37;
    --gold-light: #E8C97A;
    --line: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.04);
    --radius: 24px;
    --container: 1200px;
    --font-display: "Unbounded", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
    background: var(--bg);
    color-scheme: dark;
    scrollbar-color: rgba(212, 175, 55, 0.55) var(--bg);
    scrollbar-width: thin;
    scroll-behavior: smooth;
}

/* Базовые стили завязаны на body.arkhont, чтобы не зависеть от CDN-сбросов */
body.arkhont {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Скроллбар в цвет темы (Chrome/Edge) */
body.arkhont::-webkit-scrollbar {
    width: 10px;
}

body.arkhont::-webkit-scrollbar-track {
    background: var(--bg);
}

body.arkhont::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.35);
    border: 2px solid var(--bg);
    border-radius: 999px;
}

body.arkhont::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.55);
}

body.arkhont h1,
body.arkhont h2,
body.arkhont h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

body.arkhont p,
body.arkhont dl,
body.arkhont dd,
body.arkhont dt,
body.arkhont blockquote {
    margin: 0;
}

body.arkhont a {
    color: inherit;
    text-decoration: none;
}

body.arkhont svg {
    display: block;
}

body.arkhont button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    border: 0;
}

body.arkhont ::selection {
    background: rgba(212, 175, 55, 0.35);
    color: #fff;
}

/* Доступность */
body.arkhont a:focus-visible,
body.arkhont button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
    border-radius: 8px;
}

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

/* ============================ Кнопки ============================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease,
        background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    color: #08090B;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35),
        0 14px 34px -14px rgba(212, 175, 55, 0.75);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(232, 201, 122, 0.55),
        0 20px 44px -14px rgba(212, 175, 55, 0.9);
}

.btn-ghost {
    border-color: rgba(212, 175, 55, 0.45);
    background: rgba(212, 175, 55, 0.03);
    color: var(--gold-light);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--gold-light);
    background: rgba(212, 175, 55, 0.1);
}

.btn-sm {
    padding: 11px 20px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* ============================ Шапка ============================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(7, 8, 10, 0.72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background-color 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(7, 8, 10, 0.93);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-emblem {
    display: block;
    height: 40px;
    width: 40px;
    max-width: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1;
    color: var(--gold-light);
}

.brand-emblem-footer {
    height: 28px;
    width: 28px;
    max-width: 28px;
}

.brand-name-footer {
    font-size: 14px;
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    padding: 6px 0;
    color: var(--muted);
    font-size: 14.5px;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.nav-link.is-active {
    color: var(--gold-light);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 8px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.lang-link {
    color: var(--muted);
    padding: 4px 2px;
    transition: color 0.2s ease;
}

.lang-link:hover {
    color: var(--text);
}

.lang-link.is-active {
    color: var(--gold);
    font-weight: 600;
}

.lang-sep {
    color: rgba(154, 163, 178, 0.4);
}

/* Бургер */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 9px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid var(--line);
}

.burger-line {
    display: block;
    width: 100%;
    height: 1.5px;
    border-radius: 2px;
    background: var(--text);
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.burger.is-open .burger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.burger.is-open .burger-line:nth-child(2) {
    opacity: 0;
}

.burger.is-open .burger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ======================= Мобильное меню ======================= */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    padding: 100px 28px 48px;
    background: rgba(7, 8, 10, 0.88);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
}

.mobile-link {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
    color: var(--text);
    opacity: 0;
    transform: translateX(18px);
    transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s ease;
}

.mobile-menu.is-open .mobile-link {
    opacity: 1;
    transform: none;
}

.mobile-menu.is-open .mobile-link:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu.is-open .mobile-link:nth-child(2) { transition-delay: 0.12s; }
.mobile-menu.is-open .mobile-link:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu.is-open .mobile-link:nth-child(4) { transition-delay: 0.24s; }

.mobile-link:hover,
.mobile-link:focus-visible {
    color: var(--gold-light);
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.mobile-actions .btn-primary {
    color: #08090B;
}

.mobile-actions .btn-primary:hover {
    color: #08090B;
}

.lang-switch-mobile {
    font-size: 14px;
}

body.menu-open {
    overflow: hidden;
}

/* ============================ Hero ============================ */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 90vh;
    padding: 130px 0 90px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(58% 48% at 18% 18%, rgba(212, 175, 55, 0.20), transparent 68%),
        radial-gradient(48% 42% at 82% 8%, rgba(232, 201, 122, 0.12), transparent 70%),
        radial-gradient(70% 58% at 50% 108%, rgba(212, 175, 55, 0.08), transparent 72%),
        linear-gradient(180deg, rgba(7, 8, 10, 0) 55%, var(--bg) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 74%);
    mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 74%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-eyebrow {
    margin-bottom: 26px;
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    line-height: 1.5;
}

.hero-title {
    font-size: clamp(64px, 12vw, 160px);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 0.95;
    color: var(--gold-light);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
    .hero-title {
        background: linear-gradient(160deg, #FFFFFF 0%, var(--gold-light) 42%, var(--gold) 78%, #A9862A 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
}

.hero-subtitle {
    max-width: 640px;
    margin-top: 26px;
    color: var(--muted);
    font-size: clamp(16px, 1.6vw, 20px);
    font-weight: 300;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 42px;
}

/* ==================== Секции и стекло ==================== */

.section {
    position: relative;
    padding: 96px 0;
}

.section-page {
    padding: 130px 0 110px;
}

.glass-panel,
.glass-card,
.plan-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.glass-panel {
    position: relative;
    padding: 60px;
    overflow: hidden;
}

.glass-panel::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.16), transparent 68%);
    pointer-events: none;
}

.panel-title {
    position: relative;
    max-width: 800px;
    font-size: clamp(26px, 3.4vw, 42px);
    font-weight: 600;
}

.panel-text {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 720px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 16.5px;
    font-weight: 300;
}

.quote {
    position: relative;
    margin-top: 36px;
    padding-left: 22px;
    border-left: 2px solid var(--gold);
    color: var(--gold-light);
    font-family: var(--font-display);
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 400;
    line-height: 1.5;
}

body.arkhont blockquote.quote {
    margin-top: 32px;
}

.glass-panel .btn {
    position: relative;
    margin-top: 38px;
}

/* ======================== Заголовки страниц ======================== */

.page-head {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 720px;
    margin-bottom: 60px;
}

.page-title {
    font-size: clamp(36px, 6vw, 68px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: var(--muted);
    font-size: 16.5px;
    font-weight: 300;
}

.page-lead {
    color: var(--text);
    font-size: clamp(17px, 2vw, 21px);
    font-weight: 400;
    line-height: 1.55;
}

.page-text {
    color: var(--muted);
    font-size: 16px;
    font-weight: 300;
}

/* ============================ Тарифы ============================ */

.plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding: 40px 32px;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease,
        box-shadow 0.3s ease;
}

.plan-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 26px 60px -30px rgba(212, 175, 55, 0.45);
}

.plan-card-featured {
    transform: none;
    border-color: rgba(212, 175, 55, 0.6);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.09), rgba(255, 255, 255, 0.03));
    box-shadow: 0 30px 70px -34px rgba(212, 175, 55, 0.55);
}

.plan-card-featured:hover {
    transform: translateY(-6px);
}

.plan-name {
    color: var(--text);
    font-size: 20px;
    font-weight: 500;
}

.plan-price {
    font-family: var(--font-display);
    font-size: clamp(38px, 4.4vw, 52px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--gold-light);
}

.plan-note {
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 300;
    min-height: 22px;
}

.plan-card .btn {
    margin-top: auto;
}

.plans-free {
    margin-top: 48px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 300;
    text-align: center;
}

/* ============================ О проекте ============================ */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
    align-items: start;
}

.about-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 860px;
}

.about-copy .quote {
    margin-top: 14px;
}

/* ========================= Личный кабинет ========================= */

.account-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 520px;
    margin-inline: auto;
    padding: 52px 40px;
    text-align: center;
}

.account-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 8px;
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.07);
}

.account-card .page-title {
    font-size: clamp(28px, 4vw, 40px);
}

.skeleton-rows {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 22px;
    border-top: 1px solid var(--line);
}

.skeleton-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
}

.skeleton-row dt {
    color: var(--muted);
    font-weight: 300;
}

.skeleton-row dd {
    color: var(--gold-light);
    font-family: var(--font-display);
}

.account-card .btn {
    margin-top: 28px;
}

/* ============================= Оплата ============================= */

.checkout-wrap {
    max-width: 620px;
    margin-inline: auto;
}

.checkout-wrap .page-title {
    margin-bottom: 32px;
    text-align: center;
}

.checkout-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 40px;
    text-align: center;
}

.checkout-eyebrow {
    color: var(--gold);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.checkout-plan-name {
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 500;
}

.checkout-empty {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 20px;
    padding: 18px 0;
}

.checkout-note {
    max-width: 460px;
    margin-top: 18px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 300;
    line-height: 1.6;
}

.checkout-card .btn {
    margin-top: 26px;
}

/* ============================ Футер ============================ */

.site-footer {
    margin-top: 40px;
    padding: 46px 0;
    border-top: 1px solid var(--line);
    background: rgba(14, 17, 22, 0.55);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-note {
    color: var(--muted);
    font-size: 13.5px;
    letter-spacing: 0.06em;
}

.footer-link {
    color: var(--gold-light);
    font-size: 14.5px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-link:hover {
    color: var(--gold);
    border-color: rgba(212, 175, 55, 0.5);
}

.footer-copy {
    color: rgba(154, 163, 178, 0.75);
    font-size: 13px;
}

/* ============================ Анимации ============================ */

/* Элементы видимы по умолчанию: если GSAP не загрузился — ничего не пропадёт */

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

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================ Адаптив ============================ */

@media (max-width: 1040px) {
    .nav-desktop {
        gap: 20px;
    }

    .about-grid {
        gap: 40px;
    }
}

@media (max-width: 900px) {
    .nav-desktop,
    .header-cta {
        display: none;
    }

    .burger {
        display: flex;
    }

    .header-right {
        margin-left: auto;
    }

    .header-inner {
        min-height: 68px;
        gap: 16px;
    }

    .header-inner .brand-emblem {
        height: 32px;
        width: 32px;
        max-width: 32px;
    }

    .header-inner .brand-name {
        font-size: 17px;
        letter-spacing: 0.12em;
    }

    .hero {
        min-height: 88vh;
        padding: 96px 0 72px;
    }

    .hero-title {
        font-size: clamp(52px, 15vw, 96px);
    }

    .hero-eyebrow {
        font-size: 11px;
        letter-spacing: 0.22em;
    }

    .section {
        padding: 72px 0;
    }

    .section-page {
        padding: 104px 0 80px;
    }

    .glass-panel {
        padding: 40px 28px;
    }

    .plans {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .plan-card-featured,
    .plan-card-featured:hover {
        transform: none;
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

@media (max-width: 560px) {
    .container {
        padding-inline: 20px;
    }

    .hero {
        padding: 84px 0 64px;
    }

    .hero-title {
        font-size: clamp(44px, 14vw, 64px);
        letter-spacing: 0.01em;
    }

    .hero-eyebrow {
        margin-bottom: 20px;
        font-size: 10.5px;
    }

    .hero-subtitle {
        margin-top: 20px;
        font-size: 15.5px;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column;
        gap: 12px;
        margin-top: 32px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section {
        padding: 56px 0;
    }

    .section-page {
        padding: 88px 0 64px;
    }

    .glass-panel {
        padding: 32px 22px;
    }

    .panel-title {
        font-size: 24px;
    }

    .panel-text {
        font-size: 15.5px;
    }

    .plan-card {
        padding: 32px 24px;
    }

    .account-card,
    .checkout-card {
        padding: 36px 22px;
    }

    .page-title {
        font-size: clamp(30px, 9vw, 44px);
    }

    .mobile-link {
        font-size: 23px;
    }

    .footer-inner {
        gap: 18px;
    }
}
