@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --blue: #234E70;
    --orange: #FFB86B;
    --lavender: #B8A7FF;
    --mint: #8FE3C2;
    --cream: #FFF7EA;
    --text: #1F2933;
    --pink: #FF9BB3;
    --header-height: 64px;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;
    padding-top: var(--header-height);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #fff;
    border-bottom: 2px solid #ffe8d6;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Nunito', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--blue);
    text-decoration: none;
    white-space: nowrap;
    z-index: 1001;
}

.logo:hover {
    color: #1a3d5c;
}

/* ── Hamburger ── */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--blue);
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ── Desktop Nav ── */

.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2px;
}

.nav-list > li {
    position: relative;
}

/* Top-level nav items */
.nav-list > li > a,
.nav-list > li > .submenu-toggle,
.nav-list > .coming-soon > span {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 18px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
    border: none;
    background: none;
}

.nav-list > li > a:hover,
.nav-list > li > .submenu-toggle:hover {
    color: var(--orange);
    background: #fff7ef;
}

.submenu-toggle::after {
    content: '\25BE';
    font-size: 0.7rem;
    margin-left: 2px;
    transition: transform 0.2s;
}

.coming-soon span {
    color: #bbb !important;
    cursor: default !important;
}

.coming-soon small {
    font-size: 0.65rem;
    font-weight: 400;
    color: #ccc;
    margin-left: 1px;
}

/* ═══════════════════════════════════════════
   DESKTOP DROPDOWN — CSS-only :hover
   ═══════════════════════════════════════════ */

/* Bridge: extends li hover area 16px downward to eliminate any gap */
.nav-list > li.has-submenu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 16px;
    z-index: 997;
    /* Invisible but part of li for :hover hit-testing */
}

.submenu {
    display: none;
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    min-width: 300px;
    padding: 8px 0;
    list-style: none;
    z-index: 999;
}

/* Show submenu when hovering the li (including the ::after bridge) */
.has-submenu:hover > .submenu {
    display: block;
}

/* ── Dropdown Section ── */

.submenu-section {
    padding: 0;
}

.submenu-heading {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: var(--blue) !important;
    text-decoration: none !important;
    border-bottom: 1px solid #f0e8dc;
    margin: 0 12px 4px;
    border-radius: 8px !important;
}

.submenu-heading:hover {
    background: #f0f4ff !important;
    color: #1a3d5c !important;
}

.submenu-heading::after {
    content: '\2192';
    font-size: 0.8rem;
    margin-left: auto;
    opacity: 0.5;
}

.submenu-paths {
    list-style: none;
    padding: 4px 0;
}

.submenu-paths li {
    margin: 0;
}

.submenu-paths a {
    display: block;
    padding: 9px 20px 9px 28px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #555 !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    transition: color 0.15s, background 0.15s, padding 0.15s;
}

.submenu-paths a:hover {
    color: var(--orange) !important;
    background: #fef9f0 !important;
    padding-left: 32px !important;
}

/* ═══════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════ */

@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: #fff;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.18);
        padding: 76px 16px 40px;
        overflow-y: auto;
        overflow-x: hidden;
        right: -320px;
        visibility: hidden;
        transition: right 0.3s ease, visibility 0s 0.3s;
        display: block;
        z-index: 1000;
    }

    .main-nav.nav-open {
        right: 0;
        visibility: visible;
        transition: right 0.3s ease, visibility 0s 0s;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-list > li {
        border-bottom: 1px solid #f0e8dc;
    }

    .nav-list > li > a,
    .nav-list > li > .submenu-toggle,
    .nav-list > .coming-soon > span {
        padding: 15px 8px;
        font-size: 1.05rem;
        font-weight: 700;
        border-radius: 0;
        display: flex;
        justify-content: space-between;
    }

    /* Submenu on mobile — hidden by default, shown when .submenu-open */
    .submenu {
        display: none;
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: #fdfaf5;
        min-width: auto;
        padding: 0;
        transform: none;
        left: auto;
        top: auto;
    }

    .has-submenu.submenu-open > .submenu {
        display: block;
    }

    .has-submenu.submenu-open > .submenu-toggle::after {
        transform: rotate(180deg);
    }

    /* Remove desktop bridge on mobile */
    .nav-list > li.has-submenu::after {
        display: none;
    }

    .submenu-heading {
        padding: 13px 8px 13px 24px !important;
        font-size: 0.95rem !important;
        border-bottom: none;
        margin: 0;
        border-radius: 0 !important;
        border-top: 1px solid #f0e8dc;
    }

    .submenu-paths a {
        padding: 12px 8px 12px 40px !important;
        font-size: 0.9rem !important;
        border-bottom: 1px solid #f5efe4;
    }

    .submenu-paths a:hover {
        padding-left: 44px !important;
    }

    /* Overlay */
    body.menu-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 999;
    }
}

