/* --- Global Styles & Variables --- */
:root {
    /* NEW BRAND COLORS based on Logo */
    --bg-top: #020617;         /* Very Dark Navy (almost black) */
    --bg-bottom: #172554;      /* Rich Royal Blue */
    --header-grey: #0f172a;    
    --accent-blue: #22d3ee;    /* Vibrant Cyan/Teal from the "X" */
    --text-light: #f8fafc;
    --text-muted: #cbd5e1;      
    --font-family: 'Inter', sans-serif;
    --container-width: 1200px;
    
    /* Header Scaling Heights */
    --header-large: 100px; 
    --header-shrunk: 75px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-family);
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) fixed;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

#global-overlay-video {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; object-fit: cover; opacity: 0.05; 
}

.container { 
    max-width: var(--container-width); 
    margin: 0 auto; 
    padding: 0 1.5rem; 
    width: 100%;
}

img, video { max-width: 100%; height: auto; }

/* --- Professional Section Spacing --- */
/* Default spacing for standard pages */
section { 
    padding: 6rem 0;
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    width: 100%;
}

/* --- HOME PAGE SPECIFIC SPACING FIX --- */
/* Increases spacing significantly only on Home Page to separate sections */
body.home-page section {
    padding: 10rem 0;
}

h1, h2, h3 { line-height: 1.1; margin-bottom: 1.5rem; font-weight: 700; color: #fff; text-align: center; }
h1 { font-size: 4rem; letter-spacing: -0.03em; }
h2 { font-size: 3rem; }
p { margin-bottom: 1.5rem; color: var(--text-muted); text-align: center; max-width: 850px; margin-left: auto; margin-right: auto; }

.cta-button {
    display: inline-block; background-color: var(--accent-blue); color: #020617 !important;
    padding: 1.2rem 3.5rem; border-radius: 50px; font-weight: 800; text-decoration: none;
    text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease;
    border: none; cursor: pointer;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3); 
}
.cta-button:hover { 
    background-color: #fff; 
    transform: translateY(-3px); 
    box-shadow: 0 15px 30px rgba(34, 211, 238, 0.5); 
}

/* --- Scaling Header & Mobile Menu --- */
.sticky-header {
    position: fixed; top: 0; left: 0; width: 100%; 
    height: var(--header-large); 
    z-index: 1000; 
    background-color: rgba(2, 6, 23, 0.95); 
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}
.sticky-header.shrunk { height: var(--header-shrunk); }
.sticky-header nav { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; }

.logo img { height: 70px; width: auto; transition: height 0.3s ease; }
.sticky-header.shrunk .logo img { height: 50px; }

/* Desktop Nav */
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 600; text-decoration: none; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; transition: 0.3s; }
.nav-links a.active, .nav-links a:hover { color: var(--accent-blue); }

/* Mobile Menu Button (Hidden on Desktop) */
.mobile-menu-btn { display: none; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }

/* --- Hero Layout Fixes --- */
main { padding-top: var(--header-large); }
body.home-page main { padding-top: 0; }

.video-hero { 
    min-height: 100vh; 
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    padding-top: 80px; 
}
.hero-background-video { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    object-fit: cover; z-index: -1; 
}
.hero-overlay { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.7); } 
.hero-content { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; width: 100%; }

/* --- HIGH VISIBILITY HERO FORM --- */
.hero-signup-box {
    background: #0f172a; 
    border: 2px solid var(--accent-blue); 
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9); 
    margin-top: 3rem;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 20;
}
.hero-signup-box h3 { margin-bottom: 0.5rem; font-size: 1.8rem; color: #fff; }
.hero-signup-box p { font-size: 1rem; margin-bottom: 2rem; opacity: 1; color: var(--text-muted); }

/* Level 2 Subpage Banners */
.page-hero {
    height: 350px; position: relative; width: 100%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.page-hero video { 
    position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; 
    object-fit: cover; filter: brightness(35%); 
    transform: translate(-50%, -50%);
}
.hero-text-overlay { 
    position: relative; z-index: 5; 
    width: 100%; max-width: 1000px; 
    display: flex; flex-direction: column; align-items: center;
    padding: 0 1rem;
}
.hero-text-overlay h2 { font-size: 4rem; margin: 0; text-shadow: 0 4px 20px rgba(0,0,0,0.8); }

/* --- High-Contrast Problem Grid --- */
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 3rem; margin-top: 4rem; width: 100%; }

/* Updated for Clickable Cards */
a.problem-card {
    text-decoration: none;
    color: inherit;
    background: rgba(30, 41, 59, 0.6); 
    padding: 4rem 2rem; 
    border-radius: 32px; 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    transition: 0.4s;
    cursor: pointer;
}
/* Hover Glow Effect */
a.problem-card:hover { 
    transform: translateY(-15px); 
    border-color: var(--accent-blue);
    box-shadow: 0 10px 40px rgba(34, 211, 238, 0.15); /* Teal Glow */
}

/* SVG Number Styles */
.number-svg {
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
    stroke: var(--accent-blue);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Who is Walqer For? Grid --- */
.who-is-grid {
    display: grid;
    /* Force 4 columns on desktop as requested */
    grid-template-columns: repeat(4, 1fr); 
    gap: 3rem;
    width: 100%;
}

/* --- Alternating Layout --- */
.alternating-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6rem; width: 100%; text-align: left; }
.layout-media video { border-radius: 28px; width: 100%; box-shadow: 0 40px 80px rgba(0,0,0,0.6); }
.layout-text { text-align: left; align-items: flex-start; }
.layout-text h2, .layout-text p { text-align: left; margin-left: 0; }

/* --- About Page Spacing Adjustments --- */
.about-intro-section { padding-top: 6rem; }
.science-chart-container { 
    margin: 2rem auto 0;
    width: 100%; 
    max-width: 1000px; 
    min-height: 300px; 
    background: rgba(15, 23, 42, 0.95); 
    padding: 2rem; 
    border-radius: 32px; 
    border: 1px solid rgba(34, 211, 238, 0.2); 
}

/* --- Store Layout Fixes --- */
#product-section { display: flex !important; min-height: auto; padding: 6rem 0; visibility: visible; }
.product-page-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; width: 100%; text-align: left; align-items: start; }
.main-display-area { background: rgba(255, 255, 255, 0.03); border-radius: 32px; overflow: hidden; aspect-ratio: 4/5; position: relative; border: 1px solid rgba(255, 255, 255, 0.05); }
.main-display-area img { width: 100%; height: 100%; object-fit: cover; }
.thumbnail-images { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; margin-top: 1.5rem; }
.thumbnail { border-radius: 8px; cursor: pointer; opacity: 0.4; transition: 0.3s; overflow: hidden; border: 2px solid transparent; aspect-ratio: 1/1; }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.thumbnail.active { opacity: 1; border-color: var(--accent-blue); }

