/* ========================================
   GIROSHIMA - Site styles (home + legal pages)
   Dark, cinematic. Editor keeps css/style.css.
   ======================================== */

:root {
    --bg: #08090b;
    --bg-raised: #111317;
    --line: rgba(255, 255, 255, 0.08);
    --text: #f2efe9;
    --text-dim: #a3a7ae;
    --text-muted: #6b7079;
    --accent: #ff4d4d;
    --accent-hover: #ff6b6b;

    --font-display: 'Bebas Neue', 'Impact', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --gutter: clamp(16px, 4vw, 48px);
    --max: 1280px;
    --radius: 6px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---- Navbar ---- */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    transition: background 0.3s, border-color 0.3s;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(8, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--line);
}

.nav-container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 20px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    letter-spacing: 0.08em;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active { color: var(--text); }

.mobile-menu-btn {
    display: none;
    width: 32px;
    height: 32px;
    background: none;
    border: 0;
    cursor: pointer;
    position: relative;
}

.mobile-menu-btn span {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--text);
    transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}

.mobile-menu-btn span:nth-child(1) { top: 11px; }
.mobile-menu-btn span:nth-child(2) { top: 19px; }
.mobile-menu-btn.active span:nth-child(1) { top: 15px; transform: rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { top: 15px; transform: rotate(-45deg); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--text);
    background: rgba(0, 0, 0, 0.2);
}

.btn-ghost:hover { border-color: var(--text); }

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse at 70% 30%, rgba(255, 77, 77, 0.18), transparent 60%),
        var(--bg);
}

.hero-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 16:9 iframe scaled to cover the viewport */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100vw, 177.78vh);
    height: max(56.25vw, 100vh);
    /* nudged up so trailer captions sit above the title block */
    transform: translate(-50%, -62%);
    border: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.hero-video.ready { opacity: 1; }

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to top, var(--bg) 0%, rgba(8, 9, 11, 0.92) 28%, rgba(8, 9, 11, 0.55) 48%, rgba(8, 9, 11, 0.1) 70%, rgba(8, 9, 11, 0.6) 100%),
        linear-gradient(to right, rgba(8, 9, 11, 0.7) 0%, transparent 55%);
}

.hero-content {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter) clamp(72px, 12vh, 140px);
}

.hero-content { transition: opacity 0.5s ease; }
/* Hidden until site-data.json fills in the featured game */
.hero.is-loading .hero-content { opacity: 0; }

.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(4rem, 13vw, 11rem);
    line-height: 0.85;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    max-width: 12ch;
}

.hero-tagline {
    margin-top: 16px;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: var(--text-dim);
    max-width: 40ch;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.scroll-hint {
    position: absolute;
    right: var(--gutter);
    bottom: 32px;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    padding-bottom: 56px;
}

.scroll-hint::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 1px;
    height: 44px;
    background: linear-gradient(var(--text-muted), transparent);
}

/* ---- Sections ---- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section + .section { padding-top: 0; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px 32px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ---- Game cards ---- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 32px 20px;
}

.wide-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.wide-grid .game-card-media { aspect-ratio: 16 / 9; }

.game-card { display: block; }

.game-card-media {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-raised);
}

.apps-grid .game-card-media { aspect-ratio: 1 / 1; }

.game-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease), filter 0.4s;
}

.game-card:hover .game-card-media img {
    transform: scale(1.04);
    filter: brightness(0.85);
}

.game-card-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 16px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-muted);
}

.game-card-video {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    overflow: hidden;
}

.game-card-video.active { opacity: 1; }

/* Covers portrait cards with both landscape and shorts videos */
.game-card-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320%;
    height: 100%;
    transform: translate(-50%, -50%);
    border: 0;
}

.game-card-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
}

.game-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.2s;
}

.game-card:hover .game-card-title { color: var(--accent); }

.game-card-platform {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.empty-state { display: none; color: var(--text-muted); padding: 32px 0; }
.empty-state.visible { display: block; }

/* ---- Footer ---- */
.footer {
    border-top: 1px solid var(--line);
    padding: 56px 0 32px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .logo { font-size: 2.5rem; }

.footer-mail,
.footer-social a,
.footer-links a {
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-mail:hover,
.footer-social a:hover,
.footer-links a:hover { color: var(--text); }

.footer-social { display: flex; gap: 28px; flex-wrap: wrap; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); }
.version { margin-left: 8px; opacity: 0.6; }

/* ---- Studio page ---- */
.page-hero {
    padding: clamp(140px, 22vh, 220px) 0 clamp(40px, 8vw, 80px);
    background: radial-gradient(ellipse at 80% 0%, rgba(255, 77, 77, 0.14), transparent 55%);
}

.page-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3.5rem, 11vw, 9rem);
    line-height: 0.88;
    text-transform: uppercase;
}