/* ═══════════════════════════════════════════
   NAV v2 — 3-LEVEL DROPDOWN + CTA BUTTONS
   (added June 2026 — reuses the proven hover-bridge / accordion mechanics;
    see descent/docs/MENU_SYSTEM.md)
   ═══════════════════════════════════════════ */

/* ── Level-2 rows (subjects) inside the top-level dropdown ── */
.submenu li.has-submenu {
    position: relative;            /* anchor for the level-3 flyout */
}

.submenu .submenu-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    margin: 0 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.submenu .submenu-toggle:hover {
    background: #f0f4ff;
    color: #1a3d5c;
}

/* level-2 caret points right on desktop */
.submenu .submenu-toggle::after {
    content: '\25B8';              /* triangle right */
    font-size: 0.7rem;
    margin-left: auto;
    opacity: 0.6;
}

/* ── Level-3 flyout panel (topics) ── */
.submenu .submenu {
    top: -8px;
    left: 100%;
    transform: none;
    margin-left: 2px;
    min-width: 260px;
}

/* invisible horizontal bridge so the hover never drops (Firefox-safe) */
.submenu li.has-submenu::after {
    content: '';
    position: absolute;
    top: 0;
    left: calc(100% - 4px);
    width: 12px;
    height: 100%;
    z-index: 998;
}

/* level-3 leaf links */
.submenu .submenu a {
    display: block;
    padding: 9px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    margin: 0 8px;
    transition: color 0.15s, background 0.15s, padding 0.15s;
}

.submenu .submenu a:hover {
    color: var(--orange);
    background: #fef9f0;
    padding-left: 24px;
}

/* "Coming soon" leaf placeholder */
.submenu-coming {
    display: block;
    padding: 9px 20px;
    margin: 0 8px;
    font-size: 0.85rem;
    font-style: italic;
    color: #bbb;
    cursor: default;
}

/* Level-2 leaf links inside a top-level dropdown (e.g. the Arcade's game list) —
   direct <a> children of the first-level .submenu, excluding the "All …" heading. */
.nav-list > li > .submenu > li > a:not(.submenu-heading) {
    display: block;
    padding: 9px 20px;
    margin: 0 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s, padding 0.15s;
}

.nav-list > li > .submenu > li > a:not(.submenu-heading):hover {
    color: var(--orange);
    background: #fef9f0;
    padding-left: 24px;
}

/* ── CTA buttons (Play Free + GitHub) ── */
.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.nav-cta .btn-play,
.nav-cta .btn-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.nav-cta .btn-play {
    background: #27ae60;
    color: #fff;
    box-shadow: 0 3px 12px rgba(39, 174, 96, 0.5);
}

.nav-cta .btn-play:hover {
    background: #1e8449;
    transform: translateY(-1px);
}

.nav-cta .btn-github {
    background: var(--blue);
    color: #fff;
}

.nav-cta .btn-github:hover {
    background: #1a3d5c;
    transform: translateY(-1px);
}

