/* ==========================================================================
   erohz.com hub — "The Cabinet"
   Brand DNA carried from the TPDR guide (docs/assets/stylesheets/extra.css):
   dark slate bg, signature gold #f5c227 headings, Cinzel titles / Crimson Pro
   body, image-rendering: pixelated on art, card hover translateY(-5px) scale,
   per-game accent rails + colored glow. Diverged into a personal arcade hub.
   ========================================================================== */

/* Same Google Fonts import the guide uses. */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,400&display=swap');

:root {
  --font-body: "Crimson Pro", "Minion Pro", "EB Garamond", serif;
  --font-title: "Cinzel", serif;

  /* Slate background + surfaces. */
  --bg: #161a24;
  --bg-2: #1c212d;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(245, 194, 39, 0.18);
  --border-soft: rgba(255, 255, 255, 0.08);

  /* Signature gold + highlights. */
  --gold: #f5c227;
  --gold-hi: #ffd700;
  --gold-soft: #ffe082;

  --text: #e6e8ee;
  --text-muted: #9aa3b2;
  --text-dim: #6b7280;

  /* Status pill colors. */
  --status-live: #a5d6a7;
  --status-beta: #b39ddb;
  --status-wip: #ffe082;
  --status-archived: #8a93a3;

  /* Concentric radii (outer card -> inner pieces). */
  --radius-card: 12px;
  --radius-inner: 8px;
  --radius-pill: 999px;

  --shadow-card: 0 8px 22px rgba(0, 0, 0, 0.35);

  --tap: 44px; /* minimum tap-target size */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(245, 194, 39, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  /* Guide's signature deep text shadow, toned for a UI (not a doc page). */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { image-rendering: pixelated; }

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold-hi); }

h1, h2, h3 {
  font-family: var(--font-title);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-wrap: balance;
}

/* ==========================================================================
   HEADER (slim, sticky)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 56px;
  background: rgba(20, 24, 33, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  height: 100%;
}
.site-header__logo img {
  height: 22px;
  width: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.site-header__logo:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(245, 194, 39, 0.6));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 12px;
  font-family: var(--font-title);
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-radius: var(--radius-inner);
  transition: color 0.2s ease, background 0.2s ease;
}
.site-nav__link:hover {
  color: var(--gold);
  background: var(--surface-2);
}
.site-nav__link--active { color: var(--gold); }
.site-nav__ext::after { content: " \2197"; font-size: 0.8em; opacity: 0.8; }

/* Live Twitch badge in the header. */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  /* Slim visual height but a 44px tap target (it links out to Twitch). */
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.live-badge__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--status-archived);
  flex-shrink: 0;
}
/* Loading state: neutral while /status is in flight. */
.live-badge--loading { color: var(--text-dim); }

/* Offline: muted grey. */
.live-badge--offline { color: var(--text-muted); }
.live-badge--offline .live-badge__dot { background: var(--status-archived); }

/* Live: pulsing green, gold-tinted ring. */
.live-badge--live {
  color: var(--status-live);
  border-color: rgba(165, 214, 167, 0.5);
  background: rgba(165, 214, 167, 0.08);
}
.live-badge--live .live-badge__dot {
  background: var(--status-live);
  box-shadow: 0 0 0 0 rgba(165, 214, 167, 0.6);
  animation: live-pulse 1.8s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(165, 214, 167, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(165, 214, 167, 0); }
  100% { box-shadow: 0 0 0 0 rgba(165, 214, 167, 0); }
}

/* ==========================================================================
   MAIN LAYOUT
   ========================================================================== */
.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

/* HERO / INTRO */
.hero { margin-bottom: 56px; }
.hero__title {
  font-size: clamp(2.6rem, 8vw, 4rem);
  color: var(--gold);
  margin: 0 0 16px;
  text-shadow: 0 0 18px rgba(245, 194, 39, 0.25), 0 3px 4px rgba(0, 0, 0, 0.9);
}
.hero__lede {
  max-width: 60ch;
  margin: 0 0 24px;
  font-size: 1.15rem;
  color: var(--text);
  text-wrap: pretty;
}

/* Inline social icon row. */
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    background 0.2s ease, box-shadow 0.2s ease;
}
.social:hover {
  color: var(--gold);
  border-color: var(--border);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.social:active { transform: scale(0.96); }
.social__icon { width: 18px; height: 18px; flex-shrink: 0; }
.social__icon svg { width: 100%; height: 100%; display: block; fill: currentColor; }

/* Live dot riding the Twitch social pill when the stream is up. */
.social--live { color: var(--status-live); border-color: rgba(165, 214, 167, 0.45); }
.social__live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-live);
  box-shadow: 0 0 0 0 rgba(165, 214, 167, 0.6);
  animation: live-pulse 1.8s ease-out infinite;
}

