/* ===== SELF-HOSTED FONTS ===== */
/* Inter — latin */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter — cyrillic */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Inter — latin-ext */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono — latin */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/jetbrains-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono — cyrillic */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/jetbrains-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ===== DESIGN TOKENS (same as trainer) ===== */
:root {
    --color-bg: #111114;
    --color-bg-elevated: #19191d;
    --color-bg-card: #1f1f24;
    --color-bg-card-hover: #262630;
    --color-surface: #27272d;
    --color-text: #fafafa;
    --color-text-secondary: #a1a1aa;
    --color-text-muted: #71717a;
    --color-text-dim: #3f3f46;
    --color-accent: #e4e4e7;
    --color-accent-subtle: rgba(228, 228, 231, 0.08);
    --color-brand: #2dd4bf;
    --color-brand-subtle: rgba(45, 212, 191, 0.08);
    --color-border: #2a2a30;
    --color-border-hover: #3a3a42;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ===== LAYOUT ===== */
.l-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
.l-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(17, 17, 20, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s ease, background 0.4s ease;
}

.l-header.scrolled {
    border-bottom-color: var(--color-border);
    background: rgba(17, 17, 20, 0.88);
}

.l-header__inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.l-header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.l-header__logo img {
    width: 24px;
    height: 29px;
}

.l-header__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.l-header__link {
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 450;
    color: var(--color-text-muted);
    border-radius: var(--radius-xs);
    transition: color 0.2s ease, background 0.2s ease;
}

.l-header__link:hover {
    color: var(--color-text-secondary);
    background: var(--color-accent-subtle);
}

/* Language toggle */
.l-lang-toggle {
    margin-left: 8px;
    padding: 5px 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font-sans);
}

.l-lang-toggle:hover {
    color: var(--color-text-secondary);
    border-color: var(--color-border-hover);
    background: var(--color-accent-subtle);
}

.l-header__cta {
    margin-left: 12px;
    padding: 7px 18px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-bg);
    background: var(--color-text);
    border-radius: var(--radius-xs);
    transition: background 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.l-header__cta:hover {
    background: var(--color-text-secondary);
}

.l-header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 6px;
    margin-left: auto;
}

.l-header__burger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--color-text-secondary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.l-header__burger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.l-header__burger.open span:nth-child(2) {
    opacity: 0;
}
.l-header__burger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ===== MOBILE NAV ===== */
.l-mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(17, 17, 20, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.3s var(--ease-out), opacity 0.3s ease, visibility 0s 0.3s;
}

.l-mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.3s var(--ease-out), opacity 0.3s ease, visibility 0s 0s;
}

.l-mobile-nav__link {
    padding: 10px 12px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    border-radius: var(--radius-xs);
    transition: background 0.2s ease;
}

.l-mobile-nav__link:hover {
    background: var(--color-accent-subtle);
}

.l-mobile-nav__cta {
    margin-top: 8px;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-bg);
    background: var(--color-text);
    border-radius: var(--radius-xs);
    text-align: center;
}

/* ===== HERO ===== */
.l-hero {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    overflow: hidden;
}

.l-hero__glow {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(45, 212, 191, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.l-hero__content {
    position: relative;
    z-index: 1;
}

.l-hero__logo img {
    width: 100px;
    height: auto;
    margin: 0 auto 32px;
    filter: drop-shadow(0 8px 40px rgba(45, 212, 191, 0.12));
}

.l-hero__title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-bottom: 20px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.l-hero__subtitle {
    font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
    color: var(--color-text-muted);
    line-height: 1.65;
    max-width: 560px;
    margin: 0 auto 40px;
    font-weight: 400;
}

.l-hero__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.l-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.l-btn--primary {
    background: var(--color-text);
    color: var(--color-bg);
}

.l-btn--primary:hover {
    background: var(--color-text-secondary);
}

.l-btn--primary svg {
    opacity: 0.7;
}

.l-btn--ghost {
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.l-btn--ghost:hover {
    color: var(--color-text-secondary);
    border-color: var(--color-border-hover);
    background: var(--color-accent-subtle);
}

.l-btn--lg {
    padding: 13px 32px;
    font-size: 0.9375rem;
}

/* ===== SECTIONS ===== */
.l-section {
    padding: 100px 0;
}

.l-section--alt {
    background: var(--color-bg-elevated);
}

.l-section__header {
    text-align: center;
    margin-bottom: 56px;
}

.l-section__label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-brand);
    margin-bottom: 12px;
}

.l-section__title {
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.l-section__desc {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== FEATURES ===== */
.l-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.l-feature-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: border-color 0.3s ease, transform 0.4s var(--ease-out);
    transition-delay: var(--d, 0s);
}

.l-feature-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
}

.l-feature-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-brand-subtle);
    border: 1px solid rgba(45, 212, 191, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.l-feature-card__icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-brand);
}

