:root {
    --bg-deep: #071320;
    --bg-mid: #0d1d30;
    --bg-glow: rgba(37, 215, 210, 0.12);
    --surface: rgba(8, 20, 34, 0.78);
    --surface-strong: rgba(14, 28, 46, 0.94);
    --text: #edf6ff;
    --muted: #9eb0c3;
    --line: rgba(237, 246, 255, 0.1);
    --teal: #26d8d0;
    --red: #ff5f68;
    --gold: #ffd166;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

@font-face {
    font-family: "Magical World";
    src: url("assets/Magical World.ttf") format("truetype");
    font-display: swap;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background:
        radial-gradient(circle at top center, rgba(255, 209, 102, 0.08), transparent 18%),
        radial-gradient(circle at left top, var(--bg-glow), transparent 28%),
        linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 19, 32, 0.04), rgba(7, 19, 32, 0.24)),
        radial-gradient(circle at center, transparent 0%, rgba(7, 19, 32, 0.18) 100%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.bg-sprites {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-sprite {
    position: absolute;
    width: clamp(180px, 18vw, 320px);
    height: auto;
    opacity: 0.18;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.28));
    will-change: transform;
}

.bg-sprite-bee {
    top: 8rem;
    left: max(1.5rem, calc((100vw - 1100px) / 2 - 15rem));
    transform: rotate(-8deg);
}

.bg-sprite-boo {
    top: 12rem;
    right: max(1.5rem, calc((100vw - 1100px) / 2 - 14rem));
    transform: rotate(10deg);
}

.hero,
main,
.site-footer {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero {
    padding: 1.25rem 0 2rem;
}

.site-nav {
    display: grid;
    gap: 0.9rem;
    padding: 0.9rem 1.1rem 1.15rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 209, 102, 0.45);
    background:
        linear-gradient(180deg, rgba(7, 27, 49, 0.95), rgba(5, 19, 37, 0.95)),
        radial-gradient(circle at top center, rgba(255, 209, 102, 0.08), transparent 38%);
    box-shadow:
        0 8px 0 rgba(255, 209, 102, 0.12) inset,
        0 -1px 0 rgba(255, 209, 102, 0.16) inset,
        0 18px 35px rgba(0, 0, 0, 0.32);
    margin-bottom: 4rem;
}

.nav-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.brand-wrap {
    display: grid;
    gap: 0.2rem;
}

.brand-subtitle {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: rgba(255, 209, 102, 0.9);
    font-style: italic;
}

.nav-glyph {
    color: var(--gold);
    font-size: 0.9rem;
    text-shadow: 0 0 8px rgba(255, 209, 102, 0.35);
}
.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nav-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.nav-icon.right {
    transform: scaleX(-1); /* flips the right image */
}
.nav-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 209, 102, 0.35);
}

.brand,
.nav-link,
.eyebrow,
.section-label {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.brand {
    font-family: "Magical World", Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 4.5vw, 2.45rem);
    text-transform: none;
    letter-spacing: 0.04em;
    color: var(--gold);
    text-shadow: 0 0 14px rgba(255, 209, 102, 0.25);
}

.nav-link {
    color: rgba(237, 246, 255, 0.9);
    transition: color 180ms ease, text-shadow 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 209, 102, 0.24);
}

.hero-content,
.panel,
.card,
.stat-card,
.timeline-step {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-content {
    padding: 3rem;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(180deg, rgba(10, 24, 40, 0.96), rgba(8, 20, 34, 0.88));
    border: 1px solid rgba(237, 246, 255, 0.08);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(38, 216, 208, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 95, 104, 0.05), transparent 24%);
    pointer-events: none;
}

.hero-content > * {
    position: relative;
    z-index: 1;
}


.hero-content h1 {
    font-family: "Magical World", Georgia, "Times New Roman", serif;
     white-space: nowrap;
    font-size: clamp(2rem, 6vw, 5rem);
    max-width: 10ch;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
}