/* SECTION HEADING */
.section__title {
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   THE CABINET — project card grid
   ========================================================================== */
.cabinet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.cartridge {
  position: relative;
  display: flex;
  flex-direction: column;
  /* per-card accent injected inline as --accent by hub.js */
  --accent: var(--gold);
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
/* Left accent rail per game. */
.cartridge::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--accent);
  z-index: 2;
}
.cartridge:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: color-mix(in srgb, var(--accent), transparent 50%);
  box-shadow:
    var(--shadow-card),
    0 12px 26px color-mix(in srgb, var(--accent), transparent 82%);
}

.cartridge__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
/* Fallback placeholder cartridge when a thumb is missing/broken. */
.cartridge__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 2.4rem;
  letter-spacing: 2px;
  color: color-mix(in srgb, var(--accent), white 8%);
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 10px,
      color-mix(in srgb, var(--accent), transparent 92%) 10px 20px
    ),
    var(--bg);
}

.cartridge__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 18px 20px; /* extra left pad clears the accent rail */
  flex: 1;
}

.cartridge__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.cartridge__name {
  font-family: var(--font-title);
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}
.cartridge__tagline {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* STATUS PILL */
.status-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-family: var(--font-title);
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor, transparent 90%);
  white-space: nowrap;
}
.status-pill--live     { color: var(--status-live); }
.status-pill--beta     { color: var(--status-beta); }
.status-pill--wip      { color: var(--status-wip); }
.status-pill--archived { color: var(--status-archived); }

/* LINK BUTTONS (1..N) */
.cartridge__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;       /* push link row to the bottom of the card */
  padding: 12px 0 0;
  list-style: none;
}
.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap); /* 44px tap target */
  padding: 0 14px;
  border-radius: var(--radius-inner);
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent), transparent 55%);
  background: color-mix(in srgb, var(--accent), transparent 88%);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.cart-link:hover {
  color: #fff;
  background: color-mix(in srgb, var(--accent), transparent 70%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent), transparent 70%);
}
.cart-link:active { transform: scale(0.96); }
/* kind-specific emphasis: the primary "play/download" reads stronger. */
.cart-link--download,
.cart-link--play {
  background: color-mix(in srgb, var(--accent), transparent 72%);
  font-weight: 600;
}

/* GHOST "+ more games soon" trailing tile. */
.cartridge--ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 12px,
      rgba(255, 255, 255, 0.02) 12px 24px
    ),
    var(--bg-2);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-card);
}
.cartridge--ghost::before { content: none; }
.cartridge--ghost:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
  color: var(--gold-soft);
}
.cartridge__ghost-plus {
  font-family: var(--font-title);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.cartridge__ghost-text {
  font-family: var(--font-title);
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Empty state (no projects at all). */
.cabinet__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 20px 0;
  font-style: italic;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 22px 20px;
  margin-top: 32px;
}
.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.site-footer__sep { opacity: 0.4; }
.site-footer__mark {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}
.site-footer__mark img { height: 18px; width: auto; opacity: 0.85; }

/* ==========================================================================
   STANDALONE CONTENT PAGES (about / privacy)
   ========================================================================== */
.prose {
  max-width: 68ch;
  margin: 0 auto;
}
.prose h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  color: var(--gold);
  margin: 0 0 8px;
}
.prose h2 {
  font-size: 1.3rem;
  color: var(--gold);
  margin: 36px 0 12px;
}
.prose__meta {
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 28px;
}
.prose p { text-wrap: pretty; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  .site-main { padding: 32px 16px 48px; }
  .site-header { padding: 0 14px; gap: 8px; }
  .site-nav { gap: 0; }
  .site-nav__link { padding: 0 9px; font-size: 0.74rem; }
  .live-badge { padding: 0 9px; }
  /* On the smallest widths the badge label is verbose — keep the dot + state. */
  .hero { margin-bottom: 40px; }
}

/* ==========================================================================
   MOTION / ACCESSIBILITY
   prefers-reduced-motion disables hover translate, scale, glow, and pulses.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .cartridge:hover { transform: none; }
  .social:hover { transform: none; }
}

/* Focus visibility for keyboard users (a11y). */
a:focus-visible,
.cart-link:focus-visible,
.social:focus-visible,
.site-nav__link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
