/* ==========================================================================
   Boo Studios — public site
   ========================================================================== */

:root {
    --bg: #1c1c1c;
    --bg-deep: #050505;
    --surface: #262626;
    --text: #ffffff;
    --text-muted: #a9a9a9;
    --placeholder: #c9d0d9;

    /* Booboo accents */
    --boo-brown: #8b5a3c;
    --boo-beige: #d9c3a0;
    --boo-yellow: #f2d23c;
    --boo-red: #e8604c;
    --crystal: #2de0a7;

    --font-head: "Audiowide", system-ui, sans-serif;
    --font-body: "Exo 2", system-ui, sans-serif;

    --nav-h: 66px;
    --radius: 22px;
    --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --gutter: clamp(16px, 4vw, 56px);
}

/* Chinese: Latin names keep the brand fonts, the Chinese characters fall through to Noto Sans SC
   (loaded in the layout for /zh only) or the system's Chinese font. */
:root:lang(zh) {
    --font-head: "Audiowide", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    --font-body: "Exo 2", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, .section-title { font-family: var(--font-head); font-weight: 400; margin: 0; }

main { padding-top: var(--nav-h); }

/* ---------- Header / nav ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    background: var(--bg-deep);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 var(--gutter);
}

.corner-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 160px;
    height: 148px;
    background: var(--bg-deep);
    border-bottom-right-radius: 100% 100%;
    display: block;
    z-index: 2;
}

.corner-logo img {
    width: 84px;
    margin: 12px 0 0 24px;
    filter: invert(1) brightness(2);
    transition: transform .4s var(--ease-bounce);
}

.corner-logo:hover img { transform: rotate(-8deg) scale(1.08); }

.main-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 48px); }

.main-nav a {
    font-family: var(--font-head);
    font-size: 1.35rem;
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: transform .3s var(--ease-bounce), color .2s;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 3px;
    border-radius: 3px;
    background: var(--boo-yellow);
    transform: scaleX(0);
    transition: transform .35s var(--ease-out);
}

.main-nav a:hover { transform: translateY(-2px); color: var(--boo-yellow); }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle { display: none; }

.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: clamp(4px, 1vw, 16px);
    padding: 3px;
    border-radius: 999px;
    background: #1b1b1b;
}

.main-nav .lang-switch a {
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .06em;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--text-muted);
}

.main-nav .lang-switch a::after { display: none; }
.main-nav .lang-switch a:hover { color: #fff; transform: none; }
.main-nav .lang-switch a.is-current { background: var(--boo-yellow); color: #1a1a1a; }

/* ---------- Shared section bits ---------- */

.section-title {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    text-align: center;
}

.section-intro {
    font-family: var(--font-head);
    max-width: 640px;
    margin: 14px auto 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}

[data-reveal].is-visible { opacity: 1; transform: none; }

.mascot { pointer-events: none; user-select: none; }

@keyframes boo-idle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-10px) rotate(-3deg); }
    50%      { transform: translateY(0) rotate(0deg); }
    75%      { transform: translateY(-5px) rotate(2deg); }
}

/* ---------- 1. Hero ---------- */

.hero {
    position: relative;
    padding: 24px var(--gutter) 70px;
}

.hero-frame {
    position: relative;
    aspect-ratio: 1376 / 646;
    max-height: calc(100vh - var(--nav-h) - 80px);
    min-height: 320px;
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    isolation: isolate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 1.1s var(--ease-out);
    overflow: hidden;
}

.hero-slide.is-active { opacity: 1; z-index: 1; }

.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 6s linear; }
.hero-slide.is-active img { transform: scale(1); }

.slide-label {
    position: absolute;
    left: 20px;
    bottom: 16px;
    font-size: .78rem;
    letter-spacing: .04em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #eee;
    backdrop-filter: blur(4px);
}

.hero-brand {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: min(34%, 420px);
    z-index: 3;
    pointer-events: none;
}

.hero-logo {
    width: 100%;
    transition: opacity .6s var(--ease-out), transform .6s var(--ease-bounce);
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35));
}

