/*
Theme Name:   Fluent BCI Theme
Theme URI:    https://fluentbci.com
Description:  Standalone custom theme for the Fluent BCI website.
Author:       Dean Freestone
Version:      3.0.2
*/

/* ==========================================================================
   0. GLOBAL RESET & TYPOGRAPHY
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Raleway:wght@400;600;700&display=swap');

:root {
    --fluent-blue: #00C2FF; 
    --fluent-purple: #A020F0; 
    --fluent-pink: #FF0080;
    --fluent-bg: #0a0a0a; /* The Main Dark Black */
    --fluent-glass: rgba(10, 10, 10, 0.95);
    --fluent-text-main: #ffffff;
    --fluent-text-dark: #111111;
    --fluent-text-muted: rgba(255, 255, 255, 0.6);
    --fluent-text-muted-dark: rgba(17, 17, 17, 0.6);
}

/* CRITICAL SCROLL BEHAVIOR SETTINGS
   The animations on this site rely on 'position: sticky'.
   For sticky to work, NO parent element can have 'overflow: hidden/auto/scroll'.
*/

html {
    scroll-behavior: smooth;
    background-color: #0a0a0a !important;
    /* We apply overflow-x hidden HERE on HTML only. 
       This stops horizontal scrollbars without breaking sticky inside the body. */
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--fluent-bg);
    color: var(--fluent-text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    width: 100%;
    
    /* CRITICAL: Body must be visible for sticky children to find the viewport. */
    overflow: visible !important;
    min-height: 100vh;
}

/* ==========================================================================
   1. LAYOUT UTILITIES & STICKY FIXES
   ========================================================================== */

/* CONTAINER OVERRIDES
   These IDs match the structure in header.php.
   We force them to be block-level and visible to ensure they don't 
   accidentally create a new scroll context that traps the sticky elements.
*/
#page, 
#content, 
#primary, 
.site-content, 
.site-main {
    width: 100%;
    max-width: 100%;
    display: block;
    overflow: visible !important; /* The magic fix for sticky animations */
}

/* Typography Defaults */
h1, h2, h3, h4 {
    font-family: 'Raleway', sans-serif;
    letter-spacing: -0.02em; 
    font-weight: 600;
}

p {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.timeline-date, 
.proc-step-number, 
.matrix-axis-y, 
.matrix-axis-x {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   2. CUSTOM HEADER STYLES
   ========================================================================== */
.fluent-main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: 20px;
    padding-left: 5%;
    padding-right: 5%;
    box-sizing: border-box; 
    z-index: 9999; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    /* Dark Glass Effect */
    background-color: #0a0a0a !important; 
    background: rgba(10, 10, 10, 0.5) !important; 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background-color 0.4s ease, border-color 0.4s ease; 
}

.fluent-main-header.is-menu-open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #0a0a0a !important;
}

#fluent-header a.logo-link {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 32px; 
    color: var(--fluent-text-main);
    text-decoration: none;
    letter-spacing: 0; 
    transition: color 0.3s ease;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.main-nav a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 15px; 
    color: var(--fluent-text-main);
    text-decoration: none;
    margin-left: 40px;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
    text-shadow: 0 1px 5px rgba(0,0,0,0.1); 
}

.main-nav a:hover,
.main-nav a.is-active {
    opacity: 1.0;
    color: var(--fluent-text-main);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; 
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10000; 
}
.hamburger-menu .line {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #ffffff !important; 
    margin: 6px 0;
    transition: all 0.3s ease-in-out;
}
.hamburger-menu:focus,
.hamburger-menu:active {
    outline: none;
    box-shadow: none;
    background-color: transparent;
}

/* ==========================================================================
   3. SHARED SECTION STYLES
   ========================================================================== */
