/* Ben Daglish Fan Site — Torchlit Dungeon Stone Visual Identity */
/* Fonts: Big Shoulders Display 800 (headings), Inter 400 (body) — loaded via <link> in HTML */

/* ── Custom properties ── */
:root {
  --bg:             #130e06;
  --bg-card:        #1e160a;
  --bg-alt:         #180c05;
  --bg-overlay:     rgba(19,14,6,0.97);
  --text:           #e8d5b0;
  --text-muted:     #8a7055;
  --accent:         #d4780a;
  --accent-dim:     #a85a05;
  --accent-glow:    rgba(212,120,10,0.15);
  --accent-glow-lg: rgba(212,120,10,0.30);
  --border:         #2a1f10;
  --border-accent:  #d4780a;
  --font-heading:   'Big Shoulders Display', 'Arial Black', sans-serif;
  --font-body:      'Inter', 'Helvetica Neue', Arial, sans-serif;
  --nav-height:     56px;
  --player-height:  155px;
  --container-max:  1100px;
  --radius:         0px;
}

/* ── Torch flicker keyframe ── */
@keyframes torch-flicker {
  0%, 100% { opacity: 1; filter: brightness(1); }
  20%       { opacity: 0.93; filter: brightness(0.96); }
  45%       { opacity: 0.98; filter: brightness(1.02); }
  70%       { opacity: 0.89; filter: brightness(0.94); }
  85%       { opacity: 0.96; filter: brightness(0.99); }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  background: var(--bg);
  padding-top: var(--nav-height);
  padding-bottom: var(--player-height);
  min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--text);
  text-transform: uppercase;
}

h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s, opacity 0.15s;
}
a:hover { color: #f0a030; opacity: 0.9; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong { color: var(--accent); font-weight: 600; }
em { color: var(--text); font-style: italic; }

code {
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  color: var(--accent);
  background: var(--bg-card);
  padding: 0.1em 0.4em;
  border: 1px solid var(--border);
}

/* ── Layout utilities ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.mt-sm { margin-top: 0.75rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 3rem; }

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 9000;
  transition: top 0.1s;
  font-family: var(--font-heading);
  text-transform: uppercase;
}
.skip-link:focus { top: 0; }

/* ── Navigation ── */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(19,14,6,0.97);
  border-bottom: 2px solid var(--accent-dim);
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.nav-inner {
  display: flex;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  gap: 1.5rem;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  animation: torch-flicker 4s ease-in-out infinite;
}
.nav-brand:hover { color: #f0a030; opacity: 1; }

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.1rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }

.nav-link {
  display: block;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
  opacity: 1;
}
.nav-link.active { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  margin-left: auto;
}

/* ── Hero ── */
#hero {
  padding: 5rem 1.25rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, #080504 0%, var(--bg) 100%);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.25;
  filter: sepia(0.4) brightness(0.7);
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(212,120,10,0.08) 0%, transparent 65%);
  pointer-events: none;
}

/* Stone texture lines */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 30px, rgba(42,31,16,0.15) 30px, rgba(42,31,16,0.15) 31px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(42,31,16,0.08) 60px, rgba(42,31,16,0.08) 61px);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 850px; margin: 0 auto; }

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  animation: torch-flicker 3s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 40px rgba(212,120,10,0.3);
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: var(--accent-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-rule {
  width: 80px;
  height: 3px;
  background: var(--accent);
  margin: 1.2rem auto;
  animation: torch-flicker 4s ease-in-out infinite;
}

.hero-tagline {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-block { text-align: center; }
.stat-block .num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  animation: torch-flicker 5s ease-in-out infinite;
}
.stat-block .label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #f0900c;
  color: var(--bg);
  box-shadow: 0 0 20px var(--accent-glow-lg);
  opacity: 1;
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover {
  background: var(--accent-glow);
  color: #f0a030;
  opacity: 1;
}

/* ── Section layout ── */
.site-section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
}

.section-title {
  color: #fff;
  margin-bottom: 0.5rem;
}

