/* === LANDING.CSS ===
   assets/css/landing.css
   НАЗНАЧЕНИЕ: Стили лендинга "Мама в потоке" - 9 секций, адаптив, анимации
   СВЯЗИ: main.css (CSS переменные), themes.css (темы)
   РАЗМЕР: ~450 строк */

/* -- Header -- */
.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: hsla(0, 0%, 0%, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
}

html.light-theme .landing-header {
    background: hsla(0, 0%, 100%, 0.85);
}

.landing-header.scrolled {
    background: hsla(0, 0%, 0%, 0.85);
}

html.light-theme .landing-header.scrolled {
    background: hsla(0, 0%, 100%, 0.95);
}

.landing-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.landing-logo {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.landing-nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color var(--transition);
}

.landing-nav a:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.landing-nav-accent {
    color: var(--color-primary) !important;
    font-weight: 600;
}

/* -- Container -- */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* -- Hero -- */
.hero-section {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 60px;
}

.hero-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, hsla(340, 80%, 55%, 0.30) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, hsla(270, 60%, 58%, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, hsla(340, 70%, 50%, 0.15) 0%, transparent 40%);
    background-size: 200% 200%;
    animation: meshShift 20s ease infinite;
    pointer-events: none;
}

@keyframes meshShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-inner {
    display: flex;
    flex-direction: column;
    max-width: 820px;
    position: relative;
    z-index: 1;
}

/* padding уже в основном .hero-section */

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* -- Typewriter in hero title -- */
.hero-typewriter {
    display: inline;
}

.hero-tw--negative {
    color: var(--color-danger);
    text-decoration: line-through;
    text-decoration-thickness: 3px;
    text-decoration-color: var(--color-danger);
}

.hero-tw--positive {
    color: var(--color-success);
}

.hero-cursor {
    color: var(--color-primary);
    font-weight: 400;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-visual {
    flex: 0 0 400px;
    max-width: 400px;
    display: flex;
    justify-content: center;
    align-self: flex-start;
}

/* -- Hero Badge -- */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-bg);
    border: 1px solid hsla(340, 80%, 60%, 0.3);
    margin-bottom: 20px;
}

.hero-badge svg {
    color: var(--color-primary);
}

/* -- Hero Chat Inline (как DreamCar) -- */
.hero-chat-wrap {
    margin: 12px 0 8px;
    min-height: 80px;
}

.hero-chat-wrap .demo-chat-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* -- Hero Visual (removed - now inline chat) -- */
.hero-visual {
    display: none;
}

/* -- Hero Stats -- */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 28px;
}

.hero-stat {
    padding: 0 24px;
    border-right: 1px solid var(--border-color);
}

.hero-stat:first-child {
    padding-left: 0;
}

.hero-stat:last-child {
    border-right: none;
}

.hero-stat-value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* -- CTA Buttons -- */
.landing-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform var(--transition), box-shadow var(--transition);
    background: var(--gradient-primary);
    color: #fff;
}

.landing-cta:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
}

.landing-cta--pulse {
    animation: landing-pulse 2.5s ease-in-out infinite;
}

@keyframes landing-pulse {
    0%, 100% { box-shadow: 0 4px 15px hsla(340, 75%, 55%, 0.3), 0 0 0 0 hsla(340, 75%, 55%, 0.4); }
    50% { box-shadow: 0 4px 30px hsla(340, 75%, 55%, 0.5), 0 0 0 8px hsla(340, 75%, 55%, 0); }
}

.landing-cta--ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.landing-cta--ghost:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.w-full {
    width: 100%;
    text-align: center;
}

/* -- Demo Chat -- */
.demo-chat {
    max-width: 380px;
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    /* Фиксированная высота чтобы не скакал layout */
    min-height: 360px;
}

.demo-chat-header {
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-bg);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-display);
}

.demo-chat-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.demo-msg {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 85%;
    line-height: 1.45;
    animation: demoMsgIn 0.4s ease-out both;
}

.demo-msg--ai {
    background: var(--color-primary-bg);
    color: var(--text-primary);
    align-self: flex-start;
    border-left: 2px solid var(--color-primary);
}

.demo-msg--user {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    align-self: flex-end;
}

.demo-typing {
    opacity: 0.5;
    font-style: italic;
    font-size: 0.8rem;
    color: var(--text-secondary);
    align-self: flex-start;
    padding: 4px 0;
}

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

/* -- Sections -- */
.landing-section {
    padding: 50px 0;
}

.landing-h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-primary);
}

/* -- Grid -- */
.landing-grid {
    display: grid;
    gap: 20px;
}

