/* ========================================================
   1. ШРИФТЫ
   ======================================================== */
@font-face {
    font-family: 'Onest';
    src: url('/static/fonts/Onest-VariableFont.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Involve';
    src: url('/static/fonts/Involve-Regular.woff2') format('woff2');
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}

/* ========================================================
   2. ДИЗАЙН-ТОКЕНЫ
   ======================================================== */
:root {
    --brand-indigo: #6366F1;
    --brand-indigo-glow: rgba(99, 102, 241, 0.35);
    --brand-emerald: #10B981;
    --brand-emerald-glow: rgba(16, 185, 129, 0.3);

    /* Light Theme */
    --surface-page: #FAFBFD;
    --surface-card: #FFFFFF;
    --surface-elevated: #F4F6FA;
    --surface-glass: rgba(255, 255, 255, 0.85);
    --line-subtle: #E2E6EE;
    --line-strong: #CBD2DE;
    --text-head: #0D121C;
    --text-body: #4A5568;
    --text-hint: #8C96A6;
    --card-shadow: 0 16px 40px rgba(13, 18, 28, 0.04);
    --mesh-opacity: 0.45;
}

@media (prefers-color-scheme: dark) {
    :root {
        --surface-page: #07090E;
        --surface-card: #0F131C;
        --surface-elevated: #151B27;
        --surface-glass: rgba(15, 19, 28, 0.85);
        --line-subtle: #1C2433;
        --line-strong: #2B374E;
        --text-head: #F3F6FC;
        --text-body: #9BA6BA;
        --text-hint: #5B677C;
        --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
        --mesh-opacity: 0.15;
    }
}

html.theme-light, body.theme-light {
    --surface-page: #FAFBFD;
    --surface-card: #FFFFFF;
    --surface-elevated: #F4F6FA;
    --surface-glass: rgba(255, 255, 255, 0.85);
    --line-subtle: #E2E6EE;
    --line-strong: #CBD2DE;
    --text-head: #0D121C;
    --text-body: #4A5568;
    --text-hint: #8C96A6;
    --card-shadow: 0 16px 40px rgba(13, 18, 28, 0.04);
    --mesh-opacity: 0.45;
}

html.theme-dark, body.theme-dark {
    --surface-page: #07090E;
    --surface-card: #0F131C;
    --surface-elevated: #151B27;
    --surface-glass: rgba(15, 19, 28, 0.85);
    --line-subtle: #1C2433;
    --line-strong: #2B374E;
    --text-head: #F3F6FC;
    --text-body: #9BA6BA;
    --text-hint: #5B677C;
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    --mesh-opacity: 0.15;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: clip;
    max-width: 100%;
}

html.lenis, html.lenis body {
    height: auto;
}

body {
    font-family: 'Onest', sans-serif;
    background-color: var(--surface-page);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
}

.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--brand-indigo), var(--brand-emerald));
    z-index: 2000;
    pointer-events: none;
    transition: width 0.05s linear;
}

.viewport-canvas {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.section-boundary {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px;
}

.secondary-font {
    font-family: 'Involve', sans-serif;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

.spatial-grid-mesh {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, var(--line-subtle) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line-subtle) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: var(--mesh-opacity);
    mask-image: radial-gradient(circle at 50% 30%, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 30%, black, transparent 80%);
    pointer-events: none;
    z-index: 0;
}

.geo-ambient-traces {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

.geo-trace-line {
    stroke: var(--line-strong);
    stroke-width: 1.5;
    stroke-dasharray: 8 8;
    fill: none;
    transition: stroke-dashoffset 0.1s ease;
}

.cursor-spotlight {
    position: fixed;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-indigo-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    opacity: 0.55;
    filter: blur(40px);
}

.ambient-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(160px);
}
.glow-primary {
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--brand-indigo-glow) 0%, transparent 70%);
}
.glow-secondary {
    top: 2200px;
    right: -150px;
    background: radial-gradient(circle, var(--brand-emerald-glow) 0%, transparent 70%);
}

/* Навигация */
.nav-capsule-wrapper {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 0 24px;
    box-sizing: border-box;
    pointer-events: none;
}
.nav-capsule-wrapper > * {
    pointer-events: auto;
}

.nav-capsule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 36px;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--line-subtle);
    padding: 6px 16px;
    border-radius: 100px;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 980px;
    min-width: 0;
    box-sizing: border-box;
}

.nav-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-head);
}

.nav-brand-symbol {
    height: 32px;
    width: auto;
}

.nav-brand-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
}

.nav-anchors {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-elevated);
    padding: 4px;
    border-radius: 40px;
    border: 1px solid var(--line-subtle);
}

.nav-item {
    color: var(--text-body);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 30px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
}