/* ── Cards ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-dim);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.game-card:hover { border-top-color: var(--accent); box-shadow: 0 4px 20px var(--accent-glow); }

.game-card__body { padding: 1.2rem 1.4rem; }

.game-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.game-card__year {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

/* ── Tags / badges ── */
.tag {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tag--platform {
  background: rgba(212,120,10,0.15);
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}
.tag--category {
  background: rgba(138,112,85,0.15);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── SID Catalogue / Filter ── */
.filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.filter-btn:hover, .filter-btn.active {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

#catalogue-grid { display: flex; flex-direction: column; gap: 0.75rem; }

.sid-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  overflow: hidden;
  transition: border-color 0.15s;
}
.sid-group:hover { border-left-color: var(--accent); }
.sid-group.playing { border-left-color: var(--accent); }

.sid-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.group-play-btn {
  background: var(--accent-glow);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}
.group-play-btn:hover { background: var(--accent); color: var(--bg); }

.game-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.game-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.meta-year { font-size: 0.75rem; color: var(--text-muted); }
.meta-subtune-count { font-size: 0.72rem; color: var(--text-muted); }

.group-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: auto;
  padding: 0.2rem 0.4rem;
  transition: color 0.15s;
}
.group-toggle:hover { color: var(--accent); }

.subtune-list {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.sid-group.expanded .subtune-list { display: flex; }

.subtune-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.5rem 3.5rem;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}
.subtune-item:last-child { border-bottom: none; }
.subtune-item:hover { background: rgba(212,120,10,0.07); }
.subtune-item.playing {
  background: rgba(212,120,10,0.12);
  color: var(--accent);
}

.sub-num {
  font-size: 0.7rem;
  color: var(--text-muted);
  width: 16px;
  text-align: right;
  flex-shrink: 0;
}
.sub-name { font-size: 0.88rem; }

/* ── Timeline ── */
.timeline { max-width: 720px; }

.timeline-entry {
  position: relative;
  padding: 0 0 2.5rem 2rem;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
}
.timeline-entry::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow-lg);
}
.timeline-entry:last-child { border-color: transparent; }

.timeline-year {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.timeline-entry h3 { margin-bottom: 0.5rem; color: #fff; }

/* ── History page ── */
.history-body { max-width: 800px; }

.history-chapter {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.history-chapter:last-child { border-bottom: none; }

.history-chapter h2 {
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.history-chapter .chapter-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

/* ── Flagship / deep-dive ── */
.flagship-article {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}
.flagship-article:last-child { border-bottom: none; margin-bottom: 0; }
.flagship-article h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.flagship-article .fa-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ── Interviews / quotes ── */
.quote-block {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-alt);
  font-style: italic;
  color: var(--text-muted);
}
.quote-block cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--accent-dim);
}

.interview-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.interview-block h3 { color: var(--accent); margin-bottom: 0.5rem; }
.interview-source {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ── Videos ── */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  background: var(--bg-card);
  overflow: hidden;
  border: 1px solid var(--border);
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* YouTube facade: poster image with play overlay. Avoids relying on
   third-party iframe rendering and survives screenshots / removed embeds. */
.yt-facade {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  background: #000;
  overflow: hidden;
}
.yt-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.3s ease;
  filter: brightness(0.9);
}
.yt-facade:hover img,
.yt-facade:focus-visible img {
  transform: scale(1.04);
  filter: brightness(1);
}
.yt-facade::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(135deg, rgba(255,0,0,0.95) 0%, rgba(200,0,0,0.95) 100%);
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5);
  pointer-events: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.yt-facade::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  margin-left: -8px;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
  z-index: 2;
  pointer-events: none;
}
.yt-facade:hover::after,
.yt-facade:focus-visible::after {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 22px rgba(0,0,0,0.6);
}
.yt-facade:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.video-card:hover { box-shadow: 0 4px 20px var(--accent-glow); }
.video-card .video-embed { border: none; border-bottom: 1px solid var(--border); }
.video-card__body { padding: 0.75rem 1rem; }
.video-card h3 { font-size: 0.9rem; color: #fff; margin: 0 0 0.2rem; text-transform: none; letter-spacing: 0; }
.video-card p  { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.video-category { margin-bottom: 0.4rem; }

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.gallery-item:hover { box-shadow: 0 4px 20px var(--accent-glow); transform: scale(1.02); }
.gallery-item img { width: 100%; display: block; }
.gallery-item figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Placeholder for missing images ── */
.placeholder {
  width: 100%;
  padding-top: 75%;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder::after {
  content: 'Image unavailable';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Resources ── */
.resource-list { list-style: none; }
.resource-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.resource-list li:last-child { border-bottom: none; }
.resource-list .res-title { font-size: 0.95rem; color: var(--accent); font-weight: 600; }
.resource-list .res-desc  { font-size: 0.8rem; color: var(--text-muted); }

/* ── People ── */
.people-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.people-card h3 { color: var(--accent); margin-bottom: 0.5rem; }
.people-card .role { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 1rem; }

/* ── Player bar ── */
#player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(19,14,6,0.98);
  border-top: 2px solid var(--accent-dim);
  backdrop-filter: blur(6px);
  min-height: var(--player-height);
  display: grid;
  grid-template-rows: auto auto;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "controls info  secondary"
    "canvas   subs  secondary";
  align-items: start;
  gap: 0;
}

/* Canvas VU meter */
#pb-canvas {
  grid-area: canvas;
  display: block;
  padding: 0 1rem 0.6rem;
  width: 200px;
  height: 40px;
}

/* Transport controls */
.pb-controls {
  grid-area: controls;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.7rem 1rem 0.3rem;
}

.pb-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  line-height: 1;
}
.pb-btn:hover { color: var(--accent); border-color: var(--accent-dim); }

.pb-btn--primary {
  background: var(--accent-glow);
  border-color: var(--accent-dim);
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  font-size: 1rem;
}
.pb-btn--primary:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 12px var(--accent-glow-lg);
}

