/* ===========================================================
   GameForge portfolio — visual system
   =========================================================== */

:root {
  /* mutable theme (set by JS) */
  --accent: #00e69a;
  --accent-glow: rgba(0,230,154,.18);
  --accent-ink: #03110a;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-pixel: "Silkscreen", "Press Start 2P", monospace;

  /* surface */
  --bg-0: #07080b;        /* page */
  --bg-1: #0b0d12;        /* shell */
  --bg-2: #11141b;        /* surface */
  --bg-3: #181c25;        /* card */
  --bg-4: #1f2430;        /* raised */

  --line: rgba(255,255,255,.07);
  --line-2: rgba(255,255,255,.12);

  --ink-1: #ecedf0;
  --ink-2: #b9bcc6;
  --ink-3: #7a8090;
  --ink-4: #555a69;
  --ink-5: #353a47;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --container: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-0);
  color: var(--ink-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code { font-family: var(--font-mono); font-size: .9em; color: var(--accent); background: rgba(255,255,255,.04); padding: 1px 5px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* utilities ---------------------------------------------------- */

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

.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 6px 0 0;
  color: var(--ink-1);
  text-wrap: balance;
}
.h2.quoted { letter-spacing: -0.025em; }

.lede {
  margin-top: 14px;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 17px;
  text-wrap: pretty;
}

.meta-label { display: none; }

.forge-name {
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.forge-name.dim { color: var(--ink-3); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-2);
  transition: all .25s ease;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }

.hero-cta-row { margin-top: 32px; }

.forge-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; max-width: 360px; justify-content: flex-end; }
@media (max-width: 760px) { .forge-chips { justify-content: flex-start; } }
.forge-chip {
  font-family: var(--font-mono); font-size: 11.5px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line);
  color: var(--ink-2);
}

.forge-stage-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.25) 100%);
}

/* TOPBAR ------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: rgba(7,8,11,.72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--line-2), 0 8px 24px var(--accent-glow);
  position: relative;
  overflow: hidden;
}
.brand-mark::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(0,0,0,.08) 6px 7px);
}
.brand-mark-fg {
  font-family: var(--font-pixel);
  font-size: 11px; letter-spacing: 0.04em;
  position: relative;
}
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-tag { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.topbar-r { display: flex; align-items: center; gap: 22px; font-size: 14px; color: var(--ink-2); }
.topbar-r a:hover { color: var(--ink-1); }
.topbar-cta {
  background: var(--accent); color: var(--accent-ink) !important;
  padding: 8px 14px; border-radius: 999px; font-weight: 600;
  font-size: 13px; letter-spacing: -0.01em;
  box-shadow: 0 8px 24px var(--accent-glow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.topbar-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 32px var(--accent-glow); }

/* SIDE NAV ----------------------------------------------------- */

.sidenav {
  position: fixed; left: 24px; top: 50%; transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; gap: 4px;
}
@media (max-width: 1100px) { .sidenav { display: none; } }
.sidenav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 6px;
  color: var(--ink-4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: color .25s ease, background .25s ease;
}
.sidenav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: transparent; border: 1px solid var(--ink-5);
  transition: all .25s ease;
}
.sidenav-label { opacity: 0; transform: translateX(-4px); transition: opacity .25s ease, transform .25s ease; }
.sidenav-item:hover { color: var(--ink-2); }
.sidenav-item:hover .sidenav-label { opacity: 1; transform: translateX(0); }
.sidenav-item.is-active { color: var(--accent); }
.sidenav-item.is-active .sidenav-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.sidenav-item.is-active .sidenav-label { opacity: 1; transform: translateX(0); }

/* HERO --------------------------------------------------------- */

.hero-section {
  position: relative;
  padding: 72px 32px 88px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, var(--accent-glow), transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}
