/* ==========================================================================
   LANDING PAGE
   Публичная страница — светлая тема, адаптивная от 320px до 1920px+
   ========================================================================== */

/* --- Переменные (на public-layout, чтобы модал-overlay тоже наследовал) --- */
.public-layout {
    --l-bg: #FDFCFA;
    --l-bg-alt: #F7F5F2;
    --l-text: #18181B;
    --l-text-sub: #71717A;
    --l-text-muted: #A1A1AA;
    --l-purple: #3B82F6;
    --l-purple-deep: #2563EB;
    --l-purple-light: #60A5FA;
    --l-green: #14B8A6;
    --l-pink: #F472B6;
    --l-amber: #F59E0B;
    --l-blue: #3B82F6;
    --l-red: #EF4444;
    --l-radius: 14px;
    --l-radius-lg: 20px;
    --l-radius-xl: 24px;
    --l-font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --l-font-body: 'Inter', system-ui, sans-serif;
}

/* --- Базовый класс иконок --- */
.l-icon {
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================================
   AUTH MODAL (регистрация / логин)
   ========================================================================== */

.l-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #00000050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.l-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 16px 48px #00000030;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.l-modal__close {
    display: flex;
    justify-content: flex-end;
}

.l-modal__close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--l-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.l-modal__close-btn:hover {
    color: var(--l-text);
}

.l-modal__close-icon {
    width: 24px;
    height: 24px;
}

.l-modal__title {
    font-family: var(--l-font-heading);
    font-weight: 800;
    font-size: 28px;
    color: var(--l-text);
    text-align: center;
}

.l-modal__sub {
    font-size: 15px;
    color: var(--l-text-sub);
    text-align: center;
}

/* Поля формы */
.l-modal__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.l-modal__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.l-modal__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--l-text);
}

.l-modal__input-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--l-bg-alt);
    border: 1px solid #E4E4E7;
    border-radius: 12px;
    transition: border-color 0.15s, background 0.15s;
}

.l-modal__input-wrap:focus-within {
    border-color: var(--l-purple);
    background: var(--l-bg);
}

.l-modal__input-wrap--error {
    background: #FEF2F2;
    border-color: var(--l-red);
}

.l-modal__input-wrap--error:focus-within {
    border-color: var(--l-red);
    background: #FEF2F2;
}

.l-modal__input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--l-font-body);
    font-size: 15px;
    color: var(--l-text);
    outline: none;
}

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

.l-modal__eye-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--l-text-muted);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 8px;
}

.l-modal__eye-icon {
    width: 20px;
    height: 20px;
}

.l-modal__error {
    display: flex;
    align-items: center;
    gap: 6px;
}

.l-modal__error-icon {
    width: 14px;
    height: 14px;
    stroke: var(--l-red);
    flex-shrink: 0;
}

.l-modal__error-text {
    font-size: 13px;
    color: var(--l-red);
}

/* Поля кода подтверждения */
.l-modal__code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.l-modal__code-digit {
    width: 48px;
    height: 56px;
    border: 1px solid #E4E4E7;
    border-radius: 12px;
    background: var(--l-bg-alt);
    font-family: var(--l-font-body);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: var(--l-text);
    outline: none;
    transition: border-color 0.15s;
}

.l-modal__code-digit:focus {
    border-color: var(--l-purple);
    background: var(--l-bg);
}

/* Кнопка submit */
.l-modal__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    background: var(--l-purple);
    color: #fff;
    font-family: var(--l-font-body);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.l-modal__submit:hover {
    background: var(--l-purple-deep);
}

/* Разделитель «или» */
.l-modal__divider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.l-modal__divider-line {
    flex: 1;
    height: 1px;
    background: #E4E4E7;
}

.l-modal__divider-text {
    font-size: 13px;
    color: var(--l-text-muted);
}

/* Соцкнопки */
.l-modal__socials {
    display: flex;
    gap: 12px;
}

.l-modal__social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    font-family: var(--l-font-body);
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.l-modal__social-btn:hover {
    opacity: 0.9;
}

.l-modal__social-btn--google {
    background: #fff;
    color: var(--l-text);
    border: 1px solid #E4E4E7;
}

.l-modal__social-btn--google .l-modal__social-icon {
    color: #4285F4;
    font-weight: 700;
    font-size: 18px;
}

.l-modal__social-btn--facebook {
    background: #1877F2;
    color: #fff;
}

.l-modal__social-btn--facebook .l-modal__social-icon {
    font-weight: 700;
    font-size: 18px;
}

/* Ссылка переключения */
.l-modal__switch {
    font-size: 14px;
    color: var(--l-purple);
    text-align: center;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--l-font-body);
}

.l-modal__switch:hover {
    text-decoration: underline;
}

/* Мобильная адаптация модала */
@media (max-width: 480px) {
    .l-modal {
        padding: 24px;
        gap: 20px;
        border-radius: 16px;
    }

    .l-modal__title {
        font-size: 24px;
    }

    .l-modal__socials {
        flex-direction: column;
    }
}

