/* ============================================================
   SPACEWHLE — Premium Frontend (v2)
   Typography: Orbitron (display) + Space Grotesk (body)
   Aesthetic: Sci-fi HUD, glass, angular cuts, mint accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800;900&family=Space+Grotesk:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

/* ─── Tokens ──────────────────────────────────────────────── */
:root {
    --navbar-height: 78px;

    /* Core palette — refined */
    --primary-color: #1a4a20;
    --secondary-color: #2e8b57;
    --accent-blue: #027320;
    --accent-mint: #4dffa6;
    --accent-cyan: #5ee2c2;
    --accent-gold: #ffd28a;

    --dark-bg: #04060a;
    --dark-bg-2: #070b10;
    --dark-bg-3: #0b1218;
    --panel-bg: rgba(7, 11, 16, 0.78);
    --panel-bg-strong: rgba(5, 8, 12, 0.92);
    --glass: rgba(13, 22, 18, 0.55);

    --text-light: #f5fbf8;
    --text-muted: #b8cabb;
    --text-dim: #7a8c84;
    --border-color: rgba(46, 139, 87, 0.22);
    --border-strong: rgba(46, 139, 87, 0.45);
    --hairline: rgba(255, 255, 255, 0.06);

    --admin-red: #ff4444;
    --admin-gold: #ffd700;
    --admin-panel: rgba(7, 11, 16, 0.94);

    /* Type */
    --font-display: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Spacing rhythm */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 4.5rem;
    --space-7: 6rem;

    --radius-sm: 2px;
    --radius: 4px;
    --radius-lg: 10px;

    --shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 40px rgba(46, 139, 87, 0.15);
}

/* ─── Reset & Base ────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--dark-bg);
    color: var(--text-light);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ambient scanline + grain texture on the whole page */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9997;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.012) 0px,
            rgba(255, 255, 255, 0.012) 1px,
            transparent 1px,
            transparent 3px
        );
    mix-blend-mode: overlay;
    opacity: 0.6;
}

/* Subtle vignette */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9996;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: var(--space-2);
    line-height: 1.15;
    text-wrap: balance;
}

h1 { font-weight: 800; }
h2 {
    font-weight: 700;
    color: var(--text-light);
    font-size: clamp(1.6rem, 2.4vw, 2.4rem);
    padding-bottom: 0.85rem;
    margin: 0 auto var(--space-4);
    display: inline-block;
    position: relative;
    border: none;
}

h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 64px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), var(--accent-mint), var(--secondary-color), transparent);
    box-shadow: 0 0 12px rgba(77, 255, 166, 0.4);
}

h3 {
    font-weight: 600;
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    color: var(--text-light);
    letter-spacing: 0.12em;
}

h4 {
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    color: var(--accent-mint);
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    text-wrap: pretty;
}

strong { color: var(--text-light); font-weight: 600; }

a { color: var(--accent-mint); }
a:focus-visible { outline: 2px solid var(--accent-mint); outline-offset: 3px; border-radius: 2px; }

.center-text { text-align: center; }

/* Centered h2 wrapper for legacy markup */
h2 {
    display: table;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Glitch (kept, refined timing) ───────────────────────── */
.glitch {
    position: relative;
    display: inline-block;
    animation: glitch-flicker 9s infinite;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
}
.glitch::before {
    color: var(--accent-mint);
    animation: glitch-before 9s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}
.glitch::after {
    color: var(--accent-cyan);
    animation: glitch-after 9s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}
@keyframes glitch-flicker {
    0%, 94%, 100% { text-shadow: 0 0 32px rgba(77, 255, 166, 0.25); transform: none; }
    95% { text-shadow: -2px 0 var(--accent-mint), 2px 0 var(--accent-cyan); transform: translate(-2px, 1px); }
    96% { text-shadow: 2px 0 var(--accent-mint), -2px 0 var(--accent-cyan); transform: translate(2px, -1px); }
    97% { text-shadow: 0 0 32px rgba(77, 255, 166, 0.25); transform: translate(0); }
    98% { text-shadow: 2px 0 var(--accent-cyan), -2px 0 var(--accent-mint); transform: translate(-1px, -1px); }
}
@keyframes glitch-before {
    0%, 94%, 100% { opacity: 0; transform: none; }
    95% { opacity: 0.85; transform: translateX(-3px); }
    97% { opacity: 0.5; transform: translateX(2px); }
}
@keyframes glitch-after {
    0%, 95%, 100% { opacity: 0; transform: none; }
    96% { opacity: 0.85; transform: translateX(3px); }
    98% { opacity: 0.5; transform: translateX(-2px); }
}

/* ─── Navigation ──────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(4, 6, 10, 0.92) 0%, rgba(4, 6, 10, 0.78) 100%);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0.85rem 0;
    transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.navbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), var(--accent-mint), var(--secondary-color), transparent);
    opacity: 0.35;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-decoration: none;
}

.logo {
    width: 42px;
    height: 42px;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: drop-shadow(0 0 8px rgba(77, 255, 166, 0.3));
}
.nav-brand:hover .logo {
    transform: rotate(-8deg) scale(1.05);
    filter: drop-shadow(0 0 14px rgba(77, 255, 166, 0.55));
}

.org-name {
    background: linear-gradient(180deg, #fff 0%, #d4ecdc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.25rem;
}

.nav-link {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    padding: 4px 0;
    transition: color 0.25s ease, transform 0.25s ease;
}
.nav-link::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -4px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-mint), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.35s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text-light); }
.nav-link:hover::before, .nav-link.active::before { transform: scaleX(1); }
.nav-link:active { opacity: 0.75; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sci-fi clean look — kill rounded corners on key chrome */
.portal-link, .hero-join-now, .social-btn, .info-block, .content-box, .division-card, .section-title-card, .faq-item, .rank-category, .shenanigans-box {
    border-radius: 0 !important;
}

.portal-link {
    position: relative;
    background: transparent;
    color: var(--accent-mint);
    padding: 9px 22px;
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    border: 1px solid var(--secondary-color);
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    overflow: hidden;
}
.portal-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(77, 255, 166, 0.18), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.portal-link:hover {
    color: var(--text-light);
    background: rgba(46, 139, 87, 0.18);
    box-shadow: 0 0 20px rgba(77, 255, 166, 0.25), inset 0 0 12px rgba(46, 139, 87, 0.35);
    transform: translateY(-1px);
}
.portal-link:hover::before { transform: translateX(100%); }
.portal-link:active { transform: translateY(0); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
}
.menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--text-light);
    display: block;
    transition: background 0.2s ease, transform 0.3s ease;
}
.menu-toggle:hover span { background: var(--accent-mint); }

/* ─── HERO ────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: var(--navbar-height);
    text-align: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.home-hero {
    background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/11323356494805598208_20251123155036_1.webp');
}
.about-hero { min-height: 75vh; }

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Wider, gentler fade — the bottom blend now runs from 80% downward
       (was 94%) so the transition into the next section is smoother,
       with a lighter base opacity so the hero image holds up. */
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(4, 6, 10, 0.08) 0%, rgba(4, 6, 10, 0.45) 100%),
        linear-gradient(to bottom, rgba(4, 6, 10, 0.18) 0%, rgba(4, 6, 10, 0.16) 80%, var(--dark-bg) 100%);
    z-index: 1;
}

/* HUD bracket frame around hero content */
.hero::before, .hero::after {
    content: "";
    position: absolute;
    z-index: 2;
    pointer-events: none;
    width: 70px; height: 70px;
    border-color: var(--accent-mint);
    opacity: 0.55;
}
.hero::before {
    top: calc(var(--navbar-height) + 28px);
    left: 28px;
    border-top: 1px solid;
    border-left: 1px solid;
}
.hero::after {
    bottom: 28px;
    right: 28px;
    border-bottom: 1px solid;
    border-right: 1px solid;
}

.hero-content {
    max-width: 920px;
    padding: 24px;
    position: relative;
    z-index: 3;
}

.home-hero .hero-content,
.about-hero .hero-content,
.team-hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    text-decoration: none;
    position: relative;
}
.hero-logo-link::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(77, 255, 166, 0.12) 0%, transparent 70%);
    animation: pulse-ring 4s ease-in-out infinite;
}
@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

.hero-logo {
    width: min(180px, 42vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 14px rgba(77, 255, 166, 0.18));
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1), filter 0.4s ease;
    position: relative;
}
.hero-logo-link:hover .hero-logo,
.hero-logo-link:focus-visible .hero-logo {
    transform: translateY(-4px) scale(1.03);
    filter: drop-shadow(0 0 25px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 22px rgba(77, 255, 166, 0.45));
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 5.25rem);
    font-weight: 900;
    color: var(--text-light);
    margin-bottom: 0.65rem;
    letter-spacing: 0.06em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    background: linear-gradient(180deg, #ffffff 0%, #c9eedb 60%, #7fb89a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-hero .hero-title,
.team-hero .hero-title {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.hero-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    color: var(--accent-mint);
    margin-bottom: 1.5rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-weight: 500;
}

.hero-motto {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.3vw, 1.2rem);
    color: var(--text-muted);
    letter-spacing: 0.45em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    align-items: center;
    font-weight: 400;
}
.hero-motto span:first-child {
    color: var(--accent-mint);
    font-weight: 500;
    position: relative;
    padding: 0 1.5rem;
}
.hero-motto span:first-child::before,
.hero-motto span:first-child::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 1.2rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-mint));
    opacity: 0.7;
}
.hero-motto span:first-child::before { left: 0; }
.hero-motto span:first-child::after { right: 0; transform: scaleX(-1); }

.hero-motto span { display: block; }

.hero-description {
    color: var(--text-muted);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    max-width: 580px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}

.home-hero .hero-title,
.home-hero .hero-motto,
.home-hero .hero-description { width: 100%; text-align: center; }

