/* =========================================================
   Whimsystems: site styles
   ========================================================= */

:root {
    --bg: #0d0b1f;
    --bg-2: #13102a;
    --surface: #1b1738;
    --surface-2: #241f4a;
    --line: rgba(255, 255, 255, 0.09);
    --text: #f3f0ff;
    --muted: #b1abd3;
    --mint: #57cb9b;
    --orange: #ffa500;
    --pink: #ff6fa8;
    --sky: #7cc7ff;
    --violet: #9b8cff;
    --yellow: #ffd166;
    --radius: 20px;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
    --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    --header-h: 72px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.15;
    font-weight: 600;
}

:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    width: min(1180px, 100% - 40px);
    margin-inline: auto;
}

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--yellow);
    color: #000;
    border-radius: 10px;
    font-weight: 800;
}

.skip:focus {
    top: 12px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--mint);
    color: #0b1a14;
    box-shadow: 0 6px 0 #2f8f68, 0 14px 30px -10px rgba(87, 203, 155, 0.7);
}

.btn-primary:hover {
    box-shadow: 0 9px 0 #2f8f68, 0 20px 36px -10px rgba(87, 203, 155, 0.8);
}

.btn-primary:active {
    box-shadow: 0 2px 0 #2f8f68;
}

.btn-ghost {
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.btn-small {
    padding: 8px 18px;
    font-size: 15px;
    background: var(--orange);
    color: #1b1200;
}

.btn-big {
    font-size: clamp(16px, 3vw, 22px);
    padding: 18px 34px;
    overflow-wrap: anywhere;
}

/* ---------- Shared bits ---------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--mint);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 0 0 rgba(87, 203, 155, 0.7);
    animation: pulse 2s infinite;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(155, 140, 255, 0.16);
    color: var(--violet);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
}

.badge-live {
    background: var(--orange);
    color: #1b1200;
}

.section {
    position: relative;
    padding: clamp(70px, 10vw, 120px) 0;
}

.section-head {
    max-width: 640px;
    margin: 0 auto 50px;
    text-align: center;
}

.section h2 {
    font-size: clamp(32px, 5vw, 50px);
    margin-bottom: 14px;
}

.section-head p:last-child {
    color: var(--muted);
}

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--header-h);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled {
    background: rgba(13, 11, 31, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--line);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
}

.brand b {
    color: var(--orange);
    font-weight: 700;
}

.brand img {
    transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1);
}

.brand:hover img {
    transform: rotate(-10deg) scale(1.08);
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav a:not(.btn) {
    position: relative;
    padding: 8px 14px;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.2s ease;
}

.nav a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 3px;
    border-radius: 3px;
    background: var(--mint);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.nav a:not(.btn):hover,
.nav a.active {
    color: var(--text);
}

.nav a:not(.btn):hover::after,
.nav a.active::after {
    transform: scaleX(1);
}

.nav .btn {
    margin-left: 10px;
}

.menu-btn {
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-btn span {
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 880px) {
    .menu-btn {
        display: flex;
    }

    .nav {
        position: absolute;
        top: var(--header-h);
        left: 12px;
        right: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px;
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.98);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav a:not(.btn) {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .nav a:not(.btn)::after {
        display: none;
    }

    .nav a:not(.btn):hover {
        background: var(--surface-2);
    }

    .nav .btn {
        margin: 8px 0 0;
    }

    .site-header:has(.nav.open) {
        background: rgba(13, 11, 31, 0.95);
    }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 40px) 0 140px;
    overflow: hidden;
    background:
        radial-gradient(60% 50% at 80% 30%, rgba(124, 108, 255, 0.35), transparent 70%),
        radial-gradient(50% 40% at 10% 80%, rgba(255, 111, 168, 0.22), transparent 70%),
        linear-gradient(180deg, #0a0820 0%, #171040 60%, #13102a 100%);
}

.starfield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero h1 {
    font-size: clamp(42px, 6.6vw, 82px);
    font-weight: 700;
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}

/* Own line, so swapping words never reflows the rest of the headline. */
.whim {
    display: block;
    width: fit-content;
    background: linear-gradient(90deg, var(--orange), var(--pink), var(--violet), var(--mint), var(--orange));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 6s linear infinite;
}

.whim.swap {
    animation: shimmer 6s linear infinite, pop 0.45s cubic-bezier(.34, 1.56, .64, 1);
}

.lede {
    max-width: 520px;
    margin-bottom: 34px;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-art {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

.hero-art::before {
    content: "";
    position: absolute;
    inset: 15% 10% 5%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 165, 0, 0.35), transparent);
    filter: blur(20px);
    z-index: -1;
}

.hero-art img {
    width: 100%;
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5));
}

