@font-face { font-family: 'HomeVideo'; src: url('fonts/homevideo.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #08090b;
  --ink: #f2f3f5;
  --ink-soft: #b4b9c2;
  --ink-dim: #7c838f;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #007aff;          /* the old site's button blue */
  --gutter: clamp(16px, 5vw, 80px);
  --header-h: 72px;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ============ HEADER ============ */
.site-header {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 var(--gutter);
  background: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,0));
  transition: background .3s;
}
.site-header.solid { background: rgba(8,9,11,.94); border-bottom: 1px solid var(--line); }
.brand img { height: 26px; width: auto; }
.menu-btn {
  position: relative; z-index: 31; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
  background: rgba(0,0,0,.45); cursor: pointer; display: grid; place-content: center; gap: 5px;
  transition: background .2s, border-color .2s;
}
.menu-btn span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 1px; transition: transform .3s, opacity .2s; }
.menu-btn:hover { background: var(--accent); border-color: var(--accent); }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-panel {
  position: fixed; inset: 0; z-index: 19; display: flex; justify-content: flex-end;
  background: rgba(0,0,0,0); visibility: hidden; transition: background .35s, visibility 0s .35s;
}
.menu-panel nav {
  width: min(560px, 100%); height: 100%; overflow-y: auto; background: #0b0c0f; border-left: 1px solid var(--line);
  padding: calc(var(--header-h) + 36px) clamp(24px, 4vw, 56px) 40px;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.menu-open .menu-panel { background: rgba(0,0,0,.55); visibility: visible; transition: background .35s, visibility 0s; }
.menu-open .menu-panel nav { transform: none; }
.menu-label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 14px; font-weight: 700; }
.menu-games { list-style: none; border-top: 1px solid var(--line); }
.menu-games a {
  display: flex; gap: 18px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; line-height: 1.2;
  transition: color .2s, padding-left .25s;
}
.menu-games a:hover, .menu-games a:focus-visible { color: #5aa9ff; padding-left: 8px; }
.menu-games .n { font-size: 13px; font-weight: 700; color: var(--ink-dim); letter-spacing: .1em; flex: none; }
.menu-extra { list-style: none; margin-top: auto; padding-top: 36px; display: flex; gap: 24px; flex-wrap: wrap; }
.menu-extra a { color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.menu-extra a:hover { color: var(--ink); }
body.menu-open { overflow: hidden; }

/* ============ GAME HERO ============ */
.game { position: relative; border-bottom: 1px solid var(--line); }
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 24px) var(--gutter) 48px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {   /* left side darkening so the links always read */
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.45) 38%, rgba(0,0,0,0) 65%),
              linear-gradient(0deg, rgba(8,9,11,1) 0%, rgba(8,9,11,0) 22%);
}
.game-bit .hero::after {
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,0) 60%),
              linear-gradient(0deg, rgba(8,9,11,1) 0%, rgba(8,9,11,0) 18%);
}
.hero-content { position: relative; z-index: 2; width: min(520px, 100%); }
.hero-logo { width: 100%; height: auto; margin-bottom: 18px; filter: drop-shadow(0 8px 26px rgba(0,0,0,.6)); }
.game-peter .hero-bg { object-position: center center; }
.game-kaiten .hero-logo, .game-carwash .hero-logo { width: 78%; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 6px; }
.tagline { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink); line-height: 1.5; text-shadow: 0 2px 12px rgba(0,0,0,.8); margin-bottom: 8px; }
.meta { font-size: 14px; color: var(--ink-soft); margin-bottom: 22px; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-width: 240px; justify-content: space-between;
  padding: 14px 22px; font-size: 15px; font-weight: 600; letter-spacing: .04em; text-decoration: none;
  color: #fff; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.35); border-radius: 4px;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateX(3px); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.12); }
.btn svg { width: 16px; height: 16px; flex: none; }
.scroll-hint {
  position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); text-decoration: none;
}
.scroll-hint::after { content: ''; display: block; width: 1px; height: 26px; margin: 6px auto 0; background: currentColor; opacity: .6; }

/* Kaiten: the old slider's two parallax layers on the right (1920x1080 stage, covers the hero) */
.game-kaiten .hero { height: 100vh; height: 100svh; container-type: size; }
.k-stage {
  position: absolute; z-index: 0; left: 50%; top: 50%; aspect-ratio: 16 / 9;
  width: max(100cqw, 177.78cqh); transform: translate(-50%, -50%); pointer-events: none;
}
.k-layer { position: absolute; height: auto; will-change: transform; transition: transform .25s ease-out; }
.k-back  { left: 38%;   top: 17%;   width: 68%; }
.k-front { left: 38.5%; top: 11.4%; width: 68.3%; }

