/* ============================================================
   Code Brilliance shared blue theme
   Keeps every page on the same blue gradient and glass surfaces
   used by the homepage, including the Lab and case studies.
   Load this stylesheet last.
   ============================================================ */

:root {
    --cb-blue: #0d47a1;
    --cb-black: #0d47a1;
    --cb-ink: #ffffff;
    --cb-muted: rgba(255, 255, 255, 0.82);
    --cb-line: rgba(255, 255, 255, 0.18);
}

html {
    background-color: #0d47a1;
    scroll-padding-top: 96px;
}

body {
    background-color: #0d47a1;
    background-image: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #1976d2 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    color: #ffffff;
}

/* The canvas always sits behind the page content. */
#webgl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #1976d2 100%);
}

#content,
#html_body {
    position: relative;
    z-index: 2;
}

main,
body > footer {
    position: relative;
    z-index: 2;
}

/* ---------- Lab and case study header ---------- */
.cs-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(13, 71, 161, 0.16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.cs-header nav a {
    color: #0d47a1;
    opacity: 1;
}

.cs-header nav a:hover,
.cs-header nav a:focus-visible,
.cs-header nav a[aria-current="page"] {
    color: #1565c0;
    opacity: 1;
}

.cs-Kicker,
.cs-kicker {
    color: #bfeaff;
}

/* ---------- Glass surfaces ---------- */
.lab-card,
.cs-meta > div,
.cs-related a {
    background: rgba(255, 255, 255, 0.1);
}

.cs-hero {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(20, 236, 213, 0.1));
    border-color: rgba(255, 255, 255, 0.22);
}

.cs-cta {
    border-color: rgba(255, 255, 255, 0.24);
    background:
        radial-gradient(circle at 100% 0%, rgba(13, 71, 161, 0.45), transparent 60%),
        rgba(255, 255, 255, 0.1);
}

.lab-stage {
    background: rgba(4, 7, 13, 0.55);
    border-color: rgba(255, 255, 255, 0.16);
}

.lab-details pre {
    background: rgba(4, 7, 13, 0.62);
}

/* ---------- Text on blue ---------- */
.cs-body p,
.cs-list li {
    color: rgba(255, 255, 255, 0.9);
}

.cs-lede,
.cs-meta dt,
.cs-footer,
.cs-related small,
.lab-card p,
.lab-intro p,
.lab-footer-note,
.lab-details summary {
    color: rgba(255, 255, 255, 0.8);
}

.cs-kicker,
.cs-tags li,
.lab-index,
.lab-note,
.lab-details summary::before,
.lab-scramble-text::before,
.cs-body h2::after,
.cs-list li::before {
    color: #14ecd5;
}

.cs-tags li {
    border-color: rgba(20, 236, 213, 0.45);
}

.cs-footer {
    border-top-color: rgba(255, 255, 255, 0.2);
}

.cs-back,
.lab-back a {
    color: rgba(255, 255, 255, 0.78);
}

.cs-back:hover,
.cs-back:focus-visible,
.lab-back a:hover,
.lab-back a:focus-visible {
    color: #14ecd5;
}

/* Keep the sticky CTA and floating actions readable above the canvas. */
.sticky-cta,
.cb-floating {
    z-index: 60;
}

/* ---------- Status page (email_sent.php) ---------- */
.status-wrap {
    width: min(700px, 100%);
    margin: 0 auto;
    padding: 170px 20px 90px;
    text-align: center;
}

.status-card {
    padding: 42px 32px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.status-card h1 {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.15;
}

.status-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    border: 1px solid rgba(20, 236, 213, 0.45);
    border-radius: 50%;
    background: rgba(20, 236, 213, 0.16);
    color: #14ecd5;
    font-size: 26px;
}

@media (max-width: 640px) {
    .status-wrap {
        padding: 130px 16px 70px;
    }

    .status-card {
        padding: 30px 20px;
    }
}

/* ---------- Mobile hamburger navigation ---------- */
.cb-nav-toggle {
    display: none;
    position: absolute;
    top: 50%;
    right: 16px;
    z-index: 1002;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(13, 71, 161, 0.08);
    color: #0d47a1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transform: translateY(-50%);
    -webkit-tap-highlight-color: transparent;
}

.cb-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

header.nav-open .cb-nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

header.nav-open .cb-nav-toggle span:nth-child(2) {
    opacity: 0;
}

header.nav-open .cb-nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 820px) {
    html.js .cb-nav-toggle {
        display: flex;
    }

    /* Leave room for the button and hide the desktop row. */
    html.js header#main-header {
        min-height: 64px;
        padding: 10px 72px 10px 16px;
        justify-content: flex-start;
    }

    /* Keep the brand in the header, but only reveal it once the
       hero logo has been scrolled past. mobile.css hides .nav-logo
       to avoid overlapping the desktop nav row, so display has to
       be restored here too. */
    html.js header#main-header .nav-logo {
        display: block;
        position: absolute;
        top: 50%;
        left: 16px;
        height: 34px;
        transform: translateY(-50%);
    }

    html.js header#main-header .nav-logo.visible {
        transform: translateY(-50%);
    }

    html.js .cs-header .cs-wrap {
        padding-right: 60px;
    }

    html.js header#main-header .cb-nav,
    html.js .cs-header .cb-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        max-height: calc(100vh - 70px);
        padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid rgba(13, 71, 161, 0.16);
        box-shadow: 0 20px 50px rgba(4, 20, 50, 0.28);
    }

    html.js header#main-header.nav-open .cb-nav,
    html.js .cs-header.nav-open .cb-nav {
        display: flex;
    }

    html.js header#main-header .cb-nav a,
    html.js .cs-header .cb-nav a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        padding: 12px 14px;
        border-radius: 12px;
        background: transparent;
        color: #0d47a1;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 1.4px;
        text-transform: uppercase;
        white-space: normal;
    }

    html.js header#main-header .cb-nav a::before {
        display: none;
    }

    html.js header#main-header .cb-nav a:hover,
    html.js header#main-header .cb-nav a:focus-visible,
    html.js header#main-header .cb-nav a.active,
    html.js .cs-header .cb-nav a:hover,
    html.js .cs-header .cb-nav a:focus-visible,
    html.js .cs-header .cb-nav a[aria-current="page"] {
        color: #0d47a1;
        background: rgba(13, 71, 161, 0.09);
    }
}