/* ── Mobile: 3-level accordion + stacked CTA ── */
@media (max-width: 900px) {
    /* level-2 rows look like indented accordion headers */
    .submenu .submenu-toggle {
        margin: 0;
        border-radius: 0;
        padding: 13px 8px 13px 24px;
        font-size: 0.95rem;
        justify-content: space-between;
        border-top: 1px solid #f0e8dc;
    }

    /* caret back to a down-arrow that rotates when open (like level 1) */
    .submenu .submenu-toggle::after {
        content: '\25BE';          /* triangle down */
        margin-left: 0;
    }

    /* level-3 flyout becomes a static, deeper-indented accordion */
    .submenu .submenu {
        position: static;
        top: auto;
        left: auto;
        margin-left: 0;
        min-width: auto;
        background: #f7f1e6;
    }

    .submenu .submenu a {
        margin: 0;
        border-radius: 0;
        padding: 12px 8px 12px 40px;
        border-bottom: 1px solid #f5efe4;
    }

    .submenu .submenu a:hover {
        padding-left: 44px;
    }

    /* Level-2 leaf links (e.g. Arcade games) as full-width mobile menu rows */
    .nav-list > li > .submenu > li > a:not(.submenu-heading) {
        margin: 0;
        border-radius: 0;
        padding: 12px 8px 12px 24px;
        font-size: 0.95rem;
        border-bottom: 1px solid #f5efe4;
    }

    .submenu-coming {
        margin: 0;
        padding: 12px 8px 12px 40px;
    }

    /* kill the horizontal hover bridge on touch */
    .submenu li.has-submenu::after {
        display: none;
    }

    /* CTA buttons stack full-width at the bottom of the drawer */
    .nav-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-left: 0;
        padding: 16px 8px 4px;
    }

    .nav-cta .btn-play,
    .nav-cta .btn-github {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .nav-list > li.nav-cta {
        border-bottom: none;
    }
}

/* ═══════════════════════════════════════════
   MAIN CONTENT SECTIONS
   ═══════════════════════════════════════════ */

/* ── Hero ── */

.hero {
    text-align: center;
    padding: 40px 20px 20px;
}

.eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--orange);
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.6rem;
    margin-bottom: 1rem;
    line-height: 1.15;
    color: var(--blue);
    font-weight: 800;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.hero .tagline {
    font-size: 1.5rem;
    max-width: 720px;
    margin: 0 auto 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.6;
}

.hero .subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.85;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 40px;
}

.button-note {
    font-size: 0.85rem;
    color: #aaa;
    font-weight: 500;
}

.secondary-link {
    display: inline-block;
    color: var(--blue);
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    text-decoration: none;
    font-size: 1.1rem;
    margin-top: 10px;
    transition: color 0.2s;
}

.secondary-link:hover {
    color: var(--orange);
}

.hero-img {
    display: block;
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 0 auto 48px;
    border-radius: 24px;
}

/* ── Big Button ── */

.big-button {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(255, 184, 107, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.big-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(255, 184, 107, 0.5);
    background: #ffaa4d;
}

/* ── Explainer (What Is This?) ── */

.explainer {
    text-align: center;
    padding: 0 20px 50px;
}

.explainer h2 {
    font-size: 2.4rem;
    max-width: 750px;
    margin: 0 auto 1.8rem;
    color: var(--blue);
    font-weight: 800;
    line-height: 1.3;
}

.explainer > p {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 1.5rem;
    line-height: 1.75;
}

.flirty {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e6458a;
    margin-top: 2rem;
}

.icon-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 40px auto 30px;
}

.icon-card {
    background: #fff;
    border-radius: 20px;
    padding: 28px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.icon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.icon-emoji {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 12px;
}

.icon-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 8px;
}

.icon-card p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

.explainer-img {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 30px auto 0;
    border-radius: 24px;
}

/* ── How It Works ── */

.how-section {
    padding: 70px 20px 60px;
    text-align: center;
}

.how-section h2 {
    font-size: 2.2rem;
    color: var(--blue);
    font-weight: 800;
    margin-bottom: 40px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 40px;
}

.step {
    background: #fff;
    border-radius: 20px;
    padding: 28px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.step-icon {
    font-size: 2.4rem;
    display: block;
    margin-bottom: 12px;
}

.step-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 8px;
}