/* Before I Turn: live microscope background (the game's main menu) */
#scope { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0; transition: opacity 1.2s; }
.scope-drawn #scope { opacity: 1; }
.no-webgl #scope { display: none; }
.game-bit .hero-bg { z-index: 0; }
.scope-drawn .game-bit .hero-bg { opacity: 0; transition: opacity 1.2s; }
.game-bit .tagline, .game-bit .meta { font-family: 'HomeVideo', var(--sans); text-transform: uppercase; letter-spacing: .05em; }
.game-bit .hero-text { background: rgba(0,0,0,.6); padding: 12px 16px; margin-bottom: 20px; }
.game-bit .hero-text .meta { margin: 0; color: #9ef2ff; }

/* ============ MEDIA (trailer + gallery) ============ */
.media { padding: 56px var(--gutter) 72px; display: grid; gap: 28px; max-width: 1400px; margin: 0 auto; }
.media h3 { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 12px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; }
.video button, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button { cursor: pointer; background: #000 center / cover no-repeat; }
.video button::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.25); transition: background .2s; }
.video button:hover::before { background: rgba(0,0,0,.05); }
.video .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 84px; height: 58px; border-radius: 14px; background: rgba(0,0,0,.75); display: grid; place-items: center;
  transition: background .2s;
}
.video button:hover .play { background: #f00; }
.video .play::after { content: ''; border-left: 22px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; margin-left: 5px; }

.strip-wrap { position: relative; }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 12px) / 3); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.strip button { scroll-snap-align: start; border: 0; padding: 0; background: #000; cursor: zoom-in; border-radius: 6px; overflow: hidden; }
.strip img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; transition: transform .35s, filter .35s; }
.strip button:hover img { transform: scale(1.04); filter: brightness(1.1); }
.strip-nav {
  position: absolute; top: calc(50% - 4px); transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.65); color: #fff; font-size: 22px; cursor: pointer;
}
.strip-nav:hover { background: var(--accent); border-color: var(--accent); }
.strip-nav.prev { left: -14px; } .strip-nav.next { right: -14px; }

/* ============ FOOTER ============ */
.site-footer { padding: 64px var(--gutter) calc(32px + env(safe-area-inset-bottom)); background: #050607; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px; max-width: 1400px; margin: 0 auto; }
.foot-grid h4 { font-size: 11px; letter-spacing: .2em; color: var(--ink-dim); text-transform: uppercase; margin-bottom: 10px; font-weight: 700; }
.foot-grid p, .foot-grid a { color: var(--ink-soft); font-size: 15px; text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-grid img { height: 30px; width: auto; }
.foot-bottom { max-width: 1400px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13px; color: var(--ink-dim); }
.foot-bottom a { color: var(--ink-soft); }

/* ============ LIGHTBOX ============ */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.95); display: none; align-items: center; justify-content: center; padding: 56px 12px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-btn { position: absolute; background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; cursor: pointer; font: 600 15px var(--sans); padding: 10px 14px; }
.lb-btn:hover { background: var(--accent); border-color: var(--accent); }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 24px; padding: 12px 16px; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: var(--ink-soft); font-size: 13px; }

/* ============ PRIVACY PAGE ============ */
.page { max-width: 820px; margin: 0 auto; padding: calc(var(--header-h) + 48px) var(--gutter) 72px; }
.page h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 24px; line-height: 1.2; }
.page h2, .page h3, .page h4 { margin: 28px 0 10px; line-height: 1.3; }
.page p, .page li { color: var(--ink-soft); margin-bottom: 12px; }
.page ul, .page ol { padding-left: 22px; margin-bottom: 12px; }
.page a { color: #5aa9ff; }
.page strong { color: var(--ink); }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .hero { align-items: flex-end; padding-bottom: 72px; }
  .hero::after { background: linear-gradient(0deg, rgba(8,9,11,1) 0%, rgba(0,0,0,.72) 45%, rgba(0,0,0,.15) 80%); }
  .game-bit .hero::after { background: linear-gradient(0deg, rgba(8,9,11,1) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,0) 70%); }
  .hero-logo { width: 82%; }
  .links { width: 100%; }
  .btn { width: 100%; min-width: 0; }
  .strip { grid-auto-columns: 78%; }
  .game-kaiten .hero { height: auto; min-height: 100svh; container-type: normal; }
  .k-stage { left: -72%; top: calc(var(--header-h) - 20px); width: 170%; transform: none; }
  .strip-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover { transform: none; } }
