/* ==========================================================================
   Nexix Academy — Base / Shared Stylesheet
   Single source of truth for design tokens, background motif, navbar,
   footer, buttons and section primitives. Every page links this FIRST,
   then its own page-specific stylesheet.
   Brand: Blue #0056D2 · Teal #1aacac · Ocean #2e97a7 · Ink #0F172A
   Theme: light. Bright --teal / --ocean are DECORATIVE FILLS ONLY — they
   fail WCAG AA on white. Use --teal-ink / --ocean-ink for any text.
   ========================================================================== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Surfaces */
    --bg: #ffffff;
    --bg-alt: #f5f7fb;
    --card-bg: #ffffff;
    --card-bg-alt: #f1f4fa;
    --border: #e3e8f0;
    --border-strong: #cbd5e1;
    --border-hover: rgba(0, 86, 210, 0.45);

    /* Text */
    --ink: #0f172a;          /* 17.85:1 on white */
    --white: var(--ink);     /* back-compat alias — holds ink, not white */
    --grey: #475569;         /*  7.58:1 — body copy */
    --grey-dim: #5e6b81;     /*  5.39:1 white, 4.89:1 on tinted surfaces */
    --on-brand: #ffffff;     /* text sitting ON a brand fill */

    /* Brand */
    --primary: #0056D2;      /* 6.44:1 — matches the logo mark exactly */
    --primary-deep: #003FA5;
    --primary-soft: #eaf1fe;
    --teal: #1aacac;         /* 2.78:1 — decorative fills only, never text */
    --teal-ink: #0b6e6e;     /* 6.05:1 — the on-white substitute for teal */
    --ocean: #2e97a7;        /* 3.44:1 — decorative only */
    --ocean-ink: #155e75;    /* 7.27:1 */
    --lime: #9fef00;         /* logo accent — decorative only */

    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--teal) 100%);
    --gradient-btn: linear-gradient(135deg, #003FA5 0%, #0056D2 45%, #1A6E8E 100%);
    --gradient-text: linear-gradient(135deg, #003FA5 0%, #0B6E6E 100%);
    /* Gradients are <image> values, so background-size still applies at every
       call site that previously used the PNG. */
    --gradient-img: linear-gradient(135deg, #003FA5 0%, #0056D2 42%, #0B6E6E 100%);

    /* Depth: on light, depth comes from downward shadows, not glows */
    --glow: rgba(0, 86, 210, 0.10);
    --glow-strong: rgba(0, 86, 210, 0.22);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 10px 20px -6px rgba(15, 23, 42, 0.10);
    --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-brand: 0 10px 30px -8px var(--glow-strong);

    /* Type */
    --font-h: 'Figtree', sans-serif;
    --font-b: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Radius / layout */
    --radius: 0.75rem;
    --radius-lg: 1.5rem;
    --radius-pill: 2rem;
    --max-w: 75rem;
    --nav-h: 4.75rem;
}

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
    font-family: var(--font-b);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* --- Ambient background --- */
body::before {
    content: '';
    position: fixed;
    top: -20%; left: -10%;
    width: 70%; height: 70%;
    background: radial-gradient(ellipse, rgba(0, 86, 210, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -30%; right: -15%;
    width: 60%; height: 60%;
    background: radial-gradient(ellipse, rgba(26, 172, 172, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 20%, transparent 75%);
}

/* Retired on the light theme: 3px dots on white read as dust, not atmosphere.
   Markup is left in place so pages can drop the divs opportunistically. */
.particle { display: none; }

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.section { position: relative; z-index: 1; padding: 7.5rem 0; }
.section--tight { padding: 5rem 0; }

/* Mobile padding for the two global primitives. Same reason as the grid
   utilities above: these overrides were duplicated in main.css and ctf.css,
   so any page loading neither (for-corporates.html) kept 7.5rem section
   padding and 2rem gutters on a phone. */
@media (max-width: 820px) {
    .section { padding: 4.5rem 0; }
    .section--tight { padding: 3.5rem 0; }
}
@media (max-width: 640px) {
    .container { padding: 0 1.25rem; }
}

/* Grid utilities.
   The collapse rules live here, next to the definitions. They previously sat
   in main.css, which only index.html loads — so .grid--4 on for-corporates.html
   stayed four columns at every width and overflowed the viewport on mobile.
   A shared utility and its responsive behaviour have to travel together. */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 980px) {
    .grid--5 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid--5, .grid--4, .grid--3 { grid-template-columns: 1fr; }
}

/* Shared action row under a section (ecosystem, outcomes, corporate callback). */
.eco__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

/* Inline text link */
.inline-link { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 2px; transition: color 0.2s; }
.inline-link:hover { color: var(--primary); }

.section__head {
    max-width: 46rem;
    margin: 0 auto 3.5rem;
    text-align: center;
}
.section__head--left { margin-left: 0; text-align: left; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-h);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--teal-ink);
    margin-bottom: 1rem;
}

.section__title {
    font-family: var(--font-h);
    font-weight: 300;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.section__title em {
    font-style: italic;
    font-weight: 500;
    background: var(--gradient-img);
    background-size: cover;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section__sub {
    color: var(--grey);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 1.1rem;
}

.section--alt { background: var(--bg-alt); }

/* --- Closing CTA (shared) --- */
.closing {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 7rem 0;
    overflow: hidden;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}
.closing__glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(0, 86, 210, 0.06) 0%, transparent 62%);
    pointer-events: none;
}
.closing__inner { position: relative; z-index: 1; max-width: 42rem; margin: 0 auto; }
.closing__mantra {
    font-family: var(--font-h);
    font-weight: 600;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    background: var(--gradient-img);
    background-size: cover;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 1.25rem;
}
.closing__title {
    font-family: var(--font-h);
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.closing__sub { color: var(--grey); font-size: 1.05rem; line-height: 1.65; margin-bottom: 2.25rem; }
.closing__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- Badge / pill --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-soft);
    border: 1px solid rgba(0, 86, 210, 0.22);
    color: var(--primary-deep);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-pill);
}
.badge__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--teal-ink);
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--gradient-img);
    background-size: 150% 150%;
    background-position: center center;
    color: var(--on-brand);
    font-family: var(--font-h);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 2rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, transform 0.2s;
}
.btn-primary:hover {
    box-shadow: var(--shadow-brand);
    transform: translateY(-2px);
}
.btn-primary svg { width: 16px; height: 16px; transition: transform 0.25s; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-h);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s, background-color 0.25s;
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--primary); background: var(--primary-soft); }
.btn-ghost svg { width: 16px; height: 16px; }