.sprites {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.sprite {
    position: absolute;
    width: 30px;
    opacity: 0.9;
    animation: bob 5s ease-in-out infinite;
}

.s1 { left: 8%; top: 22%; width: 26px; animation-delay: -1s; }
.s2 { left: 46%; top: 16%; width: 30px; image-rendering: pixelated; animation-duration: 4s; }
.s3 { left: 4%; bottom: 24%; width: 30px; animation: bob 4.5s ease-in-out infinite, spin 6s linear infinite; }
.s4 { right: 6%; top: 18%; width: 54px; animation-delay: -2s; animation-duration: 6s; }
.s5 { left: 52%; bottom: 20%; width: 22px; animation: twinkle 2.4s ease-in-out infinite; }
.s6 { right: 12%; bottom: 22%; width: 22px; animation-delay: -3s; }

.hero-wave {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 90px;
    z-index: 2;
}

@media (max-width: 880px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .lede,
    .whim {
        margin-inline: auto;
    }

    .hero-ctas {
        justify-content: center;
    }

    .hero-art {
        max-width: 320px;
        margin: 0 auto;
    }

    .s4 { top: auto; bottom: 30%; right: 4%; width: 44px; }
}

/* ---------- Ticker ---------- */

.ticker {
    overflow: hidden;
    background: var(--bg-2);
    border-block: 1px solid var(--line);
    padding: 16px 0;
}

.ticker-track {
    display: flex;
    gap: 28px;
    width: max-content;
    padding-right: 28px; /* keeps the loop seamless: half the track = one full copy + gap */
    animation: marquee 32s linear infinite;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    white-space: nowrap;
}

.ticker-track span:nth-child(even) {
    color: var(--orange);
}

/* ---------- Featured ---------- */

.featured {
    background: var(--bg-2);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 56px;
    align-items: center;
}

.featured-art {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow), 0 0 0 1px var(--line);
}

.featured-art img {
    width: 100%;
    transition: transform 0.6s ease;
}

.featured-art:hover img {
    transform: scale(1.04);
}

.featured-art .badge {
    position: absolute;
    top: 18px;
    left: 18px;
}

.featured-copy > p {
    color: var(--muted);
    margin-bottom: 22px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.tags li {
    padding: 6px 14px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 880px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}

/* ---------- Game cards ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 26px;
}

.game-card {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.game-card:hover {
    border-color: rgba(255, 165, 0, 0.5);
    box-shadow: var(--shadow), 0 0 30px -8px rgba(255, 165, 0, 0.45);
}

.game-art {
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.game-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-art img {
    transform: scale(1.07);
}

.game-body {
    padding: 22px 24px 26px;
}

.game-body h3 {
    font-size: 24px;
    margin: 10px 0 8px;
}

.game-body p {
    color: var(--muted);
    font-size: 16px;
}

/* ---------- Process: level select ---------- */

.process {
    background:
        radial-gradient(40% 60% at 50% 50%, rgba(87, 203, 155, 0.08), transparent 70%),
        var(--bg-2);
}

.levels {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    counter-reset: level;
}

.levels::before {
    content: "";
    position: absolute;
    top: 34px;
    left: 12%;
    right: 12%;
    border-top: 4px dashed rgba(255, 255, 255, 0.18);
}

.level {
    position: relative;
    text-align: center;
}

.node {
    position: relative;
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 4px solid var(--mint);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--mint);
    box-shadow: 0 0 0 8px var(--bg-2);
    transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1);
}

