/* Mulu Parts - Main Theme & Base CSS (v3) */

:root {
    --bg-dark: #030405;
    --text-main: #ffffff;
    --text-sub: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #ffffff;
    --accent-dark: #000000;
    --accent-blue: #38bdf8;
    --surface: rgba(255, 255, 255, 0.02);
    --surface-hover: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.25);
    --card-bg: rgba(11, 15, 23, 0.94);
    --card-border: rgba(255, 255, 255, 0.14);
    --blur: blur(20px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scrollbar-gutter: stable;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

html.modal-open,
body.modal-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, transparent 10%, var(--bg-dark) 90%);
    z-index: 1;
    pointer-events: none;
}
h1, h2, h3, h4 {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: -0.03em;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px;
    background: #ffffff;
    color: #040810;
    font-weight: 600;
    font-size: 15px;
    border-radius: 40px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #ffffff;
    cursor: pointer;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
    background: #e2e8f0;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
    border-radius: 40px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    position: relative;
    text-decoration: none;
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---------- Hero & Sections ---------- */
.hero-track {
    position: relative;
    min-height: 82vh;
    padding-top: 100px;
    padding-bottom: 40px;
    display: flex;
    align-items: center;
}
.hero-sticky {
    position: relative;
    width: 100%;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 2;
    padding: 24px 48px;
    box-sizing: border-box;
    overflow: visible;
    background: radial-gradient(ellipse at 20% 50%, rgba(3, 4, 5, 0.96) 0%, rgba(3, 4, 5, 0.84) 42%, rgba(3, 4, 5, 0) 80%);
}
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%) scale(1.05);
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.2) contrast(1.2) grayscale(0.6);
    transition: transform 2s ease;
}
.hero-video.ready {
    transform: translate(-50%, -50%) scale(1);
    filter: brightness(0.25) contrast(1.1) grayscale(0.4);
}

/* 3D Canvas - Балансировка спорткара и фокуса формы */
#keyCanvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.72;
    mask-image: radial-gradient(ellipse 65% 85% at 75% 50%, rgba(0,0,0,1) 40%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0.02) 95%);
    -webkit-mask-image: radial-gradient(ellipse 65% 85% at 75% 50%, rgba(0,0,0,1) 40%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0.02) 95%);
    transition: opacity 0.4s ease;
}

.hero-content {
    position: relative;
    z-index: 4;
    text-align: left;
    max-width: 730px;
    width: 100%;
}
.hero-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}
.hero-badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 8px #4ade80;
}
.hero-content h1 {
    font-size: 54px;
    line-height: 1.08;
    margin: 14px 0 16px;
    letter-spacing: -1.5px;
    color: #ffffff;
}
.hero-content .sub {
    font-size: 16px;
    color: var(--text-sub);
    margin-bottom: 24px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .hero-track { min-height: auto; padding-top: 80px; padding-bottom: 20px; }
    .hero-sticky { justify-content: center; padding: 20px 24px; background: none; }
    .hero-content { text-align: center; }
    .hero-content h1 { font-size: 38px; }
}

.section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 100px 48px 60px;
    position: relative;
    z-index: 5;
}
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 { font-size: 42px; margin-bottom: 16px; color: #ffffff; }
.section-header p { color: var(--text-muted); font-size: 18px; }

/* ─── Карточка экспресс-заявки Hero (Concierge Card) ─── */
.hero-concierge-card {
    background: var(--card-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
    margin-bottom: 22px;
}

.hero-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.hero-card-title {
    font-size: 14.5px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.2px;
}
.hero-live-badge {
    font-size: 12px;
    color: #4ade80;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hero-live-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
    animation: livePulse 2s infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* ─── Табы режимов Hero ─── */
.hero-modes-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 18px;
    background: rgba(0, 0, 0, 0.45);
    padding: 5px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
}
.hero-mode-tab {
    padding: 10px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.hero-mode-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}
.hero-mode-tab.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.hero-mode-pane {
    animation: fadeIn 0.22s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Режим 1: Поиск детали ─── */
.hero-single-grid {
    display: flex;
    gap: 10px;
    align-items: center;
}
.hero-single-input-wrap {
    flex: 1;
    min-width: 250px;
}
#heroQuickInput {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;
    padding: 0 16px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
#heroQuickInput:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}
#heroQuickInput::placeholder {
    color: #94a3b8;
}

.hero-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 13px;
    padding: 0 16px;
    color: var(--text-sub);
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
    flex-shrink: 0;
}
.hero-upload-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.hero-submit-btn {
    height: 48px;
    padding: 0 30px;
    border-radius: 13px;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    background: #ffffff !important;
    color: #040810 !important;
    font-weight: 600 !important;
    font-size: 14.5px !important;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.16) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-submit-btn:hover {
    background: #e2e8f0 !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.25) !important;
}

/* ─── Режим 2: Смета ─── */
#heroEstimateInput {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 13px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 13.5px;
    outline: none;
    resize: vertical;
    margin-bottom: 12px;
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
#heroEstimateInput:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}
#heroEstimateInput::placeholder {
    color: #64748b;
}

.hero-estimate-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ─── Режим 3: Комплект ТО (Высококонтрастные карточки-чипы) ─── */
.to-helper-header {
    font-size: 13px;
    color: var(--text-sub);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.to-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.to-chip {
    display: block;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.to-chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.to-chip-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px 14px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.to-chip:hover .to-chip-content {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}
.to-chip-input:checked + .to-chip-content {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 4px 18px rgba(56, 189, 248, 0.12), inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}
.to-chip-icon {
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    transition: background 0.2s;
}
.to-chip-input:checked + .to-chip-content .to-chip-icon {
    background: rgba(56, 189, 248, 0.2);
}
.to-chip-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.to-chip-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
}
.to-chip-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.2;
}
.to-chip-input:checked + .to-chip-content .to-chip-desc {
    color: var(--text-sub);
}
.to-chip-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}
.to-chip-input:checked + .to-chip-content .to-chip-check {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #040810;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.to-submit-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.to-note {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ─── Преимущества & Мост в мессенджеры ─── */
.hero-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
    color: var(--text-sub);
}
.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hero-feature-item b {
    color: #ffffff;
}

.hero-messenger-bridge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
}
.btn-messenger {
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.btn-messenger:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}