.lead {
    margin-top: 24px;
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    color: var(--text-dim);
    max-width: 52ch;
}

.lead.narrow { margin: 0 0 40px; }

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 32px 64px;
}

.section-head.bare { border: 0; padding: 0; margin: 0; }

.prose { color: var(--text-dim); font-size: 1.05rem; }
.prose > p { margin-bottom: 24px; }

.principles { list-style: none; border-top: 1px solid var(--line); }
.principles li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.principles strong { color: var(--text); font-weight: 600; margin-right: 4px; }

/* Intro line above the forge */
.forge-intro {
    margin: -16px 0 32px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Cover forge: nodes scroll on the left, each adds a layer to the pinned SLOTDOWN cover stack (js/studio.js) */
.forge {
    --navy: #0b1730;
    --grid: rgba(120, 160, 255, 0.07);
    --grid-major: rgba(120, 160, 255, 0.14);
    --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    --gap: 44px;            /* air between stacked layers until the press */
}


/* ---- Section: nodes scroll normally on the left, the stack stays pinned on the right ---- */
.forge {
    position: relative;
    overflow-x: clip;          /* falling 3D layers must not widen the page; clip keeps sticky working */
    background:
        linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(var(--grid-major) 1px, transparent 1px) 0 0 / 120px 120px,
        linear-gradient(90deg, var(--grid-major) 1px, transparent 1px) 0 0 / 120px 120px,
        radial-gradient(ellipse at 70% 30%, #10224a, var(--navy) 70%);
    border-top: 1px solid rgba(120, 160, 255, 0.15);
    border-bottom: 1px solid rgba(120, 160, 255, 0.15);
}

.forge-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: minmax(300px, 400px) 1fr;
    gap: 48px;
}

/* ---- Node column ---- */
.nodes {
    position: relative;
    list-style: none;
    padding: 42vh 0 70vh;      /* first node starts mid-screen; room for the press after the last */
}

.node {
    position: relative;
    z-index: 2;
    padding: 16px 18px 18px;
    background: rgba(14, 20, 36, 0.94);
    border: 1px solid rgba(140, 170, 230, 0.18);
    border-radius: 8px;
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.8);
    opacity: 0.6;
    transform: scale(0.97);
    transition: border-color 0.4s, box-shadow 0.4s, transform 0.5s var(--ease), opacity 0.4s;
}

.node + .node { margin-top: 26vh; }
.node:nth-child(even) { margin-left: 36px; }

