/* Google Fonts - Outfit for Headings, Inter for Body */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Outfit:wght@300;400;700;900&display=swap');

:root {
    --bg-deep: #020b1c;
    --bg-darker: #01050e;
    --text-primary: #ffffff;
    --text-secondary: #b0b8c4;
    --accent-blue: #2E9AFE;
    --accent-cyan: #00E5FF;
    --accent-green: #00C853;
    --accent-red: #FF4444;

    --glass-bg: rgba(2, 11, 28, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);

    --neon-blue-glow: 0 0 30px rgba(46, 154, 254, 0.2);
    --neon-green-glow: 0 0 20px rgba(0, 200, 83, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.7;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
.btn {
    font-family: 'Outfit', sans-serif;
}

/* Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-accent {
    color: var(--accent-blue);
}

.text-cyan {
    color: var(--accent-cyan);
}

.text-green {
    color: var(--accent-green);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #0066cc);
    color: white;
    box-shadow: var(--neon-blue-glow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 40px rgba(46, 154, 254, 0.4);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: all 0.4s ease;
}

header.scrolled {
    padding: 15px 0;
    background: rgba(2, 11, 28, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    /* Increased size */
    width: auto;
    display: block;
    object-fit: contain;
    /* Ensure full visibility */
    filter: drop-shadow(0 0 10px rgba(46, 154, 254, 0.3));
}

nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 30px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/hero_bg.png') no-repeat center center/cover;
    opacity: 0.4;
    z-index: -2;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0));
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(46, 154, 254, 0.1);
    border: 1px solid rgba(46, 154, 254, 0.3);
    border-radius: 20px;
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-content h1 .period {
    color: var(--accent-blue);
}

.hero-content p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* Problem Section */
section {
    padding: 160px 0;
    /* Balanced Premium Spacing */
}

#solution,
#tech {
    margin-top: 100px;
    /* Reduced forced separation */
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 6rem;
    /* Reduced gap after titles */
}

.section-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #b0b8c4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.interactive-graph {
    height: 400px;
    background: linear-gradient(180deg, rgba(255, 68, 68, 0.05) 0%, rgba(2, 11, 28, 0.5) 100%);
}

.graph-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    padding-top: 50px;
}

.bar {
    width: 8%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px 4px 0 0;
    transition: height 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, transparent, rgba(255, 255, 255, 0.2));
}

.bar.peak {
    background: linear-gradient(to top, #ff2222, #ff6b6b);
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
}

/* Solution Cards - Advanced */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.card {
    transition: all 0.4s ease;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.card:hover {
    transform: translateY(-15px);
    border-color: rgba(46, 154, 254, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.card:hover .card-icon {
    transform: scale(1.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.card-icon-svg {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: all 0.4s ease;
}

.card:hover .card-icon-svg {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.1);
}

.card-icon-svg svg {
    width: 32px;
    height: 32px;
}

.icon-red {
    color: var(--accent-red);
    filter: drop-shadow(0 0 10px rgba(255, 68, 68, 0.4));
}

.icon-blue {
    color: var(--accent-blue);
    filter: drop-shadow(0 0 10px rgba(46, 154, 254, 0.4));
}

.icon-green {
    color: var(--accent-green);
    filter: drop-shadow(0 0 10px rgba(0, 200, 83, 0.4));
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.card-time {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    padding: 4px 12px;
    background: rgba(46, 154, 254, 0.1);
    border-radius: 4px;
}

/* Tech Section */
.tech-container {
    position: relative;
    padding: 4rem;
    display: flex;
    justify-content: center;
}

.tech-diagram {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.tech-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/dashboard.png') no-repeat center center/cover;
    opacity: 0.1;
    z-index: 1;
    border-radius: 24px;
}

.tech-node {
    text-align: center;
    padding: 2.5rem;
    background: var(--bg-deep);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 250px;
    transition: 0.3s;
    z-index: 2;
}

.tech-node.core {
    width: 300px;
    padding: 3rem;
    border-color: var(--accent-blue);
    box-shadow: var(--neon-blue-glow);
    background: rgba(2, 11, 28, 0.9);
}

.connection-line {
    flex-grow: 1;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    position: relative;
    overflow: hidden;
}

.connection-line::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: flow 2s infinite linear;
}

@keyframes flow {
    100% {
        left: 200%;
    }
}

/* Simulator - Premium */
.simulator-section {
    background: url('../assets/charger.png') no-repeat center center/cover;
    position: relative;
}

.simulator-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 11, 28, 0.85);
    backdrop-filter: blur(5px);
}

.simulator-wrapper {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
}

.sim-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.slider-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
    margin-top: 20px;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 20px var(--accent-cyan);
    border: 4px solid #fff;
    transition: transform 0.2s;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Footer */
footer {
    padding: 80px 0 40px;
    background: var(--bg-darker);
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    margin-bottom: 50px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        /* Slightly smaller base font */
    }

    /* Global Spacing Adjustments */
    section {
        padding: 80px 0;
        /* Reduce from 160px */
    }

    #solution,
    #tech {
        margin-top: 50px;
        /* Reduce from 100px */
    }

    .section-header {
        margin: 0 auto 3rem;
        /* Reduce from 6rem */
        padding: 0 20px;
    }

    .container {
        padding: 0 20px;
    }

    /* Hero Section */
    .hero {
        padding-top: 120px;
        /* Account for fixed header */
        text-align: center;
        min-height: auto;
        /* Allow content to dictate height if needed */
        padding-bottom: 60px;
    }

    .hero-content h1 {
        font-size: 2.8rem;
        /* Reduce from 5rem */
    }

    .hero-content p {
        font-size: 1.1rem;
        margin: 0 auto 2rem;
    }

    /* Navigation */
    .nav-container {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        display: none;
        /* Hide nav links on mobile for simplicity */
    }

    .btn {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        /* Full width buttons */
    }

    /* Grids to Columns */
    .problem-grid,
    .cards-grid,
    .sim-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        /* Stack vertically */
        gap: 40px;
    }

    /* Tech Diagram specific fix */
    .tech-diagram {
        flex-direction: column;
        gap: 40px;
    }

    .connection-line {
        width: 3px;
        height: 50px;
        /* Vertical line */
        background: linear-gradient(180deg, transparent, var(--accent-blue), transparent);
    }

    .connection-line::after {
        top: -100%;
        left: 0;
        width: 100%;
        height: 50%;
        background: linear-gradient(180deg, transparent, #fff, transparent);
        animation: flowVertical 2s infinite linear;
    }

    @keyframes flowVertical {
        100% {
            top: 200%;
        }
    }

    /* Solution Cards */
    .card {
        padding: 2rem;
        /* Reduce internal padding */
    }

    /* Simulator */
    .simulator-wrapper {
        padding: 2rem;
    }

    .interactive-graph {
        height: 250px;
        /* Smaller graph */
    }
}