/* Slopbyte — original pixel lettering, warm colours, and interactive 3D. */
@font-face { font-family: 'Slopbyte Pixel'; src: url('assets/fonts/slopbyte-pixel.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #151410;
  --ink: #ece5ce;
  --lime: #c9df9c;
  --amber: #e2b66f;
  --muted: #b0ad98;
  --line: #454635;
  --surface: #202119;
  --panel-radius: 6px;
  --mono: 'Courier New', Courier, monospace;
  --pixel: 'Slopbyte Pixel', 'Courier New', monospace;
  --pointer-x: 72%;
  --pointer-y: 30%;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; isolation: isolate; background: var(--bg); color: var(--ink); font-family: var(--mono); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(ellipse at var(--pointer-x) var(--pointer-y), #dbb66c0d, transparent 60%), radial-gradient(ellipse at 0% 90%, #5c61430a, transparent 55%); }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .2; background: repeating-linear-gradient(0deg, transparent 0px, transparent 3px, #e5cd8e07 3px, #e5cd8e07 4px); }
main { flex: 1; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
h1, h2, p, figure { margin: 0; }
svg { display: block; }
::selection { background: var(--amber); color: var(--bg); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }
.container { width: min(1040px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 12px 18px; background: var(--amber); color: var(--bg); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

/* One panel treatment and spacing scale across all three pages. */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--panel-radius); box-shadow: 0 3px 0 #080b0655, inset 0 1px 0 #ece5ce04; }

/* Shared compact navigation, using the same surfaces as the content panels. */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 66px; padding: 10px 12px 10px 18px; margin-top: 16px; }
.brand { display: flex; flex-direction: column; gap: 5px; font: 400 18px/1.2 var(--pixel); letter-spacing: .02em; }
.brand:hover { color: var(--lime); }
.brand-caption { color: var(--muted); font: 8px/1.3 var(--mono); letter-spacing: .08em; }
.site-nav { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: #171a13; }
.site-nav a { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 10px 15px; border: 1px solid transparent; border-radius: 2px; font: 700 11px/1.4 var(--mono); color: #c9c5ad; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.nav-index { color: #8f967c; font: 9px/1 var(--mono); }
.site-nav a:hover { background: #2a3022; border-color: #4c573a; color: var(--ink); }
.site-nav a:active { transform: translateY(1px); }
.site-nav a[aria-current="page"] { background: var(--lime); color: #1b2514; border-color: var(--lime); }
.site-nav a[aria-current="page"] .nav-index { color: #4d5f37; }

/* The home page stays focused on JEPS and the studio. */
.landing-intro { padding-block: 22px 16px; container-type: inline-size; }
.landing-title { font: 400 clamp(44px, 15vw, 190px)/1.05 var(--pixel); letter-spacing: 0; white-space: nowrap; text-align: center; text-shadow: 3px 3px 0 #4d5836; }
.landing-title>span { color: var(--lime); text-shadow: inherit; }
@supports (font-size: 1cqw) { .landing-title { font-size: min(20.5cqw, 190px); } }
.home-page .game-section { grid-template-columns: 1.1fr .9fr; gap: 0; padding: 0; margin-bottom: 16px; }
.home-page .featured-title { font-size: clamp(56px, 5.5vw, 76px); }
.home-page .about-section { grid-template-columns: 120px 1fr; }
.game-section { display: grid; grid-template-columns: 1.1fr .9fr; align-items: stretch; gap: 0; }
.game-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 28px; border-left: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: 8px; font: 700 10px/1.6 var(--mono); letter-spacing: .1em; color: var(--amber); margin-bottom: 15px; }
.eyebrow::before { content: ''; width: 7px; height: 7px; background: currentColor; flex-shrink: 0; }
h1 { font: 900 clamp(88px, 9.5vw, 132px)/.95 var(--mono); letter-spacing: -.085em; text-shadow: 2px 0 #9d6f4925, -1px 0 #8aaf6025, 0 0 22px #e5cf9810; }
h1, .page-heading, .game-detail-copy { animation: phosphor-arrive .65s ease-out both; }
h1>span, h2>span { color: var(--amber); text-shadow: 0 0 14px #e2b66f25; }
.game-description { margin-top: 16px; font-size: 16px; line-height: 1.7; letter-spacing: -.03em; color: #cbc7b0; }
.game-status { display: flex; align-items: center; gap: 9px; margin-top: 18px; font: 11px/1.6 var(--mono); color: var(--lime); }
.status-dot { width: 5px; height: 5px; background: currentColor; box-shadow: 0 0 6px #c9df9c50; }
.text-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; padding: 11px 15px; margin-top: 20px; border: 1px solid #69724d; border-radius: 3px; background: #303526; box-shadow: 0 2px 0 #080a06; font: 700 11px/1.6 var(--mono); transition: background .2s, transform .15s, box-shadow .15s; }
.text-link>span { color: var(--amber); font: 20px/1 Arial, sans-serif; }
.text-link:hover { background: #47402e; color: #fff0ce; }
.text-link:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #080a06, inset 0 2px 4px #0004; }
.about-section { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 24px; padding: 24px; margin-bottom: 24px; }
h2 { font: 700 34px/1.15 var(--mono); letter-spacing: -.065em; }
.about-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.about-summary>p { font-size: 13px; line-height: 1.85; color: var(--muted); }
.about-summary .text-link { flex-shrink: 0; margin: 0; }
.site-footer { border-top: 1px solid var(--line); padding-block: 18px; color: #a3a08b; font: 10px/1.6 var(--mono); }

/* The original JEPS character, rendered by the locally bundled viewer. */
.game-preview { min-width: 0; position: relative; padding: 0 20px; view-transition-name: jeps-preview; }
.preview-art { --light-x: 30%; --light-y: 20%; position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; height: 325px; overflow: hidden; perspective: 1100px; background: radial-gradient(ellipse at var(--light-x) var(--light-y), #c9df9c09, transparent 65%); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.preview-art:focus-visible { outline-offset: -5px; }
.preview-art[data-dragging] { cursor: grabbing; }
.scene-floor { position: absolute; width: 180%; height: 100%; left: -40%; top: 62%; transform: perspective(400px) rotateX(65deg); transform-origin: 50% 0%; background-image: linear-gradient(#b8df8311 1px, transparent 1px), linear-gradient(90deg, #b8df8311 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 15%, black, transparent 65%); pointer-events: none; }
.model-canvas { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; pointer-events: none; }
.model-status { position: absolute; inset: 20px; z-index: 2; display: grid; place-items: center; margin: 0; text-align: center; font: 11px/1.8 var(--mono); color: var(--muted); }
.model-status[hidden], .motion-toggle[hidden] { display: none; }
.model-no-script { position: absolute; inset: auto 16px 16px; font: 11px/1.7 var(--mono); color: var(--muted); text-align: center; }
.preview-art[data-model-state="loading"] { cursor: progress; }
.preview-controls { display: flex; align-items: center; gap: 6px; }
.motion-toggle { padding: 8px 9px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 10px/1.5 var(--mono); transition: background .2s, transform .15s; }
.motion-toggle:hover { background: #ece5ce0a; }
.motion-toggle:active { transform: translateY(1px); }
.preview-controls button:disabled { opacity: .45; cursor: default; }
figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; border-top: 1px solid var(--line); color: var(--muted); }
#scene-hint { font: 10px/1.5 var(--mono); }
.keyboard-hint { color: #92917d; }
.reset-view { display: inline-flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 10px/1.5 var(--mono); transition: background .2s, transform .15s; }
.reset-view>span { color: var(--amber); font-size: 16px; line-height: 1; }
.reset-view:hover { background: #ece5ce0a; }
.reset-view:active { transform: translateY(1px); }

/* Games and About share the same retro palette. */
.interior-page { padding-block: 24px 28px; }
.page-heading { padding: 24px; margin-bottom: 16px; }
.page-heading h1 { font-size: clamp(36px, 4vw, 52px); letter-spacing: -.075em; line-height: 1.08; }
.page-heading>p:last-child { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.game-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; align-items: stretch; }
.game-detail-copy { min-width: 0; padding: 26px; border-left: 1px solid var(--line); }
.game-detail-copy .eyebrow { margin-bottom: 14px; }
.game-detail h2 { font-size: 62px; letter-spacing: -.075em; }
.detail-description { margin-top: 16px; max-width: 38ch; font-size: 15px; line-height: 1.75; }
.detail-note { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.project-facts { margin: 20px 0 0; border-top: 1px solid var(--line); }
.project-facts>div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.project-facts dt { font: 11px/1.6 var(--mono); color: var(--muted); }
.project-facts dd { margin: 0; font: 11px/1.6 var(--mono); text-align: right; }
.project-facts dd>.status-dot { display: inline-block; vertical-align: middle; margin-right: 5px; color: var(--lime); }
.studio-details { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: stretch; }
.studio-description { padding: 24px; }
.studio-description h2 { font-size: 28px; margin-bottom: 18px; }
.studio-description>p { color: var(--muted); font-size: 14px; line-height: 1.85; max-width: 46ch; }
.studio-description>p+p { margin-top: 18px; }
.current-project { position: relative; padding: 24px; }
.current-project .eyebrow { font-size: 9px; }
.current-project h2 { font-size: 48px; }
.current-project .game-status { margin-top: 18px; }
.project-summary { color: var(--muted); font-size: 13px; line-height: 1.9; margin-top: 20px; }

@keyframes phosphor-arrive { from { opacity: .5; } to { opacity: 1; } }
@view-transition { navigation: auto; }
::view-transition-group(jeps-preview) { animation-duration: .55s; animation-timing-function: cubic-bezier(.22,.68,.25,1); }
::view-transition-old(root) { animation-duration: .2s; }
::view-transition-new(root) { animation-duration: .35s; }

@media(max-width: 800px) {
  .container { width: calc(100% - 32px); }
  .site-header { gap: 16px; }
  .site-nav a { padding-inline: 12px; }
  .game-copy, .game-detail-copy { padding: 22px; }
  .game-description { font-size: 15px; }
  .home-page .featured-title { font-size: 58px; }
  .preview-art { height: 300px; }

  .game-preview { padding-inline: 14px; }
  .keyboard-hint { display: none; }
  .about-section, .home-page .about-section { grid-template-columns: 90px 1fr; gap: 20px; padding: 22px; }
  .about-section h2 { font-size: 28px; }
  .about-summary { align-items: flex-start; flex-direction: column; gap: 14px; }
  .about-section br { display: none; }
  .page-heading, .studio-description, .current-project { padding: 22px; }
}
@media(max-width: 600px) {
  html { scroll-padding-top: 16px; }
  .site-header { flex-wrap: wrap; gap: 12px; padding: 12px; margin-top: 12px; }
  .brand { flex-direction: row; align-items: center; gap: 12px; font-size: 16px; }
  .site-nav { width: 100%; gap: 4px; }
  .site-nav a { flex: 1; gap: 7px; padding: 10px 7px; }
  .landing-intro { padding-block: 20px 12px; }
  .landing-title { text-shadow: 2px 2px 0 #4d5836; }
  .game-section, .home-page .game-section, .game-detail { grid-template-columns: 1fr; }
  .game-preview { width: 100%; }
  .preview-art { height: 280px; }

  .game-copy, .game-detail-copy { padding: 22px; border-left: 0; border-top: 1px solid var(--line); }
  .home-page .featured-title, .game-detail h2 { font-size: 54px; }
  .game-description br { display: none; }
  .game-status { margin-top: 16px; }
  .text-link { margin-top: 18px; }
  .about-section, .home-page .about-section { grid-template-columns: 1fr; gap: 16px; margin-bottom: 20px; }
  .about-summary .text-link { margin: 0; }
  .interior-page { padding-block: 20px; }
  .page-heading h1 { font-size: clamp(30px, 8vw, 44px); }
  .studio-details { grid-template-columns: 1fr; }
  .studio-description>p { font-size: 13px; }
  .site-footer { font-size: 9px; padding-block: 16px; }
}
@media(max-width: 370px) {
  .game-copy, .game-detail-copy, .page-heading, .studio-description, .current-project, .about-section, .home-page .about-section { padding: 18px; }
  .game-preview { padding-inline: 10px; }
  .preview-art { height: 260px; }

  figcaption { gap: 8px; }
  .reset-view { padding-inline: 7px; font-size: 9px; }
  .motion-toggle { padding-inline: 7px; font-size: 9px; }
  #scene-hint { font-size: 8px; }
}
@media(prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
  .game-preview { view-transition-name: none; }
}
