:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #172554 50%, #0891b2 100%);
    --primary-color: #06b6d4;
    --accent-color: #3b82f6;
    --text-light: #f8fafc;
    --text-dim: #cbd5e1;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(255, 255, 255, 0.08);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

/* Hide Scrollbar */
::-webkit-scrollbar {
    display: none;
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-light);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #e2e8f0, #bae6fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-dim);
}

/* Glassmorphism Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}




/* Floating Elements */
.floating-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Scroll-linked Astronaut Background */
#astronaut-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 250px;
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
    will-change: transform, opacity;
    transition: opacity 0.3s ease;
}


@media (max-width: 768px) {
    #astronaut-background {
        width: 150px;
        height: 150px;
        opacity: 0.3;
    }
}

.float-item {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
    color: var(--text-light);
}

/* Section Common */
section {
    position: relative;
    padding: 1.5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 10;
}

/* Hero Section */
.hero {
    height: auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    align-items: center;
    position: relative;
    z-index: 2;
}

#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 3D Model Container */
#model-3d-container {
    width: 100%;
    height: 100%;
    /* Fill the grid cell */
    min-height: 300px;
    /* Minimum constrained height */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: grab;
    border-radius: 20px;
    overflow: hidden;
}

#model-3d-container:active {
    cursor: grabbing;
}

#model-3d-container canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 20px;
    filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.3));
}


.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #7dd3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(6, 182, 212, 0.3);
}

.hero p {
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Hero Visual (Reused in Why Charge) */
.hero-visual {
    position: relative;
    height: auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.hero-card {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    animation: float 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: scale(1.1) rotate(5deg);
    background: transparent;
}

.hero-card img {
    width: 120px;
    /* Increased Size */
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.4));
}



/* Specific Positions - Center Bulb + Satellites (Symmetrical) */

/* Card 2: CENTER - AI (Light Bulb) */
.hero-card:nth-child(2) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: auto;
    animation-delay: 0s;
}

.hero-card:nth-child(2) img {
    width: 180px;
    height: 180px;
    filter: drop-shadow(0 0 40px rgba(6, 182, 212, 0.6));
}

.hero-card:nth-child(2):hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Card 1: Top Left - Robot */
.hero-card:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 1s;
}

/* Card 3: Top Right - Laptop */
.hero-card:nth-child(3) {
    top: 10%;
    right: 10%;
    animation-delay: 2s;
    z-index: 1;
    transform: none;
    left: auto;
}

.hero-card:nth-child(3):hover {
    transform: scale(1.1) rotate(5deg);
}

.hero-card:nth-child(3) img {
    width: 120px;
    height: 120px;
}

/* Card 4: Bottom Left - Test Tube */
.hero-card:nth-child(4) {
    top: auto;
    bottom: 15%;
    left: 10%;
    right: auto;
    animation-delay: 3s;
}

/* Card 5: Bottom Right - Rocket */
.hero-card:nth-child(5) {
    top: auto;
    bottom: 15%;
    right: 10%;
    left: auto;
    animation-delay: 4s;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-body);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    align-items: center;
}

/* Feature/Track Cards */
.card {
    padding: 2.5rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    background: var(--card-hover-bg);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    background: rgba(6, 182, 212, 0.1);
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Track Cards with Images */
.track-card {
    padding: 0;
    transition: transform 0.3s ease;
}

.track-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.track-content {
    padding: 2rem;
}

/* Journey Timeline - Tree Branch Layout */
.journey-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.journey-step {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0;
    position: relative;
    width: 50%;
    opacity: 0.2;
    /* Initial state before scroll reveal */
    filter: blur(5px);
    transition: all 0.5s ease;
    padding: 2rem;
}

/* Odd Steps: Left Side */
.journey-step:nth-child(odd) {
    left: 0;
    flex-direction: row-reverse;
    text-align: right;
    padding-right: 60px;
    /* Space for branch connection */
}

/* Even Steps: Right Side */
.journey-step:nth-child(even) {
    left: 50%;
    flex-direction: row;
    text-align: left;
    padding-left: 60px;
    /* Space for branch connection */
}

.journey-step.active {
    opacity: 1;
    filter: blur(0);
    transform: scale(1.05);
    /* Slight pop */
}

.step-marker {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    z-index: 2;
    transition: transform 0.3s ease;
}

.step-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Removed old line styles in favor of SVG animation */
.step-line {
    display: none;
}


/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Newsletter Section */
.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto 0;
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.newsletter-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

/* About / Footer */
.about-section {
    text-align: center;
}

footer {
    background: rgba(15, 23, 42, 0.5);
    border-top: 1px solid var(--glass-border);
    padding: 4rem 1.5rem;
    margin-top: 4rem;
    text-align: center;
}

footer img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

footer img:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.7));
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float-center {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0) rotate(0deg);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-20px) rotate(5deg);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}



/* Mobile */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        display: none;
    }

    #model-3d-container {
        height: 300px;
        margin-bottom: 1.5rem;
    }


    .scroll-reveal {
        justify-content: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    section {
        padding: 1.5rem 1rem;
    }

    .journey-step:nth-child(odd),
    .journey-step:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 1rem;
        padding-right: 1rem;
        text-align: center;
        flex-direction: column;
    }

    .testimonial-prev,
    .testimonial-next {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .journey-step {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        width: 100%;
        left: 0 !important;
        padding: 1.5rem 1rem;
    }

    .journey-step:nth-child(odd),
    .journey-step:nth-child(even) {
        text-align: center;
        flex-direction: column;
    }

    .step-marker {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .step-line {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }

    .card {
        padding: 2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }

    #lab-animation-container {
        width: 400px !important;
        height: 400px !important;
    }

    footer {
        padding: 3rem 1.5rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .logo-3d {
        width: 150px;
    }
}


@media (max-width: 400px) {
    .hero h1 {
        font-size: 2rem;
        word-wrap: break-word;
    }

    .hero p {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    section {
        padding: 1rem 1rem;
    }

    .hero-container {
        gap: 1rem;
    }

    .hero-content .scroll-reveal {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    #connect .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    #model-3d-container {
        height: 250px;
    }


    #connect .grid-2>div:nth-child(2) {
        border-left: none !important;
        padding-left: 0 !important;
        border-top: 1px solid var(--glass-border);
        padding-top: 2rem;
    }

    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-input {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    #connect .glass-panel {
        padding: 2rem 1.5rem !important;
    }

    .card {
        padding: 1.5rem;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .card h3 {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    #lab-animation-container {
        width: 300px !important;
        height: 300px !important;
        opacity: 0.03 !important;
    }

    .track-content {
        padding: 1.5rem;
    }

    .journey-step {
        padding: 1rem;
    }

    .step-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    footer .grid-3 {
        gap: 2rem;
    }
}