/* ==========================================================================
   Commodore PET Games Fan Page — css/style.css
   Phosphor CRT terminal aesthetic: Space Mono on near-black #070d07,
   #33ff33 phosphor green accent, pulsing @keyframes glow on h1/h2.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Phosphor-decay keyframe — all h1 and h2 headings pulse like real phosphor
   -------------------------------------------------------------------------- */
@keyframes phosphor-decay {
  0%   { text-shadow: 0 0 6px rgba(51,255,51,0.9), 0 0 18px rgba(51,255,51,0.5), 0 0 36px rgba(26,107,26,0.3); }
  40%  { text-shadow: 0 0 10px rgba(51,255,51,1), 0 0 28px rgba(51,255,51,0.7), 0 0 55px rgba(26,107,26,0.5); }
  65%  { text-shadow: 0 0 4px rgba(51,255,51,0.7), 0 0 12px rgba(51,255,51,0.4), 0 0 24px rgba(26,107,26,0.2); }
  100% { text-shadow: 0 0 6px rgba(51,255,51,0.9), 0 0 18px rgba(51,255,51,0.5), 0 0 36px rgba(26,107,26,0.3); }
}

/* Subtle scanline overlay — evokes a real CRT without blocking readability */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* --------------------------------------------------------------------------
   Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --bg-primary:    #070d07;
  --bg-secondary:  #0b140b;
  --bg-card:       #0a130a;
  --bg-card-alt:   #0e1a0e;
  --border-dim:    #1a6b1a;
  --border-bright: #2a9a2a;

  --text-primary:  #c8efc8;
  --text-secondary:#80c080;
  --text-dim:      #3a703a;

  --accent:        #33ff33;
  --accent-light:  #66ff66;
  --accent-dark:   #22cc22;
  --accent-on:     #070d07;

  --font-heading: 'Space Mono', 'Courier New', 'Lucida Console', monospace;
  --font-body:    'Space Mono', 'Courier New', 'Lucida Console', monospace;

  --nav-height:       60px;
  --container-max:    1200px;
  --radius:           2px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover,
a:focus {
  color: var(--accent-light);
  text-shadow: 0 0 8px rgba(51,255,51,0.6);
  outline: none;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
}

/* Only h1 and h2 get the phosphor-decay animation */
h1, h2 {
  animation: phosphor-decay 4s ease-in-out infinite;
}

h1 { font-size: clamp(2rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.7rem); color: var(--accent); }
h4 { font-size: clamp(0.95rem, 1.8vw, 1.3rem); color: var(--accent); }
h5 { font-size: clamp(0.85rem, 1.4vw, 1.1rem); color: var(--text-secondary); }

p {
  font-size: clamp(0.85rem, 1.3vw, 0.95rem);
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Container
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
#site-nav {
  visibility: hidden;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(7, 13, 7, 0.97);
  border-bottom: 2px solid var(--border-dim);
  display: flex;
  align-items: center;
  box-shadow: 0 0 12px rgba(51,255,51,0.08);
}

#site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(51,255,51,0.6);
}

.nav-links {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.4rem 0.55rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 6px rgba(51,255,51,0.5);
  background: rgba(51,255,51,0.04);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(7,13,7,0.99);
    border-bottom: 2px solid var(--border-dim);
    padding: 1rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 0.6rem 1.5rem;
    border-bottom: 1px solid var(--bg-secondary);
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 5rem;
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-dim);
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(51,255,51,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 90%, rgba(26,107,26,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.12;
  filter: saturate(0) brightness(0.6) sepia(1) hue-rotate(70deg) saturate(4);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  color: var(--text-secondary);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.06em;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-tagline {
  font-size: clamp(0.82rem, 1.3vw, 0.95rem);
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  line-height: 1.8;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  border: 1px solid var(--border-dim);
  overflow: hidden;
  background: var(--bg-card);
}

.hero-stat {
  text-align: center;
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--border-dim);
  flex: 1;
  min-width: 110px;
}

.hero-stat:last-child { border-right: none; }

.hero-stat .num {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(51,255,51,0.4);
}

.hero-stat .label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.75rem;
  border: 2px solid currentColor;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-primary {
  color: var(--accent-on);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(51,255,51,0.3);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--accent-on);
  box-shadow: 0 0 20px rgba(51,255,51,0.5);
  text-shadow: none;
}

.btn-secondary {
  color: var(--accent);
  background: transparent;
  border-color: var(--border-dim);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(51,255,51,0.06);
  text-shadow: 0 0 6px rgba(51,255,51,0.4);
}

/* --------------------------------------------------------------------------
   Section shared styles
   -------------------------------------------------------------------------- */
