/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --bg: #F8F9FB;
    --surface: #FFFFFF;
    --text: #0F172A;
    --muted: #64748B;
    
    --blue: #0066FF;
    --cyan: #00D6C9;
    --purple: #7C3AED;
    --accent-grad: linear-gradient(90deg, var(--blue), var(--cyan));
    
    --border: rgba(15, 23, 42, 0.06);
    --border-hover: rgba(0, 102, 255, 0.2);
    --shadow: 0 10px 40px -10px rgba(0, 102, 255, 0.15);
    --shadow-hover: 0 20px 60px -10px rgba(0, 102, 255, 0.25);

    --font-display: 'Syne', sans-serif;
    --font-body: 'Outfit', sans-serif;
    
    --tr: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== СБРОС ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    /* Живой анимированный градиент на фоне */
    background: linear-gradient(-45deg, #f8f9fb, #eef2ff, #f8f9fb, #e0f2fe);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Слой для частиц */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0.6;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
.container { width: min(1320px, 92%); margin-inline: auto; }

/* ===== ФОНОВЫЕ ПЯТНА ===== */
.glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}
.glow--1 {
    width: 600px; height: 600px;
    background: rgba(0, 102, 255, 0.15);
    top: -100px; right: -100px;
}
.glow--2 {
    width: 500px; height: 500px;
    background: rgba(0, 214, 201, 0.1);
    bottom: -100px; left: -100px;
}

/* ===== ТИПОГРАФИКА ===== */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.text-grad {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline;
}
.section-head {
    margin-bottom: 3rem;
}
.section-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--blue);
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}
.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--tr);
}
.btn--primary {
    background: var(--text);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}
.btn--primary:hover {
    background: var(--blue);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
}
.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn--ghost:hover {
    background: rgba(15, 23, 42, 0.03);
}
.btn--full { width: 100%; }

/* ===== ШАПКА ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--tr);
}
.header.scrolled {
    background: rgba(248, 249, 251, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border);
}
.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.logo span { color: var(--blue); font-weight: 500; margin-left: 0.2rem; }

.nav { display: flex; gap: 2rem; }
.nav__link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    transition: var(--tr);
}
.nav__link:hover { color: var(--blue); }

.header__actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* НОВЫЙ БЛОК С ДВУМЯ ТЕЛЕФОНАМИ */
.header__phones {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}
.header__phone {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}
.header__phone:hover { color: var(--blue); }

.burger {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 24px;
}
.burger span {
    display: block;
    height: 2px;
    background: var(--text);
    transition: var(--tr);
    border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
    padding: 10rem 0 6rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.badge__dot {
    width: 6px; height: 6px;
    background: var(--blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--blue);
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero__title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}
.hero__desc {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 480px;
    margin-bottom: 2.5rem;
}
.hero__actions {
    display: flex;
    gap: 1rem;
}

/* Dashboard */
.hero__dashboard {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.hero__dashboard::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent-grad);
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.dash-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.dash-status {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.dash-value {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
}
.dash-pct {
    font-size: 1.5rem;
    color: var(--blue);
    margin-left: 0.2rem;
    display: inline-block;
    animation: pulsePct 2s infinite ease-in-out;
}

@keyframes pulsePct {
    0% { transform: scale(1); text-shadow: 0 0 10px rgba(0, 102, 255, 0.3); }
    50% { transform: scale(1.15); text-shadow: 0 0 20px rgba(0, 102, 255, 0.8), 0 0 30px rgba(0, 214, 201, 0.5); }
    100% { transform: scale(1); text-shadow: 0 0 10px rgba(0, 102, 255, 0.3); }
}
.dash-chart {
    height: 150px;
    margin-bottom: 2rem;
    position: relative;
}
.chart-svg { width: 100%; height: 100%; overflow: visible; }

.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s cubic-bezier(0.25, 1, 0.5, 1);
}
.chart-area { opacity: 0; transition: opacity 1.5s ease 0.5s; }
.chart-dot { opacity: 0; transition: opacity 0.5s ease 1.8s; }
.hero__dashboard.visible .chart-line { stroke-dashoffset: 0; }
.hero__dashboard.visible .chart-area { opacity: 1; }
.hero__dashboard.visible .chart-dot { opacity: 1; }

.dash-footer {
    display: flex;
    gap: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.dash-stat { display: flex; flex-direction: column; }
.dash-stat__val { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.dash-stat__lbl { font-size: 0.75rem; color: var(--muted); }

/* ===== УСЛУГИ (BENTO) ===== */
.services { padding: 6rem 0; }
.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 1.5rem;
}
.bento-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: var(--tr);
    position: relative;
    overflow: hidden;
}
.bento-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.bento-card--large { grid-column: span 2; }
.bento-card--wide { grid-column: span 2; }

.bento-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.bento-title { font-size: 1.3rem; font-weight: 600; }
.bento-num { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--blue); opacity: 0.5; }
.bento-desc { font-size: 0.9rem; color: var(--muted); flex: 1; }