.level:hover .node {
    transform: scale(1.12) translateY(-4px);
}

.node.boss {
    border-color: var(--orange);
    color: var(--orange);
    font-size: 30px;
    animation: glow 2.4s ease-in-out infinite;
}

.level h3 {
    font-size: 22px;
    margin-bottom: 6px;
}

.level p {
    color: var(--muted);
    font-size: 16px;
}

@media (max-width: 880px) {
    .levels {
        grid-template-columns: 1fr;
        gap: 34px;
        max-width: 420px;
        margin: 0 auto;
    }

    .levels::before {
        display: none;
    }
}

/* ---------- Studio ---------- */

.studio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.studio-copy p:not(.eyebrow) {
    color: var(--muted);
    margin-bottom: 16px;
}

.values {
    display: grid;
    gap: 16px;
}

.value {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 22px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    transition: transform 0.25s ease;
}

.value:hover {
    transform: translateX(8px);
}

.value-icon {
    flex: none;
    font-size: 30px;
    line-height: 1;
}

.value h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.value p {
    color: var(--muted);
    font-size: 16px;
}

@media (max-width: 880px) {
    .studio-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}

/* ---------- Team ---------- */

.team {
    background: var(--bg-2);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 22px;
}

.member {
    padding: 30px 24px;
    text-align: center;
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.member:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 165, 0, 0.5);
}

.avatar {
    width: 132px;
    height: 132px;
    margin: 0 auto 18px;
    padding: 10px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.avatar img {
    width: 100%;
    transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1);
}

.member:hover .avatar img {
    animation: hop 0.6s cubic-bezier(.34, 1.56, .64, 1);
}

.avatar-mint { background: radial-gradient(circle at 50% 40%, rgba(87, 203, 155, 0.35), rgba(87, 203, 155, 0.08)); }
.avatar-orange { background: radial-gradient(circle at 50% 40%, rgba(255, 165, 0, 0.35), rgba(255, 165, 0, 0.08)); }
.avatar-pink { background: radial-gradient(circle at 50% 40%, rgba(255, 111, 168, 0.35), rgba(255, 111, 168, 0.08)); }
.avatar-violet { background: radial-gradient(circle at 50% 40%, rgba(155, 140, 255, 0.4), rgba(155, 140, 255, 0.1)); }

.member h3 {
    font-size: 22px;
}

.member .role {
    margin: 2px 0 12px;
    color: var(--mint);
    font-weight: 800;
    font-size: 15px;
}

.member .class-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
}

.member .class-line span {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--orange);
    color: #1b1200;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.member > p:last-child {
    color: var(--muted);
    font-size: 16px;
}

@keyframes hop {
    0% { transform: translateY(0); }
    40% { transform: translateY(-14px) rotate(-4deg); }
    100% { transform: translateY(0); }
}

/* ---------- Devlog ---------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 22px;
}

.post {
    position: relative;
    padding: 28px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.post:hover {
    transform: translateY(-6px);
    border-color: rgba(155, 140, 255, 0.5);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
}

.post h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

/* Whole card is clickable via the heading link. */
.post h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.post > p:last-child {
    color: var(--muted);
    font-size: 16px;
}

/* ---------- Contact ---------- */