.step-body p {
    font-size: 0.92rem;
    color: #666;
    line-height: 1.55;
}

.reassurance {
    font-size: 1rem;
    max-width: 720px;
    margin: 0 auto;
    color: #888;
    line-height: 1.7;
    font-style: italic;
}

/* ── The Arcade ── */

.arcade-section {
    padding: 70px 20px 60px;
    text-align: center;
}

.arcade-section h2 {
    font-size: 2.2rem;
    color: var(--blue);
    font-weight: 800;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.arcade-intro {
    font-size: 1.1rem;
    max-width: 720px;
    margin: 0 auto 40px;
    line-height: 1.7;
    color: #555;
}

.featured-game {
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px;
    max-width: 800px;
    margin: 0 auto 40px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.game-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.game-badge.playable {
    background: #e8f5e9;
    color: #2e7d32;
}

.game-badge.building {
    background: #fff3e0;
    color: #e65100;
}

.game-badge.planned {
    background: #e3f2fd;
    color: #1565c0;
}

.featured-game h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 14px;
}

.featured-game p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.featured-buttons {
    margin-top: 20px;
    text-align: center;
}

.coming-soon-heading {
    font-size: 1.4rem;
    color: var(--blue);
    font-weight: 700;
    margin-bottom: 20px;
}

.doom-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto 24px;
}

.doom-thumb {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.doom-thumb:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.coming-soon-games {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto 30px;
}

.coming-game {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}

.coming-game:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.coming-game strong {
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    color: var(--blue);
    display: block;
    margin-bottom: 6px;
}

.coming-game p {
    font-size: 0.9rem;
    color: #777;
    line-height: 1.5;
    margin: 0;
}

.github-line {
    font-size: 1rem;
    color: #888;
}

.github-line a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.github-line a:hover {
    color: var(--orange);
}

/* ── The Last Frontier ── */

.last-frontier {
    text-align: center;
    padding: 70px 20px 50px;
}

.last-frontier h2 {
    font-size: 2.2rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    color: var(--blue);
    font-weight: 800;
    line-height: 1.3;
}

.last-frontier p {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 1.5rem;
    line-height: 1.75;
    color: #444;
}

.highlight {
    font-size: 1.35rem !important;
    font-weight: 700;
    color: var(--blue) !important;
    margin-top: 1.5rem !important;
}

.frontier-img {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    margin: 30px auto 0;
    border-radius: 24px;
}

/* ── The Hall of Fame ── */

.hall-of-fame {
    text-align: center;
    padding: 70px 20px 60px;
}

.hall-of-fame h2 {
    font-size: 2.2rem;
    max-width: 750px;
    margin: 0 auto 1.5rem;
    color: var(--blue);
    font-weight: 800;
    line-height: 1.3;
}

.hall-of-fame p {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 1.5rem;
    line-height: 1.75;
    color: #444;
}

.final-cta {
    margin-top: 2rem;
}

/* ═══════════════════════════════════════════
   PAGE CONTENT (generic inner pages)
   ═══════════════════════════════════════════ */

.page {
    max-width: 880px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

.page h1 {
    font-size: 2.4rem;
    color: var(--blue);
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.page .subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 30px;
}

.page h2 {
    font-size: 1.6rem;
    color: var(--blue);
    margin-top: 36px;
    margin-bottom: 12px;
    font-weight: 700;
}

.page p {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #444;
    margin-bottom: 16px;
}

/* Inline code inside page prose (`like .this`) */
.page code {
    background: #f1ece2;
    color: #8a4b1a;
    padding: 0.12em 0.45em;
    border-radius: 5px;
    font-size: 0.95em;
    font-family: 'Consolas', 'Courier New', monospace;
}

/* Block code (starter-prompt recipe, etc.) */
.page pre {
    background: #faf7f0;
    border: 1px solid #e5dccf;
    border-radius: 12px;
    padding: 18px 22px;
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.65;
    color: #3a3226;
    margin-bottom: 20px;
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: pre-wrap;
}

/* Full-width inline image inside a text page (storytelling images) */
.page .hiw-img {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 32px auto 28px;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.path-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
    display: block;
    color: var(--text);
}

.path-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.path-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 6px;
}

.path-card p {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.5;
    margin: 0;
}

/* Mountains overview page — sherpa photo + problem name card grid */
.mountain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.mountain-card {
    display: block;
    text-decoration: none;
    color: var(--text);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.07);
    transition: transform 0.18s, box-shadow 0.18s;
}

