:root {
    /* Palette — deep space aurora */
    --c-bg:        #0a0616;   /* near-black indigo */
    --c-bg-2:      #140b2e;
    --c-indigo:    #2a1b6b;
    --c-violet:    #6d3bd1;
    --c-magenta:   #b13ad1;
    --c-teal:      #22c3c9;
    --c-accent:    #7cf5ff;   /* bright cyan for CTAs / links */
    --c-text:      #f4f2fb;
    --c-text-dim:  #b9b3d4;
    --c-card:      rgba(255, 255, 255, 0.06);
    --c-card-brd:  rgba(255, 255, 255, 0.14);

    /* Type */
    --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

    /* Rhythm */
    --radius:  18px;
    --radius-sm: 10px;
    --maxw: 1120px;
    --gutter: clamp(20px, 5vw, 64px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

/* ---------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------- */
.nav-2027 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px var(--gutter);
    transition: background-color .3s ease, backdrop-filter .3s ease, padding .3s ease;
}

.nav-2027.scrolled {
    background: rgba(10, 6, 22, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--c-card-brd);
}

.nav-2027-container {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-2027-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .2px;
    color: var(--c-text);
}
.nav-2027-logo:hover { color: var(--c-text); }
.nav-2027-logo img { height: 38px; width: auto; }

.nav-2027-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-2027-links a {
    color: var(--c-text-dim);
    font-weight: 500;
    font-size: .95rem;
    transition: color .2s ease;
}
.nav-2027-links a:hover { color: #fff; }

/* Hamburger */
.nav-2027-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
    position: relative;
    z-index: 110;   /* stay above the overlay (99) so the X is visible & tappable */
}
.nav-2027-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--c-text);
    transition: transform .3s ease, opacity .3s ease;
}
.nav-2027-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-2027-toggle.active span:nth-child(2) { opacity: 0; }
.nav-2027-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.nav-2027-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 22, 0.97);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 99;
}
.nav-2027-overlay.open { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }
.nav-2027-overlay ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.nav-2027-overlay li { margin: 22px 0; }
.nav-2027-overlay a { color: var(--c-text); font-size: 1.4rem; font-weight: 600; }

/* ---------------------------------------------------------------------
   Hero — animated gradient aurora + starfield
   --------------------------------------------------------------------- */
.hero-2027 {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px var(--gutter) 80px;
    overflow: hidden;
    isolation: isolate;
}

/* Layer 1: drifting multi-stop aurora gradient */
.hero-2027::before {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: -2;
    background: linear-gradient(
        125deg,
        var(--c-bg) 0%,
        var(--c-indigo) 22%,
        var(--c-violet) 42%,
        var(--c-magenta) 58%,
        var(--c-indigo) 76%,
        var(--c-bg) 100%
    );
    background-size: 300% 300%;
    animation: aurora-drift 24s ease-in-out infinite;
    filter: saturate(1.15);
}

/* Layer 2: soft radial glows + faint stars */
.hero-2027::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(closest-side at 20% 30%, rgba(34, 195, 201, 0.28), transparent 70%),
        radial-gradient(closest-side at 82% 68%, rgba(177, 58, 209, 0.30), transparent 70%),
        radial-gradient(1px 1px at 15% 22%, rgba(255,255,255,.9), transparent),
        radial-gradient(1px 1px at 42% 74%, rgba(255,255,255,.7), transparent),
        radial-gradient(1px 1px at 68% 33%, rgba(255,255,255,.8), transparent),
        radial-gradient(1px 1px at 88% 12%, rgba(255,255,255,.6), transparent),
        radial-gradient(1.5px 1.5px at 30% 58%, rgba(255,255,255,.85), transparent),
        radial-gradient(1px 1px at 55% 15%, rgba(255,255,255,.6), transparent),
        radial-gradient(1.5px 1.5px at 76% 82%, rgba(255,255,255,.7), transparent);
    animation: twinkle 6s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Pixel "wave": a mosaic of square blocks revealed by a diagonal band that
   travels across the hero, so the smooth gradient appears to pixelate as it
   passes. A nod to the games theme of the 2027 challenge. */
