/* ============================================================
   auth-landing.css  —  лендинговый вид стартовой страницы
   Применяется только при body.auth-landing-page
   ============================================================ */

/* ── Override body defaults from style.css ── */
body.auth-landing-page {
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ══════════════════════════════════════════════
   Slideshow
══════════════════════════════════════════════ */
.hero-slideshow {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    opacity: 0;
    filter: blur(3px) brightness(0.75);
    transition: opacity 1.3s ease-in-out;
}

.hero-slide.is-active {
    opacity: 1;
}

/* Dark gradient overlay — heavy left, lighter right */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(3, 10, 24, 0.24) 0%,
            rgba(3, 10, 24, 0.16) 28%,
            transparent 58%
        ),
        linear-gradient(
            125deg,
            rgba(0, 120, 212, 0.24) 0%,
            rgba(0, 120, 212, 0.14) 36%,
            rgba(98, 178, 254, 0.05) 68%,
            transparent 100%
        ),
        /* слева — затемнение под текст, мягче и с холодным оттенком */
        linear-gradient(
            to right,
            rgba(4, 16, 32, 0.72) 0%,
            rgba(5, 25, 48, 0.52) 35%,
            rgba(5, 19, 35, 0.20) 65%,
            rgba(0, 0, 0, 0.08) 100%
        ),
        /* виньетка сверху и снизу */
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.35) 0%,
            transparent 25%,
            transparent 75%,
            rgba(0, 0, 0, 0.45) 100%
        );
}

/* ══════════════════════════════════════════════
   Header
══════════════════════════════════════════════ */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 52px 18px;
}

/* ── Logo hover ── */
.landing-logo-img {
    height: 88px;
    width: auto;
    display: block;
    transition: transform 0.25s ease;
}

a:has(.landing-logo-img):hover .landing-logo-img {
    transform: scale(1.07);
}

.landing-contact-btn {
    --lcb-collapsed-width: 154px;
    --lcb-expanded-width: 340px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--lcb-collapsed-width);
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    color: #fff;
    padding: 12px 28px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.01em;
    overflow: hidden;
    will-change: width, background, border-color, box-shadow;
    transition:
        width 0.48s cubic-bezier(0.2, 0.8, 0.2, 1),
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    white-space: nowrap;
}

.landing-contact-btn:hover,
.landing-contact-btn:focus-visible {
    background: rgba(0, 120, 212, 0.22);
    border-color: rgba(0, 120, 212, 0.85);
    color: #62B2FE;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.18);
}

/* collapsed state: label visible */
.lcb-label {
    display: inline-block;
    width: 100%;
    opacity: 1;
    overflow: hidden;
    will-change: opacity, transform;
    transition: opacity 0.22s ease 0.12s, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
    white-space: nowrap;
}

/* expanded state: email area */
.lcb-expanded {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(var(--lcb-expanded-width) - 64px);
    opacity: 0;
    overflow: hidden;
    position: absolute;
    left: 28px;
    right: 28px;
    transform: translateY(4px);
    will-change: opacity, transform;
    transition: opacity 0.22s ease, transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
    white-space: nowrap;
    pointer-events: none;
}

.lcb-icon {
    width: 16px;
    height: 13px;
    flex-shrink: 0;
}

.lcb-email-text {
    display: inline-block;
    width: var(--lcb-email-width, auto);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    overflow: visible;
    user-select: text;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.35);
    text-underline-offset: 3px;
    transition: opacity 0.16s ease, transform 0.22s ease, text-decoration-color 0.15s;
}

.lcb-email-text:hover {
    text-decoration-color: rgba(255,255,255,0.75);
}

.lcb-close {
    display: none;
}

/* — is-expanded — */
.landing-contact-btn.is-expanded {
    width: var(--lcb-expanded-width);
    background: rgba(0, 120, 212, 0.22);
    border-color: rgba(0, 120, 212, 0.85);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.18);
    padding: 12px 28px;
}

