:root {
    /* Deep Purple Gradient Magic Color Palette */
    --deep-purple: #5B21B6;
    --electric-blue: #3B82F6;
    --bright-cyan: #06B6D4;
    --coral-accent: #F97316;
    --dark-navy: #0F172A;
    --darker-navy: #1E1B4B;
    --rich-purple: #312E81;
    --pure-white: #FFFFFF;
    --light-gray: #E2E8F0;
    --success-green: #10B981;
    --error-red: #EF4444;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--pure-white);
    background: var(--dark-navy);
    overflow-x: hidden;
    opacity: 0; /* Initially hidden */
    animation: fadeInPage 1s ease-out forwards; /* Fade in on load */
    animation-delay: 0.2s; /* Small delay for a smoother start */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--deep-purple), var(--bright-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--deep-purple);
}

.header-cta {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--pure-white);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 14px;
}

.header-cta:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(91, 33, 182, 0.3);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--darker-navy) 100%);
    color: var(--pure-white);
    padding: 140px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(91, 33, 182, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float-orb 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
    animation: float-orb 12s ease-in-out infinite reverse;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 40px;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(91, 33, 182, 0.3); }
    50% { box-shadow: 0 0 30px rgba(91, 33, 182, 0.5), 0 0 40px rgba(6, 182, 212, 0.2); }
}

.hero h1 {
    font-size: 96px;
    font-weight: 800;
    margin-bottom: 32px;
    line-height: 0.95;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--deep-purple) 0%, var(--electric-blue) 50%, var(--bright-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

.hero h1 .line {
    display: block;
    color: white; /* Temporarily set color to white for debugging */
    /* opacity: 0; */ /* Keep commented out for now */
    /* transform: translateY(50px); */ /* Keep commented out for now */
    /* animation: stagger-fade-in 1.2s ease forwards; */ /* Temporarily remove animation */
}

.hero h1 .line:nth-child(1) { animation-delay: 0.2s; }
.hero h1 .line:nth-child(2) { animation-delay: 0.5s; }
.hero h1 .line:nth-child(3) { animation-delay: 0.8s; }

@keyframes stagger-fade-in {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero .subtitle {
    font-size: 20px;
    margin-bottom: 50px;
    opacity: 0.85;
    color: var(--light-gray);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
}

.hero-form {
    max-width: 520px;
    margin: 0 auto 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    gap: 8px;
}

.hero-form input {
    flex: 1;
    padding: 20px 24px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    background: transparent;
    color: var(--pure-white);
    outline: none;
}

.hero-form input::placeholder {
    color: rgba(226, 232, 240, 0.6);
}

.hero-form input:focus {
    background: rgba(255, 255, 255, 0.05);
}

.hero-form button {
    padding: 20px 32px;
    background: linear-gradient(135deg, var(--deep-purple), var(--electric-blue));
    color: var(--pure-white);
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.hero-form button:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(91, 33, 182, 0.4);
    background: linear-gradient(135deg, var(--electric-blue), var(--bright-cyan));
}

.hero-form button {
    background: linear-gradient(135deg, var(--deep-purple), var(--electric-blue));
}

.hero-form button:hover {
    background: linear-gradient(135deg, var(--electric-blue), var(--bright-cyan));
}

.hero-trust {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 20px;
    color: var(--light-gray);
}

.hero-trust::before {
    content: '🔒';
    margin-right: 8px;
}

/* Section Styles */
.section {
    padding: 120px 0;
    background: var(--dark-navy);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--pure-white);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.section-header p {
    font-size: 20px;
    color: var(--light-gray);
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.85;
}

/* Problem Section */
.problem {
    background: linear-gradient(135deg, var(--darker-navy) 0%, var(--rich-purple) 100%);
    position: relative;
}

.problem::before {
    content: '01';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 200px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    z-index: 1;
}

.pain-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 80px;
    position: relative;
    z-index: 2;
}

.pain-point {
    padding: 40px 32px;
    background: rgba(30, 27, 75, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border-left: 4px solid var(--bright-cyan);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pain-point:nth-child(2) {
    border-left-color: var(--coral-accent);
}

.pain-point:nth-child(3) {
    border-left-color: var(--deep-purple);
}

.pain-point:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(30, 27, 75, 0.9);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pain-point-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.pain-point h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--pure-white);
}

/* Features Section - Bento Grid */
.features {
    background: var(--dark-navy);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(91, 33, 182, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted minmax for better responsiveness */
    gap: 32px; /* Increased gap for better spacing */
    margin-top: 80px;
    justify-content: center; /* Center the grid items */
    align-items: stretch; /* Ensure cards stretch to equal height */
}

.feature-card {
    padding: 48px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex; /* Use flexbox for content alignment */
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--deep-purple), var(--bright-cyan));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.25);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 24px;
    display: block;
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--pure-white);
}