.hero-logo--dark {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.hero-tagline {
    margin: 14px 0 0;
    font-family: var(--font-head);
    font-size: clamp(.8rem, 1.35vw, 1.2rem);
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .6);
    transition: color .6s, text-shadow .6s;
}

/* Background behind the logo is light -> show dark logo + dark tagline */
.hero-frame.is-light .hero-logo--white { opacity: 0; }
.hero-frame.is-light .hero-logo--dark { opacity: 1; filter: drop-shadow(0 6px 18px rgba(255, 255, 255, .35)); }
.hero-frame.is-light .hero-tagline { color: #2b2b2b; text-shadow: 0 1px 8px rgba(255, 255, 255, .6); }

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .3s, transform .3s var(--ease-bounce), background .2s;
}

.hero-arrow--prev { left: 16px; }
.hero-arrow--next { right: 16px; }
.hero-frame:hover .hero-arrow, .hero-arrow:focus-visible { opacity: 1; }
.hero-arrow:hover { transform: scale(1.15); background: var(--boo-red); }

.hero-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 4;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: width .4s var(--ease-bounce), background .3s;
}

.hero-dots button.is-active { width: 32px; background: var(--boo-yellow); border-color: var(--boo-yellow); }

.mascot--hero {
    position: absolute;
    right: calc(var(--gutter) - 50px);
    bottom: 10px;
    width: clamp(120px, 18vw, 260px);
    z-index: 5;
    animation: boo-idle 2.4s ease-in-out infinite;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45));
}

/* ---------- 2. This is Boo Studios ---------- */

.about { padding: 20px var(--gutter) 60px; }

.about-banner {
    position: relative;
    max-width: 1092px;
    margin: 24px auto 0;
    aspect-ratio: 1092 / 305;
    overflow: hidden;
    background: #fff;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}

.about-overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 28, 28, .72);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1.1s var(--ease-out);
}

.about-lineart {
    position: absolute;
    top: 0;
    height: 100%;
    width: auto;
    max-width: none;
    opacity: .9;
    transition: transform 1.2s var(--ease-out);
}

.about-lineart--left { left: 0; transform: translateX(-30px); opacity: .45; }
.about-lineart--right { right: 0; transform: translateX(30px); }

.about-text {
    position: relative;
    max-width: 62%;
    text-align: center;
    font-family: var(--font-head);
    font-size: clamp(.8rem, 1.8vw, 1.6rem);
    line-height: 1.45;
    color: #e6e6e6;
    transform: translateY(20px);
    transition: transform 1.1s var(--ease-out) .15s;
}

.about-text p { margin: 0; }
.about-lead { margin-bottom: 1em !important; }

.about-banner.is-revealed .about-overlay { opacity: 1; }
.about-banner.is-revealed .about-image { filter: grayscale(.6) blur(1px); transform: scale(1.03); }
.about-banner.is-revealed .about-lineart { transform: none; }
.about-banner.is-revealed .about-text { transform: none; }

/* ---------- 3 & 4. Teams ---------- */

.team { position: relative; padding: 50px var(--gutter) 70px; }

.team-grid {
    display: grid;
    margin: 30px auto 0;
    justify-content: center;
}

.team-grid--core {
    grid-template-columns: repeat(4, minmax(0, 275px));
    gap: 56px;
}

.team-grid--support {
    grid-template-columns: repeat(6, minmax(0, 160px));
    column-gap: 42px;
    row-gap: 36px;
    padding-right: 0;
}

.team-card { text-align: center; }

.team-card h3 { font-size: 2rem; margin-bottom: 10px; }

.team-photo {
    aspect-ratio: 275 / 380;
    border-radius: 38px;
    background: var(--placeholder);
    overflow: hidden;
    transition: transform .45s var(--ease-bounce), box-shadow .45s var(--ease-out);
}

.team-photo img { width: 100%; height: 100%; object-fit: cover; }

.team-card p {
    margin: 16px 0 0;
    color: var(--text-muted);
    font-family: var(--font-head);
    font-size: 1.15rem;
    line-height: 1.4;
}