.pb-btn--toggle.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Now-playing info */
.pb-info {
  grid-area: info;
  padding: 0.7rem 0.5rem 0.3rem;
  overflow: hidden;
}

.pb-now-playing {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  overflow: hidden;
}

#pb-composer {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
}

#pb-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pb-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

#pb-platform { color: var(--accent); font-size: 0.7rem; }

#pb-subtune {
  color: var(--text-muted);
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pb-progress {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.pb-progress-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  overflow: hidden;
  max-width: 200px;
  cursor: pointer;
}

#pb-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 1s linear;
}

/* Subtune list */
#pb-subtune-list {
  grid-area: subs;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.3rem;
  padding: 0 0.5rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) var(--bg);
}

.pb-sub-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.pb-sub-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.pb-sub-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Secondary controls */
.pb-secondary {
  grid-area: secondary;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 0.7rem 1rem 0.5rem;
}

.pb-vol-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#pb-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  background: var(--border);
  outline: none;
  cursor: pointer;
}
#pb-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 6px var(--accent-glow-lg);
}

.pb-mode-row {
  display: flex;
  gap: 0.3rem;
}

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Easter egg overlay ── */
#gauntlet-egg {
  position: fixed;
  inset: 0;
  z-index: 9800;
  background: rgba(19,14,6,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
#gauntlet-egg.active { opacity: 1; pointer-events: auto; }

.egg-screen {
  background: var(--bg-card);
  border: 2px solid var(--accent);
  box-shadow: 0 0 60px var(--accent-glow-lg), inset 0 0 40px rgba(212,120,10,0.05);
  padding: 2.5rem 3rem;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  max-width: 520px;
  width: 90%;
  animation: torch-flicker 2s ease-in-out infinite;
}
.egg-line {
  color: var(--accent);
  margin-bottom: 0.4rem;
  white-space: pre;
}
.egg-line--blink { animation: egg-blink 0.8s step-start infinite; }
.egg-line--accent { color: #fff; font-weight: 700; font-size: 1.2rem; }
.egg-line--muted { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.8rem; }

@keyframes egg-blink { 50% { opacity: 0; } }

/* ── Footer ── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
}
.site-footer__inner { text-align: center; }
.site-footer__brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-footer__text {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Reduced-motion accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive ── */
@media (max-width: 700px) {
  body { padding-bottom: 220px; }

  .nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(19,14,6,0.99);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem;
  }
  .nav-list.open { display: flex; }
  .nav-toggle { display: block; }

  #player-bar {
    grid-template-areas:
      "controls controls"
      "info      info"
      "subs      subs"
      "canvas    secondary";
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
  }
  #pb-canvas { padding-bottom: 0.4rem; }
  .pb-secondary { padding: 0.4rem 0.75rem 0.4rem; }
  .games-grid, .video-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
}