/* --- Public layout: сброс ограничений #app (600px max-width, тёмный фон) --- */
#app:has(.public-layout) {
    max-width: none;
    background: #FDFCFA;
    overflow: visible;
}

body:has(.public-layout) {
    background: #FDFCFA;
}

.public-layout {
    background: #FDFCFA;
    min-height: 100vh;
    width: 100%;
}

/* --- Контейнер --- */
.landing {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--l-bg);
    color: var(--l-text);
    font-family: var(--l-font-body);
    overflow-x: hidden;
}

/* --- CTA кнопка (используется на info-pages) --- */
.l-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--l-purple);
    color: #fff;
    border-radius: var(--l-radius);
    font-family: var(--l-font-body);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.l-cta:hover {
    background: var(--l-purple-deep);
    transform: translateY(-1px);
}

.l-cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.l-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: calc(84px + var(--safe-top));
    padding: 0 24px;
    padding-top: calc(12px + var(--safe-top));
    background: var(--l-bg);
}

.l-navbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.l-navbar__logo-icon {
    flex-shrink: 0;
}

.l-navbar__logo-text {
    font-family: var(--l-font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--l-text);
}

.l-navbar__links {
    display: none;
    gap: 32px;
}

.l-navbar__links a {
    font-family: var(--l-font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--l-text-sub);
    text-decoration: none;
    transition: color 0.15s;
}

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

.l-navbar__buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.l-btn {
    font-family: var(--l-font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: opacity 0.15s;
    border: none;
}

.l-btn:hover {
    opacity: 0.85;
}

.l-btn--outline {
    background: transparent;
    border: 1px solid #E4E4E7;
    color: var(--l-text);
}

.l-btn--login {
    background: transparent;
    color: var(--l-text-sub);
    padding: 10px 8px;
}

.l-btn--login:hover {
    color: var(--l-text);
}

.l-btn--primary {
    background: var(--l-purple);
    color: #fff;
}

@media (min-width: 768px) {
    .l-navbar {
        padding: 0 48px;
    }
    .l-navbar__links {
        display: flex;
    }
    .l-btn--login {
        background: transparent;
        border: 1px solid #E4E4E7;
        color: var(--l-text);
        padding: 10px 20px;
    }
}

@media (min-width: 1024px) {
    .l-navbar {
        padding: 0 120px;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.l-footer {
    background: #FFFFFF;
    padding: 48px 24px;
}

.l-footer__columns {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.l-footer__col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.l-footer__col h4 {
    font-family: var(--l-font-body);
    font-size: 14px;
    font-weight: 700;
    color: #1A202C;
    letter-spacing: 0.5px;
    margin: 0;
}

.l-footer__col a {
    font-family: var(--l-font-body);
    font-size: 14px;
    font-weight: 400;
    color: #4A5568;
    text-decoration: none;
    transition: color 0.15s;
}

.l-footer__col a:hover {
    color: var(--l-purple);
}

.l-footer__divider {
    border: none;
    border-top: 1px solid #E2E8F0;
    margin: 40px 0 24px;
}

.l-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.l-footer__bottom-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--l-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--l-text);
}

.l-footer__copyright {
    font-family: var(--l-font-body);
    font-size: 13px;
    color: #9CA3AF;
}

.l-footer__tg-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9CA3AF;
    font-size: 13px;
    text-decoration: none;
    transition: color .2s;
}
.l-footer__tg-link:hover { color: #2AABEE; }

@media (min-width: 768px) {
    .l-footer {
        padding: 64px 48px;
    }
    .l-footer__columns {
        flex-direction: row;
    }
    .l-footer__col {
        flex: 1;
    }
    .l-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    .l-footer {
        padding: 64px 120px;
    }
}

/* ==========================================================================
   INFO PAGES (copyright, support, terms)
   ========================================================================== */

.l-info-page {
    padding: 40px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: calc(100vh - 72px - 200px);
}

.l-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--l-font-body);
    font-size: 14px;
}

.l-breadcrumbs__link {
    color: #3B82F6;
    text-decoration: none;
    transition: color 0.15s;
}

.l-breadcrumbs__link:hover {
    text-decoration: underline;
}

.l-breadcrumbs__sep {
    color: #9CA3AF;
}

.l-breadcrumbs__current {
    color: #4A5568;
}

.l-info-title {
    font-family: var(--l-font-heading);
    font-size: 28px;
    font-weight: 800;
    color: #1A202C;
    line-height: 1.2;
}

.l-info-subtitle {
    font-family: var(--l-font-body);
    font-size: 16px;
    color: #4A5568;
    line-height: 1.7;
    max-width: 700px;
}

.l-info-date {
    font-family: var(--l-font-body);
    font-size: 14px;
    color: #9CA3AF;
}

