:root {
    /* Color Palette */
    --bg-dark-start: #081212;
    --bg-dark-end: #0f1c1a;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --logo-infer: #a3b8cc;
    --logo-know: #66b3ff;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover-bg: rgba(255, 255, 255, 0.05);
    --glass-hover-border: rgba(255, 255, 255, 0.15);

    /* Layout */
    --header-height: 80px;
    --footer-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    /* Force single viewport */
    font-family: 'Satoshi', sans-serif;
    color: var(--text-primary);
    background: radial-gradient(circle at top left, var(--bg-dark-start), var(--bg-dark-end));
    background-size: cover;
    background-position: center;
}

/* Typography specifics */
h1,
h2,
h3,
h4 {
    font-weight: 400;
    /* Regular */
    letter-spacing: -0.02em;
}

p,
span,
div {
    font-weight: 300;
    /* Light */
}

/* Global Fixed Components */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 40px;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    user-select: none;
}

.logo-img {
    height: 10px;
    width: auto;
}

.logo-img-footer {
    height: 8px;
    width: auto;
    opacity: 0.8;
}

.logo-text.font-normal {
    font-weight: 400;
    color: var(--logo-infer);
}

.logo-text.font-bold {
    font-weight: 700;
    color: var(--logo-know);
}

.section-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 100;
    /* Subtle glass effect for footer background */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
}

.section-footer .footer-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Main Container & Sections */
#main-container {
    width: 100%;
    height: 100vh;
    position: relative;
    perspective: 1000px;
    /* For anti-gravity 3D depth effects */
}

.panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
    visibility: hidden;
    /* GSAP will toggle this */
    opacity: 0;
    z-index: 10;
    overflow-y: auto;
    /* Allow scrolling if content is taller than viewport (mobile) */
    overflow-x: hidden;
}

.panel.active {
    visibility: visible;
    opacity: 1;
    z-index: 20;
}

.form {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
}

/* Section Specifics */
.content-wrapper {
    max-width: 1200px;
    width: 100%;
    padding: 0 40px;
    z-index: 2;
}

.content-wrapper.centered {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-wrapper.centered-top {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding-top: 8vh;
    padding-bottom: calc(var(--footer-height) + 40px);
    /* Ensures spacing for the absolute footer */
}

/* Section 1 Hero */
.hero-heading {
    font-size: 4.5rem;
    margin-bottom: 24px;
    color: #f8fafc;
}

.hero-subtext {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 40px;
}

.btn-hollow {
    display: inline-block;
    position: relative;
    z-index: 50;
    padding: 12px 32px;
    margin-top: 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 50px;
    /* pill shape */
    font-size: 1rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    opacity: 1;
}

.btn-header {
    right: 3vw;
    display: inline-block;
    position: fixed;
    top: 20px;
    z-index: 50;
    padding: 10px 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 50px;
    /* pill shape */
    font-size: 1rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    opacity: 1;
}

.btn-header:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.btn-hollow:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Section 2 & 3 General */
.section-heading {
    font-size: 3rem;
    margin-bottom: 48px;
    text-align: center;
    color: #f8fafc;
}

.section-subtext {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 48px;
    text-align: center;
}

/* Grids */
.four-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

.three-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin-bottom: 80px;
    /* Force margin between cards and bottom absolute footer */
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    background: var(--glass-hover-bg);
    border-color: var(--glass-hover-border);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon {
    margin-bottom: 20px;
    color: var(--logo-infer);
    transition: transform 0.4s ease;
}

.card-icon svg {
    width: 48px;
    height: 48px;
}

.card-icon img {
    width: 48px;
    height: 48px;
}

.glass-card:hover .card-icon {
    transform: scale(1.1);
    color: var(--logo-know);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #f8fafc;
}

.card-title2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #f8fafc;
}

.card-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature-card .card-icon {
    margin-bottom: 24px;
}

/* Parallax wireframe background for Section 2 */
.dashboard-wireframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    /* Hidden by default, script will show it in Section 2 */
}

#wireframe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Fixed Background Layers for Crossfading */
.fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    visibility: hidden;
    background-size: cover !important;
    background-position: center !important;
}

#bg-layer-1 {
    background: url('assets/bg-hero.jpg') no-repeat;
    opacity: 1;
    visibility: visible;
}

#bg-layer-2 {
    background: url('assets/bg-sect2.jpg') no-repeat;
}

#bg-layer-3 {
    background: url('assets/bg-sect3.jpg') no-repeat;
}

#bg-layer-4 {
    background: url('assets/bg-sect3.jpg') no-repeat;
}

/* Sections themselves are now transparent */
.section-1,
.section-2,
.section-3,
.section-4 {
    background: transparent;
}

.floating-panel {
    position: absolute;
    border: 1px solid rgba(100, 150, 200, 0.1);
    background: rgba(10, 20, 25, 0.2);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5) inset;
    backdrop-filter: blur(2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .four-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-heading {
        font-size: 3.5rem;
    }

    .section-heading {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .four-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .three-card-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        /* Compress gap strongly */
    }

    .glass-card {
        padding: 12px 10px;
        /* Highly compressed padding */
    }

    .card-icon svg {
        width: 24px;
        /* Smaller icons matching tight space */
        height: 24px;
    }

    .card-title {
        font-size: 0.95rem;
        /* Tighter font */
        margin-bottom: 4px;
    }

    .card-text {
        font-size: 0.75rem;
        /* Tighter font */
    }

    .hero-heading {
        font-size: 2.5rem;
    }

    .section-heading {
        font-size: 1.6rem;
        margin-bottom: 12px;
        /* Compress heading margin */
    }

    .hero-subtext,
    .section-subtext {
        font-size: 0.9rem;
        margin-bottom: 16px;
        /* Compress subtext margin */
    }

    .fixed-header {
        padding: 0 20px;
    }

    .logo-img {
        height: 10px;
        /* Force to 10px exactly to slice the original 21px in half */
    }

    .logo-img-footer {
        height: 8px;
        /* Force to 8px exactly to slice the original 16px in half */
    }

    /* Revert mobile flow hacks, retain absolute structure for GSAP compatibility */
    .content-wrapper {
        padding: 0 15px;
    }

    .content-wrapper.centered-top {
        padding-top: 4vh;
        /* Push everything higher on screen to make room for footer */
        padding-bottom: 0;
    }

    .section-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 10px 0;
        height: auto;
        width: 100%;
        background: transparent;
    }

    .section-footer .footer-center {
        position: relative;
        left: 0;
        transform: none;
        text-align: center;
    }
}