/* static/main/css/landing.css */

:root {
    --brand-primary: #0284c7;
    --brand-accent: #38bdf8;
    --brand-dark: #0f172a;
    --brand-slate: #1e293b;
    --surface-card: #ffffff;
    --border-subtle: rgba(226, 232, 240, 0.8);
    --border-card: #cbd5e1;
    --text-title: #0f172a;
    --text-body: #475569;
    --text-muted: #94a3b8;
}

body {
    background-color: #f8fafc !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--text-title);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.landing-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 80px 24px;
    box-sizing: border-box;
}

/* --- НАВИГАЦИЯ --- */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 48px;
}

.brand-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo-icon {
    width: 76px !important;
    height: 52px !important;
    min-width: 76px !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 7px 14px !important;
    box-sizing: border-box !important;
    color: #0f172a !important;
    transition: all 0.2s ease !important;
}

.brand-logo-icon svg {
    width: 100% !important;
    height: 100% !important;
}

.brand-logo-wrap:hover .brand-logo-icon {
    border-color: #94a3b8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
}

.brand-logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--brand-dark);
}

.brand-logo-text span {
    color: var(--brand-primary);
}

.btn-lk-login {
    background: #ffffff;
    color: var(--brand-dark);
    border: 1px solid #cbd5e1;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-lk-login:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-1px);
}

/* --- HERO СЕКЦИЯ --- */
.hero-section {
    text-align: center;
    padding: 20px 0 20px 0;
}

.enterprise-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 24px;
}

.hero-headline {
    font-size: 44px;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -1.5px;
    line-height: 1.18;
    margin: 0 auto 16px auto;
    max-width: 920px;
}

.hero-subheadline {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-title);
    margin: 0 auto 20px auto;
    max-width: 860px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-body);
    max-width: 820px;
    margin: 0 auto 36px auto;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 45px;
}

/* Основная синяя кнопка */
.btn-main-cta {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.btn-main-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -5px rgba(2, 132, 199, 0.5);
}

.btn-main-cta.is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-main-cta.is-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: mdr-spin 0.8s linear infinite;
}

@keyframes mdr-spin {
    to { transform: rotate(360deg); }
}

/* Вторая кнопка (Видеообзор) */
.btn-secondary-cta {
    background: #ffffff;
    color: var(--brand-dark) !important;
    border: 1.5px solid #cbd5e1;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.btn-secondary-cta:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.1);
}

.btn-secondary-cta svg {
    color: var(--brand-primary);
}

/* --- MOCKUP ИНТЕРФЕЙСА --- */
.mockup-window {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 20px 50px -15px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    text-align: left;
    margin: 0 auto 40px auto;
}