.team-card:hover .team-photo {
    transform: translateY(-8px) scale(1.03) rotate(-1deg);
    box-shadow: 0 18px 30px rgba(0, 0, 0, .45), 0 0 0 3px var(--boo-yellow);
}

.team-grid--support .team-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.team-grid--support .team-photo { aspect-ratio: 160 / 190; border-radius: 30px; }
.team-grid--support .team-card p { font-size: .8rem; margin-top: 10px; }

.mascot--core {
    position: absolute;
    left: calc(var(--gutter) - 10px);
    top: 150px;
    width: clamp(90px, 11vw, 165px);
    z-index: 2;
    animation: boo-idle 2.6s ease-in-out infinite;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45));
}

.mascot--support {
    position: absolute;
    right: var(--gutter);
    bottom: 40px;
    width: clamp(110px, 13vw, 200px);
    animation: boo-idle 2.2s ease-in-out infinite;
    filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45));
}

/* ---------- 5. Crystal Ocean ---------- */

.crystal {
    display: grid;
    grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 48px);
    align-items: center;
    padding: 90px var(--gutter) 110px;
    max-width: 1500px;
    margin: 0 auto;
}

.crystal-title {
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
    line-height: 1.1;
    text-shadow: -2px -2px 0 #0b0630, 2px -2px 0 #0b0630, -2px 2px 0 #0b0630, 5px 5px 0 #0b0630;
}

.crystal-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 0;
    font-family: var(--font-head);
    font-size: 1.4rem;
    letter-spacing: .03em;
}

.pulse-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--crystal);
    box-shadow: 0 0 0 0 rgba(45, 224, 167, .7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    70%  { box-shadow: 0 0 0 12px rgba(45, 224, 167, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 224, 167, 0); }
}

.crystal-pitch {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-family: var(--font-head);
    font-size: clamp(1.1rem, 1.7vw, 1.55rem);
    line-height: 1.4;
}

.pillars {
    list-style: none;
    padding: 0;
    margin: 44px 0 36px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.pillar {
    position: relative;
    min-height: 150px;
    display: grid;
    place-items: center;
    text-align: center;
    cursor: default;
}

.pillar img {
    position: absolute;
    inset: 0;
    margin: auto;
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(.42);
    transition: filter .5s var(--ease-out), transform .5s var(--ease-bounce);
}

.pillar span {
    position: relative;
    font-family: var(--font-head);
    font-size: 1.05rem;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
    transition: transform .4s var(--ease-bounce);
}

.pillar:hover img {
    filter: grayscale(0) brightness(1) drop-shadow(0 0 18px rgba(45, 224, 167, .65));
    transform: rotate(-6deg) scale(1.1);
}

.pillar:hover span { transform: scale(1.08); }

.cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--boo-yellow), var(--boo-red));
    color: #1a1a1a;
    font-family: var(--font-head);
    font-size: 1.15rem;
    text-decoration: none;
    box-shadow: 0 8px 0 #9c3a2c, 0 14px 30px rgba(232, 96, 76, .35);
    transition: transform .35s var(--ease-bounce), box-shadow .35s var(--ease-out);
}

.cta svg { width: 26px; height: 26px; }

.cta:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 0 #9c3a2c, 0 0 38px rgba(242, 210, 60, .6);
    animation: cta-wiggle .6s ease-in-out;
}

.cta:active { transform: translateY(4px); box-shadow: 0 3px 0 #9c3a2c; }

@keyframes cta-wiggle {
    0%, 100% { rotate: 0deg; }
    25% { rotate: -2deg; }
    75% { rotate: 2deg; }
}

.crystal-media {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .5), 0 0 80px rgba(45, 180, 224, .15);
}

.crystal-media video, .crystal-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Devlog & simple pages ---------- */

.page { padding: 60px var(--gutter) 90px; }

.devlog-list {
    max-width: 680px;
    margin: 40px auto 0;
    display: grid;
    gap: 24px;
}

.devlog-post {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 22px;
    transition: transform .35s var(--ease-bounce), box-shadow .35s;
}

.devlog-post:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0, 0, 0, .35); }

.devlog-post header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.devlog-post header div { display: flex; flex-direction: column; line-height: 1.2; }
.devlog-post time { color: var(--text-muted); font-size: .85rem; }