.pixel-wave {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    /* single diagonal "pixel" layer — the trippy one, no overlaid double */
    background-image:
        linear-gradient(45deg, rgba(150, 235, 255, 0.10) 25%, transparent 25%, transparent 75%, rgba(150, 235, 255, 0.10) 75%);
    background-size: 46px 46px;
    background-position: 0 0;
    /* a soft diagonal band that reveals the mosaic, then sweeps across */
    -webkit-mask-image: linear-gradient(105deg, transparent 30%, #000 43%, #000 57%, transparent 70%);
    mask-image: linear-gradient(105deg, transparent 30%, #000 43%, #000 57%, transparent 70%);
    -webkit-mask-size: 260% 100%;
    mask-size: 260% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    animation: pixel-sweep 7s linear infinite;
}

@keyframes pixel-sweep {
    from { -webkit-mask-position: 135% 0; mask-position: 135% 0; }
    to   { -webkit-mask-position: -70% 0; mask-position: -70% 0; }
}

/* Floating particles — soft glowing dots drifting up through the hero */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.hero-particles .p {
    position: absolute;
    bottom: -12px;
    border-radius: 50%;
    opacity: 0;
    animation: particle-float linear infinite;
    will-change: transform, opacity;
}
@keyframes particle-float {
    0%   { transform: translate3d(0, 0, 0) scale(0.7); opacity: 0; }
    12%  { opacity: var(--pmax, 0.8); }
    88%  { opacity: var(--pmax, 0.8); }
    100% { transform: translate3d(var(--pdx, 30px), -112vh, 0) scale(1.15); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-particles { display: none; }
}

@keyframes twinkle {
    from { opacity: .75; }
    to   { opacity: 1; }
}

.hero-2027-logo {
    width: auto;
    height: clamp(140px, 22vw, 240px);
    margin-bottom: clamp(20px, 4vw, 40px);   /* breathing room above the headline */
    filter: drop-shadow(0 8px 30px rgba(124, 245, 255, 0.25));
}

.hero-2027 h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 4.6rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1px;
    max-width: 16ch;
    text-shadow: 0 2px 40px rgba(0,0,0,.35);
}

.hero-2027 .launch {
    margin: 24px 0 0;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--c-text);
}
.hero-2027 .launch strong {
    background: linear-gradient(90deg, var(--c-accent), var(--c-magenta));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-2027 .lead {
    margin: 22px auto 0;
    max-width: 52ch;
    color: var(--c-text-dim);
    font-size: 1.1rem;
}

.hero-2027-cta {
    margin-top: 40px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 34px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    color: #0a0616;
    background: linear-gradient(90deg, var(--c-accent), #b6a8ff);
    box-shadow: 0 10px 34px rgba(124, 245, 255, 0.28);
    transition: transform .2s ease, box-shadow .2s ease;
}
.hero-2027-cta:hover {
    color: #0a0616;
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(124, 245, 255, 0.42);
}

/* ---------------------------------------------------------------------
   Signup section
   --------------------------------------------------------------------- */
.signup-2027 {
    position: relative;
    padding: 90px var(--gutter) 70px;
    background:
        radial-gradient(closest-side at 50% 0%, rgba(109, 59, 209, 0.18), transparent 70%),
        var(--c-bg);
}

.signup-2027-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    text-align: center;
}

.signup-2027 h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -.5px;
}

.signup-2027 p.sub {
    color: var(--c-text-dim);
    font-size: 1.1rem;
    max-width: 46ch;
    margin: 0 auto 40px;
}

.signup-card {
    background: var(--c-card);
    border: 1px solid var(--c-card-brd);
    border-radius: var(--radius);
    padding: clamp(16px, 4vw, 40px);
    max-width: 820px;
    margin: 0 auto;
    backdrop-filter: blur(8px);
    box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

.signup-card iframe {
    width: 100%;
    border: none;
    border-radius: var(--radius-sm);
    background: #fff;   /* Google Form is light — keep it readable */
}

/* Social */
.social-2027 {
    margin-top: 48px;
}
.social-2027 p { color: var(--c-text-dim); margin-bottom: 16px; }
.social-2027-logos {
    display: flex;
    justify-content: center;
    gap: 32px;
}
.social-2027-logos a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--c-text-dim);
    font-size: .85rem;
    transition: transform .2s ease, color .2s ease;
}
.social-2027-logos a:hover { transform: translateY(-3px); color: #fff; }
.social-2027-logos img {
    height: 42px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .9;
}

/* ---------------------------------------------------------------------
   Hosting / partners (compact, inside the hero)
   --------------------------------------------------------------------- */
.hero-hosts {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-hosts-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;   /* chips top-align; captions wrap beneath */
    gap: 28px;
}
/* the anchor: a column of [ white chip ] + [ caption ] */
.host-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.host-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    padding: 13px 22px;
    height: 70px;              /* fixed so both chips match regardless of logo shape */
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.host-item:hover .host-logo {
    transform: translateY(-3px);
    box-shadow: 0 14px 38px rgba(124, 245, 255, 0.22);
}
.host-logo img {
    height: 30px;
    width: auto;
    display: block;
}
/* per-logo optical sizing — the two lockups have very different proportions
   (CNeuroMod ~4.6:1 with a 2-line subtitle, CCN ~8.4:1) */
.host-item--cneuromod .host-logo img { height: 38px; }
.host-item--ccn .host-logo img { height: 26px; }
.host-caption {
    font-size: 0.7rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--c-text-dim);
    text-align: center;
    max-width: 200px;   /* wide enough that only the explicit <br> wraps the text */
    line-height: 1.5;
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.footer-2027 {
    padding: 34px var(--gutter);
    text-align: center;
    color: var(--c-text-dim);
    font-size: .9rem;
    border-top: 1px solid var(--c-card-brd);
    background: var(--c-bg);
}
.footer-2027 a { color: var(--c-text-dim); }
.footer-2027 a:hover { color: var(--c-accent); }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
    .nav-2027-links { display: none; }
    .nav-2027-toggle { display: flex; }
    .nav-2027-logo span.full { display: none; }  /* optional: shorten brand on tiny screens */
    .social-2027-logos { gap: 22px; }
}

/* Accessibility: respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-2027::before,
    .hero-2027::after,
    .pixel-wave {
        animation: none;
    }
    html { scroll-behavior: auto; }
}