.l-feature-card__title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.l-feature-card__desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ===== TERMINAL DEMO ===== */
.l-section--terminal {
    padding-bottom: 100px;
}

.l-terminal {
    max-width: 720px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: #0a0a0e;
    box-shadow:
        0 2px 40px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(45, 212, 191, 0.03);
}

.l-terminal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
}

.l-terminal__dots {
    display: flex;
    gap: 6px;
}

.l-terminal__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    opacity: 0.7;
}

.l-terminal__dot--red { background: #ff5f57; }
.l-terminal__dot--yellow { background: #febc2e; }
.l-terminal__dot--green { background: #28c840; }

.l-terminal__tab {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--color-text-dim);
    letter-spacing: 0.01em;
}

.l-terminal__body {
    padding: 20px 22px;
    height: 360px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.7;
    scrollbar-width: thin;
    scrollbar-color: #2a2a30 transparent;
}

.l-terminal__body::-webkit-scrollbar {
    width: 4px;
}

.l-terminal__body::-webkit-scrollbar-track {
    background: transparent;
}

.l-terminal__body::-webkit-scrollbar-thumb {
    background: #2a2a30;
    border-radius: 2px;
}

/* Prompt line */
.t-prompt-line {
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin-top: 4px;
}

.t-prompt-line:first-child {
    margin-top: 0;
}

.t-ps {
    color: var(--color-brand);
    margin-right: 8px;
    user-select: none;
    flex-shrink: 0;
}

.t-cmd {
    color: #e2e8f0;
    font-weight: 500;
}

.t-cursor {
    display: inline-block;
    width: 7px;
    height: 15px;
    background: var(--color-brand);
    opacity: 0.85;
    animation: blink 1s step-end infinite;
    margin-left: 1px;
    vertical-align: middle;
    flex-shrink: 0;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Output lines */
.t-output {
    color: #c4c4cc;
    line-height: 1.7;
    white-space: pre;
}

.t-output--green { color: #22c55e; }
.t-output--cyan { color: #2dd4bf; }
.t-output--dim { color: #52525b; }
.t-output--yellow { color: #ca8a04; }

/* ===== COURSES ===== */
.l-courses {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.l-course-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: border-color 0.3s ease, transform 0.4s var(--ease-out);
    position: relative;
}

.l-course-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
}

.l-course-card__icon-wrap {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-brand-subtle);
    border: 1px solid rgba(45, 212, 191, 0.1);
    border-radius: var(--radius-xs);
    margin-bottom: 18px;
}

.l-course-card__icon-wrap svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-brand);
}

.l-course-card__title {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin-bottom: 6px;
}

.l-course-card__desc {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin-bottom: 16px;
}

.l-course-card__badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.6875rem;
    font-weight: 500;
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
    background: var(--color-accent-subtle);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    color: var(--color-text-muted);
}

/* ===== HOW IT WORKS (STEPS) ===== */
.l-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.l-step {
    flex: 1;
    max-width: 300px;
    text-align: center;
    padding: 0 24px;
}

.l-step__num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-brand);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.l-step__icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.l-step__icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-text-secondary);
}

