/* ==================== VARIABLES - Matches App UI ==================== */
:root {
    /* Brand Colors */
    --primary: #00d4ff;
    --secondary: #00ff88;
    --accent: #ff4444;

    /* Light Theme (Matches App) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;

    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    --border-focus: #3b82f6;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Timeline specific */
    --grid-line-color: #e0e7ff;
    --margin-line-color: #fecaca;

    /* Typography */
    --font-handwritten: 'Caveat', cursive;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Mono', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;

    /* Layout */
    --container-width: 1200px;
    --border-radius: 12px;
}

/* Dark Theme (Matches App) */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-hover: #334155;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-inverse: #0f172a;

    --border-primary: #334155;
    --border-secondary: #475569;
    --border-focus: #60a5fa;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);

    --grid-line-color: #475569;
    --margin-line-color: #991b1b;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Removed paper texture for cleaner app-like look */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================== UTILITIES ==================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-title {
    font-family: var(--font-handwritten);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.text-link {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-style: wavy;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.text-link:hover {
    color: var(--secondary);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000000;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 48px;
    font-size: 18px;
}

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 2px solid var(--border-primary);
    border-radius: 50px;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-strong);
}

.theme-toggle-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(20deg);
}

/* ==================== HERO SECTION ==================== */
.hero {
    padding: var(--spacing-xl) 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

/* Editor UI Mockup - Positioned Left with Fade */
.hero-editor-mockup {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    max-width: 600px;
    z-index: 0;
    pointer-events: none;
    mask-image: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
}

/* Waveform Timeline with Grid Background */
.hero-timeline {
    background-color: var(--bg-card);
    background-image:
        /* Horizontal grid lines (20px apart) */
        repeating-linear-gradient(
            0deg,
            var(--grid-line-color) 0px,
            var(--grid-line-color) 1px,
            transparent 1px,
            transparent 20px
        ),
        /* Vertical grid lines (20px apart) */
        repeating-linear-gradient(
            90deg,
            var(--grid-line-color) 0px,
            var(--grid-line-color) 1px,
            transparent 1px,
            transparent 20px
        );
    height: 100px;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    margin-bottom: 20px;
    padding: 10px;
    box-shadow: var(--shadow-md);
}

.hero-waveform-svg {
    width: 100%;
    height: 100%;
    color: var(--text-secondary);
}

/* Text Lines with Lined Notebook Background */
.hero-text-lines {
    background-color: var(--bg-card);
    background-image:
        /* Margin lines (left and right) */
        linear-gradient(
            to right,
            var(--margin-line-color) 0,
            var(--margin-line-color) 2px,
            transparent 2px,
            transparent 48px,
            transparent calc(100% - 50px),
            var(--margin-line-color) calc(100% - 50px),
            var(--margin-line-color) calc(100% - 48px),
            transparent calc(100% - 48px)
        ),
        /* Horizontal lines (36px apart for text lines) */
        repeating-linear-gradient(
            transparent 0,
            transparent 35px,
            var(--grid-line-color) 35px,
            var(--grid-line-color) 36px
        );
    padding: 20px 60px;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
    font-family: var(--font-body);
}

.hero-text-line {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    transform: translateY(-10px);
}

.hero-text-line .word {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Selected words (cyan highlight - like app) */
.hero-text-line .word.selected {
    background-color: rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
    font-weight: 500;
}

[data-theme="dark"] .hero-text-line .word.selected {
    background-color: rgba(0, 212, 255, 0.25);
}

/* Cut words (red strikethrough - like app) */
.hero-text-line .word.cut {
    text-decoration: line-through;
    color: var(--text-tertiary);
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-handwritten);
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.1;
    animation: fadeInUp 0.8s ease;
}

.hero-underline {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 0 auto var(--spacing-md);
    border-radius: 2px;
    position: relative;
    animation: slideInLeft 0.6s ease 0.2s backwards;
}

/* Hand-drawn squiggle effect */
.hero-underline::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        var(--primary),
        var(--primary) 10px,
        transparent 10px,
        transparent 15px
    );
}

.hero-tagline {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.hero-cta-note {
    margin-top: var(--spacing-sm);
    font-size: 14px;
    color: var(--text-tertiary);
}

.hero-arrow {
    position: absolute;
    bottom: -80px;
    right: 20%;
    width: 100px;
    height: 80px;
    color: var(--primary);
    opacity: 0.6;
    animation: bounce 2s ease infinite;
}

/* ==================== FEATURES SECTION ==================== */
.features {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-primary);
    position: relative;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--border-radius);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
    opacity: 0;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.feature-title {
    font-family: var(--font-handwritten);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

/* Highlighted Feature Card */
.feature-card.highlight {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 255, 136, 0.1));
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.feature-card.highlight:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
}

.feature-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff4444, #ff8844);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

.feature-description {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ==================== VIDEO DEMO SECTION ==================== */
.video-demo {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-secondary);
}

.video-wrapper {
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 255, 136, 0.1));
}

.video-placeholder-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.video-placeholder-text {
    font-family: var(--font-handwritten);
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.video-placeholder-subtext {
    color: var(--text-tertiary);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==================== PRICING SECTION ==================== */
.pricing {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-primary);
}

.pricing-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.pricing-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-focus);
}

.pricing-card-popular {
    border-color: var(--primary);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(0, 255, 136, 0.05));
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.pricing-card-popular:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.pricing-card-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000000;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.pricing-card-header {
    margin-bottom: var(--spacing-md);
}

.pricing-card-title {
    font-family: var(--font-handwritten);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-card-price {
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.price-old {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: line-through;
    opacity: 0.8;
}

.price-current {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-card-credits {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.pricing-card-hours {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-md);
}

.pricing-card-features {
    list-style: none;
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

.pricing-card-features li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.pricing-card .btn {
    width: 100%;
}

/* ==================== BOOK DEMO SECTION ==================== */
.book-demo {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-secondary);
}

.book-demo-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--bg-card);
    border: 2px dashed var(--primary);
    border-radius: var(--border-radius);
    position: relative;
    box-shadow: var(--shadow-md);
}

/* Removed corner decorations for cleaner look */

.book-demo-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.book-demo-title {
    font-family: var(--font-handwritten);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.book-demo-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.book-demo-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.book-demo-alternative {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* ==================== FAQ SECTION ==================== */
.faq {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-primary);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: var(--spacing-md);
    background: none;
    border: none;
    font-family: var(--font-handwritten);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-toggle {
    font-size: 2rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, padding 0.2s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== FOOTER ==================== */
.footer {
    padding: var(--spacing-xl) 0 var(--spacing-md);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-logo {
    font-family: var(--font-handwritten);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: var(--spacing-xs);
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-link {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-contact {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.footer-social-link {
    color: var(--text-secondary);
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-social-link svg {
    width: 24px;
    height: 24px;
}

.footer-copyright {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-primary);
    color: var(--text-tertiary);
    font-size: 14px;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        width: 0;
    }
    to {
        width: 200px;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hero {
        padding: var(--spacing-xl) 0;
        min-height: auto;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-arrow {
        display: none;
    }

    /* Hide editor mockup on mobile */
    .hero-editor-mockup {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card-popular {
        transform: scale(1);
    }

    .pricing-card-popular:hover {
        transform: translateY(-5px);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .btn-large {
        padding: 16px 32px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .pricing-card-price {
        flex-direction: column;
        gap: 4px;
    }

    .price-old {
        font-size: 1.25rem;
    }

    .price-current {
        font-size: 2.5rem;
    }

    .book-demo-card {
        padding: var(--spacing-lg);
    }
}