.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.85rem; }

/* --- Navbar (shared) --- */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
}
/* Academy_Logo_Light.png is 3161x944 but the lockup only occupies the top
   3157x659 of it. The aspect-ratio box + cover crops the dead space away, so
   the mark sits on the nav baseline instead of floating above a gap. */
.site-nav__logo img {
    height: 2.1rem;
    aspect-ratio: 3157 / 659;
    object-fit: cover;
    object-position: left top;
}

.site-nav__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.site-nav__link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--grey);
    transition: color 0.2s;
}
.site-nav__link:hover { color: var(--primary); }
.site-nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }

.site-nav__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-img);
    background-size: 150% 150%;
    background-position: center center;
    color: var(--on-brand);
    font-family: var(--font-h);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, transform 0.2s;
}
.site-nav__cta:hover {
    box-shadow: var(--shadow-brand);
    transform: translateY(-1px);
}
.site-nav__cta svg { width: 14px; height: 14px; transition: transform 0.25s; }
.site-nav__cta:hover svg { transform: translateX(3px); }

/* Mobile nav (CSS-only toggle) */
.site-nav__toggle { display: none; }
.site-nav__burger { display: none; }

/* Raised from 860px: the nav now carries five links + logo + CTA, which
   crowds before the old breakpoint is reached. */