.hero-join-now {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    background: linear-gradient(180deg, rgba(46, 139, 87, 0.18) 0%, rgba(46, 139, 87, 0.08) 100%);
    border: 1px solid var(--secondary-color);
    color: var(--text-light);
    padding: 18px 52px;
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 0.6rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.22em;
    backdrop-filter: blur(8px);
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-shadow: inset 0 0 14px rgba(46, 139, 87, 0.18), 0 6px 28px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    cursor: pointer;
}
.hero-join-now::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(77, 255, 166, 0.22), transparent);
    transform: translateX(-100%);
    transition: transform 0.7s ease;
}
.hero-join-now::after {
    content: "›";
    font-size: 1.5em;
    line-height: 1;
    transform: translateX(0);
    transition: transform 0.3s ease;
    color: var(--accent-mint);
}
.hero-join-now:hover {
    background: linear-gradient(180deg, rgba(46, 139, 87, 0.32) 0%, rgba(46, 139, 87, 0.18) 100%);
    border-color: var(--accent-mint);
    box-shadow: inset 0 0 24px rgba(46, 139, 87, 0.4), 0 0 28px rgba(77, 255, 166, 0.25);
    transform: translateY(-3px);
    color: #fff;
}
.hero-join-now:hover::before { transform: translateX(100%); }
.hero-join-now:hover::after { transform: translateX(4px); }
.hero-join-now:active { transform: translateY(-1px); }
.hero-join-now:focus-visible {
    outline: 2px solid var(--accent-mint);
    outline-offset: 4px;
}

/* ─── Scroll cue under home hero ──────────────────────────── */
.home-hero::before {
    content: "";
}

/* ─── Sections ────────────────────────────────────────────── */
.section {
    padding: var(--space-7) 0;
    position: relative;
}

.section-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    color: var(--text-light);
}

/* keep original bg classes */
.bg-img-1 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/11323356494805598208_20251123155036_1.webp'); }
.bg-img-2 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/11323356494805598208_20251123145332_1.webp'); }
.bg-img-3 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/11323356494805598208_20251123155855_1.webp'); }
.bg-img-4 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/Molecellindixiner.webp'); }
.bg-img-5 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/SPACEWHLE_on_perseus.webp'); }
.bg-img-6 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/ScreenShot-2025-12-06_17-55-53-050.webp'); }
.bg-img-7 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/c258356c-e813-4efe-8c07-f58d450be035-screenshot.webp'); }
.bg-img-8 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/eeeee.webp'); }
.bg-img-9 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/redlevelpatrols.webp'); }
.bg-img-10 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/sejaggngkkr.webp'); }
.bg-img-11 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/image-89.webp');}
.bg-img-12 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/background8.webp'); }
.bg-img-13 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/background7.webp'); }

.section-overlay {
    position: absolute;
    inset: 0;
    /* Wider, gentler fade — the dark band only reaches ~0.18 opacity at
       its strongest and the blend zones now run 0-12% / 88-100% so the
       transition between sections feels smoother without smothering the
       background image in the middle. */
    background:
        linear-gradient(to bottom, var(--dark-bg) 0%, rgba(4, 6, 10, 0.18) 12%, rgba(4, 6, 10, 0.18) 88%, var(--dark-bg) 100%);
    z-index: 1;
}

.section-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(77, 255, 166, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77, 255, 166, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: -1px -1px;
    mask-image: radial-gradient(ellipse 70% 70% at center, #000 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at center, #000 30%, transparent 90%);
    opacity: 0.7;
    pointer-events: none;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

/* Scroll reveal */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.fade-in.visible,
.fade-in[data-skip-reveal="1"] {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Panels (info-block, content-box, division-card etc) ─── */
.info-block, .content-box, .division-card, .section-title-card, .shenanigans-box {
    background: linear-gradient(180deg, rgba(7, 11, 16, 0.88) 0%, rgba(4, 6, 10, 0.92) 100%);
    backdrop-filter: blur(4px) saturate(110%);
    -webkit-backdrop-filter: blur(4px) saturate(110%);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
}

/* HUD corner accents on key panels */
.info-block::before, .info-block::after,
.content-box::before, .content-box::after,
.division-card::before, .division-card::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: var(--accent-mint);
    opacity: 0.55;
    transition: opacity 0.3s ease, width 0.3s ease, height 0.3s ease;
    pointer-events: none;
}
.info-block::before, .content-box::before, .division-card::before {
    top: -1px; left: -1px;
    border-top: 1px solid;
    border-left: 1px solid;
}
.info-block::after, .content-box::after, .division-card::after {
    bottom: -1px; right: -1px;
    border-bottom: 1px solid;
    border-right: 1px solid;
}
.division-card:hover::before,
.division-card:hover::after {
    width: 22px;
    height: 22px;
    opacity: 1;
}

.info-block {
    padding: 2.75rem 2.5rem;
    border-left: 2px solid var(--secondary-color);
    transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.info-block:hover {
    border-left-color: var(--accent-mint);
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft), 0 0 28px rgba(77, 255, 166, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.info-block h2 {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    display: block;
    padding-bottom: 0.6rem;
    /* Reserve two lines of heading height so a single-line title (e.g.
       "Who We Are") still aligns with a two-line neighbour (e.g.
       "Why Join SPACEWHLE?"). Keeps the green left-borders and body
       text aligned across cards in .grid-2. */
    min-height: calc(2 * 1.15em + 0.6rem);
    line-height: 1.15;
}
.info-block h2::after { left: 0; transform: none; width: 48px; }
@media (max-width: 900px) {
    /* Single column on mobile — alignment is no longer a concern. */
    .info-block h2 { min-height: 0; }
}

.content-box {
    padding: 3.25rem 3rem;
    max-width: 940px;
    margin: 0 auto;
}

.section-intro {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    font-size: 1.08rem;
    color: var(--text-muted);
    line-height: 1.75;
}

/* ─── Goals list ──────────────────────────────────────────── */
.goals-list {
    list-style: none;
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.goals-list li {
    background: linear-gradient(90deg, rgba(46, 139, 87, 0.12) 0%, rgba(10, 15, 10, 0.4) 35%);
    border-left: 2px solid var(--secondary-color);
    /* Hold the content padding identical between rest and hover states
       so the text never reflows mid-hover. The arrow shifts via
       transform, not by changing the surrounding box. */
    padding: 1.1rem 1.5rem 1.1rem 2.85rem;
    font-size: 1.02rem;
    color: var(--text-muted);
    position: relative;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.goals-list li::before {
    content: "▸";
    position: absolute;
    left: 1.1rem;
    color: var(--accent-mint);
    font-size: 0.95rem;
    transition: transform 0.3s ease, color 0.3s ease;
}
.goals-list li:hover {
    border-left-color: var(--accent-mint);
    color: var(--text-light);
    background: linear-gradient(90deg, rgba(77, 255, 166, 0.12) 0%, rgba(10, 15, 10, 0.4) 35%);
}
.goals-list li:hover::before { transform: translateX(5px); }

/* ─── Quote ───────────────────────────────────────────────── */
.org-quote {
    font-family: var(--font-display);
    font-style: normal;
    font-weight: 400;
    color: var(--accent-mint);
    font-size: 1.25rem;
    line-height: 1.5;
    border: none;
    padding: 1.6rem 1.6rem 1.6rem 3.5rem;
    margin-top: 2rem;
    background: linear-gradient(90deg, rgba(46, 139, 87, 0.14) 0%, transparent 80%);
    position: relative;
    letter-spacing: 0.02em;
}
.org-quote::before {
    content: "“";
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    font-size: 4rem;
    color: var(--secondary-color);
    line-height: 1;
    font-family: Georgia, serif;
    opacity: 0.65;
}
.org-quote::after {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-mint), transparent);
}

/* ─── Section title card ──────────────────────────────────── */
.section-title-card {
    display: inline-block;
    padding: 1rem 3rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(180deg, rgba(7, 11, 16, 0.88) 0%, rgba(4, 6, 10, 0.94) 100%);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    position: relative;
}

/* ─── Divisions ───────────────────────────────────────────── */
.divisions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.division-card {
    padding: 2.25rem 1.75rem;
    text-align: center;
    border-top: 2px solid var(--secondary-color);
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-top-color 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}
.division-card::after {
    /* reuse pseudo for sweep */
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 60%; height: 100%;
    background: linear-gradient(110deg, transparent, rgba(77, 255, 166, 0.08), transparent);
    transform: skewX(-18deg);
    transition: left 0.7s cubic-bezier(.2,.7,.2,1);
    pointer-events: none;
    border: none;
    width: auto;
    height: 100%;
    opacity: 1;
}
.division-card:hover {
    transform: translateY(-7px);
    border-top-color: var(--accent-mint);
    box-shadow: var(--shadow-soft), 0 0 32px rgba(77, 255, 166, 0.15);
}
.division-card:hover::after { left: 130%; }

.division-card h3 {
    color: var(--text-light);
    font-size: 1.15rem;
    margin-top: 0.75rem;
    margin-bottom: 0.85rem;
    letter-spacing: 0.18em;
}
.division-card p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.div-logo {
    display: block;
    width: 110px;
    height: 110px;
    margin: 0 auto 1.25rem;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(77, 255, 166, 0.25));
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1), filter 0.4s ease;
}
.division-card:hover .div-logo {
    transform: scale(1.08) translateY(-2px);
    filter: drop-shadow(0 0 22px rgba(77, 255, 166, 0.55));
}

/* ─── FAQ ─────────────────────────────────────────────────── */
.faq-box { max-width: 880px; }

.faq-list {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.faq-item {
    background: rgba(7, 11, 16, 0.55);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.faq-item:hover { border-color: var(--border-strong); }
.faq-item.open {
    border-color: var(--accent-mint);
    background: rgba(7, 11, 16, 0.7);
    box-shadow: 0 0 22px rgba(77, 255, 166, 0.12);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-light);
    padding: 1.2rem 1.6rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background 0.25s ease, color 0.25s ease;
    cursor: pointer;
    letter-spacing: 0.01em;
}
.faq-question:hover { background: rgba(46, 139, 87, 0.12); color: var(--accent-mint); }
.faq-question:active { transform: scale(0.997); }

.faq-icon {
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent-mint);
    font-weight: 300;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1), background 0.3s ease;
    line-height: 1;
    border: 1px solid var(--border-color);
    border-radius: 50%;
}
.faq-item.open .faq-icon {
    transform: rotate(135deg);
    background: rgba(77, 255, 166, 0.15);
    border-color: var(--accent-mint);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(.2,.7,.2,1), padding 0.4s ease;
    padding: 0 1.6rem;
}
.faq-item.open .faq-answer {
    max-height: 400px;
    padding: 0 1.6rem 1.4rem;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 0.97rem;
    margin: 0;
    line-height: 1.75;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
}

.faq-link {
    color: var(--accent-mint);
    text-decoration: none;
    border-bottom: 1px dashed rgba(77, 255, 166, 0.4);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.faq-link:hover { color: #fff; border-bottom-color: var(--accent-mint); }

/* ─── Shenanigans ─────────────────────────────────────────── */
.shenanigans-box {
    margin: 4.5rem auto 0;
    padding: 2.5rem;
    max-width: 880px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border-top: 2px solid var(--secondary-color);
}
.shenanigans-box h3 {
    color: var(--accent-mint) !important;
    font-size: 1.35rem;
    letter-spacing: 0.2em;
}
.shenanigans-video {
    width: min(100%, 760px);
    aspect-ratio: 16 / 9;
    display: block;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    background: #000;
    object-fit: cover;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(77, 255, 166, 0.08);
}

/* ─── Ranks ───────────────────────────────────────────────── */
.rank-category {
    background: linear-gradient(180deg, rgba(7, 11, 16, 0.88) 0%, rgba(4, 6, 10, 0.94) 100%);
    border: 1px solid var(--border-color);
    padding: 1.75rem 1.6rem;
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.04);
    position: relative;
}
.rank-category::before {
    content: "";
    position: absolute;
    top: -1px; left: -1px;
    width: 14px; height: 14px;
    border-top: 1px solid var(--accent-mint);
    border-left: 1px solid var(--accent-mint);
    opacity: 0.55;
}

.rank-category h3 {
    color: var(--accent-mint);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.6rem;
    margin-bottom: 1.1rem;
    font-size: 1rem;
    letter-spacing: 0.2em;
}

.rank-list { list-style: none; padding: 0; }
.rank-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--hairline);
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0;
    transition: padding-left 0.25s ease, color 0.25s ease;
}
.rank-list li:hover { padding-left: 0.5rem; color: var(--text-light); }
.rank-list li:last-child { border-bottom: none; }

