/* =========================
   HOME — HERO
   ========================= */

/* =========================
   HOME — HERO & SECTIONS
   ========================= */

.home-root {
    /* Flexbox Centering Strategy (v2) */
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding-top: 0;
    /* Let flexbox handle vertical alignment */
    padding-bottom: 60px;

    position: relative;
    text-align: center;
}

.home-hero-inner {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Standard spacing for sections */
.page-section {
    margin-bottom: 160px;
    padding: 0 24px;
}

/* Updated Text Styles */
.home-title {
    font-size: 4.5rem;
    /* Bigger */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
    background: linear-gradient(180deg, #fff, #a0a0a0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Stronger text glow */
    text-shadow: 0 0 40px rgba(0, 164, 255, 0.25);
}

.home-subtitle {
    font-size: 1.35rem;
    /* Larger */
    color: #b0b8c1;
    /* Lighter/Cleaner */
    max-width: 800px;
    margin: 0 auto 64px;
    font-weight: 400;
    line-height: 1.6;
}

/* HERO ACTIONS */
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
}

/* Restore Original Blue Button "Blue Box" */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;

    /* Slightly more visible blue fill */
    background: rgba(0, 164, 255, 0.15);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);

    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 25px var(--accent-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 14px 32px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}


/* CTA at bottom needs to be glowing and animated */
.home-direction {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.home-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: rgba(0, 164, 255, 0.05);
    /* Very subtle fill */
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-top: 32px;
    /* Ensure spacing */
}

.home-cta:hover {
    background: rgba(0, 164, 255, 0.1);
    box-shadow: 0 0 25px var(--accent-glow), inset 0 0 10px var(--accent-glow);
    text-shadow: 0 0 8px var(--accent-primary);
}

.home-cta::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.home-cta:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* DIAGRAM */
/* DIAGRAM */
.hero-diagram-container {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto;
    border-radius: 16px;
    position: relative;
    background: radial-gradient(circle at center, rgba(0, 164, 255, 0.05), transparent 70%);

    /* Desktop Default */
    height: auto;
    aspect-ratio: 16/9;
    /* UNIVERSAL SCROLL BEHAVIOR */
    /* If JS forces canvas > container, allow scroll */
    overflow-x: auto;
    overflow-y: hidden;

    /* Scrollbar Styling (Global) */
    scrollbar-width: auto;
    scrollbar-color: var(--accent-primary) rgba(255, 255, 255, 0.1);
}

/* Webkit Scrollbar (Global) */
.hero-diagram-container::-webkit-scrollbar {
    height: 8px;
    display: block;
    background: rgba(255, 255, 255, 0.05);
}

.hero-diagram-container::-webkit-scrollbar-thumb {
    background-color: var(--accent-primary);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.hero-diagram-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .hero-diagram-container {
        width: 100%;
        height: 750px !important;
        min-height: 750px;
        aspect-ratio: auto;
        /* Disable aspect ratio to use fixed height */

        /* SCROLLING MAGIC */
        overflow-x: scroll !important;
        /* Force scrollbar */
        overflow-y: hidden;
        white-space: nowrap;

        /* Enable Native Momentum Scroll */
        -webkit-overflow-scrolling: touch;

        /* Ensure border radius doesn't clip scrollbar */
        border-radius: 8px;
        margin-bottom: 40px;

        /* Visual Scrollbar styling */
        scrollbar-width: auto;
        scrollbar-color: var(--accent-primary) rgba(255, 255, 255, 0.1);
    }

    /* Webkit Scrollbar (Chrome/Edge/Safari) */
    .hero-diagram-container::-webkit-scrollbar {
        height: 8px;
        display: block;
        background: rgba(255, 255, 255, 0.05);
    }

    .hero-diagram-container::-webkit-scrollbar-thumb {
        background-color: var(--accent-primary);
        border-radius: 10px;
        border: 2px solid rgba(0, 0, 0, 0.2);
        /* Contrast safety */
    }

    .hero-diagram-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    #systemCanvas {
        display: block;
        width: auto;
        min-width: 1000px;
        /* Synchronized with JS logic */
    }
}

#systemCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* =========================
   HOME — SECTIONS
   ========================= */

.page-section {
    margin-bottom: 160px;
    padding: 0 24px;
}

.home-section-title {
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 48px;
}

.home-section-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 24px;
    text-align: center;
    line-height: 1.7;
}

/* =========================
   DIFFERENTIATION
   ========================= */

.home-diff-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.home-diff-item {
    padding: 40px;
    border-radius: 8px;
    text-align: left;
}

.home-diff-item h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.home-diff-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* =========================
   AUDIENCE
   ========================= */

.audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.audience-item {
    padding: 32px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

.audience-item h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

.audience-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1024px) {
    .home-title {
        font-size: 2.5rem;
    }

    .home-diff-list,
    .audience-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .hero-diagram-container {
        height: 450px;
        /* Increased significantly for visibility */
        width: 100%;
        border-radius: 8px;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 40px;
    }

    #systemCanvas {
        width: 100%;
        height: 100%;
    }

    .home-title {
        font-size: 2rem;
    }

    .home-subtitle {
        font-size: 1rem;
    }

    /* Floating controls on scrollable diagram */
    #power-controls {
        position: sticky !important;
        left: 16px !important;
        bottom: 16px !important;
        margin-right: auto;
    }
}