.contact-card {
    position: relative;
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(40px, 7vw, 70px) clamp(22px, 5vw, 60px);
    text-align: center;
    border-radius: 32px;
    overflow: hidden;
    background:
        radial-gradient(60% 80% at 0% 0%, rgba(87, 203, 155, 0.25), transparent 60%),
        radial-gradient(60% 80% at 100% 100%, rgba(255, 111, 168, 0.25), transparent 60%),
        var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.contact-card > p:not(.eyebrow):not(.blink) {
    max-width: 560px;
    margin: 0 auto 32px;
    color: var(--muted);
}

.blink {
    margin-top: 28px;
    font-family: "Courier New", monospace;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--yellow);
    animation: blink 1.1s steps(1) infinite;
}

/* ---------- Footer ---------- */

.site-footer {
    background: #09071a;
    border-top: 1px solid var(--line);
    padding-top: 50px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-bottom: 34px;
}

.footer-brand p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 15px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    font-weight: 600;
    color: var(--muted);
}

.footer-nav a:hover {
    color: var(--mint);
}

.socials {
    display: flex;
    gap: 10px;
}

.socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted);
    transition: transform 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.socials a:hover {
    transform: translateY(-4px) rotate(-6deg);
    color: #0b1a14;
    background: var(--mint);
}

.socials svg {
    width: 22px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 20px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.to-top:hover {
    color: var(--orange);
}

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .8, .2, 1);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* Tilt cards keep their JS-driven transform once revealed. */
.js .tilt.in {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.7s ease;
}

/* ---------- Keyframes ---------- */

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-18px) rotate(1deg); }
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

@keyframes spin {
    to { rotate: 360deg; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; scale: 0.8; }
    50% { opacity: 1; scale: 1.2; }
}

@keyframes shimmer {
    to { background-position: 300% 0; }
}

@keyframes pop {
    0% { transform: scale(0.6) translateY(10px); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 10px rgba(87, 203, 155, 0); }
    100% { box-shadow: 0 0 0 0 rgba(87, 203, 155, 0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 0 8px var(--bg-2), 0 0 0 rgba(255, 165, 0, 0); }
    50% { box-shadow: 0 0 0 8px var(--bg-2), 0 0 30px rgba(255, 165, 0, 0.6); }
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- 404 page ---------- */

.notfound {
    min-height: 100vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 40px 0;
    background:
        radial-gradient(50% 50% at 50% 40%, rgba(124, 108, 255, 0.3), transparent 70%),
        var(--bg);
}

.notfound .brand {
    margin-bottom: 30px;
}

.notfound-code {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(90px, 20vw, 160px);
    line-height: 1;
    color: var(--mint);
    text-shadow: 6px 6px 0 var(--pink);
    animation: bob 3s ease-in-out infinite;
}

.notfound h1 {
    font-size: clamp(28px, 5vw, 40px);
    margin: 16px 0 10px;
}

.notfound p:not(.notfound-code) {
    color: var(--muted);
    margin-bottom: 28px;
}

/* ---------- Contact CTAs ---------- */

.contact-ctas {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

/* ---------- Small phones ---------- */

html {
    overflow-x: clip;
}

@media (max-width: 880px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }

    /* Keep decorative sprites away from the stacked headline. */
    .s2,
    .s5 {
        display: none;
    }

    .s1 { top: 14%; left: 4%; }
    .s6 { bottom: 10%; }
}

@media (max-width: 520px) {
    body {
        font-size: 16px;
    }

    .hero {
        padding-bottom: 110px;
    }

    .hero-ctas,
    .contact-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-ctas .btn,
    .contact-ctas .btn {
        width: 100%;
    }

    .ticker-track {
        font-size: 16px;
    }

    .eyebrow {
        font-size: 12px;
        letter-spacing: 0.08em;
    }

    .to-top {
        padding: 10px 0;
    }

    .featured-art {
        border-radius: 20px;
    }

    .game-body,
    .member,
    .post {
        padding: 22px;
    }

    .value {
        padding: 18px;
    }

    .socials a {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 360px) {
    .brand {
        font-size: 20px;
    }

    .brand img {
        width: 34px;
        height: 34px;
    }
}