/* ─── Rank Badges ─────────────────────────────────────────── */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 26px;
    padding: 0 10px;
    border-radius: 13px;
    color: #000;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.25);
    flex-shrink: 0;
    vertical-align: middle;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rank-badge:hover { transform: scale(1.08); }
.rank-leadership-glow {
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.45), 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.25);
}

/* ─── Gallery ─────────────────────────────────────────────── */
.gallery-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.gallery-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(180deg, rgba(7,11,16,0.85) 0%, rgba(4,6,10,0.92) 100%);
    border: 1px solid var(--secondary-color);
    color: var(--text-light);
    padding: 0.95rem 1.6rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.gallery-toggle:hover {
    background: rgba(46, 139, 87, 0.18);
    border-color: var(--accent-mint);
    color: var(--accent-mint);
    box-shadow: 0 0 18px rgba(77, 255, 166, 0.25), inset 0 0 14px rgba(46, 139, 87, 0.3);
    transform: translateY(-2px);
}
.gallery-toggle:active { transform: translateY(0); }
.gallery-toggle:focus-visible { outline: 2px solid var(--accent-mint); outline-offset: 3px; }

.gallery-toggle-icon {
    font-size: 1rem;
    line-height: 1;
    color: var(--accent-mint);
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.gallery-toggle[aria-expanded="false"] .gallery-toggle-icon { transform: rotate(180deg); }

.gallery-collapsible {
    --gallery-collapsed-height: 245px;
    position: relative;
    overflow: hidden;
    max-height: none;
    transition: max-height 0.6s cubic-bezier(.2,.7,.2,1);
}
.gallery-collapsible.is-collapsed { max-height: var(--gallery-collapsed-height); }
.gallery-collapsible.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 90px;
    background: linear-gradient(to bottom, rgba(4, 6, 10, 0) 0%, rgba(4, 6, 10, 0.96) 90%);
    pointer-events: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 0;
}

.gallery-grid > img,
.gallery-img {
    width: 100%;
    height: clamp(160px, 18vw, 220px);
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-color);
    transition: transform 0.5s cubic-bezier(.2,.7,.2,1), border-color 0.3s ease, box-shadow 0.3s ease, filter 0.4s ease;
    cursor: zoom-in;
    filter: saturate(0.85) brightness(0.95);
}
.gallery-grid > img:hover,
.gallery-img:hover {
    transform: scale(1.05);
    border-color: var(--accent-mint);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(77, 255, 166, 0.25);
    z-index: 10;
    position: relative;
    filter: saturate(1.1) brightness(1.05);
}

@media (max-width: 1024px) {
    .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ─── Modal ───────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.94);
    padding: 12px;
    border: 1px solid var(--border-strong);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(77, 255, 166, 0.1);
    max-width: 95vw;
    max-height: 92vh;
    overflow: hidden;
    border-radius: 6px;
    backdrop-filter: blur(6px);
}
.modal-content {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: calc(92vh - 50px);
    display: block;
    margin: 0;
    border: none;
}
.close {
    position: absolute;
    top: 6px;
    right: 10px;
    color: var(--accent-mint);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    text-shadow: 0 2px 8px #000;
}
.close:hover { color: #fff; transform: scale(1.15); }

/* ─── Footer ──────────────────────────────────────────────── */
.footer {
    background: linear-gradient(180deg, var(--dark-bg) 0%, #02030580 100%);
    padding: 4rem 0 1.5rem;
    text-align: center;
    margin-top: auto;
    position: relative;
    border-top: 1px solid var(--border-color);
}
.footer::before {
    content: "";
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-mint), transparent);
    opacity: 0.4;
}
.footer h3 {
    color: var(--accent-mint);
    font-size: 1.1rem;
    letter-spacing: 0.25em;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.75rem 0;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, rgba(7,11,16,0.85) 0%, rgba(4,6,10,0.92) 100%);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    text-decoration: none;
    padding: 11px 22px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.social-btn:hover {
    background: rgba(46, 139, 87, 0.18);
    border-color: var(--accent-mint);
    color: var(--accent-mint);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(77, 255, 166, 0.18);
}
.social-btn:active { transform: translateY(-1px); box-shadow: none; }
.social-btn svg, .social-btn .footer-icon {
    transition: transform 0.3s ease;
}
.social-btn:hover svg, .social-btn:hover .footer-icon {
    transform: scale(1.1);
}

.footer-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.sc-market-logo, .rsi-logo {
    filter: grayscale(1) invert(1) brightness(2);
    mix-blend-mode: screen;
}

.copyright {
    margin-top: 2.5rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

/* ─── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .section-bg { background-attachment: scroll; }
    .section { padding: 4rem 0; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(4, 6, 10, 0.98);
        backdrop-filter: blur(14px);
        flex-direction: column;
        padding: 1.5rem 0;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        gap: 1rem;
    }
    .nav-links.active { display: flex; }
    .menu-toggle { display: flex; }

    .hero-title { font-size: clamp(2rem, 9vw, 3rem); }
    .hero-logo { width: min(140px, 50vw); }
    .hero-motto { font-size: 0.85rem; letter-spacing: 0.3em; }

    .hero-join-now {
        width: min(100%, 320px);
        padding: 14px 28px;
        font-size: 1rem;
    }

    .grid-2 { grid-template-columns: 1fr; gap: 1.25rem; }
    .content-box { padding: 2rem 1.5rem; }
    .info-block { padding: 2rem 1.5rem; }

    .gallery-collapsible { --gallery-collapsed-height: 185px; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .gallery-toggle { width: 100%; justify-content: center; }
    .hero::before, .hero::after { width: 40px; height: 40px; }
}

/* ─── Team Page ───────────────────────────────────────────── */
.team-section { padding: 2.5rem 0 5.5rem; }

.team-page-title { text-align: center; margin-bottom: 3rem; }

.team-grid {
    display: grid;
    gap: 2rem;
}

.team-card {
    width: min(100%, 940px);
    background: linear-gradient(180deg, rgba(7, 11, 16, 0.86) 0%, rgba(4, 6, 10, 0.94) 100%);
    backdrop-filter: blur(4px) saturate(110%);
    -webkit-backdrop-filter: blur(4px) saturate(110%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1), border-color 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}
.team-card::before, .team-card::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--accent-mint);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.team-card::before { top: 8px; left: 8px; border-top: 1px solid; border-left: 1px solid; }
.team-card::after { bottom: 8px; right: 8px; border-bottom: 1px solid; border-right: 1px solid; }
.team-card:hover::before, .team-card:hover::after { opacity: 0.7; }

.team-card:nth-child(odd) { justify-self: start; }
.team-card:nth-child(even) { justify-self: end; }

.team-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.55), 0 0 36px rgba(77, 255, 166, 0.15);
}

.team-card-shell {
    display: flex;
    align-items: flex-start;
    gap: clamp(1.5rem, 3vw, 2.75rem);
    padding: clamp(1.5rem, 3vw, 2.4rem);
}
.team-card:nth-child(even) .team-card-shell { flex-direction: row-reverse; }

