/* =========================================================================
   Stinky Goblin Studios — site styles
   Dark night-time neon pixel style. Colours and fonts from WEBSITE_BRIEF.md.
   ========================================================================= */

/* ---- Fonts (self-hosted, see /licenses) -------------------------------- */
@font-face {
  font-family: "Press Start 2P";
  src: url("../assets/fonts/PressStart2P.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans PX";
  src: url("../assets/fonts/OpenSansPXBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens ----------------------------------------------------- */
:root {
  --ink:   #1d1529;   /* outlines, deep shadows */
  --panel: #160f24;   /* page / panel background */
  --panel-2: #1f1636; /* raised panel */
  --line:  #54437c;   /* borders */
  --gold:  #ffd23f;   /* headings, money, main buttons */
  --pink:  #ff5aa8;   /* hype accents */
  --green: #46e890;   /* profit / success */
  --red:   #ff4f6e;   /* loss / warnings */
  --cyan:  #5ce0ff;   /* links, screen glow */
  --text:  #f3ecff;   /* body text */
  --muted: #b7a9d6;   /* secondary text */

  --head: "Press Start 2P", monospace;
  --body: "Open Sans PX", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;

  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 4px 4px 0 var(--ink);
}

/* ---- Reset / base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--body);
  color: var(--text);
  background-color: var(--panel);
  /* layered night sky: subtle vignette + faint grid */
  background-image:
    radial-gradient(1200px 600px at 50% -10%, #241a3d 0%, rgba(36,26,61,0) 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(92,224,255,.06) 0%, rgba(92,224,255,0) 55%),
    radial-gradient(900px 500px at 10% 10%, rgba(255,90,168,.06) 0%, rgba(255,90,168,0) 55%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; height: auto; }

/* Pixel art crispness */
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ---- Typography -------------------------------------------------------- */
h1, h2, h3, .head { font-family: var(--head); line-height: 1.25; color: var(--text); font-weight: 400; }
h1 { font-size: clamp(1.4rem, 4.6vw, 2.6rem); letter-spacing: .5px; }
h2 { font-size: clamp(1.15rem, 3.4vw, 1.9rem); }
h3 { font-size: clamp(.85rem, 2.2vw, 1.05rem); }

p { font-size: clamp(1rem, 1.1vw + .6rem, 1.08rem); }
.lead { font-size: clamp(1.05rem, 1.4vw + .6rem, 1.25rem); color: var(--text); }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.pink { color: var(--pink); }
.green { color: var(--green); }
.cyan { color: var(--cyan); }

/* ---- Layout helpers ---------------------------------------------------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(48px, 8vw, 96px); position: relative; }
.section--tight { padding-block: clamp(32px, 5vw, 56px); }
.center { text-align: center; }

.eyebrow {
  font-family: var(--head);
  font-size: .62rem;
  letter-spacing: 2px;
  color: var(--pink);
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 14px;
}
.section-head { max-width: 760px; margin-inline: auto; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--muted); margin-top: 14px; }

.divider {
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 20px);
  opacity: .7;
}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--gold);
  --btn-fg: var(--ink);
  font-family: var(--head);
  font-size: .72rem;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  text-align: center;
  transition: transform .08s ease, box-shadow .08s ease, filter .1s ease;
  text-decoration: none;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); text-decoration: none; filter: brightness(1.04); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn--lg { font-size: .9rem; padding: 20px 28px; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); border-color: var(--line); box-shadow: var(--shadow-hard-sm); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn--pink { --btn-bg: var(--pink); --btn-fg: #2a0d1c; }
.btn--cyan { --btn-bg: var(--cyan); --btn-fg: #06212b; }
.btn[aria-disabled="true"], .btn.is-disabled {
  cursor: not-allowed;
  filter: grayscale(.25) brightness(.9);
  box-shadow: var(--shadow-hard-sm);
}
.btn[aria-disabled="true"]:hover, .btn.is-disabled:hover { transform: none; box-shadow: var(--shadow-hard-sm); filter: grayscale(.25) brightness(.9); }

.steam-ico { width: 18px; height: 18px; flex: none; }

/* ---- Top navigation ---------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22,15,36,.86);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.nav__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--head); font-size: .74rem; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--gold); }
.brand img { width: 40px; height: 40px; }
.brand span { display: none; }
@media (min-width: 560px) { .brand span { display: inline; } }

.nav__links { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav__links a.navlink {
  font-family: var(--head); font-size: .62rem; color: var(--muted);
  padding: 10px 12px; border-radius: var(--radius);
}
.nav__links a.navlink:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.nav__cta { display: none; }
@media (min-width: 900px) { .nav__cta { display: inline-flex; } }

.nav__toggle {
  margin-left: auto; display: inline-flex; flex-direction: column; gap: 5px;
  background: var(--panel-2); border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 10px; cursor: pointer;
}
.nav__toggle span { width: 22px; height: 3px; background: var(--text); display: block; }
@media (min-width: 720px) { .nav__toggle { display: none; } }
@media (max-width: 719px) {
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--panel); border-bottom: 3px solid var(--ink);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a.navlink { padding: 14px 8px; font-size: .7rem; border-bottom: 2px solid var(--panel-2); }
  .nav__links .btn { display: flex; justify-content: center; margin-top: 14px; }
}

/* ---- Hero (studio) ----------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(40px, 7vw, 84px);
  text-align: center;
  overflow: hidden;
}
.hero__goblin {
  width: clamp(130px, 22vw, 190px); height: auto; margin-inline: auto;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,.35));
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero h1 { margin-top: 20px; }
.hero h1 .studio-gold { color: var(--gold); }
.hero__intro { max-width: 620px; margin: 18px auto 0; color: var(--muted); }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.tag {
  font-family: var(--head); font-size: .56rem; letter-spacing: 1px;
  color: var(--muted); border: 2px solid var(--line); border-radius: 999px;
  padding: 7px 12px;
}

/* ---- Game hero (Hopium Inc) ------------------------------------------- */
.game-hero {
  position: relative;
  border-block: 3px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(22,15,36,.9) 0%, rgba(22,15,36,.5) 46%, rgba(22,15,36,.15) 100%),
    linear-gradient(180deg, rgba(22,15,36,.15), rgba(22,15,36,.12) 48%, rgba(22,15,36,.7) 100%),
    url('../assets/img/brand/library_hero.webp');
  background-size: cover;
  background-position: right bottom;
}
.game-hero__inner { padding-block: clamp(56px, 11vw, 150px); max-width: 720px; }
.game-hero__logo { width: min(440px, 80%); margin-bottom: 26px; }
.game-hero__pitch { color: var(--text); font-size: clamp(1.05rem, 1.5vw + .6rem, 1.3rem); }
.game-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---- Trailer ----------------------------------------------------------- */
.trailer-frame {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  background: #000;
  max-width: 940px; margin-inline: auto;
  aspect-ratio: 16 / 9;
}
.trailer-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Feature grid ------------------------------------------------------ */
.grid { display: grid; gap: 18px; }
.features { grid-template-columns: 1fr; }
@media (min-width: 620px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .features { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--panel-2);
  border: 3px solid var(--ink);
  border-top: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-hard-sm);
}
.card h3 { color: var(--gold); margin-bottom: 10px; font-size: .82rem; line-height: 1.5; }
.card p { color: var(--muted); font-size: 1rem; }
.card .emoji { font-size: 1.6rem; line-height: 1; display: block; margin-bottom: 12px; }

/* ---- Stats ------------------------------------------------------------- */
.stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 620px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 940px) { .stats { grid-template-columns: repeat(6, 1fr); } }
.stat {
  text-align: center;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px 10px;
}
.stat .num { font-family: var(--head); font-size: clamp(1rem, 2.4vw, 1.5rem); color: var(--gold); }
.stat .label { font-size: .82rem; color: var(--muted); margin-top: 8px; }

/* ---- Screenshot gallery ----------------------------------------------- */
.gallery { grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 620px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.shot {
  position: relative; display: block; padding: 0; border: 3px solid var(--ink);
  border-radius: var(--radius); overflow: hidden; background: #000; cursor: zoom-in;
  box-shadow: var(--shadow-hard-sm);
  transition: transform .1s ease, box-shadow .1s ease;
}
.shot:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.shot img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: .82rem; color: var(--text);
  background: linear-gradient(0deg, rgba(10,6,20,.92), rgba(10,6,20,0));
  padding: 22px 12px 10px; text-align: left;
}

/* ---- Lightbox ---------------------------------------------------------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,5,16,.92);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lb.open { display: flex; }
.lb img { max-width: 94vw; max-height: 82vh; border: 3px solid var(--line); border-radius: var(--radius); }
.lb__cap { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: .9rem; }
.lb__close, .lb__nav {
  position: absolute; background: var(--panel-2); color: var(--text);
  border: 3px solid var(--ink); border-radius: var(--radius);
  font-family: var(--head); font-size: .8rem; cursor: pointer;
  width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center;
}
.lb__close { top: 18px; right: 18px; }
.lb__nav { top: 50%; transform: translateY(-50%); }
.lb__nav--prev { left: 14px; }
.lb__nav--next { right: 14px; }
.lb__close:hover, .lb__nav:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---- Wishlist band ----------------------------------------------------- */
.cta-band {
  text-align: center;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(255,210,63,.1), transparent 70%),
    var(--panel-2);
  border-block: 3px solid var(--ink);
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { color: var(--muted); max-width: 560px; margin: 0 auto 26px; }

/* ---- Press page -------------------------------------------------------- */
.press-layout { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .press-layout { grid-template-columns: 300px 1fr; align-items: start; } }
.factsheet {
  background: var(--panel-2); border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-hard-sm);
}
@media (min-width: 900px) { .factsheet { position: sticky; top: 84px; } }
.factsheet h2 { font-size: .9rem; color: var(--gold); margin-bottom: 16px; }
.factsheet dl { display: grid; grid-template-columns: 1fr; gap: 2px; }
.factsheet dt { font-family: var(--head); font-size: .54rem; letter-spacing: 1px; color: var(--pink); text-transform: uppercase; margin-top: 14px; }
.factsheet dd { color: var(--text); font-size: .98rem; }
.factsheet dd a { word-break: break-word; }