.feature-card p {
    color: rgba(226, 232, 240, 0.8);
    font-size: 16px;
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    background: linear-gradient(135deg, var(--darker-navy) 0%, var(--rich-purple) 100%);
    position: relative;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted minmax for better responsiveness */
    gap: 32px; /* Consistent gap with features grid */
    margin-top: 60px;
    justify-content: center; /* Center the grid items */
}

.step {
    text-align: center;
    position: relative;
    background: var(--glass-bg); /* Card background */
    backdrop-filter: blur(20px);
    border-radius: 24px; /* Consistent border-radius with feature cards */
    border: 1px solid var(--glass-border);
    padding: 40px 30px; /* Padding for card content */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.step-number {
    width: 50px; /* Slightly smaller for better integration */
    height: 50px;
    background: linear-gradient(135deg, var(--deep-purple), var(--electric-blue)); /* Use defined colors */
    color: var(--pure-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* Adjusted font size */
    font-weight: 700;
    margin: 0 auto 20px; /* Adjusted margin */
    border: 2px solid rgba(255, 255, 255, 0.2); /* Add a subtle border */
}

.step-icon {
    font-size: 40px; /* Make icons more prominent */
    margin-bottom: 16px; /* Space between icon and title */
    display: block;
}

.step h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--pure-white);
}

.step p {
    color: rgba(226, 232, 240, 0.8);
    font-size: 16px;
}

/* Social Proof */
.social-proof {
    text-align: center;
    background: #09090B;
    position: relative;
}

.founder-story {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 48px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--pure-white);
    border-radius: 32px;
    font-size: 20px;
    line-height: 1.7;
    font-style: italic;
    position: relative;
}

.founder-story::before {
    content: '\201C';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 80px;
    color: var(--bright-cyan);
    opacity: 0.3;
}

.founder-story::after {
    content: '— The Lingifly Team';
    display: block;
    margin-top: 24px;
    font-style: normal;
    font-size: 16px;
    opacity: 0.8;
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, var(--deep-purple), var(--electric-blue));
    padding: 80px 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
    text-align: center;
}

.stat {
    color: var(--pure-white);
}

.stat-number {
    font-size: 64px;
    font-weight: 800;
    margin-bottom: 8px;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Final CTA */
.final-cta {
    background: linear-gradient(135deg, var(--deep-purple), var(--bright-cyan));
    color: var(--pure-white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="grad1" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:rgba(255,255,255,0.1);stop-opacity:1" /><stop offset="100%" style="stop-color:rgba(255,255,255,0);stop-opacity:0" /></radialGradient></defs><circle cx="200" cy="300" r="150" fill="url(%23grad1)" /><circle cx="800" cy="700" r="200" fill="url(%23grad1)" /></svg>');
    animation: float-bg 20s ease-in-out infinite;
}

@keyframes float-bg {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.final-cta .container {
    position: relative;
    z-index: 2;
}

.final-cta-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.final-cta h2 {
    color: var(--pure-white);
    font-size: 64px;
    margin-bottom: 24px;
    font-weight: 800;
}

.final-cta p {
    font-size: 20px;
    margin-bottom: 50px;
    opacity: 0.9;
}

.cta-form {
    max-width: 600px;
    margin: 0 auto 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 12px;
    display: flex;
    gap: 12px;
}

.cta-form input {
    flex: 1;
    padding: 24px 32px;
    border: none;
    border-radius: 20px;
    font-size: 18px;
    background: transparent;
    color: var(--pure-white);
    outline: none;
}

.cta-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.cta-form input:focus {
    background: rgba(255, 255, 255, 0.05);
}

.cta-form button {
    padding: 24px 40px;
    background: var(--pure-white);
    color: var(--deep-purple);
    border: none;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.cta-form button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.privacy-note {
    font-size: 14px;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #030712;
    color: var(--pure-white);
    padding: 80px 0 40px;
}

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

.footer-logo {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--deep-purple), var(--bright-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-tagline {
    font-size: 18px;
    margin-bottom: 48px;
    opacity: 0.7;
    color: var(--light-gray);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.copyright {
    opacity: 0.6;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

/* Success Message */
.success-message {
    background: var(--success-green);
    color: white;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.error-message {
    background: var(--error-red);
    color: white;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    display: none;
    text-align: center;
    font-weight: 500;
}

/* Animations */
@keyframes fadeInPage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px); /* Initial state for animation */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out; /* Smooth transition for non-animated state */
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease forwards;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 48px;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 32px; /* Consistent gap */
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 40px;
    }
    
    .hero-form,
    .cta-form {
        flex-direction: column;
    }
    
    .hero-form input,
    .cta-form input {
        min-width: auto;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .header {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .header-cta {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .steps {
        gap: 40px;
    }
    
    .final-cta h2 {
        font-size: 2.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .step-number {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .final-cta h2 {
        font-size: 36px;
    }
    
    .hero-form, .cta-form {
        flex-direction: column;
        padding: 16px;
    }
}