.devlog-avatar {
    width: 44px;
    height: 44px;
    padding: 7px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
}

.devlog-text { margin: 0; white-space: pre-line; }
.devlog-image { margin-top: 14px; border-radius: 14px; width: 100%; }
.devlog-source { display: inline-block; margin-top: 12px; color: var(--boo-yellow); text-decoration: none; }
.devlog-source:hover { text-decoration: underline; }
.devlog-follow { text-align: center; margin-top: 44px; }
.devlog-follow .cta svg { width: 20px; height: 20px; }

.coming-soon { text-align: center; min-height: 60vh; }
.mascot--center { width: 200px; margin: 30px auto; animation: boo-idle 2.4s ease-in-out infinite; }
.empty, .muted { color: var(--text-muted); text-align: center; }

/* ---------- Buttons shared by sub pages ---------- */

.button-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 14px 26px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, .35);
    font-family: var(--font-head);
    font-size: 1rem;
    text-decoration: none;
    transition: transform .35s var(--ease-bounce), border-color .25s, color .25s, background .25s;
}

.btn-ghost:hover { transform: translateY(-3px); border-color: var(--boo-yellow); color: var(--boo-yellow); }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .04em;
}

.status-badge.is-released .pulse-dot { background: var(--boo-yellow); animation: none; }
.status-badge.is-prototype .pulse-dot { background: var(--boo-red); }

/* ---------- Games overview ---------- */

.game-list {
    max-width: 1300px;
    margin: 60px auto 0;
    display: grid;
    gap: clamp(60px, 8vw, 110px);
}

.game-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 60px);
    align-items: center;
}

.game-feature:nth-child(even) .game-media { order: 2; }

.game-media {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}

.game-media img, .game-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease-out);
}

.game-media:hover img, .game-media:hover video { transform: scale(1.05); }

.game-media .status-badge { position: absolute; left: 16px; top: 16px; }

.game-info .crystal-pitch { margin-top: 12px; }
.game-intro { color: var(--text-muted); margin: 14px 0 28px; }

.games .mascot--center { margin-top: 80px; }

/* ---------- Game detail ---------- */

.game-hero { padding: 24px var(--gutter) 0; }

.game-hero-frame {
    position: relative;
    height: clamp(320px, 56vh, 600px);
    border-radius: 18px;
    overflow: hidden;
    background: #111;
}

.game-hero-image { width: 100%; height: 100%; object-fit: cover; animation: hero-zoom 14s ease-out both; }

@keyframes hero-zoom { from { transform: scale(1.1); } to { transform: scale(1); } }

.game-hero-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, .9) 0%, rgba(10, 10, 10, .2) 45%, transparent 70%);
}

.game-hero-text {
    position: absolute;
    left: clamp(20px, 5vw, 70px);
    bottom: clamp(20px, 5vw, 56px);
    right: 20px;
    z-index: 1;
}

.game-hero-text .crystal-title { margin-top: 14px; font-size: clamp(2.4rem, 6vw, 4.6rem); }
.game-hero-text p { margin: 8px 0 0; font-family: var(--font-head); font-size: clamp(1rem, 1.8vw, 1.4rem); color: #ddd; max-width: 700px; }

.game-body { padding-top: 60px; padding-bottom: 60px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--text-muted); text-decoration: none; transition: color .2s, transform .3s var(--ease-bounce); }
.back-link:hover { color: var(--boo-yellow); transform: translateX(-4px); }
.game-description { color: #d6d6d6; font-size: 1.1rem; margin-bottom: 30px; }
.game-description p { margin: 0 0 1em; }

.gallery-section { padding-top: 20px; }

.gallery {
    max-width: 1300px;
    margin: 36px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 18px;
}

.gallery-item {
    position: relative;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: zoom-in;
    aspect-ratio: 16 / 9;
    background: #111;
}

.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .slide-label { left: 12px; bottom: 12px; }

.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(5, 5, 5, .94);
    color: #fff;
}

