/* ============================================
   РКМ-АВТОМАТИКА | STYLES
   ============================================ */

   :root {
    --black: #000000;
    --dark: #0a0a0a;
    --gray-dark: #1a1a1a;
    --gray: #333333;
    --gray-light: #666666;
    --white: #ffffff;
    --accent: #ff3d00;
    --accent-glow: rgba(255, 61, 0, 0.5);
    --accent-secondary: #00ffcc;
    --font-display: 'Unbounded', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
    cursor: default;
}

body.modal-open {
    overflow: hidden;
}

::selection {
    background: var(--accent);
    color: var(--black);
}

/* ============================================
   INTRO SCREEN - FAN ANIMATION
   ============================================ */

.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--black);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.intro-screen.fade-out {
    animation: introFadeOut 0.5s cubic-bezier(0.86, 0, 0.07, 1) forwards;
}

@keyframes introFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
        pointer-events: none;
    }
}

.fan-container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
}

.fan-line {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: absolute;
    white-space: nowrap;
    transform-origin: center center;
    opacity: 0;
    animation: fanReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards,
               fanRotate 6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    text-shadow: 0 0 30px var(--accent-glow);
}

.fan-line[data-delay="0"] { animation-delay: 0.1s, 0.1s; --rotate-start: -40deg; --rotate-end: 0deg; }
.fan-line[data-delay="1"] { animation-delay: 0.2s, 0.2s; --rotate-start: -30deg; --rotate-end: 0deg; }
.fan-line[data-delay="2"] { animation-delay: 0.3s, 0.3s; --rotate-start: -20deg; --rotate-end: 0deg; }
.fan-line[data-delay="3"] { animation-delay: 0.4s, 0.4s; --rotate-start: -10deg; --rotate-end: 0deg; }
.fan-line[data-delay="4"] { animation-delay: 0.5s, 0.5s; --rotate-start: 10deg; --rotate-end: 0deg; }
.fan-line[data-delay="5"] { animation-delay: 0.6s, 0.6s; --rotate-start: 20deg; --rotate-end: 0deg; }
.fan-line[data-delay="6"] { animation-delay: 0.7s, 0.7s; --rotate-start: 30deg; --rotate-end: 0deg; }
.fan-line[data-delay="7"] { animation-delay: 0.8s, 0.8s; --rotate-start: 40deg; --rotate-end: 0deg; }

@keyframes fanReveal {
    0% {
        opacity: 0;
        transform: rotate(var(--rotate-start)) translateY(100px) scale(0.5);
        filter: blur(20px);
    }
    100% {
        opacity: 1;
        transform: rotate(var(--rotate-start)) translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes fanRotate {
    0% {
        transform: rotate(var(--rotate-start)) translateY(0);
    }
    50% {
        transform: rotate(var(--rotate-end)) translateY(calc(var(--index, 0) * 60px - 200px));
    }
    100% {
        transform: rotate(0deg) translateY(calc(var(--index, 0) * 60px - 200px));
        opacity: 0;
    }
}

.fan-line[data-delay="0"] { --index: 0; }
.fan-line[data-delay="1"] { --index: 1; }
.fan-line[data-delay="2"] { --index: 2; }
.fan-line[data-delay="3"] { --index: 3; }
.fan-line[data-delay="4"] { --index: 4; }
.fan-line[data-delay="5"] { --index: 5; }
.fan-line[data-delay="6"] { --index: 6; }
.fan-line[data-delay="7"] { --index: 7; }

.intro-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: logoReveal 1s ease-out 0.3s forwards;
    position: relative;
}

.logo-label {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    letter-spacing: 0.5em;
    color: var(--gray-light);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.logo-text {
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 900;
    letter-spacing: 0.2em;
    line-height: 1;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    display: inline-block;
}

.logo-sub {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 2vw, 1.5rem);
    letter-spacing: 0.8em;
    color: var(--accent);
    margin-top: 1rem;
}

@keyframes logoReveal {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.main-content.visible {
    opacity: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 61, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 61, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.5;
    animation: particleFloat 10s infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.5; }
    50% { transform: translateY(-100px) translateX(50px); opacity: 1; }
}

.hero-content {
    text-align: center;
    z-index: 10;
    position: relative;
}

.glitch {
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.5em;
    color: var(--gray-light);
    margin-bottom: 1rem;
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    right: 0;
    opacity: 0.8;
}

.glitch::before {
    animation: glitch-1 2s infinite linear alternate-reverse;
    color: var(--accent);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 3s infinite linear alternate-reverse;
    color: var(--accent-secondary);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 95% 0); transform: translateX(-2px); }
    20% { clip-path: inset(30% 0 60% 0); transform: translateX(2px); }
    40% { clip-path: inset(50% 0 30% 0); transform: translateX(-2px); }
    60% { clip-path: inset(70% 0 20% 0); transform: translateX(1px); }
    80% { clip-path: inset(90% 0 5% 0); transform: translateX(-1px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(95% 0 0 0); transform: translateX(2px); }
    20% { clip-path: inset(60% 0 30% 0); transform: translateX(-2px); }
    40% { clip-path: inset(30% 0 50% 0); transform: translateX(2px); }
    60% { clip-path: inset(20% 0 70% 0); transform: translateX(-1px); }
    80% { clip-path: inset(5% 0 90% 0); transform: translateX(1px); }
}