.mockup-header {
    background: #1e293b;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-dot-red { background: #ef4444; }
.mockup-dot-yellow { background: #f59e0b; }
.mockup-dot-green { background: #10b981; }

.mockup-title {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.mockup-body {
    padding: 24px;
    background: #f8fafc;
}

.mockup-tree-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}

.mockup-tree-row.is-nested {
    padding-left: 20px;
}

.mockup-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mockup-row-left .project-name {
    color: #0284c7;
    font-weight: 800;
}

.mockup-row-left .stage-name {
    color: #94a3b8;
}

.mockup-row-left .task-name {
    color: #64748b;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.status-success { background: #dcfce7; color: #15803d; }
.status-danger { background: #fee2e2; color: #b91c1c; }
.status-warning { background: #fef3c7; color: #b45309; }

/* --- ОСНОВНЫЕ КАРТОЧКИ СЕКЦИЙ --- */
.card-premium {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    padding: 40px;
    box-shadow: 0 12px 35px -10px rgba(15, 23, 42, 0.04);
    margin-bottom: 30px;
}

.section-header {
    text-align: left;
    margin-bottom: 20px;
}

.section-tag {
    color: var(--brand-primary);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 6px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.6px;
    margin: 0;
}

.section-description {
    font-size: 16px;
    color: var(--text-body);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* --- СЕТКИ ВНУТРЕННИХ КАРТОЧЕК --- */
.feature-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.feature-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

/* Сетка для 2 карточек (ровно 50% / 50%) */
.feature-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
}

/* --- ВНУТРЕННИЕ КАРТОЧКИ (Увеличенный читаемый шрифт и четкий контур) --- */
.feature-item-card {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    padding: 30px 28px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.feature-item-card:hover {
    border-color: #94a3b8;
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.08);
}

.feature-icon-wrap {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-item-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 12px;
    line-height: 1.35;
}

.feature-item-text {
    font-size: 16px;
    color: var(--text-body);
    line-height: 1.6;
    margin: 0;
}

.archive-note-box {
    background: #f8fafc;
    border-left: 4px solid #0284c7;
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
    border-top: 1.5px solid #cbd5e1;
    border-right: 1.5px solid #cbd5e1;
    border-bottom: 1.5px solid #cbd5e1;
    margin-top: 16px;
}

.archive-note-text {
    margin: 0;
    font-size: 15.5px;
    color: #334155;
    font-weight: 500;
    line-height: 1.6;
}

/* --- CTA БЛОК --- */
.cta-final-card {
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
}

.cta-title {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.8px;
    margin: 0 0 16px 0;
}

.cta-description {
    font-size: 16.5px;
    color: #94a3b8;
    max-width: 720px;
    margin: 0 auto 36px auto;
    line-height: 1.6;
}

/* --- ПОДВАЛ --- */
.landing-footer {
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
    font-size: 13.5px;
    border-top: 1px solid var(--border-subtle);
}

.landing-footer-container {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.landing-footer-version {
    color: #94a3b8;
}

/* --- МОДАЛЬНОЕ ОКНО --- */
.mdr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    box-sizing: border-box;
}

.mdr-modal-overlay.is-active {
    display: flex;
}

.mdr-modal-window {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    padding: 36px;
    box-sizing: border-box;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: mdrModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes mdrModalIn {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.mdr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.mdr-modal-badge {
    display: inline-block;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mdr-modal-heading {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin: 0 0 6px 0;
}

.mdr-modal-subheading {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.mdr-modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
}

.mdr-modal-close-btn:hover {
    color: #0f172a;
}

.mdr-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mdr-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mdr-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.mdr-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}

.mdr-input, .mdr-textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 15px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mdr-input:focus, .mdr-textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.mdr-textarea {
    resize: vertical;
}

.mdr-modal-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
}

.mdr-modal-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.mdr-modal-actions {
    margin-top: 8px;
}

.mdr-modal-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
}

/* --- ПОЛНЫЙ МОБИЛЬНЫЙ АДАПТИВ (SMARTPHONES & TABLETS) --- */
@media (max-width: 768px) {
    .landing-wrapper { padding: 0 16px 50px 16px; }
    .landing-nav { padding: 16px 0; margin-bottom: 32px; }
    .hero-headline { font-size: 30px; letter-spacing: -1px; }
    .hero-subheadline { font-size: 17px; margin-bottom: 16px; }
    .hero-description { font-size: 16px; margin-bottom: 28px; }
    .card-premium, .cta-final-card { padding: 26px 18px; }
    .section-title { font-size: 23px; }

    /* Все сетки карточек на смартфонах складываются в 1 столбец */
    .feature-grid-4,
    .feature-grid-3,
    .feature-grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-item-card { padding: 22px 18px; }
    .feature-item-title { font-size: 17.5px; }
    .feature-item-text { font-size: 15px; }

    .hero-cta-group { flex-direction: column; width: 100%; }
    .btn-main-cta, .btn-secondary-cta { width: 100%; justify-content: center; box-sizing: border-box; }

    .landing-footer-container { justify-content: center; text-align: center; }
    .mdr-form-row-2 { grid-template-columns: 1fr; }
    .mdr-modal-window { padding: 24px 20px; }
}