.landing-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.landing-grid--2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    margin: 0 auto;
}

/* -- Pain Cards -- */
.pain-card {
    padding: 28px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-bottom: 2px solid var(--color-primary);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.pain-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    border-color: var(--color-primary);
}

.pain-icon {
    color: var(--color-primary);
    margin-bottom: 12px;
}

.pain-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* -- Solution Cards -- */
.solution-card {
    padding: 28px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 3px solid;
    transition: transform 0.2s, box-shadow 0.2s;
}

.solution-card--low { border-left-color: var(--color-danger); }
.solution-card--mid { border-left-color: var(--color-warning); }
.solution-card--high { border-left-color: var(--color-success); }

.solution-score {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.solution-card--low .solution-score { color: var(--color-danger); }
.solution-card--mid .solution-score { color: var(--color-warning); }
.solution-card--high .solution-score { color: var(--color-success); }

.solution-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* -- Feature Cards -- */
.feature-card {
    padding: 28px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--color-primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px var(--color-primary-bg);
    border-color: var(--color-primary);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--color-primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* -- Step Cards -- */
.step-card {
    text-align: center;
    padding: 20px;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.step-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* -- Pricing -- */
.pricing-grid {
    align-items: start;
}

.pricing-card {
    padding: 32px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
}

.pricing-card--featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px hsla(340, 65%, 55%, 0.15);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.pricing-price {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.pricing-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-list {
    list-style: none;
    margin-bottom: 20px;
}

.pricing-list li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
    padding-left: 20px;
}

.pricing-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
}

.pricing-annual {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 20px;
}

/* -- Testimonial -- */
.testimonial-section {
    text-align: center;
}

.testimonial {
    max-width: 700px;
    margin: 0 auto;
}

.testimonial p {
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.testimonial p::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--color-primary);
    line-height: 1;
    display: block;
    margin-bottom: -20px;
    font-family: var(--font-display);
}

.testimonial cite {
    font-style: normal;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* -- CTA Section -- */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-bg), hsla(270, 45%, 65%, 0.08));
    border-radius: 24px;
    margin: 0 24px;
    padding: 60px 0 !important;
}

.cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

/* -- Footer -- */
.landing-footer {
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
}

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

.landing-logo-sm {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* -- Scroll Reveal -- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -- Hero Stagger Animations -- */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    animation: heroFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.hero-subtitle {
    animation: heroFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.15s both;
}

.hero-buttons {
    animation: heroFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.3s both;
}

.demo-chat {
    animation: heroFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) 0.45s both;
}

/* -- Responsive: 768px -- */
@media (max-width: 768px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        flex: 0 0 auto;
        max-width: 100%;
        margin-top: 40px;
    }

    .hero-inner {
        min-height: auto;
        padding-top: 20px;
    }

    .demo-chat {
        min-height: 350px;
    }

    .landing-grid--3 {
        grid-template-columns: 1fr;
    }

    .landing-grid--2 {
        grid-template-columns: 1fr;
    }

    .landing-nav {
        gap: 12px;
    }

    .landing-section {
        padding: 50px 0;
    }
}

/* -- Responsive: 480px -- */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .landing-h2 {
        font-size: 1.35rem;
    }

    .landing-nav a {
        font-size: 0.8rem;
    }

    .landing-container {
        padding: 0 16px;
    }
}

/* -- Cursor Glow -- */
#mb-cursor-wrap {
    position: fixed;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 10000;
    top: 0;
    left: 0;
    will-change: left, top;
}

body.mb-hide-cursor,
body.mb-hide-cursor * {
    cursor: none !important;
}

.mb-cursor-blur {
    position: absolute;
    inset: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    opacity: 0.8;
    filter: blur(40px);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.mb-cursor-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
}

#mb-cursor-wrap.mb-cursor-hover .mb-cursor-blur {
    width: 60px;
    height: 60px;
    margin: -10px;
    opacity: 0.5;
}

@media (hover: none) {
    #mb-cursor-wrap { display: none !important; }
}

/* -- Typing cursor (typewriter) -- */
.demo-cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    background: var(--color-primary);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 0.8s step-end infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.demo-cursor-done {
    display: none;
}

/* -- Noise texture overlay -- */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 0;
}

/* -- Theme change smooth transitions -- */
body, body * {
    transition: background-color 0.35s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Исключения с собственными hover transitions */
.landing-cta, .feature-card, .pain-card, .solution-card, .pricing-card, .zk-theme-btn, .zk-theme-chip {
    transition: background-color 0.25s, color 0.2s, border-color 0.2s, transform 0.25s, box-shadow 0.25s;
}