.mountain-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.mountain-card img {
    display: block;
    width: 100%;
    height: auto;
}

.mountain-card-title {
    display: block;
    padding: 14px 18px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--blue);
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--orange);
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

.site-footer {
    background: #fff;
    border-top: 2px solid #ffe8d6;
    padding: 50px 20px 30px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    margin-bottom: 20px;
}

.footer-logo {
    font-family: 'Nunito', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 6px;
}

.footer-tagline {
    color: #aaa;
    font-size: 0.95rem;
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--orange);
}

.footer-social {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-placeholder {
    font-size: 1.6rem;
    opacity: 0.4;
    cursor: default;
}

.footer-bottom {
    color: #bbb;
    font-size: 0.85rem;
}

.footer-bottom .domain {
    font-weight: 700;
    color: var(--blue);
    font-family: 'Nunito', sans-serif;
}

/* ═══════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero .tagline {
        font-size: 1.2rem;
    }

    .hero .subtitle {
        font-size: 1.05rem;
    }

    .eyebrow {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .explainer h2,
    .last-frontier h2,
    .hall-of-fame h2 {
        font-size: 1.7rem;
    }

    .how-section h2,
    .arcade-section h2 {
        font-size: 1.7rem;
    }

    .icon-strip {
        grid-template-columns: 1fr;
        max-width: 360px;
    }

    .steps {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .doom-gallery {
        grid-template-columns: repeat(2, 1fr);
        max-width: 400px;
    }

    .coming-soon-games {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .featured-game {
        padding: 24px 20px;
    }

    .page h1 {
        font-size: 1.8rem;
    }

    .path-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Interactive Demo Callout ── */
.demo-callout {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid #4fc3f7;
    padding: 1.5em 2em;
    margin: 2.5em 0;
    border-radius: 0 10px 10px 0;
}
.demo-callout h3 {
    color: #4fc3f7;
    margin: 0 0 0.8em 0;
    font-size: 1.35rem;
}
.demo-callout h4 {
    color: #ffd54f;
    margin: 1.2em 0 0.4em 0;
    font-size: 1.1rem;
}
.demo-page {
    margin-bottom: 0.5em;
}
.demo-page p {
    margin: 0.3em 0;
    line-height: 1.7;
}
.demo-reqs {
    font-size: 0.9rem;
    color: #888;
    margin-top: 1.2em;
}
.demo-dl-button {
    display: inline-block;
    background: #4fc3f7;
    color: #0a0a18;
    font-weight: 700;
    padding: 0.7em 2em;
    border-radius: 6px;
    text-decoration: none;
    margin: 0.8em 0 0.4em 0;
    transition: background 0.2s;
}
.demo-dl-button:hover {
    background: #81d4fa;
}
.demo-note {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.2em;
}
.demo-note code {
    background: rgba(255,255,255,0.08);
    padding: 0.15em 0.5em;
    border-radius: 3px;
}

/* ═══════════════════════════════════════════
   GAME PAGE (e.g. /arcade/descent-qed/)
   ═══════════════════════════════════════════ */

.gp .game-badge {
    margin-top: 6px;
}

.gp-hook {
    font-size: 1.25rem !important;
    line-height: 1.6 !important;
    color: #444 !important;
    margin: 0.4rem 0 1.6rem !important;
}

.gp code {
    background: #f1ece2;
    color: #8a4b1a;
    padding: 0.12em 0.45em;
    border-radius: 5px;
    font-size: 0.95em;
}

/* Placeholders for art/screenshots not yet made */
.media-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    background: repeating-linear-gradient(45deg, #fbf6ec, #fbf6ec 12px, #f6efe1 12px, #f6efe1 24px);
    border: 2px dashed #e3d6bf;
    border-radius: 18px;
    color: #b08a52;
    padding: 40px 20px;
    min-height: 220px;
}

.media-placeholder span {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
}

.media-placeholder small {
    font-size: 0.85rem;
    color: #c0a878;
    max-width: 360px;
}

.media-placeholder.small {
    min-height: 150px;
    padding: 24px 16px;
}

.gp-hero {
    margin: 0 0 24px;
}

.gp-hero-img {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    margin: 4px auto 24px;
    border-radius: 20px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
}

/* CTA row */
.gp-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 8px 0 6px;
}