.site-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-dim);
}

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

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent);
  padding-left: 0.75rem;
}

.section-title {
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: clamp(0.82rem, 1.3vw, 0.95rem);
  max-width: 65ch;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(51,255,51,0.08), inset 0 0 20px rgba(51,255,51,0.02);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   History / chapter sections
   -------------------------------------------------------------------------- */
.history-chapter {
  margin-bottom: 2.5rem;
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 4px solid var(--accent);
}

.history-chapter h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-dim);
  font-size: clamp(1rem, 2vw, 1.4rem);
}

.history-chapter p { color: var(--text-primary); }
.history-chapter p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Person cards
   -------------------------------------------------------------------------- */
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.person-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--accent);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.person-card:hover {
  box-shadow: 0 0 16px rgba(51,255,51,0.07);
}

.person-card h4 {
  color: var(--accent);
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.person-card .role {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: block;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.person-card p {
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.person-card p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Game entries (catalogue)
   -------------------------------------------------------------------------- */
.game-entry {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--accent);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.game-entry:hover {
  box-shadow: 0 0 12px rgba(51,255,51,0.07);
}

.game-header {
  background: var(--bg-card-alt);
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.game-title {
  color: var(--accent);
  font-size: clamp(1rem, 1.8vw, 1.3rem);
}

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

.tag {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.tag-year {
  background: var(--accent);
  color: var(--accent-on);
}

.tag-genre {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-dim);
}

.game-body {
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.game-body-text { flex: 1; }

.game-description {
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.8;
  margin-bottom: 0.4rem;
}

.game-thumb {
  width: 140px;
  height: 105px;
  object-fit: cover;
  border: 1px solid var(--border-dim);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .game-body { grid-template-columns: 1fr; }
  .game-thumb { width: 100%; height: auto; aspect-ratio: 4/3; }
}

/* --------------------------------------------------------------------------
   Platform / genre filter
   -------------------------------------------------------------------------- */
.platform-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
}

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

.gallery-figure {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  margin: 0;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.gallery-figure:hover {
  box-shadow: 0 0 14px rgba(51,255,51,0.1);
}

.gallery-figure img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.3s;
  filter: saturate(0.85);
}

.gallery-figure:hover img {
  opacity: 0.9;
  filter: saturate(1);
}

.gallery-figure figcaption {
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0.4rem 0.6rem;
  background: var(--bg-card-alt);
  border-top: 1px solid var(--border-dim);
}

/* --------------------------------------------------------------------------
   Video embeds
   -------------------------------------------------------------------------- */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-dim);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-wrapper.lite-youtube {
  background-color: #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
}

.lite-youtube__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.6) brightness(0.8) sepia(0.3) hue-rotate(80deg);
}

.lite-youtube__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 48px;
  border: 2px solid var(--accent);
  border-radius: 0;
  background: rgba(7,13,7,0.85);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s, box-shadow 0.18s;
  z-index: 2;
}

.lite-youtube__play:hover,
.lite-youtube__play:focus-visible {
  background: rgba(51,255,51,0.15);
  box-shadow: 0 0 16px rgba(51,255,51,0.5);
  outline: none;
}

.lite-youtube__play-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 4px;
}

.lite-youtube--activated {
  cursor: default;
  background-image: none !important;
}

.video-entry {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--accent);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s;
}

.video-entry:hover {
  box-shadow: 0 0 12px rgba(51,255,51,0.07);
}

.video-entry-header {
  padding: 0.85rem 1.25rem 0.65rem;
  border-bottom: 1px solid var(--border-dim);
  background: var(--bg-card-alt);
}

.video-entry-header h3 {
  color: var(--accent);
  margin-bottom: 0.2rem;
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
}

.video-entry-header p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   Links grid
   -------------------------------------------------------------------------- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
}

.link-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--accent);
  padding: 1.25rem;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}

.link-card:hover {
  box-shadow: 0 0 12px rgba(51,255,51,0.07);
  color: inherit;
  text-shadow: none;
}

.link-icon {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 1;
}

.link-card-content h3 {
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.link-card-content p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Page hero (interior pages)
   -------------------------------------------------------------------------- */
.page-hero {
  padding: calc(var(--nav-height) + 3rem) 1.5rem 3rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-dim);
}

.page-hero .section-label {
  display: block;
  margin-bottom: 0.5rem;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 700;
  animation: phosphor-decay 4s ease-in-out infinite;
}

.page-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.82rem, 1.3vw, 0.95rem);
  color: var(--text-secondary);
  max-width: 65ch;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-dim);
}

