/* =========================================
   BASE STYLES & MEDICAL AESTHETIC
========================================= */
:root {
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.4);
    --secondary: #14b8a6;
    /* Teal / Medical Accent */
    --secondary-glow: rgba(20, 184, 166, 0.4);
    --bg-dark: #030712;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   BACKGROUND CANVAS (IMAGE SEQUENCE)
========================================= */
.video-container {
    position: fixed;
    /* Keeps canvas permanently in viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

#bg-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Exactly center the image */
    display: block;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(3, 7, 18, 0.1) 0%, rgba(3, 7, 18, 0.9) 100%);
    pointer-events: none;
}

/* =========================================
   SCROLL TRACK (Triggers GSAP)
========================================= */
.scroll-container {
    height: 500vh;
    /* Artificially expanding height for scroll distance */
    position: relative;
    z-index: 1;
}

/* =========================================
   UI OVERLAYS
========================================= */
.ui-layer {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    /* Let scroll events pass through to body */
    display: flex;
    align-items: center;
    justify-content: center;
}

.phase-ui {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    pointer-events: auto;
    /* Re-enable clicks inside the actual UI elements */
    text-align: center;
    padding: 3.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
    max-width: 850px;
    width: 90%;
}

/* Only Phase 1 is visible on initial load */
.phase1-text {
    opacity: 1;
    visibility: visible;
}

/* Text & Typography */
.gradient-text {
    font-size: 3.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.15;
    letter-spacing: -1.5px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Indicator */
.scroll-indicator {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    animation: bounce 2.5s infinite;
    font-weight: 600;
}

.scroll-indicator .arrow {
    margin-top: 0.5rem;
    font-size: 1.5rem;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

/* Docs Grid Menu */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.doc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-8px);
    border-color: var(--secondary);
    box-shadow: 0 15px 35px var(--secondary-glow);
}

.doc-btn .icon {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.doc-btn .label {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Action Buttons & Pills */
.install-pill {
    display: inline-block;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.install-pill code {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    color: var(--secondary);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.mt-4 {
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.8rem;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    gap: 0.75rem;
}

.btn-github {
    background: var(--text);
    color: #0f172a;
    border: 2px solid var(--text);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

.btn-github:hover {
    background: transparent;
    color: var(--text);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.0);
}

/* Responsiveness */
@media (max-width: 600px) {
    .gradient-text {
        font-size: 2.8rem;
    }

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

    .phase-ui {
        padding: 2rem;
    }
}