:root {
  --bg: #0b0d10;
  --bg-2: #12161b;
  --line: rgba(217, 212, 199, .12);
  --text: #d9d4c7;
  --muted: #8b8d8f;
  --accent: #b8322b;
  --fog: 200, 206, 210;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.mono { font-family: var(--mono); }

/* film grain over everything */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-3%, 2%); }
  66% { transform: translate(2%, -3%); }
  100% { transform: translate(0, 0); }
}

/* header */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.top.scrolled {
  background: rgba(11, 13, 16, .82);
  backdrop-filter: blur(10px);
  border-color: var(--line);
}
.logo { font: 500 15px var(--mono); text-decoration: none; letter-spacing: .02em; }
.logo span, .hero-title span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); }
.nav a { font-size: 14px; text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); }

/* hero */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-start;
  padding: clamp(120px, 22vh, 220px) var(--gutter) clamp(64px, 12vh, 140px);
  overflow: hidden; isolation: isolate;
}
.hero-bg {
  position: absolute; inset: -4%; z-index: -3;
  background: url("assets/img/hero.jpg") center bottom / cover no-repeat;
  filter: saturate(.8) brightness(1.1) contrast(1.05);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: scale(1.06) translateX(-1.5%); } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,13,16,.45) 0%, rgba(11,13,16,0) 35%, rgba(11,13,16,0) 80%, var(--bg) 100%),
    radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0,0,0,.55) 100%);
}
.fog {
  position: absolute; left: -50%; width: 200%; z-index: -2;
  pointer-events: none; opacity: .45;
  background: radial-gradient(ellipse at center, rgba(var(--fog), .35) 0%, rgba(var(--fog), 0) 65%);
  filter: blur(30px);
}
.fog-a { top: 38%; height: 28%; animation: fogmove 55s linear infinite; }
.fog-b { top: 55%; height: 22%; opacity: .3; animation: fogmove 80s linear infinite reverse; }
@keyframes fogmove {
  0% { transform: translateX(-12%); }
  50% { transform: translateX(12%); }
  100% { transform: translateX(-12%); }
}
.hero-inner { max-width: 720px; }
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.hero-title {
  margin: 0;
  font: 500 clamp(56px, 11vw, 148px)/.9 var(--serif);
  letter-spacing: -.02em;
}
.hero-lead { margin: 24px 0 32px; max-width: 34em; font-size: clamp(17px, 1.6vw, 20px); color: #bdb8ac; }
.btn {
  display: inline-block; padding: 13px 22px;
  border: 1px solid rgba(217,212,199,.4); border-radius: 2px;
  font: 500 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--text); color: var(--bg); }
.clock {
  position: absolute; right: var(--gutter); bottom: clamp(64px, 12vh, 140px);
  text-align: right; font-size: 12px; color: var(--muted);
}
.clock-label { display: block; letter-spacing: .18em; text-transform: uppercase; }
.clock-time { display: block; margin-top: 4px; font-size: 28px; color: var(--text); letter-spacing: .06em; }
.clock.glitch .clock-time { color: var(--accent); animation: flicker .18s steps(2) 6; }
@keyframes flicker { 50% { opacity: .2; } }

/* sections */
section { padding: clamp(72px, 12vw, 140px) var(--gutter) 0; }
.section-head { max-width: 1200px; margin: 0 auto 48px; }
h2 { margin: 0; font: 500 clamp(36px, 5vw, 64px)/1.05 var(--serif); }

.game {
  max-width: 1200px; margin: 0 auto 96px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.game-media { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.game-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(.7); transition: transform 1.2s ease; }
.game:hover .game-media img { transform: scale(1.03); }
.badge {
  position: absolute; top: 14px; left: 14px;
  padding: 6px 10px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(11,13,16,.78); border: 1px solid var(--line);
}
.game-title { margin: 0 0 18px; font: 600 clamp(40px, 5vw, 68px)/1 var(--serif); letter-spacing: .02em; }
.game-title span { color: var(--accent); }
.game-hook { font: italic 500 clamp(20px, 2vw, 24px)/1.4 var(--serif); color: var(--text); margin: 0 0 16px; }
.game-body p:not(.eyebrow):not(.game-hook):not(.game-tag) { color: #a9a69e; margin: 0 0 24px; }
.facts { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--line); font-size: 13px; }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts span { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.facts b { font-weight: 500; text-align: right; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shot { padding: 0; border: 1px solid var(--line); background: none; cursor: zoom-in; overflow: hidden; }
.shot img { aspect-ratio: 1; object-fit: cover; filter: saturate(.6) brightness(.85); transition: filter .3s, transform .3s; }
.shot:hover img, .shot:focus-visible img { filter: none; transform: scale(1.06); }

/* Enoch: no footage yet, so a typographic placeholder */
.enoch-art {
  aspect-ratio: 16 / 10;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 55%, rgba(184,50,43,.16), transparent 55%),
    linear-gradient(160deg, #15110f, #0b0d10 70%);
}
.enoch-ring {
  position: absolute; width: min(56%, 320px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(217,212,199,.18);
  box-shadow: 0 0 80px rgba(184,50,43,.15) inset;
  animation: breathe 7s ease-in-out infinite;
}
.enoch-ring::before, .enoch-ring::after {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  border: 1px dashed rgba(217,212,199,.1);
  animation: spin 60s linear infinite;
}
.enoch-ring::after { inset: 32%; border-style: solid; animation-duration: 90s; animation-direction: reverse; }
@keyframes breathe { 50% { transform: scale(1.04); opacity: .75; } }
@keyframes spin { to { transform: rotate(360deg); } }
.enoch-word {
  position: relative;
  font: 500 clamp(36px, 6vw, 72px) var(--serif); letter-spacing: .5em; margin-right: -.5em;
  color: rgba(217,212,199,.85);
}

.studio { max-width: 900px; margin: 0 auto; }
.studio-text { margin: 0; font: 500 clamp(24px, 3vw, 36px)/1.35 var(--serif); }

.contact { max-width: 1200px; margin: 0 auto; padding-bottom: clamp(72px, 10vw, 120px); }
.mail {
  display: inline-block; margin-top: 24px;
  font: 500 clamp(22px, 3.4vw, 40px) var(--mono); text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 4px;
  overflow-wrap: anywhere;
}
.mail:hover { color: #fff; }

.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--gutter); border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 16px;
  background: rgba(5,6,8,.94); cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 90vh; width: auto; border: 1px solid var(--line); }
.lightbox-close {
  position: absolute; top: 12px; right: 16px;
  font-size: 36px; line-height: 1; color: var(--text); background: none; border: 0; cursor: pointer;
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .game { grid-template-columns: 1fr; margin-bottom: 72px; }
  .clock { display: none; }
}
@media (max-width: 520px) {
  .nav a { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
.game-body .game-tag { margin: 0 0 24px; color: var(--text); font-size: 13px; letter-spacing: .08em; }

/* until the key art is in assets/img: grey fog instead of a picture */
.fog-art {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(ellipse at 60% 40%, rgba(var(--fog), .18), transparent 60%),
    linear-gradient(180deg, #232a30 0%, #2c3339 55%, #161b20 70%, #0e1114 100%);
}
.fog-art img.missing { display: none; }
.shot.missing, .gallery.empty { display: none; }
.game-ref { font-style: normal; font-size: 12px; letter-spacing: .12em; color: var(--muted); }

/* drawn previews (scenes.js); a real picture in assets/img covers them */
canvas.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-scene { z-index: -4; }
.game-media img { position: relative; z-index: 1; }
.enoch-word, .badge { z-index: 2; }