.l-step__title {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.l-step__desc {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.l-step__connector {
    display: flex;
    align-items: center;
    padding-top: 64px;
    flex-shrink: 0;
}

.l-step__connector svg {
    width: 40px;
    height: 24px;
    stroke: var(--color-text-dim);
}

/* ===== STATS ===== */
.l-stats {
    padding: 64px 0;
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.l-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    text-align: center;
}

.l-stat {
    padding: 16px;
}

.l-stat__value {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    display: inline;
}

.l-stat__suffix {
    font-family: var(--font-mono);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 600;
    color: var(--color-brand);
    display: inline;
}

.l-stat__label {
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ===== CTA ===== */
.l-cta {
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.l-cta__line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-brand), transparent);
    opacity: 0.4;
}

.l-cta__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    margin-bottom: 14px;
}

.l-cta__desc {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    max-width: 480px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.l-footer {
    padding: 32px 0;
    border-top: 1px solid var(--color-border);
}

.l-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.l-footer__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: -0.02em;
}

.l-footer__brand img {
    width: 20px;
    height: 24px;
}

.l-footer__links {
    display: flex;
    gap: 24px;
}

.l-footer__links a {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.l-footer__links a:hover {
    color: var(--color-text-secondary);
}

.l-footer__copy {
    font-size: 0.75rem;
    color: var(--color-text-dim);
}

/* ===== ANIMATIONS ===== */

/* Hero entrance */
.anim-hero {
    opacity: 0;
    transform: translateY(24px);
    animation: heroIn 0.7s var(--ease-out) forwards;
    animation-delay: var(--d, 0s);
}

@keyframes heroIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children inside revealed containers */
.reveal.revealed .l-feature-card,
.reveal.revealed .l-course-card,
.reveal.revealed .l-step,
.reveal.revealed .l-stat {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.5s var(--ease-out) forwards;
    animation-delay: var(--d, 0s);
}

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .l-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .l-courses {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .l-steps {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .l-step {
        max-width: 400px;
    }

    .l-step__connector {
        display: none;
    }

    .l-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .l-header__nav,
    .l-header__cta {
        display: none;
    }

    .l-lang-toggle {
        margin-left: auto;
    }

    .l-header__burger {
        display: flex;
        margin-left: 8px;
    }

    .l-hero {
        padding: 130px 0 72px;
    }

    .l-hero__logo img {
        width: 80px;
        margin-bottom: 24px;
    }

    .l-hero__title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .l-hero__subtitle {
        font-size: 0.875rem;
    }

    .l-hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .l-section {
        padding: 72px 0;
    }

    .l-section__header {
        margin-bottom: 40px;
    }

    .l-courses {
        grid-template-columns: 1fr;
    }

    .l-stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .l-stats {
        padding: 48px 0;
    }

    .l-cta {
        padding: 72px 0;
    }

    .l-footer__inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .l-footer__links {
        gap: 16px;
    }

    .l-container {
        padding: 0 16px;
    }
}

/* ===== WAITLIST MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s 0.25s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s 0s;
}

.modal {
    width: 100%;
    max-width: 400px;
    margin: 16px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 36px 32px;
    position: relative;
    transform: translateY(12px) scale(0.97);
    transition: transform 0.25s var(--ease-out);
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    border-radius: var(--radius-xs);
    transition: color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.modal__close:hover {
    color: var(--color-text);
    background: var(--color-accent-subtle);
}

.modal__title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.modal__desc {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin-bottom: 24px;
}

.modal__input {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    outline: none;
    transition: border-color 0.2s ease;
}

.modal__input::placeholder {
    color: var(--color-text-dim);
}

.modal__input:focus {
    border-color: var(--color-brand);
}

.modal__input--error {
    border-color: #ef4444;
}

.modal__submit {
    width: 100%;
    margin-top: 12px;
    padding: 11px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    color: var(--color-bg);
    background: var(--color-text);
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal__submit:hover {
    background: var(--color-text-secondary);
}

.modal__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal__msg {
    margin-top: 14px;
    font-size: 0.8125rem;
    text-align: center;
    line-height: 1.5;
}

.modal__msg--success {
    color: var(--color-brand);
}

.modal__msg--error {
    color: #ef4444;
}