.landing-contact-btn.is-expanded .lcb-label {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.landing-contact-btn.is-expanded .lcb-expanded {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.24s ease 0.14s, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s;
}

.landing-contact-btn.is-closing .lcb-expanded {
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Анимация появления скопированного текста */
@keyframes lcb-text-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lcb-email-text.is-copied {
    text-decoration-color: transparent;
    animation: lcb-text-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.lcb-email-text.is-swapping {
    opacity: 0;
    transform: translateY(-3px);
}

/* ══════════════════════════════════════════════
   Contact popup
══════════════════════════════════════════════ */
.landing-contact-popup {
    position: fixed;
    top: 70px;
    right: 52px;
    z-index: 200;
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    min-width: 220px;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.landing-contact-popup.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.landing-contact-popup__label {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.landing-contact-popup__email {
    font-size: 14px;
    font-weight: 600;
    color: #0078D4;
    text-decoration: none;
    display: block;
}

.landing-contact-popup__email:hover {
    text-decoration: underline;
}

.landing-contact-popup__no-email {
    font-size: 13px;
    color: #374151;
}

/* ══════════════════════════════════════════════
   Main two-column layout
══════════════════════════════════════════════ */
.landing-main {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 100vh;
    padding: 88px 52px 185px 60px;
    gap: 48px;
}

/* ── Left: headline ── */
.landing-hero-text {
    position: fixed;
    left: 60px;
    bottom: 175px;
    z-index: 20;
    flex: 1 1 0;
    color: #fff;
    max-width: 775px;
}

.landing-hero-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 16px 0;
}

.landing-hero-title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 22px 0;
    letter-spacing: 0;
    max-width: 780px;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.30);
}

.landing-hero-title span {
    display: block;
}

.landing-hero-desc {
    font-size: clamp(15px, 1.2vw, 18px);
    color: rgba(255, 255, 255, 0.78);
    max-width: 660px;
    line-height: 1.68;
    margin: 0;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.26);
}

/* ── Right: auth card ── */
.landing-auth-col {
    flex-shrink: 0;
    width: 390px;
}

/* ── Override auth-container for white card on landing ── */
body.auth-landing-page .auth-container {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.30) !important;
    padding: 32px 28px !important;

    /* Сразу видима — без задержки animate-reveal */
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
    animation: none !important;
    overflow: hidden !important;
}

body.auth-landing-page .auth-container::before {
    display: none !important;
}

/* Скрываем glass-декорации внутри контейнера */
body.auth-landing-page .auth-glass-layer-1,
body.auth-landing-page .auth-glass-layer-2,
body.auth-landing-page .auth-blob--top,
body.auth-landing-page .auth-blob--bottom,
body.auth-landing-page .auth-shimmer {
    display: none !important;
}

/* ── Form colors для белого фона ── */
body.auth-landing-page .form-tabs {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

body.auth-landing-page .form-tabs-pill {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

body.auth-landing-page .form-tab {
    color: #6b7280;
}

body.auth-landing-page .form-tab.active {
    color: #111827;
}

body.auth-landing-page .form-title {
    color: #111827;
}

body.auth-landing-page .form-subtitle {
    color: #6b7280;
}

body.auth-landing-page .form-label {
    color: #374151;
}

body.auth-landing-page .form-input {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #111827;
}

body.auth-landing-page .form-input::placeholder {
    color: #9ca3af;
}

body.auth-landing-page .form-input:focus {
    background: #fff;
    border-color: #0078D4;
}

body.auth-landing-page .input-icon {
    color: #9ca3af;
}

body.auth-landing-page .toggle-password {
    color: #9ca3af;
}

body.auth-landing-page .toggle-password:hover {
    color: #374151;
}

body.auth-landing-page .forgot-password {
    color: #0078D4;
}

body.auth-landing-page .code-check-btn {
    color: #0078D4;
    border-color: #0078D4;
}

/* ══════════════════════════════════════════════
   Quote card (right column)
══════════════════════════════════════════════ */
.landing-quote-card {
    position: fixed;
    bottom: 90px;
    right: 52px;
    z-index: 100;
    width: 360px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px) saturate(170%) brightness(1.08);
    -webkit-backdrop-filter: blur(24px) saturate(170%) brightness(1.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 24px 26px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.26),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

/* Liquid glass specular highlight */
.landing-quote-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        130deg,
        rgba(255, 255, 255, 0.09) 0%,
        rgba(255, 255, 255, 0.03) 35%,
        rgba(255, 255, 255, 0) 65%
    );
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

.landing-quote-body,
.landing-quote-footer {
    position: relative;
    z-index: 2;
}

.landing-quote-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.landing-quote-mark {
    font-size: 42px;
    line-height: 1;
    color: #62B2FE;
    font-family: Georgia, serif;
    flex-shrink: 0;
    opacity: 0.9;
    margin-top: 1px;
}

.landing-quote-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.68;
    color: rgba(255, 255, 255, 0.90);
    margin: 0;
    font-style: italic;
}