.hero-section::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 30%, transparent 75%);
  pointer-events: none;
  opacity: .55;
}
.hero-section::after {
  /* CRT scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.hero-grid {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.3fr;
  gap: 56px; align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

.hero-title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 6.2vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero-title-em {
  background: linear-gradient(95deg, var(--accent), color-mix(in oklab, var(--accent), white 25%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px var(--accent-glow));
}
.hero-sub {
  margin-top: 22px; max-width: 44ch;
  font-size: 18px; color: var(--ink-2); text-wrap: pretty;
}
.hero-meta { margin-top: 32px; display: grid; gap: 8px; max-width: 420px; }
.hero-meta-row {
  display: grid; grid-template-columns: 70px 1fr;
  font-family: var(--font-mono); font-size: 12px;
  padding: 8px 0; border-top: 1px solid var(--line);
  color: var(--ink-2);
}
.hero-meta-row:last-child { border-bottom: 1px solid var(--line); }
.hero-meta-key { color: var(--ink-4); letter-spacing: 0.1em; }

/* hero demo */
.hero-demo-wrap { position: relative; }
.hero-demo {
  position: relative; aspect-ratio: 16 / 10;
  width: 100%;
  border: none; padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #06080d;
  border: 1px solid var(--line-2);
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,.8),
    0 0 0 1px rgba(0,0,0,.4),
    0 0 80px -20px var(--accent-glow);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.hero-demo:hover {
  transform: translateY(-2px);
  box-shadow:
    0 40px 100px -30px rgba(0,0,0,.85),
    0 0 0 1px rgba(0,0,0,.4),
    0 0 100px -10px var(--accent-glow);
}
.hero-demo-chrome {
  position: absolute; top: 0; left: 0; right: 0; height: 36px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px;
  background: linear-gradient(180deg, #0d1018, #0a0d14);
  border-bottom: 1px solid var(--line);
  z-index: 3;
}
.hero-demo-dots { display: flex; gap: 6px; }
.hero-demo-dots span { width: 10px; height: 10px; border-radius: 50%; background: #2a2f3b; }
.hero-demo-dots span:nth-child(1) { background: #ff5f57; }
.hero-demo-dots span:nth-child(2) { background: #febc2e; }
.hero-demo-dots span:nth-child(3) { background: #28c840; }
.hero-demo-url { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); flex: 1; text-align: center; }
.hero-demo-badge {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 0.15em;
  color: var(--accent); padding: 3px 8px;
  border: 1px solid var(--accent); border-radius: 3px;
}

.hero-demo-stage {
  position: absolute; top: 36px; left: 0; right: 0; bottom: 0;
  background: #050811;
  overflow: hidden;
}
.hero-demo-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-demo-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}

.hero-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  pointer-events: none;
}
.hero-play-disc {
  position: relative;
  width: 84px; height: 84px;
  display: grid; place-items: center;
  background: rgba(8,11,18,.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-glow), 0 20px 60px -10px rgba(0,0,0,.6);
  transition: transform .25s ease, box-shadow .25s ease;
}
.hero-play-disc::before {
  content: ""; position: absolute; inset: -6px; border-radius: 999px;
  border: 1px solid var(--accent); opacity: .35;
  animation: ring-pulse 2.4s ease-out infinite;
}
@keyframes ring-pulse {
  0% { transform: scale(.92); opacity: .5; }
  100% { transform: scale(1.18); opacity: 0; }
}
.hero-demo:hover .hero-play-disc {
  transform: scale(1.06);
  box-shadow: 0 0 0 8px var(--accent-glow), 0 24px 70px -10px rgba(0,0,0,.7);
}
.hero-play-tri {
  font-size: 24px; color: var(--accent);
  filter: drop-shadow(0 0 12px var(--accent));
  margin-left: 4px; /* optical center */
}
.hero-play-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px;
  background: rgba(8,11,18,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  white-space: nowrap;
}
.hero-play-label { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; letter-spacing: -0.005em; color: var(--ink-1); }
.hero-play-meta {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.05em;
  padding-left: 10px; border-left: 1px solid var(--line-2);
}

.hero-demo-caption {
  margin-top: 14px; display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
}
.hero-demo-caption .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); }

/* lightbox ----------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(2,4,8,.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 5vh 4vw;
  animation: lb-fade .25s ease-out;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-frame {
  position: relative;
  width: 100%; max-width: 1200px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  overflow: hidden;
  box-shadow: 0 60px 140px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.5);
  animation: lb-rise .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes lb-rise { from { transform: translateY(20px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.lightbox-video { width: 100%; height: 100%; display: block; }
.lightbox-close {
  position: fixed; top: 24px; right: 28px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 28px; line-height: 1;
  color: var(--ink-1);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-2);
  border-radius: 50%;
  cursor: pointer;
  transition: all .2s ease;
  z-index: 1001;
}
.lightbox-close:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* WHAT IT IS --------------------------------------------------- */

.what-section {
  position: relative;
  padding: 96px 32px 96px;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
}
.what-shot {
  margin-top: 44px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #06080d;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4);
}
.what-shot img { width: 100%; height: auto; display: block; }

/* FORGE SECTION ------------------------------------------------ */

.forge-section { position: relative; padding: 110px 32px 110px; border-top: 1px solid var(--line); }
.forge-section.is-shell { background: var(--bg-1); }
.forge-section.is-dark  { background: var(--bg-0); }

.forge-head {
  display: grid; grid-template-columns: 1fr auto;
  align-items: end; gap: 24px;
  margin-bottom: 36px;
  max-width: 1100px;
}
@media (max-width: 760px) { .forge-head { grid-template-columns: 1fr; } }

.forge-step-meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-3);
  text-align: right; min-width: 200px;
}
.forge-step-meta-i { font-family: var(--font-display); font-size: 36px; color: var(--ink-1); font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.forge-step-meta-i span { color: var(--ink-4); font-weight: 400; }
.forge-step-meta-t { margin-top: 6px; color: var(--accent); letter-spacing: 0.04em; }

.forge-stage { position: relative; }

.forge-stage-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #06080d;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4);
}
.forge-media { width: 100%; height: auto; display: block; }
.forge-stage-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 70%, rgba(0,0,0,.3) 100%);
}