.section-intro {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 72ch;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Review cards
   -------------------------------------------------------------------------- */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 4px solid var(--accent);
  margin-bottom: 2rem;
  overflow: hidden;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-card-alt);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-dim);
}

.review-title-group { flex: 1 1 auto; }

.review-game-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.review-year {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.review-source-badge {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.review-body { padding: 1.25rem 1.5rem; }

.review-source {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-dim);
}

.review-quote {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: rgba(51,255,51,0.03);
  border-left: 3px solid var(--accent);
}

.review-quote p {
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.review-quote footer {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Flagship entries
   -------------------------------------------------------------------------- */
.flagship-entry {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border-dim);
}

.flagship-entry:first-of-type { border-top: none; }

.flagship-header {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 4px solid var(--accent);
  margin-bottom: 2rem;
}

.flagship-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.flagship-title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  color: var(--accent);
  margin-bottom: 0.4rem;
  animation: phosphor-decay 4s ease-in-out infinite;
}

.flagship-subtitle {
  font-size: clamp(0.82rem, 1.3vw, 0.95rem);
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1rem;
}

.flagship-body {
  display: grid;
  grid-template-columns: 1fr min(40%, 320px);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 700px) {
  .flagship-body { grid-template-columns: 1fr; }
}

.flagship-screenshots {
  display: grid;
  gap: 0.75rem;
}

.flagship-screenshots img {
  width: 100%;
  border: 1px solid var(--border-dim);
  filter: saturate(0.7);
}

.flagship-screenshots img:hover {
  filter: saturate(1);
}

.flagship-videos { margin-top: 2rem; }

.flagship-crosslinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.flagship-crosslinks a {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.flagship-crosslinks a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-shadow: 0 0 6px rgba(51,255,51,0.4);
}

/* --------------------------------------------------------------------------
   Resources list
   -------------------------------------------------------------------------- */
.resource-group {
  margin-bottom: 3rem;
}

.resource-group h3 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-dim);
}

.resource-list {
  display: grid;
  gap: 0.75rem;
}

.resource-item {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  transition: box-shadow 0.2s;
}

.resource-item:hover {
  box-shadow: 0 0 10px rgba(51,255,51,0.07);
}

.resource-item h4 {
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.resource-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.resource-item a {
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Placeholder (no image found)
   -------------------------------------------------------------------------- */
.placeholder {
  background: var(--bg-card-alt);
  border: 1px dashed var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  padding: 1rem;
  aspect-ratio: 4/3;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   PETSCII Easter-egg modal
   -------------------------------------------------------------------------- */
#pet-modal {
  position: fixed;
  inset: 0;
  background: rgba(7,13,7,0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#pet-modal[hidden] { display: none !important; }

.pet-modal-box {
  font-family: var(--font-heading);
  color: var(--accent);
  background: var(--bg-card);
  border: 2px solid var(--accent);
  padding: 2.5rem 3rem;
  max-width: 520px;
  width: 100%;
  text-align: left;
  box-shadow: 0 0 40px rgba(51,255,51,0.2), inset 0 0 20px rgba(51,255,51,0.03);
  position: relative;
}

.pet-modal-art {
  font-size: clamp(0.65rem, 1.5vw, 0.85rem);
  line-height: 1.4;
  white-space: pre;
  color: var(--accent);
  text-shadow: 0 0 6px rgba(51,255,51,0.6);
  margin-bottom: 1.5rem;
}

.pet-modal-boot {
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  line-height: 1.9;
  color: var(--accent);
  margin-bottom: 1.5rem;
  white-space: pre;
  text-shadow: 0 0 4px rgba(51,255,51,0.4);
}

.pet-modal-cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.pet-modal-dismiss {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: color 0.2s;
  text-transform: uppercase;
}

.pet-modal-dismiss:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Skip link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-on);
  padding: 0.5rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
}

.skip-link:focus { top: 0.5rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border-dim);
  padding: 2.5rem 0;
  background: var(--bg-secondary);
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Scroll reveal (JS-driven)
   -------------------------------------------------------------------------- */
.reveal {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* --------------------------------------------------------------------------
   Stat inline (inside text)
   -------------------------------------------------------------------------- */
.inline-stat {
  color: var(--accent);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.petscii-hr {
  border: none;
  text-align: center;
  color: var(--border-dim);
  margin: 2rem 0;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.petscii-hr::before {
  content: '---- \25c6 ---- \25c6 ---- \25c6 ----';
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .hero-stat { padding: 1rem; }
  .flagship-header { padding: 1.25rem; }
  .pet-modal-box { padding: 1.5rem; }
  .pet-modal-art { font-size: 0.6rem; }
}