.gp-ghost-btn {
    display: inline-block;
    background: #fff;
    color: var(--blue);
    border: 2px solid var(--blue);
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 13px 28px;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.gp-ghost-btn:hover {
    background: var(--blue);
    color: #fff;
    transform: translateY(-2px);
}

.gp-setup-line {
    font-size: 0.95rem !important;
    color: #888 !important;
    margin: 8px 0 8px !important;
}

/* Then -> Now */
.gp-thennow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 24px 0;
}

.gp-thennow figure {
    margin: 0;
}

.gp-thennow img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

.gp-thennow .media-placeholder {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    display: flex;
}

.gp-thennow figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin-top: 8px;
    font-weight: 600;
}

.gp-original-row-label {
    font-size: 0.95rem !important;
    color: #888 !important;
    margin: 24px 0 10px !important;
    font-weight: 600;
}

/* Galleries */
.gp-gallery {
    display: grid;
    gap: 12px;
    margin: 8px 0 8px;
}

.gp-gallery.four { grid-template-columns: repeat(4, 1fr); }
.gp-gallery.three { grid-template-columns: repeat(3, 1fr); }
/* Two figures side by side, images shown in full at the SAME height and NOTHING cropped.
   Each figure's width is proportional to its image's aspect ratio (W/H) via flex-grow with
   flex-basis:0, so both images come out exactly the same height. The scientist portrait is
   square (grow 1). The mountain photo's grow = its own W/H: default is 4:3 (1.333); for a
   photo with a different shape, add/use a `.mtn-###` modifier class (### = W/H × 100) on the
   gallery div. This keeps ALL the logic in this one global file, one ratio per page. */
.gp-gallery.two { display: flex; align-items: flex-start; }
.gp-gallery.two > figure { margin: 0; min-width: 0; flex: 1 1 0; }
.gp-gallery.two > figure:nth-child(2) { flex-grow: 1.333; }          /* 4:3 mountain (960×720) — default (K2, Annapurna) */
.gp-gallery.two.mtn-165 > figure:nth-child(2) { flex-grow: 1.649; }  /* wider mountain (Everest 1187×720) */
.gp-gallery.two.mtn-178 > figure:nth-child(2) { flex-grow: 1.778; }  /* 16:9 mountain (Tirich Mir 1280×720) */
 .gp-gallery.two.mtn-141 > figure:nth-child(2) { flex-grow: 1.411; }  /* ~7:5 mountain (Gasherbrum I 1016×720) */
 .gp-gallery.two.mtn-150 > figure:nth-child(2) { flex-grow: 1.5; }    /* 3:2 mountain (Kangchenjunga 1080×720) */
 .gp-gallery.two.mtn-156 > figure:nth-child(2) { flex-grow: 1.556; }  /* 1120×720 mountain (Broad Peak) */
 .gp-gallery.two.mtn-151 > figure:nth-child(2) { flex-grow: 1.514; }  /* 1090×720 mountain (Saraghrar) */
 .gp-gallery.two.mtn-152 > figure:nth-child(2) { flex-grow: 1.519; }  /* 1094×720 mountain (Eiger) */
 .gp-gallery.two.mtn-149 > figure:nth-child(2) { flex-grow: 1.494; }  /* 1076×720 mountain (Kilimanjaro) */
 .gp-gallery.two > figure > img { width: 100%; height: auto; }
