@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@600;700;800;900&display=swap');

:root {
    /* Flutter App Theme Alignment */
    --primary: #E50914; /* AppColors.accent - Netflix Red */
    --primary-glow: rgba(229, 9, 20, 0.4);
    --primary-gradient: linear-gradient(135deg, #FF4545 0%, #E50914 100%);
    
    --bg-main: #09090B; /* AppColors.background - Zinc 950 */
    --bg-surface: #18181B; /* AppColors.surface - Zinc 900 */
    --bg-surface-hover: #27272A; /* AppColors.secondary - Zinc 800 */
    
    --text-main: #FAFAFA; /* AppColors.textPrimary - Zinc 50 */
    --text-muted: #A1A1AA; /* AppColors.textSecondary - Zinc 400 */
    --text-gradient: linear-gradient(180deg, #FAFAFA 0%, #A1A1AA 100%);
    
    --border: #27272A; /* AppColors.divider - Zinc 800 */
    --border-glow: rgba(229, 9, 20, 0.3);
    
    --radius-sm: 16px; /* InputDecorationTheme radius */
    --radius: 20px; /* CardTheme radius */
    --radius-full: 30px; /* ElevatedButtonTheme radius */
    
    --success: #10B981; /* AppColors.success */
    
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Inter', sans-serif; /* Body font from app_theme.dart */
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Animated Glowing Background Mesh */
.bg-mesh {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: #050505;
}

.mesh-blob {
    position: absolute;
    filter: blur(120px);
    opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%; left: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(229, 57, 53, 0.15) 0%, rgba(0,0,0,0) 70%);
}

.blob-2 {
    bottom: -20%; right: -10%;
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(255, 112, 67, 0.1) 0%, rgba(0,0,0,0) 70%);
    animation-delay: -5s;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul { list-style: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif; /* Heading font from app_theme.dart */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-primary-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 { font-size: clamp(2.8rem, 4vw, 4rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: 1.25rem; }

p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1600px; /* Increased to use more left/right empty space */
    margin: 0 auto;
    padding: 0 40px;
}

/* Components - Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px; /* Matches app cardTheme radius — clean, not bubbly */
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.35);
}

.btn-primary:hover {
    background: #FF2020;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--bg-surface);
    color: var(--text-main);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px 0; /* Tighter navbar */
    transition: all var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom-color: var(--border);
}

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

.brand {
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.brand span { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    /* No background pill — clean and minimal */
}

.nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.nav-links a:hover {
    color: white;
    border-bottom-color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    /* Remove large padding-top — use exact navbar height offset */
    padding-top: 68px; /* = navbar height 52px + small gap 16px */
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    z-index: 10;
    margin-top: -5vh; /* Pushes content slightly up to reduce top empty space */
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.2);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.pill-badge .dot {
    width: 6px; height: 6px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
}

.hero h1 {
    margin-bottom: 20px;
    line-height: 1.05;
}

.hero p {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
}

/* Dashboard Mockup (Right Column) */
.hero-mockup-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-main {
    width: 100%;
    max-height: 70vh; /* Extremely important to prevent breaking out of 100vh */
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
    transform: rotateY(-10deg) rotateX(5deg) scale(0.95);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mockup-container:hover .mockup-main {
    transform: rotateY(0deg) rotateX(0deg) scale(1);
}

/* Bento Grid Features */
.features {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(280px, auto));
    gap: 24px;
}

.bento-card {
    background: rgba(24, 24, 27, 0.5); /* Premium glass background */
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: all var(--transition);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.04), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.bento-card:hover::before { opacity: 1; }
.bento-card:hover {
    border-color: rgba(229, 9, 20, 0.3); /* Subtle red border on hover */
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 40px rgba(229, 9, 20, 0.08); /* Red glow shadow */
}

.bento-card.wide { grid-column: span 2; }
.bento-card.tall { grid-row: span 2; justify-content: flex-start; }

.bento-icon {
    font-size: 2.5rem;
    color: var(--primary); /* Solid red icon */
    margin-bottom: 24px;
    display: inline-block;
    filter: drop-shadow(0 0 12px rgba(229, 9, 20, 0.4)); /* Glowing icon */
}

.bento-card.tall .bento-icon { margin-top: auto; }

.bento-content h3 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: white;
}

/* Stats Ribbon */
.stats {
    padding: 80px 0;
    border-top: 1px solid rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.02);
    background: linear-gradient(90deg, transparent, rgba(229, 9, 20, 0.03), transparent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3.5rem;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

/* CTA Waitlist */
.cta-section {
    padding: 150px 0;
    text-align: center;
    position: relative;
}

.cta-box {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(24, 24, 27, 0.4);
    padding: 80px 40px;
    border: 1px solid rgba(229, 9, 20, 0.15);
    border-radius: 32px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 0 100px rgba(229, 9, 20, 0.05);
}

.form-group {
    display: flex;
    gap: 16px;
    max-width: 500px;
    margin: 40px auto 0;
    background: rgba(9, 9, 11, 0.8);
    padding: 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all var(--transition);
}

.form-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.2);
}

.form-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0 24px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    outline: none;
}

.form-group input::placeholder { color: var(--text-muted); }

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.footer ul li { margin-bottom: 16px; }
.footer ul li a:hover { color: white; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
}

/* Responsive Fallback to Vertical for Mobile */
@media (max-width: 1024px) {
    .hero {
        height: auto;
        padding-top: 140px;
        padding-bottom: 60px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        align-items: center;
        text-align: center;
        margin: 0 auto;
    }
    .hero-cta {
        justify-content: center;
        flex-direction: column;
    }
    .hero-mockup-container {
        margin: 40px auto 0;
    }
    .mockup-main {
        transform: none;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    .bento-card.tall { grid-column: span 2; grid-row: auto; }
    .bento-card.wide { grid-column: span 2; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-cta { flex-direction: column; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.wide, .bento-card.tall { grid-column: span 1; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .form-group { flex-direction: column; background: transparent; border: none; padding: 0; }
    .form-group input { border: 1px solid var(--border); border-radius: var(--radius-full); padding: 16px 24px; margin-bottom: 16px; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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