/* =========================================
   1. GLOBAL & RESET
   ========================================= */
:root {
    --bg-white: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-tech: #f0f9ff;
    --primary: #000000;
    --accent-core: #C6F432;
    /* Bright Lime Green */
    --text-main: #111111;
    --text-sub: #4b5563;
    --border-light: #e2e8f0;
    --font-code: "JetBrains Mono", monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-white);
    color: var(--text-main);
    overflow-x: hidden;
    /* height: 200vh;  <-- REMOVED: Only use this if you need scroll space for testing */
}

/* =========================================
   2. SHRINKING STICKY HEADER
   ========================================= */
.sticky-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    /* Centers the header */
    width: 100%;
    background: transparent;
    z-index: 999;
    /* Higher than slider */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1350px;
    padding: 20px 40px;
    transition: padding 0.4s ease;
}

/* SHRINK EFFECT STATE */
.sticky-header.shrunk {
    width: 90%;
    max-width: 1400px;
    top: 20px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.sticky-header.shrunk .header-inner {
    padding: 10px 30px;
}

/* Navigation Links */
.logo {
    font-weight: 800;
    font-size: 1.2rem;
    text-decoration: none;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 1000;
}

.logo img {
    height: auto;
    width: 150px;
    transition: filter 0.3s ease;
    filter: invert(1) brightness(100);
    /* White when header is transparent on dark hero */
}

.sticky-header.shrunk .logo img {
    filter: none;
    /* Original color when header has solid white background */
}

.nav-links {
    display: flex;
    gap: 30px;
    /* Increased gap slightly for better aesthetics */
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    /* White for dark hero background */
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    /* Needed for the underline line */
    transition: color 0.3s ease;
    white-space: nowrap;
}

.sticky-header.shrunk .nav-links a {
    color: #111111;
    /* Dark text when header is white */
}

/* Hover State */
.nav-links a:hover {
    color: var(--accent-core, #C6F432);
}

/* Shrunk Header Hover State - text remains dark */
.sticky-header.shrunk .nav-links a:hover {
    color: #111111;
}

/* ACTIVE STATE */
.nav-links a.active {
    color: var(--accent-core, #C6F432);
    font-weight: 700;
}

/* Shrunk Header Active State - text remains dark */
.sticky-header.shrunk .nav-links a.active {
    color: #111111;
    font-weight: 700;
}

/* Animated Underline Effect */
.nav-links a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #C6F432;
    transition: width 0.3s ease-in-out;
}

/* Show underline on Hover OR when Active */
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn-demo {
    background: #C6F432;
    color: #000000;
    padding: 10px 20px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: transform 0.2s;
}

.btn-demo:hover {
    transform: scale(1.05);
}

/* =========================================
   3. HERO SLIDER STYLES (REQUIRED FOR SLIDER)
   ========================================= */
.bw-hero {
    position: relative;
    height: 100vh;
    /* Full screen height */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
    background-color: #050505;
    /* Deep AI dark background */
    padding-top: 120px;
    /* Increased to give space for transparent header */
}

/* Modern AI Background */
.hero-modern-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Animated Gradient Spheres */
.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite alternate;
}

.sphere-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(198, 244, 50, 0.3) 0%, rgba(198, 244, 50, 0) 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.sphere-2 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(198, 244, 50, 0.2) 0%, rgba(198, 244, 50, 0) 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.sphere-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(198, 244, 50, 0.15) 0%, rgba(198, 244, 50, 0) 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

/* Grid Overlay */
.grid-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 100%);
    mask-image: radial-gradient(circle at center, black 0%, transparent 100%);
}

/* Noise overlay for premium texture */
.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    z-index: 2;
    pointer-events: none;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, 5%) scale(1.1);
    }

    66% {
        transform: translate(-5%, 10%) scale(0.9);
    }

    100% {
        transform: translate(0, -5%) scale(1);
    }
}

/* Content Wrapper */
.hero-content {
    max-width: 900px;
    z-index: 10;
    position: relative;
}

/* Typography & Animations */
.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    /* White text for dark hero */
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
    display: inline-block;
    position: relative;
}


.hero-subtitle {
    font-size: 1.25rem;
    color: #e2e8f0;
    /* Light gray for subtitle */
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 40px auto;
    opacity: 0;
    animation: slideUpFade 0.8s ease-out 0.5s forwards;
}