@media (max-width: 1024px) {
    .site-nav__burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 42px; height: 42px;
        padding: 0 9px;
        border: 1px solid var(--border-strong);
        border-radius: 0.6rem;
        cursor: pointer;
    }
    .site-nav__burger span {
        display: block;
        height: 2px;
        background: var(--ink);
        border-radius: 2px;
        transition: transform 0.25s, opacity 0.2s;
    }
    .site-nav__toggle:checked ~ .site-nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-nav__toggle:checked ~ .site-nav__burger span:nth-child(2) { opacity: 0; }
    .site-nav__toggle:checked ~ .site-nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .site-nav__menu {
        position: fixed;
        top: var(--nav-h); left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 1rem 1.5rem 1.5rem;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.3s ease, opacity 0.25s ease;
    }
    /* Raised from 26rem — five links + CTA overflow the old cap. */
    .site-nav__toggle:checked ~ .site-nav__menu {
        max-height: 32rem;
        opacity: 1;
        pointer-events: auto;
    }
    .site-nav__link { padding: 0.7rem 0.25rem; font-size: 1rem; border-bottom: 1px solid var(--border); }
    .site-nav__cta { justify-content: center; margin-top: 0.75rem; padding: 0.85rem; font-size: 0.95rem; }
}

/* --- Footer (shared) --- */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: auto;
}
.site-footer__top {
    display: grid;
    grid-template-columns: 1.4fr 2fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}
.site-footer__logo img {
    height: 1.9rem;
    aspect-ratio: 3157 / 659;
    object-fit: cover;
    object-position: left top;
    margin-bottom: 1.1rem;
}
.site-footer__tagline {
    color: var(--grey);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 22rem;
    margin-bottom: 1.5rem;
}
.site-footer__socials { display: flex; gap: 0.75rem; }
.site-footer__social {
    width: 2.4rem; height: 2.4rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--grey);
    transition: border-color 0.25s, color 0.25s, transform 0.25s;
}
.site-footer__social svg { width: 18px; height: 18px; }
.site-footer__social:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); transform: translateY(-2px); }

.site-footer__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.site-footer__col h4 {
    font-family: var(--font-h);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink);
    margin-bottom: 1rem;
}
.site-footer__col a {
    display: block;
    font-size: 0.9rem;
    color: var(--grey);
    padding: 0.35rem 0;
    transition: color 0.2s;
}
.site-footer__col a:hover { color: var(--primary); }

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
}
.site-footer__copy { font-size: 0.78rem; color: var(--grey-dim); }
.site-footer__mantra {
    font-family: var(--font-h);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    background: var(--gradient-img);
    background-size: cover;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

@media (max-width: 720px) {
    .site-footer__top { grid-template-columns: 1fr; gap: 2.5rem; }
    .site-footer__cols { grid-template-columns: repeat(2, 1fr); }
    .site-footer__bottom { flex-direction: column; text-align: center; }
}

/* --- Lab screenshot (shared: index.html, for-corporates.html) ---
   Academy-Hands-On-Learning.png is a pre-composed cutout: it already carries
   its own window chrome, rounded corners and drop shadows, and ~21% of its
   pixels are fully transparent. So it needs no frame, border, radius or
   background, and it sits cleanly on both --bg and --bg-alt.
   Do NOT wrap it in .browser-frame (double chrome) or .shot (a crop box for
   oversized raw screenshots).
   The source is 1800x796, so the cap keeps it at ~2.5x density. */
.lab-shot {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    margin-inline: auto;
}

/* Caption under a screenshot. Shared, so it lives here rather than in a
   page stylesheet — for-corporates.html does not load main.css. */
.shot-note {
    font-size: 0.78rem;
    color: var(--grey-dim);
    margin-top: 0.85rem;
}

/* --- FAQ (shared: ctf.html, for-corporates.html) --- */
.faq { max-width: 46rem; margin: 0 auto; display: grid; gap: 0.85rem; }
.faq__item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.faq__item[open] { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.faq__q {
    font-family: var(--font-h);
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    padding: 1.1rem 2rem 1.1rem 0;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
    content: '+';
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--teal-ink);
}
.faq__item[open] .faq__q::after { content: '\2212'; }
.faq__a { padding: 0 0 1.2rem; }
.faq__a p { color: var(--grey); font-size: 0.92rem; line-height: 1.65; }
.faq__a a { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 2px; }
.faq__more { text-align: center; color: var(--grey); font-size: 0.9rem; margin-top: 1.75rem; }

/* --- GSAP reveal helper (hidden until in view; visible if JS/motion off) --- */
.reveal { opacity: 0; transform: translateY(40px); }
.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1 !important; transform: none !important; }
    .particle, .badge__dot { animation: none; }
}

/* No-JS / fallback: never leave content hidden */
.no-js .reveal { opacity: 1; transform: none; }
