/* =========================================================
   pages.css — shared layout for project pages
   (/gamechops/, /birdboy/, /this-week-in-chiptune/, /hot-spotter/)
   Loaded AFTER style.css. Per-page theme = body class overriding
   --accent / --accent-2 / --accent-3.
   ========================================================= */

/* ─── Space Grotesk / Space Mono (Hot Spotter only) ─── */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk/space-grotesk-400-700-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/space-mono/space-mono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/space-mono/space-mono-700-latin.woff2') format('woff2');
}

/* ─── Page themes ─── */
body.page-gamechops  { --accent: #9b7bff; --accent-2: #b79bff; --accent-3: #4c3a80; }
body.page-birdboy    { --accent: #a8b8f8; --accent-2: #c3cdfa; --accent-3: #4a5a99; }
body.page-twic       { --accent: #22e5ff; --accent-2: #7ff0ff; --accent-3: #7721FB;
                       --gb-green: #9bbc0f; --gb-green-2: #8bac0f; --gb-grey: #c5c5c5;
                       background: #000; }
body.page-hotspotter { --accent: #f0973c; --accent-2: #f6b56e; --accent-3: #8a4f14;
                       --hs-green: #3dbb6e; --bg: #12151d; --bg-elev: #0d1017;
                       --bg-elev-2: #1b2030; --ink: #e6e7ec; --ink-dim: #8b90a3;
                       background: var(--bg); color: var(--ink);
                       font-family: 'Space Grotesk', 'Familjen Grotesk', system-ui, sans-serif; }

/* ─── Themed CTAs — style.css hardcodes the homepage red fill/glow;
   project pages fill with their own accent + dark text, accent glow ─── */
.hero-cta {
  color: #0c0c0d;
  background: var(--accent);
  border-color: var(--accent);
}
.hero-cta--ghost {
  color: var(--accent);
  background: transparent;
  border-color: var(--accent-3);
}
.hero-cta:hover {
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 60%, transparent),
              inset 0 0 12px color-mix(in srgb, #0c0c0d 15%, transparent);
}

/* ─── Page hero (own classes — avoids main.js .js-ready coupling) ─── */
.p-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 72px 5vw 56px;
}
.p-hero-text .eyebrow { margin-bottom: 18px; }
.p-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.95;
  text-transform: uppercase;
  font-weight: 400;
  overflow-wrap: break-word;
}
.p-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin-top: 18px;
}
.p-bio { margin-top: 18px; max-width: 54ch; font-size: 16px; color: #c9c9c4; }
.p-hero .hero-actions { margin-top: 28px; }
.p-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 5px 10px;
  margin-bottom: 20px;
}
.p-wordmark { max-width: 440px; width: 100%; height: auto; display: block; }
.p-hero .frame img { width: 100%; height: auto; display: block; }

/* ─── Reset homepage .hero-visual rules inside .p-hero (bug fix) ───
   css/style.css's .hero-visual/::after/img rules are written for the
   homepage's absolutely-positioned hero (relies on a positioned
   ancestor). .p-hero reuses the same .hero-visual/.frame markup but
   is a static two-column grid, so the absolute positioning escapes
   the grid and blows up the layout. Scoped to .p-hero only — the
   homepage (style.css / index.html) is untouched. ─── */
.p-hero .hero-visual {
  position: static;
  right: auto;
  top: auto;
  bottom: auto;
  width: auto;
  z-index: auto;
}
.p-hero .hero-visual::after {
  content: none;
}
.p-hero .hero-visual img {
  height: auto;
  object-fit: initial;
  filter: none;
}
@media (max-width: 900px) {
  .p-hero .hero-visual {
    width: auto;
    opacity: 1;
  }
  .p-hero .hero-visual .meta {
    display: block;
  }
}

/* ─── Stats band ─── */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  margin: 40px 5vw 0;
}
.stat { padding: 24px 20px; border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: 34px;
  color: var(--accent);
}
.stat span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
}

/* ─── Platform pills ─── */
.pills { padding: 8px 5vw 0; }
.pill {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  border: 1px solid var(--accent-3);
  color: var(--accent);
  padding: 8px 14px;
  margin: 0 8px 10px 0;
  text-decoration: none;
}
.pill:hover { border-color: var(--accent); }

/* ─── Bird Boy flock grid ─── */
.flock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 28px 5vw 0;
}
.bird {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg-elev);
  padding: 20px 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}
.bird:hover { border-color: var(--accent); }
.bird img { width: 100%; max-width: 200px; height: auto; border-radius: 10px; object-fit: cover; }
.bird b { font-weight: 600; font-size: 15px; display: block; }