.bento-viz { margin-top: 2rem; height: 80px; display: flex; align-items: flex-end; position: relative; }

/* Анимации в карточках */
.mini-chart { width: 100%; height: 100%; overflow: visible; }
.mini-line { stroke-dasharray: 400; stroke-dashoffset: 400; }
.bento-card.visible .mini-line { animation: drawMiniLine 6s infinite cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes drawMiniLine {
    0% { stroke-dashoffset: 400; } 20% { stroke-dashoffset: 0; } 80% { stroke-dashoffset: 0; } 90% { stroke-dashoffset: 400; } 100% { stroke-dashoffset: 400; }
}

.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 100%; width: 100%; }
.bar { flex: 1; height: var(--h); background: var(--bg); border-radius: 4px 4px 0 0; transform: scaleY(0); transform-origin: bottom; }
.bento-card.visible .bar { background: var(--accent-grad); animation: growBar 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, playBar 1.5s infinite alternate ease-in-out; }
.bento-card.visible .bar:nth-child(1) { animation-delay: 0s, 0.8s; }
.bento-card.visible .bar:nth-child(2) { animation-delay: 0.1s, 1.1s; }
.bento-card.visible .bar:nth-child(3) { animation-delay: 0.2s, 1.0s; }
.bento-card.visible .bar:nth-child(4) { animation-delay: 0.3s, 1.3s; }
.bento-card.visible .bar:nth-child(5) { animation-delay: 0.4s, 1.2s; }
@keyframes growBar { 0% { transform: scaleY(0); } 100% { transform: scaleY(1); } }
@keyframes playBar { 0% { transform: scaleY(1); } 100% { transform: scaleY(0.4); } }