.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-height: 82vh; max-width: 92vw; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { margin-top: 12px; color: var(--text-muted); }
.lightbox .hero-arrow { opacity: 1; position: fixed; }
.lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 2.6rem;
    cursor: pointer;
    transition: transform .3s var(--ease-bounce);
}
.lightbox-close:hover { transform: rotate(90deg); color: var(--boo-red); }

.other-games-grid {
    max-width: 1000px;
    margin: 36px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 20px;
}

.other-game {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: transform .4s var(--ease-bounce);
}

.other-game img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.6); transition: filter .4s; }
.other-game:hover { transform: translateY(-6px) rotate(-.5deg); }
.other-game:hover img { filter: brightness(.85); }
.other-game-title { position: absolute; left: 18px; bottom: 16px; font-family: var(--font-head); font-size: 1.5rem; }
.other-game .status-badge { position: absolute; top: 14px; left: 14px; }

/* ---------- About page ---------- */

.about-hero {
    position: relative;
    min-height: clamp(340px, 54vh, 560px);
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 40px var(--gutter);
    background: radial-gradient(ellipse at center, #2a2a2a 0%, var(--bg) 70%);
}

.about-hero-art {
    position: absolute;
    bottom: -14%;
    height: 112%;
    width: auto;
    max-width: none;
    pointer-events: none;
    animation: art-float 6s ease-in-out infinite;
}

.about-hero-art--left { left: 0; opacity: .45; }
.about-hero-art--right { right: 0; opacity: .9; animation-delay: -3s; }

@keyframes art-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -12px; }
}

.about-hero-text { position: relative; text-align: center; max-width: 760px; }
.about-hero-text .crystal-title { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
.about-hero-text p { margin: 18px 0 0; font-family: var(--font-head); font-size: clamp(1.1rem, 2vw, 1.6rem); color: #d8d8d8; }

.story {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px var(--gutter);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(30px, 5vw, 70px);
    align-items: center;
}

.story-text .section-title { text-align: left; margin-bottom: 20px; }
.story-text p { color: #d0d0d0; font-size: 1.12rem; margin: 0 0 1em; }
.story-image { border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); rotate: 1.5deg; transition: rotate .6s var(--ease-bounce); }
.story-image:hover { rotate: 0deg; }
.story-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.values { padding: 40px var(--gutter) 60px; }

.values-grid {
    max-width: 1100px;
    margin: 40px auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.value-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 34px 28px 30px;
    overflow: hidden;
    transition: transform .45s var(--ease-bounce), box-shadow .45s;
}

.value-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--boo-yellow), var(--boo-red));
    transform: scaleX(.25);
    transform-origin: left;
    transition: transform .5s var(--ease-out);
}

.value-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 20px 40px rgba(0, 0, 0, .4); }
.value-card:hover::before { transform: scaleX(1); }
.value-number { font-family: var(--font-head); font-size: 2.6rem; color: rgba(255, 255, 255, .12); line-height: 1; }
.value-card h3 { font-size: 1.5rem; margin: 10px 0 10px; }
.value-card p { margin: 0; color: var(--text-muted); }

.team-grid--spaced { margin-top: 70px; }
.page-cta { text-align: center; padding: 20px var(--gutter) 100px; }

/* ---------- Contact page ---------- */

.contact-grid {
    max-width: 1100px;
    margin: 50px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.contact-card { background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); }
.contact-card h2 { font-size: 1.3rem; margin: 0 0 10px; }
.contact-card h2:not(:first-child) { margin-top: 24px; }
.contact-card p { color: var(--text-muted); margin: 0 0 18px; }
.contact-side { display: grid; gap: 24px; }