.node::after {              /* out pin feeding the stack */
    content: '';
    position: absolute;
    top: 26px;
    right: -6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1a2440;
    border: 2px solid #5a6a90;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.node-head { display: flex; align-items: baseline; gap: 10px; }

.node-no {
    font-family: var(--font-display);
    font-size: 1.8rem;
    line-height: 1;
    color: #6c7a9c;
    transition: color 0.3s;
}

.node-title { font-size: 1.05rem; font-weight: 600; }

.node-adds {
    display: inline-block;
    margin: 10px 0 8px;
    padding: 3px 8px;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: #c7d5f5;
    background: rgba(120, 160, 255, 0.1);
    border: 1px solid rgba(120, 160, 255, 0.25);
    border-radius: 4px;
}

.node-desc { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }

.node-ai {
    display: inline-block;
    margin-top: 10px;
    padding: 2px 7px;
    font-family: var(--mono);
    font-size: 0.64rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8ea0c8;
    border: 1px solid rgba(140, 170, 230, 0.3);
    border-radius: 99px;
}

.node.done { opacity: 0.8; transform: none; }
.node.done .node-no { color: #c9d3ea; }
.node.done::after { background: var(--accent); border-color: var(--accent); }

.node.active {
    opacity: 1;
    transform: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent), 0 16px 40px -10px rgba(255, 77, 77, 0.5);
}

.node.active .node-no,
.node.active .node-ai { color: var(--accent); border-color: rgba(255, 77, 77, 0.5); }
.node.active .node-adds { color: #fff; background: rgba(255, 77, 77, 0.2); border-color: var(--accent); }
.node.active::after { background: var(--accent); border-color: #fff; box-shadow: 0 0 12px 3px var(--accent); }

/* Wire down the node column, filled up to the active node */
.spine {
    position: absolute;
    left: 30px;
    top: 42vh;
    bottom: 70vh;
    width: 2px;
    background: repeating-linear-gradient(rgba(140, 170, 230, 0.3) 0 8px, transparent 8px 14px);
    z-index: 1;
}

.spine-fill {
    position: absolute;
    inset: 0 0 auto 0;
    height: 0;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* ---- Pinned stack ---- */
.viewport {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1800px;
    min-width: 0;
    padding-top: 40px;
}

.stack {
    position: relative;
    width: min(100%, 640px, calc((100vh - 280px) * 1.745));
    aspect-ratio: 960 / 550;
    transform-style: preserve-3d;
    transform: rotateX(56deg) rotateZ(-32deg) translateZ(-60px);
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.2, 1);
}

.layer {
    position: absolute;
    inset: 0;
    border-radius: 4px;
    transform: translateZ(calc(var(--i) * var(--gap) + 320px));
    opacity: 0;
    transition: transform 0.75s cubic-bezier(0.3, 1.4, 0.5, 1), opacity 0.35s, box-shadow 0.6s, outline-color 0.6s;
    outline: 1px solid rgba(160, 190, 255, 0.35);
    outline-offset: -1px;
    background-size: cover;
    background-position: center;
}

.layer.in { transform: translateZ(calc(var(--i) * var(--gap))); opacity: 1; }
.layer::after {
    content: attr(data-name);
    position: absolute;
    left: 0;
    top: -22px;
    padding: 2px 7px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.layer.current::after { opacity: 1; }
.stack.pressed .layer::after { opacity: 0; }

.layer.current { outline-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 40px rgba(255, 77, 77, 0.35); }

/* Ghost frame showing where the layers will land */
.stack::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px dashed rgba(160, 190, 255, 0.35);
    border-radius: 4px;
    transition: opacity 0.4s;
}

.layer-guides {
    background:
        linear-gradient(90deg, transparent calc(33.33% - 1px), rgba(214, 232, 255, 0.55) calc(33.33% - 1px) 33.33%, transparent 33.33%),
        linear-gradient(90deg, transparent calc(66.66% - 1px), rgba(214, 232, 255, 0.55) calc(66.66% - 1px) 66.66%, transparent 66.66%),
        linear-gradient(transparent calc(33.33% - 1px), rgba(214, 232, 255, 0.55) calc(33.33% - 1px) 33.33%, transparent 33.33%),
        linear-gradient(transparent calc(66.66% - 1px), rgba(214, 232, 255, 0.55) calc(66.66% - 1px) 66.66%, transparent 66.66%),
        rgba(16, 52, 112, 0.35);
}

.guide-box {
    position: absolute;
    border: 1.5px dashed #d6e8ff;
    font-family: var(--mono);
    font-size: 10px;
    color: #d6e8ff;
    padding: 3px 5px;
    letter-spacing: 0.06em;
}

.layer-blueprint { background-image: url(../images/cover/layer-1-blueprint.jpg); }
.layer-flat-bg { background: #fe017c; }
.layer-objects-flat { background-image: url(../images/cover/layer-3-objects-flat.webp); }
.layer-ink { background-image: url(../images/cover/layer-4-ink.webp); }
.layer-logo { background-image: url(../images/cover/layer-5-logo.webp); }
.layer-shading { background-image: url(../images/cover/layer-6-shading.webp); }
.layer-final { background-image: url(../images/cover/cover-final.jpg); outline: none; }

.layer-fx { overflow: hidden; }
.layer-fx::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 22%, rgba(255, 240, 120, 0.55), transparent 22%),
        radial-gradient(circle at 30% 18%, rgba(255, 230, 90, 0.45), transparent 26%),
        radial-gradient(ellipse at 70% 70%, rgba(255, 255, 255, 0.18), transparent 45%);
    mix-blend-mode: screen;
}

.spark {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: -7px;
    background: radial-gradient(circle, #fff 10%, rgba(255, 240, 150, 0.9) 30%, transparent 70%);
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
    animation: twinkle 1.6s ease-in-out infinite;
}

@keyframes twinkle { 50% { transform: scale(0.4) rotate(45deg); opacity: 0.5; } }

/* Press: collapse the gaps, face the camera, show the real cover */
.stack.pressed { transform: rotateX(0) rotateZ(0) translateZ(0); }
.stack.pressed .layer.in { transform: translateZ(0); outline-color: transparent; box-shadow: none; }
.stack.pressed .layer-final { opacity: 1; transition-delay: 0.9s; }
.stack.pressed::before { opacity: 0; }
.stack.pressed::after {         /* flash on impact */
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 4px;
    animation: press-flash 1.6s ease-out 0.8s both;
    pointer-events: none;
}

@keyframes press-flash {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); background: rgba(255, 255, 255, 0); }
    25% { box-shadow: 0 0 0 6px rgba(255, 77, 77, 0.9), 0 0 80px 20px rgba(255, 77, 77, 0.6); background: rgba(255, 255, 255, 0.55); }
    100% { box-shadow: 0 30px 80px -20px rgba(255, 77, 77, 0.55); background: rgba(255, 255, 255, 0); }
}

.shipped {
    position: absolute;
    right: -14px;
    top: -18px;
    transform: rotate(8deg) scale(2.2);
    opacity: 0;
    padding: 6px 14px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--accent);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1) 1.5s, opacity 0.2s 1.5s;
    z-index: 5;
}