/* WALKTHROUGH ------------------------------------------------- */

.walk-section { padding: 110px 32px 110px; background: var(--bg-1); border-top: 1px solid var(--line); }

.walk-strip {
  margin-top: 48px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 980px) { .walk-strip { grid-template-columns: repeat(2, 1fr); } }

.walk-card { display: flex; flex-direction: column; }
.walk-card-i {
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 0.2em;
  color: var(--accent); margin-bottom: 10px;
}
.walk-card-poster {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid; place-items: center;
}
.walk-poster-tag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.15em;
  color: var(--ink-4); padding: 3px 6px; border: 1px dashed var(--line-2); border-radius: 3px;
  z-index: 2;
}
.walk-poster-art {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,.02), transparent),
    radial-gradient(circle at 30% 30%, var(--accent-glow), transparent 60%);
}
.walk-poster-art::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 80%);
  opacity: .5;
}
/* placeholder iconography per step */
.walk-poster-art[data-i="0"]::after {
  content: "_"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 38px; color: var(--accent);
  animation: blink 1.1s steps(2) infinite;
}
.walk-poster-art[data-i="1"]::after {
  content: "{ }"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 30px; color: var(--ink-2); letter-spacing: 4px;
}
.walk-poster-art[data-i="2"]::after {
  content: "▦"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 36px; color: var(--accent);
}
.walk-poster-art[data-i="3"]::after {
  content: "</>"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 26px; color: var(--ink-2);
}
.walk-poster-art[data-i="4"]::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 36px; color: var(--accent);
  filter: drop-shadow(0 0 12px var(--accent));
}

.walk-card-t { margin-top: 12px; font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.walk-card-c { margin-top: 6px; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }

/* NEXT --------------------------------------------------------- */

.next-section { padding: 80px 32px 110px; background: var(--bg-0); border-top: 1px solid var(--line); }
.next-card {
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px; align-items: center;
  padding: 36px 36px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
}
@media (max-width: 760px) { .next-card { grid-template-columns: 1fr; } }
.next-status {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--bg-3);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.next-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #cca030;
  box-shadow: 0 0 0 4px rgba(204,160,48,.18);
  animation: pulse 1.6s ease-in-out infinite;
}
.next-status-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em; color: var(--ink-4); }
.next-status-v { font-family: var(--font-display); font-weight: 600; font-size: 14px; }

/* FOOTER ------------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding: 28px 0; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-r { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.foot-r a:hover { color: var(--accent); }
.foot-sep { color: var(--ink-5); }

/* responsive top padding tweaks */
@media (max-width: 760px) {
  .hero-section { padding: 48px 24px 64px; }
  .what-section, .forge-section, .walk-section, .next-section { padding-left: 24px; padding-right: 24px; padding-top: 72px; padding-bottom: 72px; }
  .container { padding: 0 4px; }
}