.nav-item:hover {
    color: var(--text-head);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.is-active {
    color: var(--text-head);
    background: var(--surface-card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

.nav-action-cluster {
    display: flex;
    align-items: center;
    gap: 14px;
}

.theme-pill-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-elevated);
    border: 1px solid var(--line-subtle);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    color: var(--text-body);
    transition: transform 0.15s ease;
}

.theme-pill-btn:active {
    transform: scale(0.94);
}

.theme-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--brand-indigo);
}

.primary-nav-trigger {
    background-color: var(--text-head);
    color: var(--surface-page);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    transition: transform 0.15s ease;
}

.primary-nav-trigger:active {
    transform: scale(0.95);
}

/* Hero */
.hero-stage {
    padding: 190px 24px 80px 24px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.hero-content-envelope {
    max-width: 1120px;
    width: 100%;
    text-align: center;
}

.hero-telemetry-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 40px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--brand-indigo);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 28px;
}

.badge-ping {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--brand-indigo);
    box-shadow: 0 0 10px var(--brand-indigo);
}

.hero-monumental-heading {
    font-size: clamp(2.6rem, 5.3vw, 4.85rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text-head);
    margin: 0 auto 28px auto;
    max-width: 1060px;
}

.hero-lead-narrative {
    font-size: clamp(1.05rem, 1.3vw, 1.25rem);
    color: var(--text-body);
    max-width: 780px;
    margin: 0 auto 44px auto;
    line-height: 1.6;
}

