/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - matching Nodus app */
    --bg-primary: #FBF8F3;
    --bg-cream: #F5EFE6;
    --bg-card: #FFFFFF;
    --accent-green: #5D8B6F;
    --accent-soft-green: #A8C9B8;
    --accent-peach: #FFD4B2;
    --accent-lavender: #E8D7F1;
    --accent-pink: #FFD4DD;
    --accent-blue: #D4E8FF;
    --text-primary: #2D2D2D;
    --text-secondary: #6B6B6B;
    --text-muted: #9B9B9B;
    --border-light: #E8E3DC;
    
    /* Legacy compatibility */
    --primary: var(--accent-green);
    --secondary: var(--accent-soft-green);
    --bg-white: var(--bg-card);
    --bg-gray: var(--bg-cream);
    
    /* Gradients - updated with app colors */
    --gradient-green: linear-gradient(135deg, #5D8B6F 0%, #A8C9B8 100%);
    --gradient-hero: linear-gradient(135deg, #FBF8F3 0%, #F5EFE6 100%);
    --gradient-cta: linear-gradient(135deg, #A8C9B8 0%, #5D8B6F 100%);
    
    /* Spacing */
    --section-padding: 80px;
    --container-max: 1200px;
    --card-padding: 32px;
    
    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-gray);
}

body {
    font-family: var(--font-system);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    overflow-x: hidden;
}

/* ===== UTILITIES ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 48px;
    text-align: center;
}

h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--gradient-hero);
    padding: var(--section-padding) 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.brain-icon {
    font-size: 36px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #5D8B6F, #A8C9B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-icon {
    flex-shrink: 0;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(88, 210, 154, 0.15), rgba(110, 231, 183, 0.15));
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(88, 210, 154, 0.3);
}

.hero h1 {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary), #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.cta-button {
    display: inline-block;
    background: var(--gradient-green);
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(88, 210, 154, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(88, 210, 154, 0.35);
}

.cta-button.secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cta-button.large {
    padding: 20px 56px;
    font-size: 20px;
}

.hero-screens {
    display: flex;
    gap: 0;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 460px;
}

.phone-screen {
    height: auto;
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    position: absolute;
}

/* Первый скрин — меньше, спереди, чуть левее */
.phone-screen:first-child {
    width: 244px;
    z-index: 2;
    left: 50%;
    transform: translateX(-68%) translateY(20px);
    box-shadow: 0 32px 72px rgba(0,0,0,0.20);
}

/* Второй скрин — больше, сзади, чуть правее */
.phone-screen:last-child {
    width: 258px;
    z-index: 1;
    left: 50%;
    transform: translateX(-18%) translateY(-18px);
    opacity: 1;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

.phone-screen:first-child:hover {
    transform: translateX(-68%) translateY(20px);
}

.phone-screen:last-child:hover {
    transform: translateX(-18%) translateY(-18px);
}

/* ===== PROBLEM SECTION ===== */
.problem {
    background: white;
    padding: var(--section-padding) 0;
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.problem-card {
    background: white;
    padding: var(--card-padding);
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.problem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.problem-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.problem-card h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.problem-card p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===== SOLUTION SECTION ===== */
.solution {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, #f0f7f3, #f7fcfa);
}

.solution-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    padding: 48px;
    background: white;
    background-image: radial-gradient(circle, rgba(93,139,111,0.06) 1px, transparent 1px);
    background-size: 20px 20px;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.big-task {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.task-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.task-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.demo-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ai-icon {
    font-size: 48px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.arrow {
    font-size: 36px;
    color: var(--primary);
    font-weight: bold;
}

.small-steps {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.step-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.step-item {
    padding: 12px;
    margin-bottom: 8px;
    background: var(--bg-gray);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.step-item:nth-child(2) { animation-delay: 0.1s; }
.step-item:nth-child(3) { animation-delay: 0.2s; }
.step-item:nth-child(4) { animation-delay: 0.3s; }
.step-item:nth-child(5) { animation-delay: 0.4s; }
.step-item:nth-child(6) { animation-delay: 0.5s; }

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

.solution > .container {
    text-align: center;
}

.solution-text {
    text-align: center;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ===== FEATURES SECTION ===== */
.features {
    background: var(--bg-gray);
    padding: var(--section-padding) 0;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 32px;
}

.feature-row.reverse {
    direction: rtl;
}

.feature-row.reverse > * {
    direction: ltr;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(93,139,111,0.12), rgba(168,201,184,0.15));
    border-radius: 16px;
    margin-bottom: 20px;
}

.feature-text h3 {
    font-size: 26px;
    margin-bottom: 12px;
}

.feature-text p {
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.feature-visual {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.feature-row.reverse .feature-visual {
    justify-content: flex-end;
}

.mockup-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
}

.feature-screenshot {
    width: 90%;
    max-width: 320px;
    height: auto;
    display: block;
    border-radius: 20px;
    margin: 16px 0;
    box-shadow: none;
    border: none;
}

/* ===== GAMIFICATION SECTION ===== */
.gamification {
    padding: var(--section-padding) 0;
    background: white;
}

.gamification-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.gamification-card {
    background: white;
    padding: 24px 20px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                var(--gradient-green) border-box;
    transition: all 0.3s ease;
}

.gamification-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(88, 210, 154, 0.2);
}

.gamification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(93,139,111,0.1), rgba(168,201,184,0.12));
    border-radius: 16px;
    margin: 0 auto 14px;
}

.gamification-card h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 16px;
}

.gamification-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

/* ===== HOW IT WORKS SECTION ===== */
.how-it-works {
    background: var(--bg-gray);
    padding: var(--section-padding) 0;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.step {
    flex: 1;
    max-width: 300px;
    text-align: center;
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--gradient-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: 0 8px 16px rgba(88, 210, 154, 0.3);
}

.step-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.step-content h3 {
    margin-bottom: 12px;
}

.step-content p {
    color: var(--text-secondary);
}

.step-arrow {
    font-size: 36px;
    color: var(--primary);
    font-weight: bold;
}

/* ===== FINAL CTA SECTION ===== */
.final-cta {
    background: var(--gradient-cta);
    padding: var(--section-padding) 0;
    text-align: center;
    color: white;
    background-image:
        var(--gradient-cta),
        radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: auto, 22px 22px;
}

.final-cta .cta-button.large {
    background: white;
    color: #2d5c45;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.final-cta .cta-button.large:hover {
    background: #f0faf5;
    box-shadow: 0 12px 40px rgba(0,0,0,0.24);
    transform: translateY(-2px);
}

.final-cta h2 {
    color: white;
    margin-bottom: 16px;
}

.final-cta-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.cta-note {
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-gray);
    padding: 40px 0;
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 60px;
    }
    
    h1 { font-size: 40px; }
    h2 { font-size: 32px; }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .feature-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 48px;
    }
    
    h1 { font-size: 32px; }
    h2 { font-size: 28px; }
    
    .hero-screens {
        position: relative;
        height: 360px;
        overflow: hidden;
    }

    .phone-screen {
        position: absolute;
        left: 50%;
    }

    .phone-screen:first-child {
        width: 148px;
        z-index: 2;
        transform: translateX(-90%) translateY(22px);
        box-shadow: none;
    }

    .phone-screen:last-child {
        width: 160px;
        z-index: 1;
        transform: translateX(-20%) translateY(-14px);
        box-shadow: none;
        opacity: 1;
    }
    
    .problem-grid,
    .gamification-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .problem-card {
        padding: 20px 16px;
    }

    .problem-icon {
        font-size: 44px;
        margin-bottom: 10px;
    }

    .problem-card h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .problem-card p {
        font-size: 13px;
    }

    .problem-grid .problem-card:last-child {
        grid-column: 1 / -1;
        max-width: calc(50% - 6px);
        margin: 0 auto;
        width: 100%;
    }
    
    .solution-demo {
        flex-direction: column;
        gap: 24px;
    }
    
    .demo-arrow .arrow {
        transform: rotate(90deg);
    }
    
    .cta-button {
        width: 100%;
        text-align: center;
    }
}

/* ===== SUBTLE PATTERNS ===== */
.hero {
    background-image:
        var(--gradient-hero),
        radial-gradient(circle, rgba(93,139,111,0.07) 1px, transparent 1px);
    background-size: auto, 28px 28px;
}

.problem {
    background-image:
        linear-gradient(rgba(93,139,111,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(93,139,111,0.035) 1px, transparent 1px);
    background-size: 36px 36px;
}

.gamification {
    background-image: radial-gradient(circle, rgba(93,139,111,0.05) 1px, transparent 1px);
    background-size: 28px 28px;
}

.how-it-works {
    background-image: radial-gradient(circle, rgba(93,139,111,0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ===== SCIENCE SECTION ===== */
.science {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, #f0f7f3, #f7fcfa);
    background-image:
        linear-gradient(135deg, #f0f7f3, #f7fcfa),
        radial-gradient(circle, rgba(93,139,111,0.06) 1px, transparent 1px);
    background-size: auto, 24px 24px;
}

.science-badge {
    display: block;
    text-align: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(135deg, rgba(93,139,111,0.12), rgba(168,201,184,0.15));
    color: #5D8B6F;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(93,139,111,0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.science-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 48px;
    text-align: center;
    line-height: 1.6;
}

.science-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.science-card {
    background: white;
    border-radius: 20px;
    padding: 32px 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(93,139,111,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.science-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.science-stat {
    font-size: 40px;
    font-weight: 800;
    background: linear-gradient(135deg, #5D8B6F, #A8C9B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1;
}

.science-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.science-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.science-source {
    font-size: 12px;
    color: #A8C9B8;
    font-style: italic;
}

@media (max-width: 768px) {
    .science-grid {
        grid-template-columns: 1fr;
    }
    .science-subtitle {
        font-size: 16px;
    }
}