.hero-title-wrap {
    display: flex;
    align-items: center; /* Было baseline - это часто ломает верстку при разных шрифтах */
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap; /* Позволяем перенос на мобильных, чтобы не ломало ширину */
    margin-bottom: 1.5rem;
    line-height: 1;
    position: relative; /* Чтобы трансформации не влияли на соседей */
    z-index: 2;
}

.hero-rkm {
    font-family: var(--font-display);
    font-size: clamp(3rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroGlow 3s ease-in-out infinite alternate;
    vertical-align: baseline;
    /* Фикс самого текста */
    display: inline-block;
    will-change: transform; /* Подсказываем браузеру, что элемент будет двигаться */
    transform: translateZ(0); /* Аппаратное ускорение */
    margin-top: -0.1em; /* Микро-коррекция вертикали */
}

@keyframes heroGlow {
    0% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
    100% { filter: drop-shadow(0 0 40px var(--accent-glow)); }
}

.hero-dash {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 6rem);
    color: var(--accent);
    font-weight: 300;
    /* Фикс "тире" */
    display: inline-block;
    vertical-align: middle; /* Выравнивание по центру */
}

.hero-auto {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--white);
}

.hero-tagline {
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.6;
    color: var(--gray-light);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1.2rem 2.5rem; /* Синхронизирован вертикальный padding с .btn-ai-hero */
    min-height: 56px; /* Фиксированная минимальная высота для синхронизации */
    box-sizing: border-box;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    border: 1px solid;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--black);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
    text-align: center;
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--black);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scroll-indicator span {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--gray-light);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ============================================
   SECTIONS COMMON
   ============================================ */

section {
    padding: 8rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.section-number {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    color: var(--gray);
    line-height: 1;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
}

.section-note {
    font-family: var(--font-mono);
    color: var(--gray-light);
    letter-spacing: 0.02em;
    max-width: 600px;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    line-height: 1.6;
    margin-top: 1rem;
    line-height: 1.4;
}

.section-disclaimer {
    padding: 1.5rem;
    background: rgba(255, 61, 0, 0.05);
    border: 1px solid var(--accent);
    border-radius: 8px;
    margin-bottom: 3rem;
    max-width: 900px;
}

.section-disclaimer p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-light);
}

.section-disclaimer strong {
    color: var(--accent);
    font-family: var(--font-display);
}

.competencies-wrapper {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--gray);
}

.competencies-subtitle {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin: 0 0 2rem 0;
    letter-spacing: 0.05em;
}

.competency-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.competency-label {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--gray);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--white);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.competency-label:hover {
    border-color: var(--accent);
    background: rgba(255, 61, 0, 0.1);
    color: var(--accent);
}

/* ============================================
   SERVICES
   ============================================ */

.services {
    background: linear-gradient(180deg, var(--black) 0%, var(--dark) 50%, var(--black) 100%);
    /* Добавляем overflow, чтобы не появлялся горизонтальный скролл */
    overflow-x: hidden; 
    position: relative;
}

.services-grid {
    display: grid;
    /* Уменьшаем минимальную ширину карточки до 280px для узких телефонов */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    /* ВАЖНО: Добавляем внутренние отступы, чтобы карточки не липли к краям */
    padding: 0 1rem; 
    width: 100%;
    /* Центрируем, если карточек мало */
    justify-content: center;
}

.service-card {
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    /* Фикс для карточки, чтобы она была аккуратной */
    width: 100%; /* Растягиваем на всю ширину ячейки грида */
    max-width: 500px; /* Ограничиваем, чтобы на больших экранах не были гигантскими */
    margin: 0 auto; /* Центрируем саму карточку в ячейке */
}