.hero-cta-junction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.epic-btn {
    height: 52px;
    padding: 0 30px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.epic-btn:active {
    transform: scale(0.96) !important;
}

.epic-btn-brand {
    background-color: var(--brand-indigo);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 10px 30px var(--brand-indigo-glow);
}
.epic-btn-brand:hover {
    box-shadow: 0 16px 36px rgba(99, 102, 241, 0.45);
}

.epic-btn-glass {
    background: var(--surface-card);
    color: var(--text-head);
    border: 1px solid var(--line-strong);
}
.epic-btn-glass:hover {
    border-color: var(--brand-indigo);
}

/* Manifest & Ticker */
.manifesto-stage {
    padding: 100px 0 140px 0;
}

.manifesto-text {
    font-size: clamp(1.8rem, 3.4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-head);
    max-width: 1100px;
    margin: 0 auto;
}

.word-span {
    display: inline-block;
    opacity: 0.15;
    transition: opacity 0.1s ease;
}

.ticker-ribbon {
    padding: 24px 0;
    border-top: 1px solid var(--line-subtle);
    border-bottom: 1px solid var(--line-subtle);
    overflow: hidden;
    white-space: nowrap;
}

.ticker-track {
    display: inline-flex;
    gap: 32px;
    animation: marqueeScroll 25s linear infinite;
}

.ticker-element {
    font-size: 15px;
    color: var(--text-hint);
}

.ticker-separator {
    color: var(--line-strong);
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Карточки секций */
.modular-card {
    background: var(--surface-card);
    border: 1px solid var(--line-subtle);
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modular-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(99, 102, 241, 0.08),
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modular-card:hover::after {
    opacity: 1;
}

.modular-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: height 0.3s ease;
    z-index: 2;
}

.modular-card:hover::before {
    height: 6px;
}

.theme-accent-1::before { background: var(--brand-indigo); }
.theme-accent-2::before { background: var(--brand-emerald); }
.theme-accent-3::before { background: #8B5CF6; }
.theme-accent-4::before { background: #06B6D4; }

.slice-index {
    color: var(--text-hint);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
    position: relative;
    z-index: 1;
}

.slice-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-head);
    line-height: 1.25;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.slice-details {
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.cascade-stage {
    padding: 140px 0;
}

.section-lead {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px auto;
}

.section-title {
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 700;
    color: var(--text-head);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-body);
}

.cascade-deck {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cascade-card {
    min-height: 340px;
}

.card-metric-footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--line-subtle);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    position: relative;
    z-index: 1;
}

.card-metric-footer span {
    font-size: 13px;
    color: var(--text-hint);
}

.card-metric-footer strong {
    font-size: 24px;
    font-weight: 700;
}

.kinetic-stage {
    padding: 140px 0;
    background-color: var(--surface-elevated);
}

.kinetic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.kinetic-card {
    min-height: 320px;
}

.horizontal-scroll-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.horizontal-pin-zone {
    padding: 80px 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.horizontal-head {
    margin-bottom: 48px;
    width: 100%;
}

.horizontal-track-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: visible;
}

.horizontal-track {
    display: flex;
    gap: 36px;
    padding-left: calc((100vw - 1240px) / 2 + 28px);
    padding-right: 140px;
    width: max-content;
    will-change: transform;
}

.horizontal-card {
    width: 420px;
    min-height: 380px;
    flex-shrink: 0;
    transform-origin: center center;
}

.stack-stage {
    padding: 140px 0 180px 0;
}

.cards-stack-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 920px;
    margin: 0 auto;
    position: relative;
}

.stack-card {
    position: sticky;
    top: 140px;
    min-height: 260px;
    transform-origin: center top;
}

.action-stage {
    padding: 120px 0 160px 0;
}

.action-monolith {
    background: radial-gradient(circle at top, var(--brand-indigo-glow) 0%, transparent 70%), var(--surface-card);
    border: 1px solid var(--line-subtle);
    border-radius: 32px;
    padding: 80px 32px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.action-brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.action-title {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 700;
    color: var(--text-head);
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 820px;
    margin: 0 auto 16px auto;
}

.action-subtext {
    font-size: 16px;
    color: var(--text-hint);
    margin-bottom: 40px;
}

.footer-stage {
    border-top: 1px solid var(--line-subtle);
    padding: 40px 0;
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand-side {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-brand-img {
    height: 32px;
    width: auto;
}

.footer-brand-notes,
.footer-meta-side {
    font-size: 13px;
    color: var(--text-hint);
}
.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 8px;
    justify-content: flex-end;
}
.footer-legal-links a {
    color: var(--text-body);
    text-decoration: none;
}
.footer-legal-links a:hover { color: var(--text-head); }
.legal-checks { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 12px; }
.legal-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--text-body);
    line-height: 1.5;
    padding: 14px 16px;
    border: 1.5px solid var(--line-subtle);
    border-radius: 12px;
    background: var(--surface-elevated);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.legal-check:hover {
    border-color: var(--line-strong);
    background: var(--surface-card);
}
.legal-check:has(input:checked) {
    border-color: var(--brand-indigo);
    background: rgba(99, 102, 241, 0.05);
}
.legal-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 2px 0 0 0;
    border: 2px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface-card);
    display: grid;
    place-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.legal-check input:hover {
    border-color: var(--brand-indigo);
}
.legal-check input::after {
    content: '';
    width: 10px;
    height: 10px;
    clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 20%, 80% 0, 38% 62%);
    background: #fff;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.legal-check input:checked {
    background: var(--brand-indigo);
    border-color: var(--brand-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.legal-check input:checked::after { transform: scale(1); }
.legal-check span {
    flex: 1;
    padding-top: 1px;
}
.legal-check a { color: var(--brand-indigo); text-decoration: none; font-weight: 600; white-space: nowrap; transition: opacity 0.2s ease; }
.legal-check a:hover { opacity: 0.8; }
.legal-continue { font-size: 12px; color: var(--text-hint); margin: 4px 0 12px; }
.legal-wrap { max-width: 860px; margin: 0 auto; padding: 12px 20px 48px; }
.legal-card { background: var(--surface-card); border: 1px solid var(--line-subtle); border-radius: 24px; padding: 36px 32px; }
.legal-card h1 { font-size: 28px; color: var(--text-head); margin-bottom: 8px; }
.legal-card h2 { font-size: 18px; color: var(--text-head); margin: 22px 0 8px; }
.legal-card p { font-size: 14px; color: var(--text-body); line-height: 1.65; margin-bottom: 10px; }
.legal-meta { color: var(--text-hint) !important; font-size: 13px !important; }

/* Авторизация и регистрация */
.auth-body {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
html:has(.auth-body) {
    height: 100%;
    overflow: hidden;
}
.auth-body .spatial-grid-mesh,
.auth-body .glow-primary {
    position: fixed;
    pointer-events: none;
}
.auth-body .glow-primary {
    top: -180px;
    width: 520px;
    height: 520px;
}
.auth-body .glow-secondary {
    display: none;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.auth-back-link {
    color: var(--text-body);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.auth-back-link:hover {
    color: var(--text-head);
}

.auth-viewport {
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 24px 32px;
    position: relative;
    z-index: 2;
    min-height: 0;
    overflow: auto;
}

.auth-card-container {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: var(--surface-card);
    border: 1px solid var(--line-subtle);
    border-radius: 32px;
    padding: 44px 36px;
    box-shadow: var(--card-shadow);
    position: relative;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-head);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-body);
}

.social-auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    height: 48px;
    border-radius: 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--line-subtle);
    color: var(--text-head);
    font-family: 'Onest', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-btn:hover {
    border-color: var(--line-strong);
    background: var(--surface-card);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-hint);
    font-size: 12px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--line-subtle);
}

.auth-divider span {
    padding: 0 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.input-label {
    font-size: 13px;
    color: var(--text-body);
    font-weight: 500;
}

.input-forgot-link {
    font-size: 12px;
    color: var(--brand-indigo);
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.input-forgot-link:hover {
    opacity: 0.8;
}

.auth-input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: var(--surface-elevated);
    border: 1px solid var(--line-subtle);
    color: var(--text-head);
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    padding: 0 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input:focus {
    border-color: var(--brand-indigo);
    box-shadow: 0 0 0 3px var(--brand-indigo-glow);
    background: var(--surface-card);
}

.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-password-wrapper .auth-input {
    padding-right: 48px;
}

.toggle-password-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-hint);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}
.toggle-password-btn:hover {
    color: var(--text-head);
}