.contact-discord { background: linear-gradient(145deg, #3b3f9c, #262a6b); }
.contact-discord > svg { width: 44px; height: 44px; margin-bottom: 12px; }
.contact-discord p { color: #d6d8ff; }
.contact-email { color: var(--boo-yellow); font-family: var(--font-head); text-decoration: none; word-break: break-all; }
.contact-email:hover { text-decoration: underline; }

.contact-form { display: grid; gap: 18px; }
.contact-form .cta { justify-self: start; border: 0; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field label { font-family: var(--font-head); font-size: .95rem; }

.form-field input, .form-field textarea {
    font: inherit;
    color: var(--text);
    background: #1a1a1a;
    border: 2px solid #3a3a3a;
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color .2s, box-shadow .2s;
}

.form-field textarea { resize: vertical; min-height: 140px; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--boo-yellow); box-shadow: 0 0 0 4px rgba(242, 210, 60, .15); }
.form-field .input-validation-error { border-color: var(--boo-red); }
.field-error { color: var(--boo-red); font-size: .9rem; }
.form-errors:empty, .form-errors.validation-summary-valid { display: none; }
.form-errors { background: rgba(232, 96, 76, .15); border: 1px solid var(--boo-red); border-radius: 12px; padding: 12px 16px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-success { text-align: center; padding: 20px 0; }
.form-success .mascot { width: 150px; margin: 0 auto 16px; animation: boo-idle 2.4s ease-in-out infinite; }
.form-success p { font-family: var(--font-head); color: var(--text); font-size: 1.2rem; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--bg-deep);
    padding: 44px var(--gutter) 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }

.socials a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--surface);
    transition: transform .35s var(--ease-bounce), background .25s, color .25s;
}

.socials svg { width: 21px; height: 21px; }
.socials a:hover { transform: translateY(-5px) rotate(-8deg); background: var(--boo-yellow); color: #1a1a1a; }

.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-brand img { width: 110px; }
.footer-brand p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.footer-text { display: flex; flex-direction: column; gap: 4px; }
.footer-credit { font-size: .8rem !important; }
.footer-credit a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; transition: color .25s; }
.footer-credit a:hover { color: var(--boo-yellow); }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .team-grid--core { grid-template-columns: repeat(2, minmax(0, 275px)); gap: 40px; }
    .team-grid--support { grid-template-columns: repeat(3, minmax(0, 160px)); }
    .mascot--support { position: static; margin: 30px auto 0; }
    .crystal { grid-template-columns: 1fr; }
    .crystal-info { max-width: 560px; }
    .game-feature { grid-template-columns: 1fr; }
    .game-feature:nth-child(even) .game-media { order: 0; }
    .story { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; max-width: 560px; }
    .contact-grid { grid-template-columns: 1fr; max-width: 640px; }
}

@media (max-width: 760px) {
    :root { --nav-h: 58px; }

    .corner-logo { width: 104px; height: 96px; }
    .corner-logo img { width: 54px; margin: 8px 0 0 14px; }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: 0;
        padding: 10px;
        cursor: pointer;
    }

    .nav-toggle span { width: 26px; height: 3px; border-radius: 3px; background: #fff; transition: transform .3s, opacity .3s; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .main-nav {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 26px 0 30px;
        background: var(--bg-deep);
        transform: translateY(-120%);
        transition: transform .45s var(--ease-out);
        z-index: 1;
    }

    .main-nav.is-open { transform: none; }

    .hero-frame { aspect-ratio: 4 / 3; }
    .hero-brand { width: 55%; left: 6%; top: 42%; }
    .hero-arrow { display: none; }
    .slide-label { top: 12px; bottom: auto; left: 12px; }
    .mascot--hero { right: 4px; bottom: -8px; width: 100px; }

    .about-banner { aspect-ratio: 4 / 3; }
    .about-text { max-width: 86%; }
    .about-lineart--left { display: none; }
    .about-lineart--right { opacity: .25; }

    .mascot--core { display: none; }

    .team-grid--core { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
    .team-card h3 { font-size: 1.4rem; }
    .team-card p { font-size: .95rem; }
    .team-grid--support { grid-template-columns: repeat(2, minmax(0, 150px)); column-gap: 22px; }

    .pillars { gap: 8px; }
    .pillar { min-height: 110px; }
    .pillar span { font-size: .85rem; }

    .form-row { grid-template-columns: 1fr; }
    .about-hero-art--left { display: none; }
    .about-hero-art--right { opacity: .25; right: -30%; }
    .lightbox .hero-arrow { display: block; }

    .site-footer { flex-direction: column; text-align: center; }
    .footer-brand { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    [data-reveal] { opacity: 1; transform: none; }
}