.intro,
.panel p,
.card p,
.feature-list,
.timeline-step p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.intro {
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.meta-chip {
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 0.92rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    transition: transform 180ms ease, background-color 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button.primary {
    background: linear-gradient(135deg, var(--teal), #178fc4);
    color: #041319;
    border-color: transparent;
}

.button.secondary {
    background: var(--surface-strong);
}

main {
    padding-bottom: 3rem;
}

.panel {
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-top: 2px solid rgba(255, 209, 102, 0.42);
}

.accent {
    background: linear-gradient(135deg, rgba(15, 30, 46, 0.96), rgba(8, 20, 34, 0.96));
}

.grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    border-radius: 20px;
    padding: 1.75rem;
    border-top: 1px solid rgba(255, 209, 102, 0.26);
}

.card h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.section-head {
    margin-bottom: 1.25rem;
    text-align: center;
}

.section-head h2 {
    margin: 0;
}

.section-head h2::after {
    content: "";
    display: block;
    width: 70px;
    height: 2px;
    margin: 0.7rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 209, 102, 0.2), rgba(255, 209, 102, 0.92), rgba(255, 209, 102, 0.2));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
}

.feature-list {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
}

.feature-list li {
    margin-bottom: 0.55rem;
}

.action-card {
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
}

.help-card::before {
    background: var(--teal);
}

.hinder-card::before {
    background: var(--red);
}

.timeline-panel {
    overflow: hidden;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.timeline-step {
    border-radius: 18px;
    padding: 1.4rem;
}

.timeline-index {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(38, 216, 208, 0.12);
    color: var(--teal);
    font-size: 0.85rem;
    font-weight: 700;
}

.stack-grid,
.compact-grid {
    margin-bottom: 0;
}

.screenshot-panel {
    background:
        linear-gradient(180deg, rgba(10, 24, 40, 0.96), rgba(8, 20, 34, 0.92)),
        radial-gradient(circle at top left, rgba(255, 209, 102, 0.08), transparent 30%);
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.screenshot-card {
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(14, 28, 46, 0.98), rgba(9, 19, 33, 0.98));
}

.screenshot-card-wide {
    grid-column: span 2;
}

.screenshot-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: left;
}

.screenshot-trigger img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 220ms ease, filter 220ms ease;
}

.screenshot-trigger:hover img,
.screenshot-trigger:focus-visible img {
    transform: scale(1.02);
    filter: saturate(1.08);
}

.screenshot-trigger img.enemy-shot {
    width: min(72%, 220px);
    height: 190px;
    margin: 0.8rem auto;
    aspect-ratio: auto;
    object-fit: contain;
    background:
        radial-gradient(circle at top, rgba(255, 209, 102, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(9, 19, 33, 0.95), rgba(7, 15, 26, 0.95));
    padding: 0.75rem;
    border-radius: 14px;
}

.screenshot-copy {
    padding: 1.4rem 1.5rem 1.5rem;
}

.screenshot-copy h3 {
    margin: 0.15rem 0 0.7rem;
}

.screenshot-copy p:last-child {
    margin-bottom: 0;
}

.stack-card,
.compact-card {
    background: var(--surface-strong);
}

.site-footer {
    padding: 0 0 2rem;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(255, 209, 102, 0.28);
    margin-top: 0.5rem;
}

.site-footer a {
    color: var(--teal);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--gold);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 10, 17, 0.82);
    backdrop-filter: blur(8px);
}

.lightbox-dialog {
    position: relative;
    width: min(1040px, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
    border-radius: 24px;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(10, 24, 40, 0.98), rgba(8, 20, 34, 0.98));
    border: 1px solid rgba(237, 246, 255, 0.12);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
    position: sticky;
    top: 0;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    cursor: pointer;
}

.lightbox-dialog img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    border: 1px solid rgba(237, 246, 255, 0.08);
    margin-top: 0.75rem;
}

.lightbox-caption {
    margin: 1rem 0 0;
}

body.lightbox-open {
    overflow: hidden;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 500ms ease forwards;
}

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 800px) {
    .two-up,
    .three-up,
    .timeline,
    .stats-grid,
    .screenshot-grid {
        grid-template-columns: 1fr;
    }

    .screenshot-card-wide {
        grid-column: auto;
    }

    .hero-content {
        padding: 2rem;
        max-width: 100%;
    }

    .bg-sprite {
        width: clamp(110px, 24vw, 160px);
        opacity: 0.14;
    }

    .bg-sprite-bee {
        top: 7rem;
        left: 0.5rem;
    }

    .bg-sprite-boo {
        top: 14rem;
        right: 0.5rem;
    }

    .site-nav {
        gap: 1rem;
        margin-bottom: 2rem;
        padding: 0.9rem 0.8rem 1rem;
    }

    .nav-top {
        gap: 0.65rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.9rem;
    }

    .lightbox-dialog {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-sprite,
    .reveal {
        animation: none;
        transform: none;
    }
}