.service-card.open {
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(255, 61, 0, 0.15);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(255, 61, 0, 0.25);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    transition: stroke 0.3s ease;
}

.service-card:hover .service-icon svg {
    stroke: var(--accent-secondary);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.service-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.service-lead {
    color: var(--gray-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-card ul {
    list-style: none;
}

.service-list li {
    font-size: 0.9rem;
    color: var(--gray-light);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    transition: color 0.3s ease;
}

.service-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.service-card:hover .service-list li::before {
    opacity: 1;
    transform: translateX(0);
}

.service-card:hover .service-list li {
    color: var(--white);
}

.service-glow {
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover .service-glow {
    opacity: 0.3;
}

.service-toggle {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    color: var(--white);
    border: 1px solid var(--gray);
    padding: 0.75rem 1rem;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 10px 30px rgba(255, 61, 0, 0.1);
}

.service-toggle-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-weight: 600;
}

.service-details {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.service-details ul {
    margin-top: 1rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-details li {
    color: var(--gray-light);
    line-height: 1.5;
}

.service-case-btn {
    margin-top: 1.25rem;
    width: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    color: var(--black);
    border: none;
    padding: 1rem 1.25rem;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.service-case-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 61, 0, 0.2);
}

.case-template {
    display: none;
}

/* ============================================
   CASE MODAL
   ============================================ */

.case-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--black);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.case-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.case-modal {
    position: relative;
    background: var(--black);
    width: 100%;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.case-modal-header {
    position: sticky;
    top: 0;
    background: var(--black);
    padding: 2rem 3rem;
    border-bottom: 1px solid var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.case-modal-pill {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
}

.case-modal-close {
    background: transparent;
    border: 2px solid var(--gray);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.case-modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(90deg);
}

.case-modal-content {
    padding: 4rem 3rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

body.modal-open {
    overflow: hidden;
}

.case-modal-content h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.case-modal-content p {
    color: var(--gray-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.case-modal-content ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.case-modal-content li {
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--white);
}

.case-modal-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ============================================
   PRODUCTS SECTION
   ============================================ */

.products {
    background: linear-gradient(180deg, var(--black) 0%, var(--dark) 50%, var(--black) 100%);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    padding: 3rem;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(255, 61, 0, 0.1);
}

.product-card-highlight {
    border-color: var(--accent);
    background: rgba(255, 61, 0, 0.03);
}

.product-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--accent);
    color: var(--black);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.product-card h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.product-card p {
    color: var(--gray-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.product-features {
    list-style: none;
    margin-bottom: 2rem;
}

.product-features li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--white);
    line-height: 1.6;
}

.product-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.product-timeline {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    font-size: 0.95rem;
}

.product-timeline strong {
    color: var(--accent);
}

.products-note {
    text-align: center;
    padding: 2.5rem;
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    border-radius: 8px;
    max-width: 900px;
    margin: 0 auto;
}

.products-note p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray-light);
}

.products-note strong {
    color: var(--accent);
    font-family: var(--font-display);
}

/* ============================================
   POSTAI PRODUCT CARD (Compact)
   ============================================ */

.postai-card {
    background: var(--gray-dark);
    border: 2px solid var(--gray);
    padding: 2.5rem;
    border-radius: 12px;
    margin: 3rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.postai-card:hover {
    border-color: var(--accent);
}

.product-badge-soon {
    background: var(--accent-secondary);
}

/* Header */
.postai-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

.postai-main-logo {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.postai-intro {
    flex: 1;
}

.postai-header h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.postai-tagline {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin: 0 0 0.5rem 0;
}

.postai-desc {
    color: var(--gray-light);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Description Block */
.postai-description {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--gray);
    border-radius: 10px;
    margin-bottom: 2rem;
}

.postai-description p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-light);
}

.postai-description p:last-child {
    margin-bottom: 0;
}

.postai-description strong {
    color: var(--accent);
    font-family: var(--font-display);
}

/* Modules Grid */
.postai-modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.postai-module-tile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--gray);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.postai-module-tile:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.postai-module-tile img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.module-info strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 0.2rem;
}

.module-subtitle {
    display: block;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.module-info p {
    font-size: 0.9rem;
    color: var(--gray-light);
    line-height: 1.5;
    margin: 0;
}

/* Benefits */
.postai-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray);
    border-bottom: 1px solid var(--gray);
}

.benefit {
    padding: 0.5rem 1rem;
    background: rgba(255, 61, 0, 0.1);
    border: 1px solid var(--accent);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent);
}