.prose h2 { color: var(--gold); margin-top: 8px; }
.prose h3 { color: var(--cyan); margin-top: 28px; margin-bottom: 8px; }
.prose p { color: var(--text); margin-top: 12px; }
.prose ul { margin-top: 12px; padding-left: 22px; color: var(--muted); }
.prose li { margin-top: 8px; }
.prose li b, .prose p b { color: var(--text); }

.dl-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 560px) { .dl-grid { grid-template-columns: 1fr 1fr; } }
.dl-card {
  display: flex; gap: 14px; align-items: center;
  background: var(--panel-2); border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-hard-sm);
}
.dl-card img { width: 56px; height: 56px; object-fit: contain; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); flex: none; }
.dl-card .dl-meta { min-width: 0; }
.dl-card .dl-title { font-family: var(--head); font-size: .62rem; color: var(--text); }
.dl-card .dl-sub { font-size: .86rem; color: var(--muted); margin-top: 4px; }
.dl-card a.dl-link { font-family: var(--head); font-size: .56rem; color: var(--cyan); display: inline-block; margin-top: 8px; }

.note {
  border-left: 4px solid var(--cyan); background: rgba(92,224,255,.06);
  padding: 14px 16px; border-radius: var(--radius); color: var(--muted); font-size: .95rem; margin-top: 18px;
}
.note.warn { border-left-color: var(--gold); background: rgba(255,210,63,.07); }