/* Buttons */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    animation: slideUpFade 0.8s ease-out 0.7s forwards;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    /* Modern rounded corners */
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-solid {
    background-color: var(--accent-core, #C6F432);
    color: #000000;
    border: 2px solid var(--accent-core, #C6F432);
    box-shadow: 0 4px 15px rgba(198, 244, 50, 0.4);
}

.btn-solid:hover {
    background-color: #a4cc26;
    border-color: #a4cc26;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 244, 50, 0.6);
}

.btn-outline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: white;
    transform: translateY(-2px);
}

/* Slider Controls (Dots) */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

/* Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .btn-group {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
    }
}

/* =========================================
   3. MOBILE NAVIGATION & RESPONSIVENESS
   ========================================= */

/* Default State (Desktop): Hide Hamburger and Mobile Elements */
.hamburger {
    display: none;
    cursor: pointer;
}

.mobile-only {
    display: none;
}

/* CHANGED BREAKPOINT: 
   Set to 1023px.
   This ensures 1024px (Laptops/iPad Landscape) get the NORMAL Desktop header.
   Anything smaller (Tablets/Phones) gets the hamburger.
*/
@media (max-width: 1023px) {

    /* 1. Adjust Sticky Header for Mobile */
    .sticky-header.shrunk {
        width: 95%;
        top: 10px;
    }

    .header-inner {
        padding: 15px 20px;
    }

    .logo {
        transform: translateY(4px); /* Move logo slightly lower to align with hamburger */
    }

    /* 2. Hamburger Icon Styling */
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        -webkit-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
        background-color: var(--accent-core, #C6F432); /* Lime green by default on dark header */
        border-radius: 2px;
    }

    /* When header shrinks and turns white, make hamburger black */
    .sticky-header.shrunk .hamburger .bar {
        background-color: #000000;
    }

    /* Hamburger Animation to 'X' */
    .hamburger.active .bar {
        background-color: var(--accent-core, #C6F432) !important;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* 3. Navigation Menu (Side Drawer) */
    .nav-links {
        position: fixed;
        left: -110%;
        top: 0;
        flex-direction: column;
        background-color: #000000; /* Pitch black */
        width: 100vw;
        height: 100vh;
        text-align: center;
        padding-top: 100px;
        transition: left 0.4s ease;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 998;
        display: flex !important;
    }

    .nav-links.active {
        left: 0 !important;
        display: flex !important;
        visibility: visible !important;
    }

    /* Expand header and make it black to seamlessly blend with the open mobile menu */
    .sticky-header:has(.nav-links.active) {
        background-color: #000000 !important;
        width: 100% !important;
        top: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Ensure logo turns white when menu is open, overriding the shrunk header rule */
    .sticky-header:has(.nav-links.active) .logo img {
        filter: invert(1) brightness(100) !important;
    }

    /* Remove the broken full-width green underline on mobile */
    .nav-links a::after {
        display: none !important;
    }

    /* Force text to be white, overriding any shrunk header rules */
    .sticky-header .nav-links a, .nav-links a {
        display: block;
        padding: 15px 0;
        font-size: 1.1rem;
        color: #ffffff !important; 
    }
    
    .nav-links a:hover {
        color: var(--accent-core, #C6F432);
    }

    /* 4. Handle the "Book Now" Button */
    .header-actions {
        display: none !important;
    }

    /* FIX: Button Width Control */
    .nav-links .btn-demo.mobile-only {
        display: block;
        /* Ensures margin auto works */
        width: fit-content;
        /* Only takes necessary space, not full width */
        min-width: 160px;
        /* Ensures it's not too tiny */
        margin: 30px auto 0;
        /* Centers the button horizontally */
        padding: 12px 30px;
        /* Nice touch area */
        color: #000000 !important; /* Force black text on lime green button */
    }

    .logo img {
        width: 150px;
    }
}

/* =========================================
   4. LAPTOP & SMALL DESKTOP FIX (1024px - 1350px)
   ========================================= */
/* This targets devices that are too big for mobile menu, 
   but too small for the tight 70% header */
@media screen and (min-width: 1024px) and (max-width: 1350px) {

    /* FIX: Increase width from 70% to 95% so elements fit */
    .sticky-header.shrunk {
        width: 95%;
    }

    /* Adjust padding to prevent squashing */
    .sticky-header.shrunk .header-inner {
        padding: 10px 30px;
    }

    /* Reduce gap between links slightly to save space */
    .sticky-header.shrunk .nav-links {
        gap: 20px;
    }

    /* Ensure button doesn't wrap */
    .header-actions {
        flex-shrink: 0;
    }
}

/* =========================================
   HERO FIX FOR LAPTOP & TABLET (1040px - 768px)
   ========================================= */

@media screen and (max-width: 1040px) {
    .bw-hero {
        /* 1. Stop forcing exact center, let padding do the work */
        align-items: flex-start !important;

        /* 2. Push content down significantly to clear the header */
        padding-top: 180px !important;

        /* 3. Ensure height doesn't clip content */
        height: auto !important;
        min-height: 100vh;
        padding-bottom: 80px;
    }

    /* 4. Reduce Title Size for Laptops so it doesn't dominate */
    .hero-title {
        font-size: 3rem !important;
        /* Reduced from 4rem */
        line-height: 1.2;
    }

    /* 5. Adjust Subtitle width */
    .hero-subtitle {
        font-size: 1.1rem;
        max-width: 80%;
    }
}

/* =========================================
   HERO FIX FOR MOBILE (768px and below)
   ========================================= */
@media screen and (max-width: 768px) {
    .bw-hero {
        padding-top: 140px !important;
        padding-bottom: 50px !important;
        align-items: flex-start !important;
        min-height: 60vh !important; /* Significantly reduce height on mobile */
    }

    .hero-title {
        font-size: 2.5rem !important;
    }
}