/* Pricing Table */
.postai-pricing-table {
    margin-bottom: 2rem;
}

.pricing-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--gray);
    align-items: center;
}

.pricing-row-header {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px 6px 0 0;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-light);
}

.pricing-row-featured {
    background: rgba(255, 61, 0, 0.08);
    border-left: 3px solid var(--accent);
}

.pricing-row span {
    font-size: 0.95rem;
    color: var(--white);
}

.pricing-row span:nth-child(2) {
    color: var(--gray-light);
}

.pricing-row span:nth-child(3),
.pricing-row span:nth-child(4) {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--accent);
    text-align: right;
}

.pricing-row strong {
    color: var(--white);
}

/* CTA Button */
.postai-cta-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 8px;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.postai-cta-btn:hover {
    background: var(--accent);
    color: var(--black);
}

@media (max-width: 1000px) {
    .postai-modules-grid {
        grid-template-columns: 1fr;
    }
    
    .postai-module-tile {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .postai-module-tile img {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 768px) {
    .pricing-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .pricing-row-header span:nth-child(2) {
        display: none;
    }
    
    .pricing-row span:nth-child(2) {
        display: none;
    }
    
    .postai-benefits {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .postai-header {
        flex-direction: column;
        text-align: center;
    }
    
    .postai-module-tile {
        flex-direction: column;
        text-align: center;
    }
    
    .postai-module-tile img {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-card {
        padding: 2rem;
    }
}

/* ============================================
   ABOUT
   ============================================ */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-lead {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.highlight {
    color: var(--accent);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.highlight:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.about-text p:last-child {
    color: var(--gray-light);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-item {
    padding: 0.8rem 1.5rem;
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    cursor: default;
}

.tech-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 61, 0, 0.1);
}

.about-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--gray-dark);
    border-left: 3px solid var(--accent);
    transition: all 0.3s ease;
}

.benefit-item:hover {
    background: rgba(255, 61, 0, 0.05);
    transform: translateX(5px);
}

.benefit-icon {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: bold;
    flex-shrink: 0;
}

.benefit-item strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--white);
}

.benefit-item p {
    font-size: 0.9rem;
    color: var(--gray-light);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   CONTACT
   ============================================ */

.contact {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-content {
    text-align: center;
}

.contact-cta {
    margin-bottom: 6rem;
}

.contact-lead {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-promise {
    font-size: 1.1rem;
    color: var(--gray-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.contact-alt {
    margin-top: 2rem;
    font-size: 1rem;
    color: var(--gray-light);
}

.telegram-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.telegram-link:hover {
    color: var(--accent);
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-email:hover {
    color: var(--accent);
}

.email-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.contact-email:hover .email-icon {
    background: var(--accent);
    color: var(--black);
    transform: translateX(10px);
}

.contact-footer {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray);
    color: var(--gray-light);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 600;
}

.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.4;
}

.footer-legal p {
    margin: 0;
}

/* ============================================
   CASE MODAL
   ============================================ */

.case-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--black);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.case-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.case-modal {
    position: relative;
    background: var(--black);
    width: 100%;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.case-modal-overlay.active .case-modal {
    transform: none;
}

.case-modal-header {
    position: sticky;
    top: 0;
    background: var(--black);
    padding: 2rem 3rem;
    border-bottom: 1px solid var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.case-modal-pill {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
}

.case-modal-close {
    background: transparent;
    border: 2px solid var(--gray);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.case-modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(90deg);
}

.case-modal-content {
    padding: 4rem 3rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

@media (max-width: 768px) {
    .case-modal-header {
        padding: 1.5rem 1.5rem;
    }
    
    .case-modal-content {
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   CASE ITEMS (detailed case structure)
   ============================================ */

.case-item {
    margin-bottom: 5rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    position: relative;
}

.case-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -2.5rem;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--gray), transparent);
}

.case-item:last-child {
    margin-bottom: 0;
}

.case-item h4 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: var(--white);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.case-problem,
.case-solution,
.case-result {
    margin-bottom: 2.5rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    line-height: 1.8;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.case-problem strong,
.case-solution strong,
.case-result strong {
    display: block;
    margin-bottom: 0.8rem;
    font-family: var(--font-display);
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.case-problem {
    color: var(--gray-light);
}

.case-problem strong {
    color: #ff3d00;
}

.case-solution {
    color: var(--white);
}

.case-solution strong {
    color: #00ffcc;
}

.case-result {
    color: var(--white);
}

.case-result strong {
    color: #00ff88;
}

.case-tech-toggle {
    margin-top: 1rem;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--gray-light);
    color: var(--gray-light);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    width: auto;
    margin-bottom: 1rem;
}

.case-tech-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.case-tech {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--gray);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.case-tech p {
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1rem;
    color: var(--gray-light);
}

.case-tech p:last-child {
    margin-bottom: 0;
}

.case-tech strong {
    color: var(--accent);
}

.case-price {
    margin-top: 3rem;
    padding: 2rem;
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 12px;
    text-align: center;
    font-size: 1.4rem;
}

.case-price strong {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 1.2em;
}

.case-calculate-btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    color: var(--black);
    border: none;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.case-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 61, 0, 0.2);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .hero-title-wrap {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-dash {
        display: none;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    section {
        padding: 4rem 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem; /* Сохраняем отступы на мобильных */
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .contact-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .case-modal {
        width: 100%;
        max-height: 100vh;
        border: none;
    }
    
    .case-modal-content {
        padding: 2rem 1.5rem;
    }
    
    .case-item {
        padding: 1.5rem;
    }
    
    .case-problem,
    .case-solution,
    .case-result {
        padding: 1.2rem;
        font-size: 0.95rem;
    }
}

/* ============================================
   CUSTOM CURSOR (optional enhancement)
   ============================================ */

@media (hover: hover) {
    body {
        cursor: none;
    }
    
    .cursor {
        position: fixed;
        width: 20px;
        height: 20px;
        border: 2px solid var(--accent);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease;
        mix-blend-mode: difference;
    }
    
    .cursor-dot {
        position: fixed;
        width: 4px;
        height: 4px;
        background: var(--accent);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
    }
    
    .cursor.hover {
        width: 50px;
        height: 50px;
        border-color: var(--accent-secondary);
    }
}

/* ============================================
   AI ESTIMATOR STYLES
   ============================================ */

.ai-estimator {
    background: #050505;
    border-top: 1px solid var(--gray);
    position: relative;
    z-index: 1;
    overflow: visible;
    margin-bottom: 2rem; /* Дополнительный отступ снизу */
}

.estimator-disclaimer {
    padding: 1rem 1.5rem;
    background: rgba(255, 61, 0, 0.05);
    border: 1px solid var(--accent);
    border-radius: 8px;
    margin: 1.5rem auto 0;
    max-width: 900px;
    text-align: center;
}

.estimator-disclaimer p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-light);
    font-family: var(--font-mono);
}

.estimator-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    min-height: 600px;
    margin-top: 2rem;
}

.chat-column {
    display: flex;
    flex-direction: column;
}

/* Chat Interface */
.chat-interface {
    display: flex;
    flex-direction: column;
    background: var(--gray-dark);
    border: 1px solid var(--gray);
    border-radius: 12px;
    overflow: hidden;
    min-height: 600px;
    max-height: 800px;
}

.chat-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: #000;
    border-bottom: 1px solid var(--gray);
    font-size: 0.8rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.chat-controls-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.force-submit-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--accent);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-mono);
    text-transform: none;
}

.force-submit-btn:hover {
    background: var(--accent);
    color: var(--black);
}

.clear-chat-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.clear-chat-btn:hover { 
    text-decoration: underline; 
    color: var(--accent-secondary);
}

.chat-window {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0a0a0a 100%);
    min-height: 0; /* Важно для правильной работы flex с overflow */
}

.chat-message {
    max-width: 80%;
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { 
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

.ai-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--gray);
    border-bottom-left-radius: 2px;
    color: var(--white);
}

.user-message {
    align-self: flex-end;
    background: rgba(255, 61, 0, 0.1);
    border: 1px solid var(--accent);
    border-bottom-right-radius: 2px;
    color: var(--white);
}

/* Streaming индикатор */
.streaming-indicator {
    display: inline-block;
    color: var(--accent);
    font-size: 1.2rem;
    margin-right: 8px;
    animation: streaming-pulse 1s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes streaming-pulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

.streaming-text {
    display: inline;
}

.chat-message.streaming-complete .streaming-indicator {
    display: none;
}

.chat-input-area {
    padding: 1rem;
    background: var(--black);
    border-top: 1px solid var(--gray);
    display: flex;
    gap: 1rem;
}

.chat-input-area input {
    flex: 1;
    background: transparent;
    border: 1px solid var(--gray);
    padding: 0.8rem 1rem;
    color: var(--white);
    font-family: var(--font-mono);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input-area input:focus {
    border-color: var(--accent);
}

.chat-send-btn {
    background: var(--accent);
    border: none;
    color: var(--black);
    width: 48px;
    height: 48px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.chat-send-btn:hover {
    background: var(--white);
}

/* Инлайн форма лидов */
.lead-form-area {
    padding: 1.5rem;
    background: rgba(255, 61, 0, 0.05);
    border-top: 1px solid var(--accent);
}

.lead-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.lead-form-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--accent);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.close-lead-form {
    background: none;
    border: none;
    color: var(--gray-light);
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--font-mono);
    transition: color 0.3s;
}

.close-lead-form:hover {
    color: var(--accent);
}

.lead-prompt {
    font-size: 0.9rem;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.lead-inputs-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#inlineLeadForm input {
    width: 100%;
    padding: 0.8rem;
    background: #000;
    border: 1px solid var(--gray);
    color: white;
    font-family: var(--font-mono);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

#inlineLeadForm input:focus { 
    border-color: var(--accent); 
    outline: none; 
}

.submit-lead-btn {
    width: 100%;
    margin-top: 10px;
    padding: 1rem;
    background: var(--accent);
    color: black;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-family: var(--font-display);
    border-radius: 4px;
    transition: background 0.3s;
}

.submit-lead-btn:hover {
    background: var(--white);
}

/* Estimate Panel */
.estimate-panel {
    background: var(--gray-dark);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 61, 0, 0.05);
}

.estimate-metrics {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-box {
    flex: 1;
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
}

.metric-label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 1.2rem;
    font-weight: bold;
    font-family: var(--font-display);
    color: var(--accent);
}

/* Стили для области ТЗ */
.tz-preview-container {
    background: #fdfdfd; /* Цвет бумаги */
    color: #333; /* Темно-серый текст для контраста */
    border-radius: 4px;
    font-family: 'Georgia', 'Times New Roman', serif; /* Шрифт документов */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 1px solid #ccc;
    margin-top: 2rem;
    flex: 1;
    position: relative;
    min-height: 300px;
}

.tz-header {
    background: #333;
    color: #fff;
    padding: 10px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: bold;
}

.tz-content {
    padding: 2rem;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    height: 500px; /* Делаем область больше */
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Внутренние стили самого сгенерированного HTML */
.tz-content h3 {
    font-family: 'Arial', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #000;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.tz-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.tz-content li {
    margin-bottom: 0.5rem;
}

.tz-content b, .tz-content strong {
    font-weight: 700;
    color: #000;
}

.tz-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Скроллбар внутри ТЗ */
.tz-content::-webkit-scrollbar {
    width: 6px;
}
.tz-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}
.tz-content::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

.tz-placeholder {
    color: #999;
    font-style: italic;
    font-family: var(--font-mono);
    text-align: center;
    margin-top: 40%;
    font-size: 0.9rem;
}

.estimate-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.estimate-header {
    font-family: var(--font-display);
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.estimate-row {
    margin-bottom: 2rem;
}

.estimate-label {
    display: block;
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.estimate-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--white);
    font-weight: 600;
}

#priceValue { 
    color: var(--accent); 
}