.gp-gallery figcaption {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

.gp-gallery img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Formula */
.gp-formula {
    text-align: center;
    font-size: 1.1rem !important;
    margin: 18px 0 !important;
}

/* Lists */
.gp-list {
    font-size: 1.08rem;
    line-height: 1.7;
    color: #444;
    margin: 8px 0 18px;
    padding-left: 1.4em;
}

.gp-list li { margin-bottom: 8px; }

.gp-proofs li { font-weight: 600; color: var(--blue); }

.nowrap { white-space: nowrap; }

/* Understanding-mode signs */
.gp-signs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 20px 0 24px;
}

.gp-sign {
    background: #fff;
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    border-top: 5px solid #ccc;
}

.gp-sign.s1 { border-top-color: var(--blue); }
.gp-sign.s2 { border-top-color: var(--lavender); }
.gp-sign.s3 { border-top-color: var(--mint); }
.gp-sign.s4 { border-top-color: var(--orange); }

.gp-sign-tier {
    display: inline-block;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--blue);
    margin-bottom: 8px;
}

.gp-sign p {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.55;
    margin: 0;
}

/* Kindergarten color chips */
.gp-c {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.95em;
}

.gp-c.red { background: #e74c3c; color: #fff; }
.gp-c.yellow { background: #f4d03f; color: #5a4a00; }
.gp-c.blue { background: #3498db; color: #fff; }
.gp-c.green { background: #27ae60; color: #fff; }
.gp-c.purple { background: #9b59b6; color: #fff; }
.gp-c.orange { background: #e67e22; color: #fff; }

/* Couple roles */
.gp-roles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 18px 0 18px;
}

.gp-role {
    background: #fff;
    border-radius: 18px;
    padding: 24px 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.gp-role h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--blue);
    margin-bottom: 10px;
}

.gp-role p {
    font-size: 0.98rem;
    color: #555;
    line-height: 1.65;
    margin: 0;
}

.gp-solo {
    display: block;
    margin-top: 8px;
    font-style: italic;
    color: #e6458a;
    font-weight: 600;
}

.gp-muted {
    color: #888 !important;
    font-size: 1rem !important;
}

/* Footer strip */
.gp-footstrip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin: 36px 0 8px;
    padding: 18px 22px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
}

.gp-footstrip a {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.gp-footstrip a:hover { color: var(--orange); }

@media (max-width: 768px) {
    .gp-hook { font-size: 1.1rem !important; }
    .gp-thennow,
    .gp-roles,
    .gp-signs { grid-template-columns: 1fr; }
    .gp-gallery.four,
    .gp-gallery.three { grid-template-columns: repeat(2, 1fr); }
    .gp-gallery.two { flex-direction: column; }
    .gp-gallery.two > figure,
    .gp-gallery.two.mtn-165 > figure:nth-child(2),
    .gp-gallery.two.mtn-178 > figure:nth-child(2),
    .gp-gallery.two.mtn-141 > figure:nth-child(2),
    .gp-gallery.two.mtn-150 > figure:nth-child(2),
    .gp-gallery.two.mtn-156 > figure:nth-child(2) { width: 100%; flex: none; }
    .gp-gallery.two.mtn-151 > figure:nth-child(2),
    .gp-gallery.two.mtn-152 > figure:nth-child(2),
    .gp-gallery.two.mtn-149 > figure:nth-child(2) { width: 100%; flex: none; }
    .gp-footstrip { flex-direction: column; align-items: flex-start; }
}

/* ── Image lightbox (click any .gp img to enlarge; works on any browser) ── */
.zoomable { cursor: zoom-in; }

body.lightbox-locked { overflow: hidden; }

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
    cursor: default;
}

.lightbox-close {
    position: fixed;
    top: 14px;
    right: 18px;
    width: 46px;
    height: 46px;
    font-size: 2rem;
    line-height: 1;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

/* Looping gameplay clip (game page hero) */
.pt-clip {
    width: 100%;
    max-width: 960px;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 10;
}

.pt-clip__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