.input-hint {
    font-size: 11px;
    color: var(--text-hint);
    margin-top: 2px;
}

.auth-submit-btn {
    width: 100%;
    margin-top: 10px;
}

.auth-error-banner {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #EF4444;
    font-size: 12px;
    text-align: center;
}

.auth-footer-prompt {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-body);
}

.auth-accent-link {
    color: var(--brand-indigo);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.auth-accent-link:hover {
    opacity: 0.8;
}

/* Регистрация шаги */
.reg-progress-header {
    margin-bottom: 24px;
}

.reg-steps-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.reg-step-name {
    font-size: 12px;
    color: var(--brand-indigo);
    font-weight: 600;
}

.reg-progress-track {
    height: 4px;
    background: var(--surface-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.reg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-indigo), var(--brand-emerald));
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.reg-step-pane {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reg-step-pane.is-hidden {
    display: none;
}

.otp-input-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 12px 0 6px 0;
    width: 100%;
}

.otp-cell {
    width: 100%;
    height: 60px;
    border-radius: 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--line-subtle);
    font-family: 'Onest', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text-head);
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.otp-cell:focus {
    border-color: var(--brand-indigo);
    box-shadow: 0 0 0 3px var(--brand-indigo-glow);
    background: var(--surface-card);
}

.otp-resend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-hint);
    margin-top: 6px;
}

.text-trigger-btn {
    background: none;
    border: none;
    color: var(--brand-indigo);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
}
.text-trigger-btn:hover {
    opacity: 0.8;
}

.role-selector-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.role-choice-card {
    cursor: pointer;
    position: relative;
}

.role-choice-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-choice-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--surface-elevated);
    border: 1px solid var(--line-subtle);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.role-choice-card input[type="radio"]:checked + .role-choice-box {
    border-color: var(--brand-indigo);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 4px 18px var(--brand-indigo-glow);
}

.role-choice-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    margin-top: 3px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.role-choice-card input[type="radio"]:checked + .role-choice-box .role-choice-dot {
    border-color: var(--brand-indigo);
    background: var(--brand-indigo);
    box-shadow: 0 0 0 3px var(--surface-card) inset;
}

.role-choice-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.role-choice-title {
    font-size: 15px;
    color: var(--text-head);
    font-weight: 700;
}

.role-choice-desc {
    font-size: 12px;
    color: var(--text-body);
}

.reg-nav-controls {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.reg-nav-controls .epic-btn {
    flex: 1;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1024px) {
    .cascade-deck, .kinetic-grid { grid-template-columns: 1fr; }
    .horizontal-track { padding-left: 28px; }
    .nav-anchors { display: none; }
    .nav-capsule { gap: 12px; }
    .nav-capsule-wrapper { padding: 0 16px; max-width: 100%; }
}

@media (max-width: 768px) {
    .site-nav, .nav-anchors { display: none; }
    .nav-capsule-wrapper {
        top: 12px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        padding: 0 12px;
        overflow: hidden;
    }
    .nav-capsule {
        gap: 8px;
        padding: 6px 10px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }
    .nav-brand-title { display: none; }
    .theme-text { display: none; }
    .nav-action-cluster { gap: 8px; flex-shrink: 0; }
    .theme-pill-btn { padding: 6px 10px; }
    .primary-nav-trigger { padding: 8px 14px; white-space: nowrap; }
    .magnetic-node { transform: none !important; }
    .hero-stage { padding: 110px 16px 48px; }
    .hero-monumental-heading { font-size: clamp(28px, 8vw, 42px); }
    .hero-lead-narrative { font-size: 15px; }
    .hero-cta-junction { flex-direction: column; width: 100%; }
    .epic-btn { width: 100%; }
    .section-boundary { padding: 0 16px; }
    .horizontal-pin-zone { height: auto; }
    .horizontal-track-container { width: 100%; left: auto; right: auto; margin-left: 0; margin-right: 0; overflow: hidden; }
    .horizontal-track { flex-direction: column; padding: 0 16px; }
    .horizontal-card { width: 100%; min-height: auto; }
    .footer-layout { flex-direction: column; gap: 16px; text-align: center; }
    .footer-legal-links { justify-content: center; }
    .auth-header { padding: 16px; }
    .auth-viewport { padding: 12px 16px 32px; align-items: flex-start; }
    .auth-card { padding: 28px 18px; border-radius: 22px; }
    .social-auth-grid { grid-template-columns: 1fr; }
    .legal-check a { white-space: normal; }
}