.wave-chart { width: 100%; height: 60px; }
.wave-line { stroke-dasharray: 600; stroke-dashoffset: 600; }
.bento-card.visible .wave-line { animation: drawWaveLine 5s infinite cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes drawWaveLine {
    0% { stroke-dashoffset: 600; } 20% { stroke-dashoffset: 0; } 80% { stroke-dashoffset: 0; } 90% { stroke-dashoffset: 600; } 100% { stroke-dashoffset: 600; }
}

.area-chart { width: 100%; height: 100%; overflow: visible; }
.area-line { stroke-dasharray: 800; stroke-dashoffset: 800; }
.area-fill { opacity: 0; }
.bento-card.visible .area-line { animation: drawAreaLine 7s infinite cubic-bezier(0.4, 0, 0.2, 1); }
.bento-card.visible .area-fill { animation: fadeAreaFill 7s infinite ease-in-out; }
@keyframes drawAreaLine {
    0% { stroke-dashoffset: 800; } 20% { stroke-dashoffset: 0; } 80% { stroke-dashoffset: 0; } 90% { stroke-dashoffset: 800; } 100% { stroke-dashoffset: 800; }
}
@keyframes fadeAreaFill {
    0% { opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 90% { opacity: 0; } 100% { opacity: 0; }
}

/* ===== ПРОЦЕСС ===== */
.process { padding: 6rem 0; }
.process__timeline { position: relative; padding-top: 2rem; }
.process__line { position: absolute; top: 3.3rem; left: 0; right: 0; height: 2px; background: var(--border); z-index: 1; }
.process__line-fill { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: var(--accent-grad); transition: width 1.5s ease-in-out; }
.process.visible .process__line-fill { width: 100%; }

.process__pulse {
    position: absolute; top: 50%; left: 0; width: 16px; height: 16px; background: #fff; border-radius: 50%; transform: translate(-50%, -50%);
    box-shadow: 0 0 20px 5px var(--cyan), 0 0 40px 10px var(--blue); opacity: 0; z-index: 3; pointer-events: none;
}
.process.visible .process__pulse { animation: travelBall 2.5s linear infinite; }
@keyframes travelBall {
    0% { left: 0%; opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    10% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    90% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { left: 100%; opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
}

.process__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; z-index: 4; }
.step { display: flex; flex-direction: column; align-items: flex-start; }
.step__dot { width: 16px; height: 16px; background: #fff; border: 3px solid var(--blue); border-radius: 50%; margin-bottom: 1.5rem; box-shadow: 0 0 0 4px var(--bg); transition: var(--tr); position: relative; }
.step:hover .step__dot { background: var(--blue); box-shadow: 0 0 0 4px var(--bg), 0 0 15px rgba(0, 102, 255, 0.4); }
.step__num { font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; color: var(--blue); margin-bottom: 0.5rem; }
.step__title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step__desc { font-size: 0.85rem; color: var(--muted); }

/* ===== КОНТАКТЫ ===== */
.contact { padding: 6rem 0; }
.contact__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 4rem;
    box-shadow: var(--shadow);
}
.contact__title { font-size: clamp(2rem, 4vw, 3.5rem); margin: 1rem 0 1.5rem; }
.contact__desc { color: var(--muted); margin-bottom: 2.5rem; max-width: 400px; }
.contact__info { display: flex; flex-direction: column; gap: 0.5rem; }

/* ОБНОВЛЕННЫЙ ТЕЛЕФОН (шрифт чуть меньше и line-height, чтобы 2 номера влезли) */
.contact__phone {
    font-family: var(--font-display);
    font-size: 1.8rem; /* Уменьшил с 2rem для аккуратности */
    font-weight: 700;
    color: var(--text);
    transition: var(--tr);
    line-height: 1.2;
}
.contact__phone:hover { color: var(--blue); }

.contact__email { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.05em; }

.form { display: flex; flex-direction: column; gap: 1.5rem; }
.form__group { position: relative; }
.form__input {
    width: 100%; background: transparent; border: 1px solid var(--border); border-radius: 8px;
    padding: 1.2rem 1rem 0.6rem; font-family: var(--font-body); font-size: 1rem; color: var(--text); transition: var(--tr); resize: none;
}
.form__input:focus { outline: none; border-color: var(--blue); }
.form__label {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-size: 0.9rem; color: var(--muted);
    pointer-events: none; transition: var(--tr);
}
.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label { top: 0.8rem; font-size: 0.7rem; color: var(--blue); font-weight: 600; letter-spacing: 0.05em; }
textarea.form__input { padding-top: 1.5rem; }
textarea.form__input + .form__label { top: 1.5rem; }

/* ===== ПОДВАЛ ===== */
.footer { padding: 2rem 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); }
.footer__brand { font-family: var(--font-display); font-weight: 800; color: var(--text); }
.footer__brand span { color: var(--blue); }
.footer__links a:hover { color: var(--blue); }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== АДАПТИВ ===== */
@media (max-width: 1024px) {
    .hero__inner { grid-template-columns: 1fr; gap: 3rem; }
    .hero__dashboard { max-width: 500px; }
    .bento { grid-template-columns: repeat(2, 1fr); }
    .bento-card--large, .bento-card--wide { grid-column: span 2; }
    .process__steps { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
    .process__line { display: none; }
    .contact__inner { grid-template-columns: 1fr; padding: 2.5rem; gap: 3rem; }
}

@media (max-width: 768px) {
    .nav, .header__phones { display: none; } /* Скрываем блок с телефонами на мобилке */
    .burger { display: flex; }
    
    .hero { padding-top: 7rem; }
    .hero__title { font-size: clamp(2.5rem, 10vw, 3.5rem); }
    .dash-value { font-size: 3rem; }
    
    .bento { grid-template-columns: 1fr; }
    .bento-card--large, .bento-card--wide { grid-column: span 1; }
    
    .process__steps { grid-template-columns: 1fr; gap: 2rem; }
    
    .contact__inner { padding: 2rem; border-radius: 16px; }
    .contact__phone { font-size: 1.5rem; } /* На мобилке телефоны будут чуть меньше */
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(150%);
    width: min(800px, 92%); background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(15px);
    border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem;
    display: flex; justify-content: space-between; align-items: center; gap: 2rem;
    box-shadow: 0 10px 40px rgba(0, 102, 255, 0.15); z-index: 9999; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.cookie-banner.show { transform: translateX(-50%) translateY(0); }
.cookie-banner p { font-size: 0.9rem; color: var(--text); margin: 0; line-height: 1.5; }
.cookie-banner a { color: var(--blue); text-decoration: underline; font-weight: 500; }
@media (max-width: 768px) {
    .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; gap: 1rem; padding: 1.2rem; }
}

/* ===== ЧЕКБОКС СОГЛАСИЯ ===== */
.checkbox-wrap { display: flex; align-items: flex-start; gap: 0.8rem; cursor: pointer; margin-bottom: 0.5rem; user-select: none; }
.checkbox-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-box { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 4px; background: transparent; flex-shrink: 0; position: relative; transition: var(--tr); margin-top: 2px; }
.checkbox-wrap:hover .checkbox-box { border-color: var(--blue); }
.checkbox-wrap input:checked + .checkbox-box { background: var(--blue); border-color: var(--blue); }
.checkbox-wrap input:checked + .checkbox-box::after {
    content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.checkbox-text { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.checkbox-text a { color: var(--blue); text-decoration: underline; font-weight: 500; }
.checkbox-text a:hover { color: var(--text); }