.team-photo-frame {
    width: clamp(110px, 13vw, 160px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    padding: 0.75rem;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(46, 139, 87, 0.3);
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 20%, rgba(77, 255, 166, 0.18), rgba(4, 6, 10, 0.96)),
        rgba(7, 11, 16, 0.85);
    position: relative;
    box-shadow: inset 0 0 16px rgba(77, 255, 166, 0.1);
}
.team-photo-frame::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(77, 255, 166, 0.4), transparent 50%, rgba(77, 255, 166, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.team-photo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(5, 8, 5, 0.88);
    transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
}
.team-card:hover .team-photo { transform: scale(1.04); }

.team-card-content { flex: 1; min-width: 0; }
.team-name {
    color: var(--text-light);
    margin-bottom: 0.4rem;
    letter-spacing: 0.12em;
    font-size: 1.4rem;
    text-align: left;
}
.team-role {
    color: var(--accent-mint);
    font-family: var(--font-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 500;
    margin-bottom: 1.4rem;
    text-align: left;
}

.team-actions { margin-bottom: 0.2rem; }

.team-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(180deg, rgba(7,11,16,0.85) 0%, rgba(4,6,10,0.92) 100%);
    border: 1px solid var(--secondary-color);
    color: var(--text-light);
    padding: 0.85rem 1.35rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 500;
    font-size: 0.74rem;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.team-toggle:hover {
    background: rgba(46, 139, 87, 0.2);
    color: var(--accent-mint);
    border-color: var(--accent-mint);
    box-shadow: inset 0 0 14px rgba(46, 139, 87, 0.35), 0 0 16px rgba(77, 255, 166, 0.2);
    transform: translateY(-2px);
}
.team-toggle:active { transform: translateY(0); }
.team-toggle:focus-visible { outline: 2px solid var(--accent-mint); outline-offset: 3px; }

.team-toggle-icon {
    font-size: 1rem;
    line-height: 1;
    color: var(--accent-mint);
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.team-toggle[aria-expanded="false"] .team-toggle-icon { transform: rotate(180deg); }

.team-collapsible {
    --team-collapsed-height: 86px;
    overflow: hidden;
    max-height: none;
    transition: max-height 0.6s cubic-bezier(.2,.7,.2,1);
    position: relative;
}
.team-collapsible.is-collapsed { max-height: var(--team-collapsed-height); }
.team-collapsible.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 50px;
    background: linear-gradient(to bottom, rgba(4, 6, 10, 0) 0%, rgba(4, 6, 10, 0.92) 100%);
    pointer-events: none;
}
.team-collapsible-content {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-color);
}

.team-quote {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.85;
    white-space: pre-line;
    position: relative;
    padding-left: 1.4rem;
    border-left: 2px solid var(--secondary-color);
    font-family: var(--font-body);
}
.team-quote::before {
    content: "“";
    font-size: 2.4rem;
    color: var(--accent-mint);
    position: absolute;
    top: -0.7rem;
    left: 0.2rem;
    opacity: 0.5;
    font-family: Georgia, serif;
}

@media (max-width: 768px) {
    .team-photo-frame {
        width: min(100%, 160px);
        margin: 0 auto;
    }
    .team-card,
    .team-card:nth-child(odd),
    .team-card:nth-child(even) { width: 100%; justify-self: stretch; }

    .team-card-shell,
    .team-card:nth-child(even) .team-card-shell {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .team-photo-frame { width: min(100%, 200px); margin: 0 auto; }
    .team-card-content { text-align: center; }
    .team-name, .team-role { text-align: center; }
    .team-toggle { width: 100%; justify-content: center; }
}

/* ─── Page transition ─────────────────────────────────────── */
#transition-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--dark-bg);
    z-index: 99998;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
#transition-overlay.t-hidden { opacity: 0; }

/* ============================================================
   Admin / Members panel styles — preserved from original
   ============================================================ */

.admin-hero {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.admin-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(5,8,5,0.20), rgba(5,8,5,0.45));
    pointer-events: none;
}
.admin-hero-content { position: relative; z-index: 2; text-align: center; }
.admin-hero-content h1 { font-size: 2.4rem; color: var(--admin-gold); letter-spacing: 0.3em; margin-bottom: 6px; }
.admin-hero-content p { color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; margin: 0; }

.admin-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    z-index: 1;
}

/* Admin dashboard background — bg image (via .bg-img-N) with a soft
   darkening overlay so the floating cards stay legible. The cards
   themselves keep their solid --admin-panel fill so the data they
   show isn't compromised.
   Used on .admin-shell so the hero + dashboard sit on the SAME image
   without a visible seam between them. */
.admin-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.admin-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4,6,10,0.55) 0%, rgba(4,6,10,0.65) 50%, rgba(4,6,10,0.78) 100%);
    pointer-events: none;
    z-index: 0;
}
.admin-bg > * { position: relative; z-index: 1; }
/* Inner hero must not paint its own background — the parent .admin-bg
   carries the image now. */
.admin-shell .admin-hero {
    background: transparent;
    background-image: none;
}
.admin-shell .admin-hero::before { content: none; }
/* Solid card background on the cards themselves so a busy bg image
   doesn't bleed through tables / forms. Same colour as before, just
   forced opaque against the overlay. */
.admin-bg .admin-card {
    background: var(--admin-panel);
    backdrop-filter: none;
}
.admin-bg .roster-table-wrap {
    background: rgba(4, 6, 10, 0.95);
    border-radius: 6px;
}
@media (max-width: 900px) {
    /* iOS Safari can't do fixed backgrounds smoothly. */
    .admin-bg { background-attachment: scroll; }
}

#access-gate { text-align: center; padding: 80px 20px; color: var(--text-muted); font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase; }
#access-gate .gate-icon { font-size: 3rem; margin-bottom: 16px; }
#access-gate h2 { color: var(--admin-red); font-size: 1.2rem; }

.admin-card { background: var(--admin-panel); border: 1px solid var(--border-color); border-radius: 8px; padding: 28px; box-shadow: 0 0 20px rgba(0,0,0,0.6); }
.admin-card h3 { color: var(--admin-gold); font-size: 0.82rem; letter-spacing: 0.25em; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; text-align: left; }

