.page-loading {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-transition: all .4s .2s ease-in-out;
    transition: all .4s .2s ease-in-out;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
}

[data-bs-theme="dark"] .page-loading {
    background-color: #121519;
}

.page-loading.active {
    opacity: 1;
    visibility: visible;
}

.page-loading-inner {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    text-align: center;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    -webkit-transition: opacity .2s ease-in-out;
    transition: opacity .2s ease-in-out;
    opacity: 0;
}

.page-loading.active > .page-loading-inner {
    opacity: 1;
}

.page-loading-inner > span {
    display: block;
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    font-weight: normal;
    color: #6f788b;
}

[data-bs-theme="dark"] .page-loading-inner > span {
    color: #fff;
    opacity: .6;
}

.page-spinner {
    display: inline-block;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: .75rem;
    vertical-align: text-bottom;
    background-color: #d7dde2; 
    border-radius: 50%;
    opacity: 0;
    -webkit-animation: spinner .75s linear infinite;
    animation: spinner .75s linear infinite;
}

[data-bs-theme="dark"] .page-spinner {
    background-color: rgba(255,255,255,.25);
}

@-webkit-keyframes spinner {
    0% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }
    50% {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

@keyframes spinner {
    0% {
        -webkit-transform: scale(0);
        transform: scale(0);
    }
    50% {
        opacity: 1;
        -webkit-transform: none;
        transform: none;
    }
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-violet: #0ea5e9;
    --accent-red: #ef4444;
    --light: #ffffff;
    --light-secondary: #f8fafc;
    --light-tertiary: #f1f5f9;
    --light-quaternary: #e2e8f0;
    --dark: #1e293b;
    --dark-secondary: #0f172a;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gray-dark: #334155;
    --surface: rgba(255, 255, 255, 0.8);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    --gradient-sunset: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-ocean: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-forest: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-cosmic: linear-gradient(135deg, #667db6 0%, #0082c8 25%, #0082c8 75%, #667db6 100%);

    /* ── Type system ───────────────────────────────────────── */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Orbitron', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

    /* ── Refined neutrals ──────────────────────────────────── */
    --ink: #0a0f1e;            /* premium near-black for headings */
    --ink-soft: #334155;       /* body-strong text */
    --muted: #64748b;          /* secondary text */
    --hairline: rgba(15, 23, 42, 0.08);   /* 1px borders */
    --hairline-strong: rgba(15, 23, 42, 0.12);

    /* ── Brand gradient (single source of truth) ───────────── */
    --grad-brand: linear-gradient(120deg, #2563eb 0%, #3b82f6 42%, #06b6d4 100%);
    --grad-brand-soft: linear-gradient(120deg, rgba(37,99,235,0.12), rgba(6,182,212,0.12));

    /* ── Rare-accent stripe — the four logo colours. Used sparingly on small
       spaces only (underlines, separators, dots), never as large fills. ── */
    --grad-accent: linear-gradient(90deg, var(--primary), var(--accent-cyan), var(--accent-pink), var(--accent));

    /* ── Playful "game" palette — warm orangered → green spectrum.
       Neutral surfaces + these vivid accents = the brand colour identity. ── */
    --game-1: #ff4d2e;   /* orangered */
    --game-2: #ff8a2b;   /* orange    */
    --game-3: #ffc21f;   /* yellow    */
    --game-4: #9fd72b;   /* greenyellow */
    --game-5: #22c55e;   /* green     */
    --grad-game: linear-gradient(100deg, #ff4d2e 0%, #ff8a2b 26%, #ffc21f 50%, #9fd72b 74%, #22c55e 100%);
    --grad-cta:  linear-gradient(135deg, #ff5a2e 0%, #ff9416 100%);   /* warm CTA */
    --shadow-cta: 0 12px 30px rgba(255, 110, 40, 0.30);

    /* ── Layered, soft shadows (the premium "depth" look) ──── */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.12), 0 6px 16px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 32px 72px rgba(15, 23, 42, 0.16), 0 10px 24px rgba(15, 23, 42, 0.08);
    --shadow-brand: 0 12px 30px rgba(37, 99, 235, 0.28);

    /* ── Radius scale ──────────────────────────────────────── */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 999px;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, div, button, nav, header, main, footer, hr, span, article, section, aside {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
    margin-top: 84px;       /* = floating navbar (14px inset + 62px island) + breathing room */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

.row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
}

.col {
    flex: 1;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { 
        transform: translateX(-50%) translateY(0); 
    }
    40% { 
        transform: translateX(-50%) translateY(-10px); 
    }
    60% { 
        transform: translateX(-50%) translateY(-5px); 
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* -- RESPONSIVE LAYOUT */
/* --- Desktop --- */

@media screen and (max-width:1380px) {
    .container {
        margin: 0 50px;
    }
}

@media screen and (max-width:1366px) {
    
}

@media screen and (max-width:1280px) {
    
}

@media screen and (max-width:1024px) {
    
}

/* --- Tablet --- */
@media screen and (max-width:768px) {

}

@media screen and (max-width:601px) {
    
}

/* --- Mobile --- */
@media screen and (max-width:414px) {
    .container {
        margin: 0 25px;
    }
}

@media screen and (max-width:390px) {
    
}

@media screen and (max-width:375px) {
    
}

@media screen and (max-width:360px) {

}

@media screen and (max-width:320px) {
    body {
        width: 320px;
        overflow: scroll;
    }
}

/* ============================================================
   Global polish (additive — applies site-wide)
   ============================================================ */
html { scroll-behavior: smooth; }

::selection {
    background: rgba(37, 99, 235, 0.22);
    color: var(--dark, #1e293b);
}

/* Refined scrollbar */
* { scrollbar-width: thin; scrollbar-color: #c7d2e0 transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    border-radius: 8px;
    border: 3px solid #fff;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #94a3b8, #64748b); }

/* Accessible, consistent keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
    border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

/* Respect users who prefer less motion (covers the whole site) */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}


/* ── Reduced motion: honour the OS-level preference everywhere ── */
@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;
    }
}
/* ── Members-only gate (shown when a guest asks for a solution) ── */
.pnp-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.pnp-gate-overlay.active { opacity: 1; pointer-events: auto; }

.pnp-gate-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 22px;
    padding: 2.4rem 2rem 2rem;
    text-align: center;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pnp-gate-overlay.active .pnp-gate-card { transform: scale(1) translateY(0); }

.pnp-gate-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--light-secondary, #f1f5f9);
    color: var(--gray-dark, #475569);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pnp-gate-close:hover {
    background: var(--accent-red, #ef4444);
    color: #fff;
    transform: rotate(90deg);
}

.pnp-gate-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(37, 99, 235, 0.10);
    border: 2px solid rgba(37, 99, 235, 0.22);
    color: var(--primary);
}

.pnp-gate-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

.pnp-gate-card p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 26px;
}

.pnp-gate-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.pnp-gate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pnp-gate-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.30);
}

.pnp-gate-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.40);
}

.pnp-gate-btn.ghost {
    background: #fff;
    border: 1.5px solid var(--hairline-strong);
    color: var(--gray-dark);
}

.pnp-gate-btn.ghost:hover {
    border-color: rgba(37, 99, 235, 0.4);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Amber variant for the "solution revealed" note (same card skeleton). */
.pnp-reveal .pnp-gate-icon {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #d97706;
}

.pnp-reveal .pnp-gate-btn.primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.32);
}

.pnp-reveal .pnp-gate-btn.primary:hover {
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.42);
}