#timeValue { 
    color: var(--accent-secondary); 
}

.estimate-sub {
    font-size: 0.8rem;
    color: var(--gray);
}

.estimate-summary {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--gray-light);
    margin-bottom: auto;
    border-left: 2px solid var(--gray);
}

.estimate-disclaimer {
    font-size: 0.7rem;
    color: var(--gray);
    margin: 1rem 0;
}

.estimate-cta-btn {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    font-family: var(--font-display);
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.estimate-cta-btn:hover {
    background: var(--white);
    color: var(--black);
}

/* Glitch text effect for price */
.glitch-text {
    animation: glitchPrice 2s infinite;
}

@keyframes glitchPrice {
    0%, 100% { 
        transform: translate(0);
    }
    20% { 
        transform: translate(-2px, 2px);
    }
    40% { 
        transform: translate(-2px, -2px);
    }
    60% { 
        transform: translate(2px, 2px);
    }
    80% { 
        transform: translate(2px, -2px);
    }
}

/* Modal Styles specific to lead form */
.lead-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lead-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lead-modal {
    background: var(--gray-dark);
    padding: 2rem;
    border: 1px solid var(--accent);
    width: 400px;
    position: relative;
    border-radius: 8px;
}

.lead-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.lead-modal-close:hover {
    color: var(--accent);
}

.lead-modal h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.lead-modal p {
    color: var(--gray-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.lead-input {
    width: 100%;
    background: var(--black);
    border: 1px solid var(--gray);
    padding: 1rem;
    color: var(--white);
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
}

.lead-input:focus {
    border-color: var(--accent);
}

.lead-submit-btn {
    width: 100%;
    background: var(--accent);
    border: none;
    padding: 1rem;
    font-family: var(--font-display);
    font-weight: 600;
    cursor: pointer;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background 0.3s;
}

.lead-submit-btn:hover {
    background: var(--white);
}

@media (max-width: 900px) {
    .estimator-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .estimate-panel {
        order: -1; /* Показываем оценку сверху на мобильных */
    }
    .lead-inputs-row { 
        flex-direction: column; 
    }
    .estimate-metrics {
        flex-direction: column;
    }
    .tz-content {
        height: 400px;
        padding: 1.5rem;
    }
    .chat-interface {
        min-height: 400px;
        max-height: 600px;
    }
}

/* --- Стили для Hardcore ТЗ --- */

/* Блок секции */
.tz-content h3 {
    background: #000;
    color: #fff;
    padding: 8px 12px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace; /* Моноширинный шрифт для заголовков */
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    display: inline-block;
}

/* Обычный текст в ТЗ */
.tz-content p, .tz-content ul {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* БЛОК КОДА (Терминал) */
.code-block {
    background: #1e1e1e; /* Темный фон */
    color: #d4d4d4; /* Светло-серый текст (можно заменить на #00ff00 для хакерского зеленого) */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    border-left: 4px solid #ff3d00; /* Акцент бренда */
    overflow-x: auto;
    white-space: pre-wrap; /* Сохранять переносы */
    box-shadow: inset 0 0 10px #000;
    line-height: 1.5;
}

/* Элементы списка в ТЗ */
.tz-content li {
    margin-bottom: 8px;
    padding-left: 5px;
}

.tz-content b {
    color: #000;
    font-weight: 700;
}

/* Микро-детали для таблиц (если AI решит нарисовать) */
.tz-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.85rem;
}
.tz-content th, .tz-content td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.tz-content th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* --- SITE HEADER --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 1.5rem 2rem;
    pointer-events: none; /* Чтобы клики проходили сквозь пустое место */
    mix-blend-mode: difference; /* Стильный эффект наложения на фон */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    pointer-events: all;
}

.brand-rkm {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--white);
    letter-spacing: 0.1em;
}

.brand-ai {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-left: 5px;
}

/* Кнопка в шапке */
.tg-header-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.tg-header-btn:hover {
    background: #2AABEE;
    border-color: #2AABEE;
    transform: translateY(-2px);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* --- ГЛАВНАЯ КНОПКА AI В HERO --- */
.btn-ai-hero {
    position: relative;
    padding: 1.2rem 3rem;
    min-height: 56px; /* Фиксированная минимальная высота для синхронизации */
    box-sizing: border-box;
    background: #000;
    border: 1px solid var(--accent);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 61, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-ai-hero:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(255, 61, 0, 0.6);
    background: var(--accent);
    color: #000;
}

.btn-icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

/* Эффект блика на кнопке */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* --- ПЛАВАЮЩИЙ ВИДЖЕТ (В углу экрана) --- */
.ai-floating-widget {
    position: fixed;
    bottom: 30px;
    right: -150px;
    z-index: 990;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Аватар робота */
.widget-avatar {
    width: 60px;
    height: 60px;
    background: #111;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 61, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

/* Глаз робота (SVG кольцевой индикатор) */
.avatar-eye-svg {
    width: 30px; /* Размер всего индикатора */
    height: 30px;
    transform: rotate(-90deg); /* Начальная точка сверху */
}

.eye-bg, .eye-scanner {
    fill: none;
    stroke-width: 12; /* Толщина линии */
}

.eye-bg {
    stroke: #333; /* Цвет фона кольца */
}

.eye-scanner {
    stroke: var(--accent); /* Цвет активного сегмента */
    stroke-linecap: round;
    stroke-dasharray: 251.2; /* Длина окружности (2 * PI * R) */
    stroke-dashoffset: 251.2;
    animation: eye-circle-anim 2s infinite linear;
}

.ai-floating-widget:hover .widget-avatar {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 61, 0, 0.8);
    background: var(--accent);
}

.ai-floating-widget:hover .eye-scanner {
    animation: eye-circle-anim 1s infinite linear; /* Ускоряем анимацию при hover */
}

/* Текст подсказки рядом с виджетом */
.widget-tooltip {
    background: rgba(0,0,0,0.8);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    border: 1px solid var(--gray);
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.ai-floating-widget:hover .widget-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes eye-circle-anim {
    0% {
        stroke-dashoffset: 251.2;
    }
    50% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -251.2;
    }
}

/* Эффекты при скролле к агенту */
.highlight-pulse {
    animation: border-pulse 1s ease 2;
}

@keyframes border-pulse {
    0% { box-shadow: 0 0 0 rgba(255, 61, 0, 0); }
    50% { box-shadow: 0 0 50px rgba(255, 61, 0, 0.2); }
    100% { box-shadow: 0 0 0 rgba(255, 61, 0, 0); }
}

.shake-input {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* --- MERMAID SCHEMES --- */
.mermaid {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
}

/* --- PDF MODE (Черный текст на белом для печати) --- */
.pdf-mode {
    background: white !important;
    color: black !important;
    height: auto !important; /* Убираем фикс высоту */
    overflow: visible !important; /* Убираем скроллбар */
    border: none !important;
    font-size: 12px !important;
}

.pdf-mode h3 {
    border-bottom-color: black !important;
    color: black !important;
}

.pdf-mode .code-block {
    background: #f0f0f0 !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
    white-space: pre-wrap !important; /* Чтобы код переносился и влезал в А4 */
}

.pdf-mode .mermaid {
    background: white !important;
    border: 1px solid #ccc !important;
}

/* --- PDF BUTTON --- */
.tz-actions {
    margin-top: 10px;
    text-align: right;
}

.btn-pdf {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 8px 15px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.3s;
    border-radius: 4px;
}

.btn-pdf:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* --- TELEGRAM BUTTON IN CHAT --- */
.chat-action-container {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-tg-button {
    display: inline-block;
    padding: 14px 28px;
    background: #fff;
    color: #0088cc;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
}

.chat-tg-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: #0088cc;
}

.chat-tg-button:active {
    transform: translateY(0);
}

.chat-action-note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

/* Адаптив для кнопки в чате */
@media (max-width: 768px) {
    .chat-tg-button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .chat-action-container {
        padding: 12px;
    }
}


/* Адаптив для шапки */
@media (max-width: 768px) {
    .site-header { 
        padding: 1rem; 
    }
    .tg-header-btn span:first-of-type { 
        display: none; /* Скрываем текст "Чат...", оставляем иконку */
    }
    .tg-header-btn { 
        padding: 8px; 
        border-radius: 50%; 
    }
    .status-dot { 
        position: absolute; 
        top: 0; 
        right: 0; 
    }
    
    /* Мобильная адаптация виджета */
    .ai-floating-widget { 
        bottom: 20px; 
        right: 25px; 
    }
    .widget-tooltip { 
        display: none; /* Скрываем текст на мобилках */
    }
    
    /* Делаем кнопку в Hero на всю ширину */
    .hero-cta { 
        flex-direction: column; 
        width: 100%; 
    }
    .btn-ai-hero { 
        width: 100%; 
        justify-content: center; 
    }
    
    /* Для мобильных input должен быть 16px, чтобы не зумило */
    .chat-input-area input,
    #userMessage {
        font-size: 16px !important; 
    }
}

/* --- Магическая кнопка Telegram (Deep Linking) --- */
.tg-magic-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #2AABEE; /* Telegram Blue */
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    margin: 15px auto;
    border-radius: 8px;
    font-family: var(--font-display, 'Arial', sans-serif);
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    animation: pulse-tg 2s infinite;
    box-shadow: 0 5px 15px rgba(42, 171, 238, 0.3);
    transition: all 0.3s ease;
    max-width: 400px;
    width: calc(100% - 40px);
}

.tg-magic-btn:hover {
    background: #229ED9;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(42, 171, 238, 0.4);
}

.tg-magic-btn svg {
    flex-shrink: 0;
}

@keyframes pulse-tg {
    0% { 
        box-shadow: 0 0 0 0 rgba(42, 171, 238, 0.7);
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(42, 171, 238, 0);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(42, 171, 238, 0);
    }
}