/* --- Blog Feed --- */
.blog-feed {
    padding-top: 4rem;
}
.blog-grid {
    display: grid;
    /* Force 2 columns on desktop */
    grid-template-columns: repeat(2, 1fr); 
    gap: 3rem;
    width: 100%;
}
.article-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: 0.4s ease;
    height: 100%;
}
.article-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    background: rgba(30, 41, 59, 0.8);
}
.card-image {
    height: 240px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020617;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: 0.5s ease;
}
.card-image img.logo-thumb {
    width: 60%;
    height: auto;
    object-fit: contain;
}
.article-card:hover .card-image img {
    transform: scale(1.05);
}
.card-content {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.card-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #fff;
    line-height: 1.3;
}
.card-content p {
    font-size: 1rem;
    margin-bottom: 0;
    opacity: 0.7;
}

/* --- Footer Restore --- */
footer { background: #020617; padding: 6rem 0 3rem; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; width: 100%; text-align: left; }
.footer-column h3 { text-align: left; margin-bottom: 1.5rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px; color: #fff; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 0.8rem; }
.footer-column ul li a { color: var(--text-muted); text-decoration: none; transition: 0.3s; font-size: 0.9rem; }
.footer-column ul li a:hover { color: var(--accent-blue); }
.footer-bottom { text-align: center; margin-top: 4rem; opacity: 0.4; padding-top: 3rem; border-top: 1px solid rgba(255,255,255,0.05); }

/* --- Animation --- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }


/* --- MOBILE RESPONSIVE OVERHAUL --- */
@media (max-width: 992px) {
    /* Header & Nav */
    .mobile-menu-btn { display: block; z-index: 1002; }
    .nav-links { 
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh; 
        background: #020617; flex-direction: column; justify-content: center; 
        transition: 0.4s ease; box-shadow: -10px 0 30px rgba(0,0,0,0.8);
        border-left: 1px solid rgba(255,255,255,0.1);
        z-index: 1001;
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 1.5rem 0; }
    .nav-links a { font-size: 1.5rem; }

    /* Typography */
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    .hero-text-overlay h2 { font-size: 2.5rem; }

    /* Layouts */
    .alternating-layout, .product-page-grid, .infographics-cta-content, .footer-grid, .blog-grid, .who-is-grid { 
        grid-template-columns: 1fr; 
        gap: 3rem; 
        text-align: center; 
    }
    .alternating-layout.reverse .layout-media { order: 1; } 

    /* Alignment overrides */
    section { padding: 4rem 0; }
    body.home-page section { padding: 6rem 0; } 
    
    .layout-text, .product-details, .footer-column, .cta-text-side, .card-content { 
        text-align: center; 
        align-items: center; 
    }
    .layout-text h2, .layout-text p, 
    .product-details h1, .product-details p,
    .footer-column h3, .footer-column ul,
    .cta-text-side h3, .cta-text-side p,
    .card-content h3, .card-content p { 
        text-align: center; 
        margin-left: auto; 
        margin-right: auto;
    }
    
    /* Hero Form */
    .hero-signup-box { padding: 2rem 1.5rem; margin-top: 2rem; }
    .hero-signup-box form { flex-direction: column; gap: 1rem; }
    .hero-signup-box input { border-radius: 12px !important; width: 100%; text-align: center;}
    .hero-signup-box button { border-radius: 12px !important; width: 100%; padding: 1.2rem; }

    /* Grids */
    .problem-grid { grid-template-columns: 1fr; }
    .about-intro-section { padding-top: 4rem; }
    
    /* Team Grid - Stacks nicely on mobile */
    .team-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* Team Grid Styles (Desktop) */
.team-grid {
    display: grid;
    /* Force 5 columns on desktop for row of 5 */
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    width: 100%;
}
.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.team-member img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    /* FIX: Align image to the top so heads aren't cut off */
    object-position: top; 
    border: 3px solid var(--accent-blue);
    margin-bottom: 1.5rem;
    background: #1e293b;
}
.team-member h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem; /* Slightly smaller for fitting 5 across */
    color: #fff;
    line-height: 1.2;
}
.team-title {
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* --- Email Chooser Modal --- */
.email-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.email-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.email-modal {
    background: #0f172a;
    border: 2px solid var(--accent-blue);
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.email-modal-overlay.active .email-modal {
    transform: translateY(0);
}
.email-modal h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #fff;
}
.email-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
    cursor: pointer;
}
.email-option-btn:hover {
    background: rgba(34, 211, 238, 0.1);
    border-color: var(--accent-blue);
}
.email-modal-close {
    margin-top: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9rem;
}