.stack.pressed .shipped { opacity: 1; transform: rotate(8deg) scale(1); }

/* Layer readout under the stack */
.readout {
    margin-top: clamp(28px, 6vh, 56px);
    text-align: center;
}

.readout-meta {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #8ea0c8;
}

.readout h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1;
    margin-top: 8px;
}

.readout-bar {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 14px;
}

.readout-bar span {
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: rgba(140, 170, 230, 0.25);
    transition: background 0.3s;
}

.readout-bar span.on { background: var(--accent); }

/* Feed wire: active node pin → stack (fixed overlay) */
.feed-layer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 3;
    overflow: visible;
}

.feed { fill: none; stroke: rgba(255, 77, 77, 0.45); stroke-width: 2; stroke-dasharray: 6 8; animation: feed-flow 0.8s linear infinite; }
.pulse { fill: #fff; filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 12px var(--accent)); }

@keyframes feed-flow { to { stroke-dashoffset: -14; } }

/* ---- Mobile: stack pinned on top, nodes scroll underneath ---- */
@media (max-width: 860px) {
    .forge-inner { grid-template-columns: 1fr; gap: 0; }
    .viewport {
        order: -1;
        top: 64px;
        height: 48vh;
        z-index: 4;
        padding-top: 7vh;
        justify-content: flex-start;
        background: var(--navy);
        border-bottom: 1px solid rgba(120, 160, 255, 0.2);
        box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.8);
    }
    .stack { width: min(76vw, 400px); --gap: 22px; }
    .readout { margin-top: 3vh; }
    .readout h3 { font-size: 1.5rem; }
    .nodes { padding: 4vh 0 50vh; margin-top: -2vh; }
    .node + .node { margin-top: 18vh; }
    .node:nth-child(even) { margin-left: 0; }
    .node::after { display: none; }
    .spine { left: 26px; top: 4vh; bottom: 50vh; }
    .feed-layer { display: none; }
    .shipped { font-size: 1.2rem; right: -6px; }
}

@media (prefers-reduced-motion: reduce) {
    .stack, .layer, .shipped, .node { transition-duration: 0.01s !important; transition-delay: 0s !important; }
    .feed, .spark, .stack.pressed::after { animation: none; }
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stats div { display: flex; flex-direction: column-reverse; gap: 4px; }

.stats dd {
    font-family: var(--font-display);
    font-size: clamp(4rem, 9vw, 7rem);
    line-height: 0.9;
}

.stats dt { color: var(--text-muted); font-size: 0.9rem; }
.stats-note { margin-top: 28px; color: var(--text-muted); font-size: 0.9rem; }

.roadmap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.roadmap-item {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.roadmap-item h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2.2rem;
    line-height: 1;
    margin: 16px 0 10px;
}

.roadmap-item p { color: var(--text-dim); font-size: 0.95rem; flex: 1; }

.tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 4px 10px;
}

.tag-live { color: #fff; background: var(--accent); border-color: var(--accent); }

.text-link {
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.text-link:hover { color: var(--accent-hover); }

.cta-block {
    border-top: 1px solid var(--line);
    padding-top: clamp(48px, 8vw, 96px);
}

.cta-block .section-title { font-size: clamp(3rem, 8vw, 6rem); }

/* ---- Legal pages ---- */
.legal-page { padding: 140px var(--gutter) 64px; }

.legal-content {
    max-width: 760px;
    margin: 0 auto;
    color: var(--text-dim);
}

.legal-content h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1;
    text-transform: uppercase;
    color: var(--text);
}

.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 48px 0 12px;
}

.legal-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 28px 0 8px;
}

.legal-content p,
.legal-content ul,
.legal-content ol { margin-bottom: 16px; }
.legal-content ul,
.legal-content ol { padding-left: 22px; }
.legal-content li { margin-bottom: 6px; }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content a { color: var(--accent); }
.legal-content a:hover { text-decoration: underline; }

.last-updated {
    margin-top: 12px;
    margin-bottom: 40px !important;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---- Responsive ---- */
@media (max-width: 760px) {
    .mobile-menu-btn { display: block; z-index: 2; }

    .nav-links {
        position: fixed;
        inset: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        background: var(--bg);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
    }

    .nav-links.active { opacity: 1; pointer-events: auto; }

    .nav-link {
        font-family: var(--font-display);
        font-size: 2.5rem;
        font-weight: 400;
        letter-spacing: 0.04em;
        color: var(--text);
    }

    .games-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
    .wide-grid { grid-template-columns: 1fr; }
    .game-card-info { flex-direction: column; gap: 2px; }
    .scroll-hint { display: none; }
}

@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
    .roadmap { grid-template-columns: 1fr; }
}

}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