.about-section { padding: 120px 5%; }
.about-section.dark-bg { background-color: var(--fluent-bg); color: var(--fluent-text-main); }
.about-section.light-bg { background-color: #ffffff; color: var(--fluent-text-dark); }

.about-vision, .about-convergence {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.about-grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: baseline;
    width: 100%;
}

.about-grid-heading h2, .section-heading {
    font-family: 'Raleway', sans-serif;
    font-size: 48px;
    font-weight: 600;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.about-text-large {
    font-family: 'Inter', sans-serif;
    font-size: 36px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.about-text-medium {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--fluent-text-muted); 
}
.about-section.light-bg .about-text-medium {
    color: var(--fluent-text-muted-dark);
}

.about-section.dark-bg .about-grid-heading h2,
.about-section.dark-bg .section-heading,
.about-section.dark-bg .about-text-large { color: var(--fluent-text-main); }

.about-melbourne .about-grid-layout {
    grid-template-columns: 1fr 1fr;
    align-items: center;
}
.about-melbourne .section-heading {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 80px;
}
.about-melbourne img { 
    width: 100%; 
    height: auto; 
    display: block; 
    border-radius: 12px; 
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3); 
}

/* ==========================================================================
   4. FOOTER STYLES
   ========================================================================== */
.fluent-footer {
    background-color: var(--fluent-bg);
    color: var(--fluent-text-main);
    padding: 100px 5% 50px;
    font-family: 'Inter', sans-serif;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto 80px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 80px;
}

.footer-branding { flex: 1 1 300px; margin-bottom: 40px; }

.footer-logo {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: var(--fluent-text-main);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
    letter-spacing: 0;
}

.footer-tagline {
    font-size: 16px;
    opacity: 0.6;
    max-width: 300px;
    line-height: 1.5;
}

.footer-nav-column { flex: 0 1 200px; margin-bottom: 40px; }

.footer-nav-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.4;
    margin-bottom: 25px;
    color: var(--fluent-text-main); 
    font-weight: 600;
}

.footer-nav-links { list-style: none; padding: 0; margin: 0; }
.footer-nav-links li { margin-bottom: 12px; }
.footer-nav-links a {
    color: var(--fluent-text-main);
    text-decoration: none;
    font-size: 15px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.footer-nav-links a:hover { opacity: 1.0; }

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    opacity: 0.4;
}

.footer-legal-links { text-align: right; }
.footer-legal-links a {
    color: var(--fluent-text-main);
    text-decoration: none;
    margin-left: 30px;
    transition: opacity 0.2s;
}
.footer-legal-links a:hover { opacity: 1.0; }

.footer-disclaimer-inline { text-align: center; padding: 0 20px; }
.footer-disclaimer-inline p { margin: 0; }

/* ==========================================================================
   5. MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    p { font-size: 18px; }
    .about-text-medium { font-size: 18px; }

    .about-grid-layout,
    .about-melbourne .about-grid-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-grid-heading h2, .section-heading { font-size: 32px; }
    .about-text-large { font-size: 24px; }

    .hamburger-menu { display: block; }
    .hamburger-menu.is-open .line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger-menu.is-open .line:nth-child(2) { opacity: 0; }
    .hamburger-menu.is-open .line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .main-nav {
        display: none; 
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background-color: #0a0a0a !important; 
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 99; 
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .main-nav.is-open { display: flex; }
    .main-nav a {
        margin: 20px 0;
        font-size: 24px;
        opacity: 1.0;
        color: #ffffff !important; 
    }

    body .fluent-hero {
        flex-direction: column-reverse;
        height: auto;
        padding: 120px 5% 60px; 
        overflow: hidden; 
    }
    body .hero-text-container {
        width: 100%;
        text-align: center;
        margin-top: 40px;
        padding: 0 5px;  
    }
    body .hero-animation-container {
        width: 100%;
        height: 60vw; 
        max-height: 400px;
        padding-left: 0; 
    }
    body .hero-text-container h1 { font-size: 32px; }
}

@media (max-width: 768px) {
    .footer-top { justify-content: flex-start; gap: 30px; }
    .footer-branding { flex-basis: 100%; margin-bottom: 20px; }
    .footer-nav-column { flex: 1 1 40%; margin-bottom: 20px; }
    .footer-bottom { flex-direction: column; gap: 24px; text-align: center; }
    .footer-legal-links a { margin: 0 10px; }
}

@media (max-width: 380px) {
    body .hero-text-container h1 { font-size: 28px; }
}

/* ==========================================================================
   6. SITE PRELOADER
   ========================================================================== */
#site-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    z-index: 99999; 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease-out, visibility 0.6s;
}

#site-loader.is-loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    opacity: 0;
    animation: loaderFadeIn 0.5s forwards 0.1s;
}

.loader-logo {
    font-family: 'Raleway', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    display: block;
    margin-bottom: 15px;
    letter-spacing: 0;
}

.loader-bar-container {
    width: 120px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    margin: 0 auto;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-bar {
    width: 100%;
    height: 100%;
    background: #00C2FF;
    transform: translateX(-100%);
    animation: loaderProgress 1.5s ease-in-out forwards;
}

@keyframes loaderFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes loaderProgress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(-30%); }
    100% { transform: translateX(0%); }
}