.copy-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.copy-btn {
  font-family: var(--head); font-size: .56rem; cursor: pointer;
  background: var(--panel); color: var(--cyan); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px;
}
.copy-btn:hover { border-color: var(--cyan); }

/* ---- Footer ------------------------------------------------------------ */
.footer { border-top: 3px solid var(--ink); background: var(--ink); }
.footer__inner { padding-block: clamp(36px, 6vw, 60px); display: grid; gap: 26px; }
@media (min-width: 760px) { .footer__inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer .brand-block { display: flex; gap: 14px; align-items: flex-start; }
.footer .brand-block img { width: 56px; height: 56px; }
.footer h4 { font-family: var(--head); font-size: .6rem; color: var(--gold); letter-spacing: 1px; margin-bottom: 14px; text-transform: uppercase; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--cyan); }
.footer__legal { border-top: 2px solid var(--line); padding-block: 22px; color: var(--muted); font-size: .84rem; }
.footer__legal p { font-size: .84rem; }
.footer__legal a { color: var(--muted); text-decoration: underline; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.social-row a {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--head); font-size: .56rem; color: var(--text);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 9px 12px;
}
.social-row a:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }

/* ---- Skip link --------------------------------------------------------- */
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--ink); font-family: var(--head); font-size: .6rem;
  padding: 10px 14px; border-radius: var(--radius); transition: top .15s ease;
}
.skip:focus { top: 8px; }

/* ---- Placeholder marker (for not-yet-filled links) --------------------- */
[data-placeholder="true"]::after {
  content: "TBD";
  font-family: var(--head); font-size: .5em;
  background: var(--red); color: #fff; border-radius: 3px;
  padding: 1px 4px; margin-left: 6px; vertical-align: middle;
}