.search-row { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search-row input, .search-row select { flex: 1; min-width: 160px; padding: 10px 14px; background: rgba(0,0,0,0.5); border: 1px solid var(--border-color); border-radius: 4px; color: var(--text-light); font-size: 0.88rem; font-family: var(--font-body); }
.search-row input::placeholder { color: var(--text-muted); }

.roster-table-wrap { overflow-x: auto; }
.roster-table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.roster-table-wrap thead th { text-align: left; padding: 10px 12px; color: var(--accent-mint); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; border-bottom: 1px solid var(--border-color); font-family: var(--font-display); }
.roster-table-wrap tbody tr { border-bottom: 1px solid rgba(22,41,26,0.5); transition: background 0.15s; }
.roster-table-wrap tbody tr:hover { background: rgba(46,139,87,0.07); }
.roster-table-wrap tbody td { padding: 10px 12px; color: var(--text-muted); vertical-align: middle; }
.roster-table-wrap tbody td:first-child { color: var(--text-light); font-weight: 600; }

.div-badge { display: inline-block; padding: 2px 7px; border-radius: 3px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; margin: 1px; }
.div-op  { background: rgba(46,139,87,0.25); color: #2e8b57; border: 1px solid #2e8b5740; }
.div-log { background: rgba(0,217,255,0.15); color: #00d9ff; border: 1px solid #00d9ff40; }
.div-med { background: rgba(255,68,68,0.15);  color: #ff6666; border: 1px solid #ff444440; }
.div-aca { background: rgba(255,215,0,0.15);  color: #ffd700; border: 1px solid #ffd70040; }

.action-btn { padding: 5px 12px; border-radius: 3px; border: 1px solid; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; cursor: pointer; text-transform: uppercase; transition: all 0.18s; font-family: var(--font-display); }
.btn-edit   { background: rgba(0,217,255,0.1); border-color: #00d9ff60; color: #00d9ff; }
.btn-edit:hover { background: rgba(0,217,255,0.25); }
.btn-delete { background: rgba(255,68,68,0.1); border-color: #ff444460; color: #ff6666; }
.btn-delete:hover { background: rgba(255,68,68,0.25); }
.btn-primary { background: rgba(46,139,87,0.2); border-color: #2e8b5760; color: #2e8b57; padding: 10px 20px; font-size: 0.82rem; }
.btn-primary:hover { background: rgba(46,139,87,0.35); }
.btn-gold { background: rgba(255,215,0,0.1); border-color: #ffd70060; color: #ffd700; padding: 10px 20px; font-size: 0.82rem; }
.btn-gold:hover { background: rgba(255,215,0,0.25); }
.btn-danger { background: rgba(255,68,68,0.1); border-color: #ff444460; color: #ff6666; padding: 10px 20px; font-size: 0.82rem; }
.btn-danger:hover { background: rgba(255,68,68,0.25); }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 9998; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: #0a0f0a; border: 1px solid var(--border-color); border-radius: 8px; padding: 32px; width: 100%; max-width: 520px; z-index: 9999; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-box h3 { color: var(--admin-gold); font-size: 0.85rem; letter-spacing: 0.25em; margin-bottom: 24px; text-align: left; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #fff; }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-mint); font-family: var(--font-display); }
.form-group input, .form-group select { padding: 10px 12px; background: rgba(0,0,0,0.5); border: 1px solid var(--border-color); border-radius: 4px; color: var(--text-light); font-size: 0.88rem; font-family: var(--font-body); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent-mint); box-shadow: 0 0 0 3px rgba(77,255,166,0.15); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.checkbox-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(0,0,0,0.4); border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; font-size: 0.82rem; color: var(--text-muted); transition: all 0.15s; }
.checkbox-item:hover { border-color: var(--secondary-color); color: var(--text-light); }
.checkbox-item input[type=checkbox] { accent-color: var(--secondary-color); width: 14px; height: 14px; }

/* ── Compact role-ping checklist (used on admin announce + event creator) ── */
.role-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 2px;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px;
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 14px;
}
.role-checklist .role-checklist-item {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    margin: 0 !important;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.76rem;
    line-height: 1.2;
    color: var(--text-light);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    min-width: 0;
}
.role-checklist .role-checklist-item:hover { background: rgba(46,139,87,0.12); }
.role-checklist .role-checklist-item input[type="checkbox"] {
    width: 13px !important;
    height: 13px;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    accent-color: var(--secondary-color);
    cursor: pointer;
    background: transparent !important;
}
.role-checklist .role-checklist-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 4px rgba(0,0,0,0.6); }
.role-checklist .role-checklist-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }

/* @everyone / @here toggles on the event creator */
.ping-toggles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ping-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ping-toggle input[type="checkbox"] { width: auto !important; margin: 0 !important; padding: 0 !important; cursor: pointer; accent-color: var(--secondary-color); }
.ping-toggle.danger { border-color: rgba(255,68,68,0.4); color: #ff8888; }
.ping-toggle.warn   { border-color: rgba(255,170,68,0.4); color: #ffc266; }
.ping-toggle:hover  { background: rgba(46,139,87,0.1); }

.role-choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; max-height: 190px; overflow-y: auto; padding: 8px; background: rgba(0,0,0,0.35); border: 1px solid var(--border-color); border-radius: 5px; margin-bottom: 14px; }
.role-choice { display: flex !important; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; background: rgba(0,0,0,0.32); border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; color: var(--text-muted) !important; font-size: 0.78rem !important; font-weight: 600; letter-spacing: 0 !important; margin-bottom: 0 !important; text-transform: none !important; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.role-choice:hover { background: rgba(46,139,87,0.1); border-color: var(--secondary-color); color: var(--text-light) !important; }
.role-choice input[type=checkbox] { flex: 0 0 auto; width: 14px !important; height: 14px; margin: 0 !important; padding: 0 !important; background: transparent !important; accent-color: var(--secondary-color); }
.role-choice span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

.points-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.points-box { background: rgba(0,0,0,0.4); border: 1px solid var(--border-color); border-radius: 5px; padding: 12px; text-align: center; }
.points-box label { display: block; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-mint); margin-bottom: 6px; font-family: var(--font-display); }
.points-box input { width: 100%; padding: 7px; background: rgba(0,0,0,0.5); border: 1px solid var(--border-color); border-radius: 3px; color: var(--text-light); font-size: 1rem; text-align: center; font-family: var(--font-mono); }

.add-member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

#toast { position: fixed; bottom: 30px; right: 30px; padding: 14px 22px; border-radius: 5px; font-size: 0.88rem; font-weight: 600; letter-spacing: 0.06em; z-index: 99999; display: none; border: 1px solid; }
#toast.success { background: rgba(46,139,87,0.2); border-color: #2e8b57; color: #2e8b57; }
#toast.error   { background: rgba(255,68,68,0.2); border-color: #ff4444; color: #ff6666; }

.summary-chips { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.summary-chip { background: rgba(0,0,0,0.4); border: 1px solid var(--border-color); border-radius: 5px; padding: 10px 18px; font-size: 0.82rem; color: var(--text-muted); }
.summary-chip strong { color: var(--admin-gold); font-size: 1.1rem; display: block; font-family: var(--font-display); }

.empty-state { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 40px 0; letter-spacing: 0.06em; }

#admin-dashboard { display: none; }

@media (max-width: 700px) {
    .add-member-grid, .form-row, .points-row { grid-template-columns: 1fr; }
    .summary-chips { flex-direction: column; }
}

/* ─── Members rank tracker (preserved) ────────────────────── */
.rank-display { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.rank-badge-large { width: 80px; height: 40px; border-radius: 20px; font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: #000; letter-spacing: 0px; text-transform: capitalize; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.3); text-shadow: none; }
.rank-info h4 { margin: 0; color: var(--text-light); font-size: 1.2rem; text-align: left; }
.rank-info p { margin: 4px 0 0; color: var(--text-muted); font-size: 0.9rem; }

.rank-progress-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 700; font-family: var(--font-display); letter-spacing: 0.1em; }
.rank-progress-bar { height: 10px; background: rgba(255,255,255,0.05); border-radius: 5px; overflow: hidden; margin-bottom: 12px; border: 1px solid var(--border-color); }
.rank-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-blue), var(--secondary-color), var(--accent-mint)); transition: width 1s ease-in-out; box-shadow: 0 0 12px rgba(77,255,166,0.4); }
.rank-next { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 10px; }
.rank-next strong { color: var(--accent-mint); }

.stats-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border-color); }
.stat-box { background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 16px 10px; text-align: center; transition: transform 0.2s ease, border-color 0.2s ease; }
.stat-box:hover { transform: translateY(-2px); border-color: var(--accent-mint); }
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--accent-mint); margin-bottom: 4px; text-shadow: 0 0 12px rgba(77, 255, 166, 0.3); font-family: var(--font-display); }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.14em; font-family: var(--font-display); }

#username-greeting { font-size: 1.8rem; margin-bottom: 10px; color: var(--accent-mint); font-weight: 600; letter-spacing: 0.06em; text-transform: none !important; font-family: var(--font-display); }

/* ─── Skeletons ───────────────────────────────────────────── */
@keyframes skeleton-scan { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton-box { background: linear-gradient(90deg, rgba(22, 41, 26, 0.8) 25%, rgba(46, 139, 87, 0.18) 50%, rgba(22, 41, 26, 0.8) 75%); background-size: 800px 100%; animation: skeleton-scan 1.6s infinite linear; border-radius: 4px; min-height: 14px; }
.skeleton-box.sk-chip { height: 72px; border-radius: 6px; }
.skeleton-box.sk-row { height: 40px; margin-bottom: 8px; border-radius: 5px; }
.skeleton-box.sk-row:last-child { margin-bottom: 0; }
.skeleton-box.sk-bar { height: 8px; border-radius: 4px; }
.skeleton-box.sk-title { height: 22px; width: 55%; border-radius: 4px; margin-bottom: 12px; }
.skeleton-box.sk-text { height: 14px; border-radius: 3px; margin-bottom: 6px; }
.skeleton-box.sk-badge { width: 72px; height: 72px; border-radius: 8px; }
.skeleton-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skeleton-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.skeleton-badge-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ─── Leaderboard, badges, events, etc. (preserved) ────────── */
.leaderboard-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; background: rgba(0,0,0,0.35); border: 1px solid var(--border-color); border-radius: 5px; font-size: 0.88rem; transition: border-color 0.2s, background 0.2s; }
.lb-row:hover { background: rgba(46,139,87,0.1); border-color: var(--secondary-color); }
.lb-row.lb-gold   { border-color: #ffd700; background: rgba(255,215,0,0.07); }
.lb-row.lb-silver { border-color: #c0c0c0; background: rgba(192,192,192,0.07); }
.lb-row.lb-bronze { border-color: #cd7f32; background: rgba(205,127,50,0.07); }
.lb-row.lb-me     { border-color: var(--secondary-color); background: rgba(46,139,87,0.14); }
.lb-divider { display: flex; align-items: center; justify-content: center; padding: 8px 0; color: var(--text-muted); letter-spacing: 0.4em; font-size: 0.75rem; }
.lb-divider span { display: inline-block; }
.lb-rank { font-weight: 800; color: var(--text-muted); font-size: 0.82rem; text-align: center; font-family: var(--font-display); }
.lb-rank.gold   { color: #ffd700; }
.lb-rank.silver { color: #c0c0c0; }
.lb-rank.bronze { color: #cd7f32; }
.lb-name { color: var(--text-light); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-pts  { color: var(--accent-mint); font-weight: 700; font-size: 0.85rem; white-space: nowrap; font-family: var(--font-mono); }
.lb-tab-row { display: flex; gap: 8px; margin-bottom: 14px; }
.lb-tab { padding: 5px 14px; border: 1px solid var(--border-color); border-radius: 20px; background: rgba(0,0,0,0.3); color: var(--text-muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: all 0.2s; font-family: var(--font-display); }
.lb-tab.active, .lb-tab:hover { background: rgba(46,139,87,0.2); border-color: var(--accent-mint); color: var(--text-light); }

.badge-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px; width: 84px; background: rgba(0,0,0,0.4); border: 1px solid var(--border-color); border-radius: 8px; text-align: center; opacity: 0.35; filter: grayscale(1); transition: opacity 0.3s, border-color 0.3s, filter 0.3s; cursor: default; position: relative; }
.badge-chip.earned { opacity: 1; filter: none; border-color: var(--accent-mint); box-shadow: 0 0 12px rgba(77,255,166,0.3); }
.badge-chip .badge-icon { font-size: 1.8rem; line-height: 1; }
.badge-chip .badge-name { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.2; font-family: var(--font-display); }
.badge-chip.earned .badge-name { color: var(--accent-mint); }
.badge-chip .badge-pts { font-size: 0.6rem; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }
.badge-chip[title]:hover::after { content: attr(title); position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); background: rgba(10,15,10,0.97); border: 1px solid var(--border-color); color: var(--text-light); font-size: 0.72rem; padding: 5px 9px; border-radius: 4px; white-space: nowrap; z-index: 10; pointer-events: none; }

.event-list { display: flex; flex-direction: column; gap: 10px; }
.event-card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: rgba(0,0,0,0.35); border: 1px solid var(--border-color); border-radius: 6px; transition: border-color 0.2s, background 0.2s; }
.event-card:hover { border-color: var(--accent-mint); background: rgba(46,139,87,0.06); }
.event-date-block { display: flex; flex-direction: column; align-items: center; min-width: 48px; background: rgba(46,139,87,0.12); border: 1px solid rgba(46,139,87,0.3); border-radius: 5px; padding: 6px 8px; text-align: center; }
.event-date-block .ev-day   { font-size: 1.4rem; font-weight: 800; color: var(--accent-mint); line-height: 1; font-family: var(--font-display); }
.event-date-block .ev-month { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-display); }
.event-info .ev-title { font-size: 0.95rem; font-weight: 700; color: var(--text-light); margin-bottom: 3px; }
.event-info .ev-desc  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.event-info .ev-type  { display: inline-block; font-size: 0.62rem; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 5px; font-weight: 700; font-family: var(--font-display); }

.rsvp-btn { padding: 7px 14px; border-radius: 4px; border: 1px solid var(--secondary-color); background: rgba(46,139,87,0.12); color: var(--secondary-color); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s; min-width: 80px; text-align: center; font-family: var(--font-display); }
.rsvp-btn:hover { background: rgba(46,139,87,0.3); color: #fff; }
.rsvp-btn.attending { background: rgba(46,139,87,0.3); color: #fff; border-color: var(--accent-mint); }
.rsvp-btn.attending:hover { background: rgba(255,68,68,0.15); border-color: #ff4444; color: #ff6666; }
.rsvp-count { font-size: 0.7rem; color: var(--text-muted); text-align: center; margin-top: 3px; }
.event-card-link { text-decoration: none; display: block; }
.event-card-link:focus-visible .event-card { outline: 2px solid var(--accent-mint); outline-offset: 2px; }
.rsvp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; background: rgba(46,139,87,0.2); border: 1px solid var(--secondary-color); border-radius: 12px; color: #71ff9e; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.rsvp-chip.rsvp-chip-decline { background: rgba(255,68,68,0.18); border-color: rgba(255,68,68,0.55); color: #ff8888; }
.rsvp-cta  { font-size: 0.72rem; color: var(--secondary-color); font-weight: 600; letter-spacing: 0.03em; white-space: nowrap; }

@media (max-width: 600px) {
    .event-card { grid-template-columns: auto 1fr; }
    .rsvp-btn { grid-column: 1 / -1; }
}

.stats-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stats-timeframe, .stats-metric-toggle { display: flex; gap: 4px; }
.tf-btn, .mt-btn { background: rgba(0,0,0,0.4); border: 1px solid var(--border-color); color: var(--text-muted); padding: 6px 12px; border-radius: 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; transition: background 0.18s, color 0.18s, border-color 0.18s; font-family: var(--font-display); }
.tf-btn:hover, .mt-btn:hover { background: rgba(46,139,87,0.12); color: var(--text-light); }
.tf-btn.active { background: var(--secondary-color); color: #fff; border-color: var(--accent-mint); }
.mt-btn.active { background: color-mix(in srgb, var(--mt-color) 25%, transparent); color: var(--mt-color); border-color: var(--mt-color); }
#stats-chart { background: rgba(0,0,0,0.25); border: 1px solid var(--border-color); border-radius: 6px; padding: 4px; }
#stats-chart-wrap { margin-top: 14px; }

.ops-log-list { display: flex; flex-direction: column; gap: 8px; }
.ops-log-item { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px; background: rgba(0,0,0,0.35); border: 1px solid var(--border-color); border-radius: 6px; padding: 12px 16px; }
.ops-log-date-block { text-align: center; flex-shrink: 0; }
.ops-log-day  { display: block; font-size: 1.4rem; font-weight: 800; color: var(--accent-mint); line-height: 1; font-family: var(--font-display); }
.ops-log-mon  { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-top: 2px; font-family: var(--font-display); }
.ops-log-info { min-width: 0; }
.ops-log-title { font-size: 0.92rem; font-weight: 700; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-log-desc  { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-type.completed { background: rgba(100,100,100,0.15); border: 1px solid rgba(150,150,150,0.3); color: #aaa; }

.ref-section h4 { color: var(--accent-mint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 10px; text-align: left; font-family: var(--font-display); }
.ref-recruiter { background: rgba(0,0,0,0.35); border: 1px solid var(--border-color); border-radius: 6px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ref-handle { color: var(--text-light); font-weight: 700; font-size: 0.92rem; }
.ref-status { font-size: 0.72rem; padding: 4px 10px; border-radius: 12px; font-weight: 600; white-space: nowrap; font-family: var(--font-display); letter-spacing: 0.08em; }
.ref-status.earned  { background: rgba(46,139,87,0.18); border: 1px solid rgba(46,139,87,0.5); color: #71ff9e; }
.ref-status.pending { background: rgba(255,170,68,0.12); border: 1px solid rgba(255,170,68,0.35); color: #ffaa44; }
.ref-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ref-item { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-color); border-radius: 5px; padding: 9px 14px; flex-wrap: wrap; }
.ref-item .ref-handle { flex: 1; min-width: 120px; }
.ref-meta { color: var(--text-muted); font-size: 0.72rem; font-family: var(--font-mono); }

.promo-queue-list { display: flex; flex-direction: column; gap: 8px; }
.promo-row { display: flex; align-items: center; gap: 16px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,215,0,0.15); border-radius: 6px; padding: 10px 16px; flex-wrap: wrap; }
.promo-name  { flex: 1; min-width: 120px; font-weight: 700; color: var(--text-light); font-size: 0.9rem; }
.promo-rank-flow { display: flex; align-items: center; gap: 8px; }
.promo-badge { font-size: 0.72rem; font-weight: 800; padding: 4px 10px; border-radius: 20px; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-display); }
.promo-badge.current { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: var(--text-muted); }
.promo-badge.next    { background: rgba(255,215,0,0.15); border: 1px solid rgba(255,215,0,0.4); color: #ffd700; }

/* Generic feedback status pill — used by Site Feedback + Event Feedback */
.fb-status { padding: 8px 12px; border-radius: 5px; font-size: 0.85rem; }
.fb-status.ok    { background: rgba(46,139,87,0.15); border: 1px solid rgba(46,139,87,0.4); color: #71ff9e; }
.fb-status.error { background: rgba(255,68,68,0.12); border: 1px solid rgba(255,68,68,0.45); color: #ff8888; }

/* Roster column sort indicators */
.roster-table-wrap th.sortable { position: relative; }
.roster-table-wrap th.sortable:hover { color: var(--text-light); background: rgba(46,139,87,0.06); }
.roster-table-wrap th.sortable .sort-ind {
    display: inline-block;
    width: 0.9em;
    margin-left: 4px;
    font-size: 0.7rem;
    color: var(--secondary-color);
    vertical-align: middle;
}

.roster-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.roster-header h3 { color: var(--admin-gold); font-size: 0.82rem; letter-spacing: 0.25em; }

/* Admin roster: rank tic-tac pill */
.rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #000;
    text-shadow: 0 1px 0 rgba(255,255,255,0.25);
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.promo-arrow { color: var(--accent-mint); font-size: 1rem; }
.promo-ops   { font-size: 0.78rem; color: var(--accent-mint); font-weight: 600; white-space: nowrap; font-family: var(--font-mono); }

.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
/* Unify every Quick Action button so we don't end up with a rainbow row
   (gold + cyan + teal + green). Each button still keeps its title /
   icon, but the background, border, and text colour all collapse to a
   single teal-secondary palette. */
.quick-actions-grid .action-btn {
    padding: 12px 14px;
    font-size: 0.82rem;
    background: rgba(46,139,87,0.10) !important;
    border: 1px solid var(--secondary-color) !important;
    color: var(--secondary-color) !important;
    letter-spacing: 0.06em;
    line-height: 1.25;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.quick-actions-grid .action-btn:hover {
    background: rgba(46,139,87,0.22) !important;
    color: #fff !important;
}
.quick-actions-grid a.action-btn { text-decoration: none; }

#bulk-bar { display: flex; align-items: center; gap: 14px; background: rgba(46,139,87,0.1); border: 1px solid rgba(46,139,87,0.35); border-radius: 6px; padding: 10px 16px; margin-bottom: 14px; flex-wrap: wrap; }
#bulk-count { font-size: 0.82rem; font-weight: 700; color: var(--accent-mint); white-space: nowrap; min-width: 80px; font-family: var(--font-display); }
.bulk-inputs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-cb { width: 15px; height: 15px; cursor: pointer; accent-color: var(--secondary-color); }
.row-selected td { background: rgba(46,139,87,0.06); }

/* details/summary catalogue */
details > summary { transition: background 0.22s ease, color 0.22s ease; user-select: none; cursor: pointer; }
details > summary:hover { background: rgba(46,139,87,0.15) !important; color: #fff !important; }
details > summary:active { background: rgba(46,139,87,0.25) !important; }
details a { transition: color 0.2s ease; }
details a:hover { color: var(--accent-mint) !important; }

/* ─── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .glitch::before, .glitch::after { display: none; }
}

/* ─── Scroll reveal stagger ───────────────────────────────── */
.fade-in.fade-in-staggered > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.fade-in-staggered.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.fade-in.fade-in-staggered.visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.fade-in.fade-in-staggered.visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.fade-in.fade-in-staggered.visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.fade-in.fade-in-staggered.visible > *:nth-child(5) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }

/* ============================================================
   FLUID MOTION LAYER — added by enhancements
   ============================================================ */

/* Top scroll-progress line */
#sw-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--accent-blue), var(--secondary-color), var(--accent-mint));
    box-shadow: 0 0 10px rgba(77, 255, 166, 0.55), 0 0 22px rgba(46, 139, 87, 0.35);
    z-index: 10000;
    pointer-events: none;
    transition: transform 0.08s linear, opacity 0.3s ease;
    will-change: transform;
}

/* Scrolled-state nav: tighter, deeper background */
.navbar {
    transition: padding 0.35s cubic-bezier(.2,.7,.2,1),
                background 0.35s ease,
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}
.navbar.is-scrolled {
    padding: 0.55rem 0;
    background: linear-gradient(180deg, rgba(2, 4, 7, 0.96) 0%, rgba(2, 4, 7, 0.88) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    border-bottom-color: var(--border-strong);
}
.navbar.is-scrolled .logo {
    width: 36px;
    height: 36px;
}
.navbar.is-scrolled .nav-brand {
    font-size: 1.05rem;
}

/* Hero content gets composited for smooth parallax */
.hero-content {
    will-change: transform, opacity;
    transition: transform 0.05s linear, opacity 0.2s linear;
}

/* Magnetic hover micro-translation (applied via CSS vars from JS) */
.hero-join-now,
.portal-link,
.gallery-toggle,
.team-toggle,
.social-btn {
    --mx: 0px;
    --my: 0px;
}
.hero-join-now.is-magnet,
.portal-link.is-magnet,
.gallery-toggle.is-magnet,
.team-toggle.is-magnet,
.social-btn.is-magnet {
    transform: translate(var(--mx), calc(var(--my) - 2px));
}
.hero-join-now,
.portal-link,
.gallery-toggle,
.team-toggle,
.social-btn {
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease,
                box-shadow 0.3s ease, transform 0.18s cubic-bezier(.2,.7,.2,1);
}

/* Gallery tilt — subtle 3D lean on hover */
.gallery-grid > img,
.gallery-img {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(1);
    transition: transform 0.4s cubic-bezier(.2,.7,.2,1),
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                filter 0.4s ease;
    transform-style: preserve-3d;
}
.gallery-grid > img:hover,
.gallery-img:hover {
    transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(1.06);
}

/* Staggered children reveal for grids
   Children are revealed *within* a .fade-in parent that has become visible. */
.sw-stagger > * {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(.2,.7,.2,1),
                transform 0.7s cubic-bezier(.2,.7,.2,1);
    transition-delay: calc(var(--stagger-i, 0) * 70ms);
}
.fade-in.visible .sw-stagger > *,
.sw-stagger.visible > *,
.fade-in.visible.sw-stagger > * {
    opacity: 1;
    transform: translateY(0);
}

/* When the stagger container itself is a direct .fade-in (e.g. .grid-2.fade-in) */
.sw-stagger.fade-in > * { opacity: 0; transform: translateY(22px); }
.sw-stagger.fade-in.visible > * { opacity: 1; transform: translateY(0); }

/* Bumped reveal motion — replaces the old "instant" .fade-in behavior
   from script.js. Now matches a real reveal curve. */
.fade-in {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s cubic-bezier(.2,.7,.2,1),
                transform 0.9s cubic-bezier(.2,.7,.2,1);
    will-change: opacity, transform;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* HERO: never hide initial content even before observer fires */
.hero .fade-in,
.hero-content.fade-in {
    opacity: 1;
    transform: none;
}

/* Slow ambient drift on hero background images (parallax companion) */
@keyframes ambient-drift {
    0%, 100% { background-position: 50% 50%; }
    50%      { background-position: 52% 48%; }
}
.home-hero,
.about-hero,
.team-hero {
    animation: ambient-drift 28s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .home-hero, .about-hero, .team-hero { animation: none; }
    #sw-scroll-progress { display: none; }
}

/* Section title underline — animate width when it enters view */
.fade-in h2::after,
.fade-in .section-title-card::after {
    transform-origin: center;
    transition: width 0.9s cubic-bezier(.2,.7,.2,1) 0.2s, opacity 0.6s ease 0.2s;
}
.fade-in:not(.visible) h2::after { width: 0; opacity: 0; }
.fade-in.visible h2::after { opacity: 1; }

/* Smoother FAQ chevron and answer transitions */
.faq-answer { transition: max-height 0.55s cubic-bezier(.2,.7,.2,1), padding 0.4s ease; }
.faq-item   { transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, transform 0.25s ease; }
.faq-item.open { transform: translateY(-1px); }

/* Division card lift now uses a softer curve */
.division-card { transition: transform 0.45s cubic-bezier(.2,.7,.2,1),
                             border-top-color 0.45s ease,
                             box-shadow 0.45s ease; }

/* Team card breathes on hover */
.team-card { transition: transform 0.5s cubic-bezier(.2,.7,.2,1),
                         border-color 0.45s ease,
                         box-shadow 0.5s ease; }

/* Link underline grow animation (anchor inside content) */
.content-box a,
.info-block a {
    position: relative;
    text-decoration: none;
    color: var(--accent-mint);
    background-image: linear-gradient(90deg, var(--accent-mint), var(--accent-mint));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size 0.4s cubic-bezier(.2,.7,.2,1), color 0.25s ease;
    padding-bottom: 1px;
}
.content-box a:hover,
.info-block a:hover {
    background-size: 100% 1px;
    color: #fff;
}

/* Soft float for org logo in hero */
@keyframes hero-logo-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}
.hero-logo {
    animation: hero-logo-float 6s ease-in-out infinite;
}
.hero-logo-link:hover .hero-logo { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } }


/* ============================================================
   PREMIUM MOTION LAYER — cursor glow, char stagger, 3D tilt,
   image reveals, HUD bracket draw-in, particles, page wipe
   ============================================================ */

/* ─── 1. Cursor-follow glow ───────────────────────────────── */
/* Removed per design feedback */
#sw-cursor-glow { display: none !important; }

/* ─── 2. Character stagger reveal ─────────────────────────── */
.sw-split { display: inline-block; }
.sw-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.45em) rotateX(-25deg);
    transform-origin: 50% 100%;
    transition: opacity 0.7s cubic-bezier(.2,.7,.2,1),
                transform 0.85s cubic-bezier(.2,.7,.2,1);
    transition-delay: calc(var(--char-i, 0) * 22ms + 80ms);
    will-change: opacity, transform;
}
/* Reveal when its containing fade-in goes visible, OR via head-in observer */
.fade-in.visible .sw-char,
.sw-head-in .sw-char,
.sw-head-in.sw-split,
.sw-head-in .sw-split,
.hero .sw-char,
h2.sw-head-in .sw-char {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}
/* Hero subtitle / titles always reveal on load (above fold) */
.hero h1 .sw-char,
.hero h2 .sw-char,
.hero .hero-subtitle .sw-char {
    animation: sw-char-in 1s cubic-bezier(.2,.7,.2,1) both;
    animation-delay: calc(var(--char-i, 0) * 28ms + 150ms);
    opacity: 0;
    transform: translateY(0.45em);
}
@keyframes sw-char-in {
    0%   { opacity: 0; transform: translateY(0.45em) rotateX(-25deg); filter: blur(4px); }
    60%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) rotateX(0); filter: blur(0); }
}

/* When h2 has no fade-in parent flagged, the section observer triggers reveal */
.sw-head-in.sw-split,
.sw-head-in .sw-split { /* container becomes visible */ }
.sw-head-in .sw-char { opacity: 1; transform: translateY(0) rotateX(0); }

/* ─── 3. 3D card tilt ─────────────────────────────────────── */
.sw-tiltable {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --tilt-lx: 50%;
    --tilt-ly: 50%;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(.2,.7,.2,1),
                border-color 0.45s ease,
                box-shadow 0.45s ease;
    will-change: transform;
}
.sw-tiltable:hover {
    transform: perspective(1100px)
               rotateX(var(--tilt-x))
               rotateY(var(--tilt-y))
               translateY(-4px);
}
/* Override the simple translateY(-5..-7px) hover transforms */
.division-card.sw-tiltable:hover {
    transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-7px);
}
.team-card.sw-tiltable:hover {
    transform: perspective(1300px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-6px);
}
.info-block.sw-tiltable:hover {
    transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-3px);
}
.rank-category.sw-tiltable:hover {
    transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}
/* Spotlight on tilt cards */
.sw-tiltable {
    position: relative;
    isolation: isolate;
}
.sw-tiltable::after { /* mind: divisions/info/content/team already use ::before/::after for HUD */
    /* skip this — would clash. Use a child via JS later if needed. */
}
/* Use a subtle radial highlight via background-image when hovering */
.division-card.sw-tiltable:hover,
.team-card.sw-tiltable:hover {
    background-image: radial-gradient(circle at var(--tilt-lx) var(--tilt-ly),
                                      rgba(77, 255, 166, 0.10) 0%,
                                      transparent 50%);
}

/* Logos/photos float forward on tilt */
.division-card.sw-tiltable .div-logo,
.team-card.sw-tiltable .team-photo-frame {
    transform: translateZ(20px);
    transition: transform 0.45s cubic-bezier(.2,.7,.2,1);
}

/* ─── 4. Image reveal — DISABLED ──────────────────────────── */
/* Was causing gallery images inside the collapsed container to stay hidden.
   Neutralize the class entirely so any cached DOM still renders. */
.sw-reveal-target {
    clip-path: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ─── 5. Animated HUD bracket draw-in ─────────────────────── */
/* Many panels already have static ::before/::after bracket corners.
   For draw-in, we animate width from 0 → final on reveal. */
.sw-hud-target.info-block::before,
.sw-hud-target.info-block::after,
.sw-hud-target.content-box::before,
.sw-hud-target.content-box::after,
.sw-hud-target.division-card::before,
.sw-hud-target.division-card::after,
.sw-hud-target.rank-category::before,
.sw-hud-target.team-card::before,
.sw-hud-target.team-card::after,
.sw-hud-target.shenanigans-box {
    width: 0;
    height: 0;
    opacity: 0;
    transition: width 0.7s cubic-bezier(.2,.7,.2,1) 0.2s,
                height 0.7s cubic-bezier(.2,.7,.2,1) 0.4s,
                opacity 0.5s ease 0.2s;
}
.sw-hud-target.sw-hud-drawn.info-block::before,
.sw-hud-target.sw-hud-drawn.content-box::before,
.sw-hud-target.sw-hud-drawn.division-card::before,
.sw-hud-target.sw-hud-drawn.rank-category::before,
.sw-hud-target.sw-hud-drawn.team-card::before {
    width: 18px; height: 18px; opacity: 0.7;
}
.sw-hud-target.sw-hud-drawn.info-block::after,
.sw-hud-target.sw-hud-drawn.content-box::after,
.sw-hud-target.sw-hud-drawn.division-card::after,
.sw-hud-target.sw-hud-drawn.team-card::after {
    width: 18px; height: 18px; opacity: 0.7;
}

/* Panel entrance also gets a slight scale-in feel */
.sw-hud-target {
    transition: transform 0.7s cubic-bezier(.2,.7,.2,1),
                opacity 0.7s ease,
                border-color 0.45s ease,
                box-shadow 0.5s ease;
}
.sw-hud-target:not(.sw-hud-drawn) {
    /* Soft initial — but don't fully hide; respect fade-in parent's reveal */
}

/* ─── 6. Particles ────────────────────────────────────────── */
#sw-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.sw-particle {
    position: absolute;
    top: var(--p-y);
    left: var(--p-x);
    width: var(--p-size);
    height: var(--p-size);
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-mint) 0%, rgba(77, 255, 166, 0.4) 35%, transparent 70%);
    opacity: var(--p-op);
    animation: sw-particle-drift var(--p-dur) ease-in-out infinite;
    animation-delay: var(--p-delay);
    filter: blur(0.2px);
    box-shadow: 0 0 6px rgba(77, 255, 166, 0.45);
}
@keyframes sw-particle-drift {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(20px, -30px) scale(1.2); }
    50%  { transform: translate(-15px, -60px) scale(0.9); }
    75%  { transform: translate(25px, -40px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    #sw-particles { display: none; }
}

/* ─── 7. Page transition — fast clean fade ────────────────── */
/* Diagonal wipe removed (was too slow). Fast fade only. */
#sw-cursor-glow,
#transition-overlay.sw-wipe::before,
#transition-overlay.sw-wipe::after { display: none !important; }
#transition-overlay { transition: opacity 0.18s ease; }

/* ─── 8. Scroll cue ───────────────────────────────────────── */
.sw-scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.sw-scroll-cue.is-gone { opacity: 0; transform: translate(-50%, 20px); }
.sw-scroll-cue-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.45em;
    color: var(--accent-mint);
    opacity: 0.65;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(77, 255, 166, 0.5);
}
.sw-scroll-cue-line {
    position: relative;
    width: 1px;
    height: 48px;
    background: linear-gradient(180deg, transparent, rgba(77, 255, 166, 0.5), transparent);
    overflow: hidden;
}
.sw-scroll-cue-line::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -1px;
    width: 3px;
    height: 12px;
    background: var(--accent-mint);
    box-shadow: 0 0 12px rgba(77, 255, 166, 0.8), 0 0 24px rgba(77, 255, 166, 0.4);
    animation: scroll-cue-pulse 2.2s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes scroll-cue-pulse {
    0%   { top: -20%; opacity: 0; }
    40%  { opacity: 1; }
    100% { top: 120%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .sw-scroll-cue-line::after { animation: none; opacity: 0.6; top: 40%; }
}

/* ─── 9. h2 reveal underline animation ────────────────────── */
h2::after {
    transition: transform 0.9s cubic-bezier(.2,.7,.2,1) 0.3s,
                opacity 0.6s ease 0.3s,
                width 0.9s cubic-bezier(.2,.7,.2,1) 0.3s;
}
h2:not(.sw-head-in)::after {
    transform: translateX(-50%) scaleX(0);
    opacity: 0;
}
h2.sw-head-in::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

/* ─── 10. Refined nav link enter ──────────────────────────── */
.nav-link {
    overflow: hidden;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(77, 255, 166, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
    pointer-events: none;
}
.nav-link:hover::after { transform: translateX(100%); }

/* ─── 11. Smooth FAQ icon swap ────────────────────────────── */
.faq-icon {
    transition: transform 0.5s cubic-bezier(.34,1.56,.64,1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item.open .faq-icon {
    box-shadow: 0 0 14px rgba(77, 255, 166, 0.45);
}

/* ─── 12. Logo idle subtle rotate when nav idle ───────────── */
@keyframes nav-logo-shine {
    0%, 92%, 100% { filter: drop-shadow(0 0 8px rgba(77,255,166,0.3)); }
    96%           { filter: drop-shadow(0 0 14px rgba(77,255,166,0.7)) brightness(1.15); }
}
.navbar .logo {
    animation: nav-logo-shine 7s ease-in-out infinite;
}

/* ─── 13. Page-load curtain (first-paint) ─────────────────── */
@keyframes sw-curtain {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-100%); }
}
.sw-curtain {
    position: fixed; inset: 0;
    background: var(--dark-bg);
    z-index: 99999;
    animation: sw-curtain 0.9s cubic-bezier(.7,0,.3,1) 0.15s both;
    pointer-events: none;
}
.sw-curtain::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-mint), transparent);
    box-shadow: 0 0 18px rgba(77,255,166,0.7);
}

/* ─── Polish: ensure team & division images always render ─── */
.team-photo,
.div-logo {
    clip-path: none !important;
    opacity: 1 !important;
}
.team-photo.sw-reveal-target,
.div-logo.sw-reveal-target {
    clip-path: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ─── 15. Hide cursor glow on small screens ───────────────── */
@media (max-width: 768px), (pointer: coarse) {
    #sw-cursor-glow { display: none !important; }
}

/* ============================================================
   16. Mobile optimisation pass (additive — desktop untouched)
   Everything below is gated behind max-width media queries, so
   it ONLY affects phones / small tablets. The desktop layout is
   not changed by any rule in this section.
   ============================================================ */

/* --- Navbar fit on phones --------------------------------------------
   Bug: the brand wordmark (~226px) + "Login" button + hamburger together
   overflowed the padded nav content box below ~450px, shoving the
   hamburger off the right edge where body{overflow-x:hidden} clipped it —
   so on phones the menu was literally unreachable. Shrink the brand and
   the Login button just enough that the hamburger always stays on-screen
   and tappable. */
@media (max-width: 500px) {
    .nav-container { gap: 0.6rem; }
    .nav-brand { font-size: 0.9rem; letter-spacing: 0.08em; gap: 8px; min-width: 0; }
    .nav-brand .org-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .navbar .logo { width: 32px; height: 32px; }
    .nav-right { gap: 0.5rem; flex-shrink: 0; }
    .portal-link { padding: 7px 11px; font-size: 0.6rem; letter-spacing: 0.1em; white-space: nowrap; }
    /* Grow the hamburger hit area to ~44px without shifting the layout. */
    .menu-toggle { padding: 9px; margin-right: -5px; }
}

/* --- Forms: stop iOS Safari auto-zooming on focus --------------------
   Any input with text < 16px makes iOS zoom in when it gains focus, which
   is jarring and leaves the page zoomed. Force 16px on small screens. */
@media (max-width: 768px) {
    .form-group input, .form-group select, .form-group textarea,
    .search-row input, .search-row select,
    .points-box input,
    .modal-box input, .modal-box select, .modal-box textarea {
        font-size: 16px;
    }
}

/* --- Modals: keep clear of the screen edges on phones ---------------- */
@media (max-width: 600px) {
    .modal-overlay { padding: 16px; }
    .modal-box { padding: 24px 20px; max-height: 88vh; }
}

/* --- Admin / portal hero + cards: tighten on very small screens ------ */
@media (max-width: 480px) {
    .admin-hero-content h1 { font-size: 1.6rem; letter-spacing: 0.18em; }
    .admin-hero-content p { font-size: 0.72rem; letter-spacing: 0.12em; }
    .admin-wrapper { padding: 24px 14px 48px; }
    .admin-card { padding: 20px 16px; }
    .roster-header { gap: 8px; }
}

/* ============================================================
   17. Shared pagination control (.pager) — leaderboard, events
   ============================================================ */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.pager-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pager-btn:hover:not(:disabled) {
    background: rgba(46, 139, 87, 0.15);
    border-color: var(--secondary-color);
    color: var(--text-light);
}
.pager-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}
.pager-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager-ellipsis { color: var(--text-muted); padding: 0 4px; }

/* ============================================================
   18. Roster change log (admin) — .cl-* entries
   ============================================================ */
.cl-log { max-height: 520px; overflow-y: auto; padding-right: 6px; }
.cl-day {
    position: sticky;
    top: 0;
    background: #0a0f0a;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    padding: 9px 2px 6px;
    border-bottom: 1px solid var(--border-color);
    z-index: 1;
}
.cl-entry { padding: 9px 4px; border-bottom: 1px solid var(--border-color); }
.cl-entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.84rem; }
.cl-badge {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 9px;
    border-radius: 20px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.cl-target { font-weight: 700; color: var(--text-light); }
.cl-by { color: var(--text-muted); font-size: 0.78rem; }
.cl-time { color: var(--text-muted); font-size: 0.78rem; margin-left: auto; white-space: nowrap; }
.cl-details { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.cl-chip {
    font-size: 0.74rem;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 8px;
}
.cl-chip-k { color: var(--text-muted); font-weight: 600; margin-right: 4px; }
.cl-note { font-size: 0.76rem; color: var(--text-muted); font-style: italic; width: 100%; margin-top: 2px; }

/* ============================================================
   19. Content editor (gallery) — .editor-* / .gx-*
   ============================================================ */
.editor-form { display: flex; flex-direction: column; gap: 6px; }
.editor-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-top: 6px;
}
.editor-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 10px 12px;
    font-family: inherit;
}
.editor-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(46, 139, 87, 0.25);
}
.editor-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.editor-status { font-size: 0.82rem; color: var(--text-muted); }

.editor-list { display: flex; flex-direction: column; gap: 10px; }
.gx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}
.gx-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 5px;
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0.5);
}
.gx-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.gx-url {
    color: var(--secondary-color);
    font-size: 0.8rem;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gx-url:hover { text-decoration: underline; }
.gx-alt { color: var(--text-muted); font-size: 0.76rem; }
.btn-danger { background: var(--admin-red); border-color: var(--admin-red); color: #fff; flex: 0 0 auto; }
.btn-danger:hover { filter: brightness(1.1); }
@media (max-width: 560px) {
    .gx-row { flex-wrap: wrap; }
    .gx-meta { flex-basis: 100%; order: 3; }
}