.landing-quote-footer {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.landing-quote-author {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.50);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════
   Legal links (repositioned)
══════════════════════════════════════════════ */
body.auth-landing-page nav.auth-legal-links {
    position: fixed;
    bottom: 20px;
    right: 52px;
    z-index: 100;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

body.auth-landing-page nav.auth-legal-links a {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

body.auth-landing-page nav.auth-legal-links a:hover {
    color: rgba(255, 255, 255, 0.92);
}

.landing-copyright {
    position: fixed;
    bottom: 20px;
    left: 52px;
    z-index: 100;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.70);
    margin: 0;
}

/* ══════════════════════════════════════════════
   auth-support hidden (JS использует его ID)
══════════════════════════════════════════════ */
body.auth-landing-page .auth-support {
    display: none !important;
}

/* ══════════════════════════════════════════════
   CTA card (на лендинге вместо формы входа)
══════════════════════════════════════════════ */
.landing-cta-card {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 20px;
    padding: 40px 36px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.landing-cta-label {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    letter-spacing: 0.02em;
    margin: 0;
}

.lp-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #0078D4;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    padding: 14px 52px;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.lp-cta-btn:hover,
.lp-cta-btn:focus-visible {
    background: #f0f9ff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.24);
    transform: translateY(-1px);
    outline: none;
}

/* Синяя кнопка «Начать» — фиксирована на уровне нижней части цитаты ————————————————————— */
.lp-start-btn {
    position: fixed;
    bottom: 90px;
    left: 60px;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0078D4;
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 999px;
    padding: 18px 84px;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 28px rgba(0, 120, 212, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.lp-start-btn:hover,
.lp-start-btn:focus-visible {
    background: #1a8fe8;
    box-shadow: 0 10px 36px rgba(0, 120, 212, 0.68), 0 0 0 4px rgba(0, 120, 212, 0.22);
    transform: translateY(-2px);
    outline: none;
}

.lp-support {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.lp-support__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
}

.lp-support__email {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.lp-support__email:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════════════
   Responsive
══════════════════════════════════════════════ */
@media (max-width: 960px) {
    body.auth-landing-page {
        min-height: 100svh;
        height: 100svh;
        overflow: hidden;
    }

    .hero-slide {
        background-position: center center;
        filter: blur(2px) brightness(0.62);
    }

    .hero-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(2, 8, 20, 0.76) 0%,
                rgba(3, 13, 30, 0.64) 42%,
                rgba(2, 8, 20, 0.84) 100%
            ),
            linear-gradient(
                135deg,
                rgba(0, 120, 212, 0.22) 0%,
                rgba(0, 120, 212, 0.12) 48%,
                transparent 100%
            );
    }

    .landing-main {
        min-height: 100svh;
        padding: 320px 24px 148px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
    }

    .landing-hero-text {
        position: static;
        display: block;
        width: 100%;
        max-width: 620px;
        margin: 0 auto;
        text-align: left;
    }

    .landing-hero-title {
        max-width: 100%;
        font-size: 40px;
        line-height: 1.16;
        margin-bottom: 18px;
    }

    .landing-hero-desc {
        max-width: 100%;
        font-size: 17px;
        line-height: 1.55;
    }

    .landing-quote-card {
        display: none;
    }

    .lp-start-btn {
        position: static;
        display: flex !important;
        width: fit-content;
        min-width: 240px;
        max-width: 100%;
        min-height: 60px;
        margin: 28px 0 0;
        padding: 0 64px;
        z-index: 25;
    }

    .landing-header {
        padding: 20px 24px 14px;
    }

    .landing-logo-img {
        height: 64px;
    }

    /* Логотип плавно скрывается при раскрытии кнопки «Связаться» */
    .landing-header a:has(.landing-logo-img) {
        overflow: hidden;
        max-width: 200px;
        transition:
            max-width 0.44s cubic-bezier(0.2, 0.8, 0.2, 1),
            opacity 0.32s ease;
    }

    .landing-header:has(.landing-contact-btn.is-expanded) a:has(.landing-logo-img) {
        max-width: 0;
        opacity: 0;
        pointer-events: none;
    }

    .landing-contact-btn {
        --lcb-collapsed-width: 132px;
        --lcb-expanded-width: calc(100vw - 48px);
        padding: 10px 20px;
        font-size: 16px;
    }

    /* Кнопка раскрывается прямо в хедере (не fixed) */
    .landing-contact-btn.is-expanded {
        width: var(--lcb-expanded-width);
        padding: 11px 22px;
    }

    .landing-contact-btn.is-expanded .lcb-expanded {
        left: 22px;
        right: 22px;
        width: auto;
        justify-content: center;
    }

    .landing-contact-btn.is-expanded .lcb-email-text {
        width: auto;
        max-width: calc(100vw - 112px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.auth-landing-page nav.auth-legal-links {
        left: 24px;
        right: 24px;
        bottom: 48px;
        justify-content: center;
        gap: 12px;
    }

    body.auth-landing-page nav.auth-legal-links a {
        font-size: 11px;
        text-align: center;
    }

    .landing-copyright {
        left: 24px;
        right: 24px;
        bottom: 20px;
        text-align: center;
    }

    .landing-contact-popup {
        right: 24px;
    }
}

@media (max-width: 480px) {
    .landing-main {
        padding: 260px 20px 154px;
    }

    .landing-header {
        padding: 18px 20px 12px;
    }

    .landing-logo-img {
        height: 56px;
    }

    .landing-header a:has(.landing-logo-img) {
        max-width: 180px;
    }

    .landing-contact-btn {
        --lcb-collapsed-width: 118px;
        --lcb-expanded-width: calc(100vw - 40px);
        font-size: 15px;
        padding: 9px 16px;
    }

    .landing-contact-btn.is-expanded {
        padding: 10px 18px;
    }

    .landing-contact-btn.is-expanded .lcb-expanded {
        left: 18px;
        right: 18px;
    }

    .landing-contact-btn.is-expanded .lcb-email-text {
        max-width: calc(100vw - 100px);
        font-size: 13px;
    }

    .landing-hero-title {
        font-size: 33px;
        line-height: 1.17;
    }

    .landing-hero-desc {
        font-size: 15px;
    }

    .lp-start-btn {
        min-width: 220px;
        max-width: 100%;
        min-height: 58px;
        margin-top: 24px;
        padding: 0 52px;
        font-size: 18px;
    }

    body.auth-landing-page nav.auth-legal-links {
        left: 20px;
        right: 20px;
        bottom: 46px;
        gap: 8px 14px;
    }

    body.auth-landing-page nav.auth-legal-links a {
        font-size: 10.5px;
    }

    .landing-copyright {
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 600px) {
    body.auth-landing-page nav.auth-legal-links {
        display: flex !important;
        left: 16px;
        right: 16px;
        bottom: 35px;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 14px;
        opacity: 0.78;
    }

    body.auth-landing-page nav.auth-legal-links a {
        font-size: 9px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .landing-copyright {
        display: block !important;
        left: 16px;
        right: 16px;
        bottom: 16px;
        font-size: 10px;
        line-height: 1.1;
        text-align: center;
        opacity: 0.72;
    }

    .landing-main {
        padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    }
}

/* Для очень коротких экранов (ландшафт или маленькие телефоны) */
@media (max-width: 960px) and (max-height: 620px) {
    .landing-main {
        padding-top: 160px;
    }
}