.l-info-content {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.l-info-content section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.l-info-content h2 {
    font-family: var(--l-font-heading);
    font-size: 20px;
    font-weight: 700;
    color: #1A202C;
    margin: 0;
}

.l-info-content p {
    font-family: var(--l-font-body);
    font-size: 16px;
    color: #4A5568;
    line-height: 1.7;
    margin: 0;
}

.l-info-content a {
    color: #3B82F6;
    text-decoration: none;
}

.l-info-content a:hover {
    text-decoration: underline;
}

.l-info-content ul {
    margin: 0;
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.l-info-content li {
    font-family: var(--l-font-body);
    font-size: 15px;
    color: #4A5568;
    line-height: 1.6;
}

.l-info-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--l-font-body);
    font-size: 15px;
}

.l-info-table th,
.l-info-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #E2E8F0;
    color: #4A5568;
}

.l-info-table th {
    font-weight: 600;
    color: #1A202C;
    font-size: 14px;
}

.l-info-table tbody tr:last-child td {
    border-bottom: none;
}

/* --- Support form --- */

.l-support-form {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.l-support-form--success {
    padding: 32px;
    background: #E8FFF0;
    border-radius: var(--l-radius);
    color: #14B8A6;
    font-family: var(--l-font-body);
    font-size: 16px;
    font-weight: 500;
}

.l-support-form__row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.l-support-form__note {
    font-family: var(--l-font-body);
    font-size: 13px;
    color: #9CA3AF;
}

.l-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.l-form-field__label {
    font-family: var(--l-font-body);
    font-size: 14px;
    font-weight: 500;
    color: #1A202C;
}

.l-form-field__input,
.l-form-field__select,
.l-form-field__textarea {
    font-family: var(--l-font-body);
    font-size: 15px;
    color: var(--l-text);
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 12px 16px;
    outline: none;
    background: #fff;
    transition: border-color 0.15s;
}

.l-form-field__input:focus,
.l-form-field__select:focus,
.l-form-field__textarea:focus {
    border-color: var(--l-purple);
}

.l-form-field__input::placeholder,
.l-form-field__textarea::placeholder {
    color: #A0AEC0;
}

.l-form-field__textarea {
    height: 160px;
    resize: vertical;
}

.l-form-field__select-wrap {
    position: relative;
}

.l-form-field__select {
    width: 100%;
    appearance: none;
    cursor: pointer;
    padding-right: 40px;
}

.l-form-field__chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #A0AEC0;
    pointer-events: none;
}

/* --- Delete account page --- */

.l-delete-form {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.l-delete-reasons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.l-delete-reason {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--l-font-body);
    font-size: 15px;
    color: #4A5568;
    transition: background 0.15s;
}

.l-delete-reason:hover {
    background: #F7FAFC;
}

.l-delete-reason--active {
    background: #EBF5FF;
    color: #1A202C;
}

.l-delete-reason__radio {
    display: none;
}

.l-delete-reason__dot {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    border: 2px solid #CBD5E0;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.l-delete-reason--active .l-delete-reason__dot {
    border-color: #3B82F6;
    box-shadow: inset 0 0 0 4px #3B82F6;
}

.l-delete-warning {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #FFF5F5;
    border: 1px solid #FED7D7;
    border-radius: 12px;
}

.l-delete-warning__icon {
    font-size: 24px;
    line-height: 1;
}

.l-delete-warning__text {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: var(--l-font-body);
    font-size: 15px;
    color: #4A5568;
    line-height: 1.6;
}

.l-delete-warning__text p {
    margin: 0;
}

.l-delete-warning__text ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.l-delete-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.l-delete-cancel {
    padding: 12px 24px;
    font-family: var(--l-font-body);
    font-size: 15px;
    color: #4A5568;
    background: none;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.l-delete-cancel:hover {
    background: #F7FAFC;
}

.l-delete-btn {
    padding: 12px 24px;
    font-family: var(--l-font-body);
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background: #4A5568;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.l-delete-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.l-delete-btn:not(:disabled):hover {
    background: #2D3748;
}

.l-delete-btn--danger {
    background: #E53E3E;
}

.l-delete-btn--danger:not(:disabled):hover {
    background: #C53030;
}

.l-delete-done {
    padding: 32px;
    background: #F7FAFC;
    border-radius: 12px;
    font-family: var(--l-font-body);
    font-size: 16px;
    color: #4A5568;
    line-height: 1.6;
}

.l-delete-done p {
    margin: 0;
}

.l-form-field__textarea--short {
    height: 100px;
}

/* --- Info pages: tablet --- */
@media (min-width: 768px) {
    .l-info-page {
        padding: 48px 48px 80px;
        gap: 32px;
    }

    .l-info-title {
        font-size: 36px;
    }

    .l-info-content h2 {
        font-size: 22px;
    }

    .l-support-form__row {
        flex-direction: row;
    }

    .l-support-form__row > .l-form-field {
        flex: 1;
    }
}

/* --- Info pages: desktop --- */
@media (min-width: 1024px) {
    .l-info-page {
        padding: 64px 120px 80px;
        gap: 40px;
    }
}