/* Bird Boy softening */
body.page-birdboy .p-title,
body.page-birdboy h2.section-title,
body.page-birdboy .page-band .big {
  text-transform: lowercase;
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
body.page-birdboy .p-title { font-size: clamp(40px, 5vw, 64px); }
body.page-birdboy .frame,
body.page-birdboy .project { border-radius: 12px; overflow: hidden; }
body.page-birdboy .hero-cta { border-radius: 999px; }

/* ─── TWiC ─── */
body.page-twic .p-title { color: var(--accent); text-shadow: 4px 4px 0 var(--accent-3); }
body.page-twic .stat b { color: var(--accent); text-shadow: 2px 2px 0 var(--accent-3); }
.gb-text {
  font-family: 'VT323', monospace;
  color: var(--gb-green);
  font-size: 20px;
  letter-spacing: 0.04em;
}
body.page-twic .pill { border-color: var(--gb-green-2); color: var(--gb-green); }
body.page-twic .pill:hover { border-color: var(--gb-green); }
.strip-beam {
  height: 6px;
  background: linear-gradient(90deg, #ff004d, #ff8a00, #ffe600, #2bd94c, #22e5ff, #7721FB);
}

/* ─── Hot Spotter ─── */
body.page-hotspotter .p-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  text-transform: none;
  font-size: clamp(38px, 4.6vw, 62px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
body.page-hotspotter .eyebrow,
body.page-hotspotter .p-tag,
body.page-hotspotter .p-badge,
body.page-hotspotter .section-num,
body.page-hotspotter .section-sub { font-family: 'Space Mono', monospace; }
body.page-hotspotter h2.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(34px, 4.5vw, 60px);
}
body.page-hotspotter .p-bio { color: #b9bdc9; }
body.page-hotspotter .stat b {
  font-family: 'Space Mono', monospace;
  font-size: 26px;
  color: var(--hs-green);
}
.strip-heat {
  height: 8px;
  background: linear-gradient(90deg, #5b9bd9, #3dbb6e, #b8d44a, #f0c53c, #f0973c, #e8564a);
}

/* Mock app window (hero visual) */
.app-mock {
  border: 1px solid rgba(230,231,236,0.1);
  background: #0d1017;
  padding: 18px;
}
.app-mock .bar {
  display: flex;
  justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.trk { margin-bottom: 14px; }
.trk:last-child { margin-bottom: 2px; }
.trk .nm {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 5px;
}
.trk .nm em {
  font-style: normal;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
}
.trk .nm em.v { color: var(--accent); }
.trk .nm .hot {
  background: var(--accent);
  color: #12151d;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  letter-spacing: 0.1em;
  margin-left: 8px;
}
.wave { display: flex; align-items: center; gap: 1px; height: 34px; }
.wave i { flex: 1; border-radius: 1px; min-height: 8%; }

/* Feature grid */
.fgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 28px 5vw 0;
}
.fcard {
  border: 1px solid rgba(230,231,236,0.1);
  background: var(--bg-elev);
  padding: 20px;
}
.fcard b { font-size: 15px; font-weight: 700; display: block; }
.fcard b i {
  font-style: normal;
  color: var(--accent);
  margin-right: 8px;
  font-family: 'Space Mono', monospace;
  font-weight: 400;
}
.fcard p { font-size: 13px; color: #a7abb8; margin-top: 8px; }

/* Screenshot band — first shot full-width, detail shots side by side */
.shots { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 28px 5vw 0; }
.shots .frame img { width: 100%; height: auto; display: block; }
@media (min-width: 901px) {
  .shots { grid-template-columns: 1fr 1fr; align-items: start; }
  .shots .frame:first-child { grid-column: 1 / -1; }
}

/* ─── Closing band ─── */
.page-band {
  margin-top: 64px;
  border-top: 1px solid var(--rule);
  padding: 56px 5vw;
  text-align: center;
}
.page-band .big {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 44px);
  text-transform: uppercase;
}
body.page-hotspotter .page-band .big {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--accent);
}
.page-band .small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-top: 12px;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .p-hero { grid-template-columns: 1fr; padding: 48px 24px 40px; gap: 32px; }
  .stats-band { grid-template-columns: repeat(2, 1fr); margin: 32px 24px 0; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .flock, .fgrid { grid-template-columns: 1fr 1fr; padding: 24px 24px 0; }
  .pills { padding: 8px 24px 0; }
}
@media (max-width: 600px) {
  .flock, .fgrid { grid-template-columns: 1fr; }
}
