/* ==========================================================================
   PC Engine Fan Page — css/style.css
   Phase 2: Steel blue · NEC orange · Circuit precision.
   Advanced CSS: backdrop-filter, :has(), container queries, HuCard motif.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Electrolize&family=Source+Code+Pro:wght@400;500;600&display=swap');

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Base palette */
  --bg:            #1a2a3a;
  --bg-card:       #162235;
  --bg-alt:        #122030;
  --text:          #e4eef8;
  --text-muted:    #7a98b5;
  --accent:        #ff5f1f;
  --accent-dim:    #cc4a10;
  --secondary:     #00c8ff;
  --border:        #253a50;
  --border-accent: #ff5f1f;

  /* Hardware colour-coding (HuCard = orange, CD-ROM² = cyan) */
  --color-hucard:  #ff5f1f;
  --color-cdrom:   #00c8ff;

  /* Typography */
  --font-heading:  'Electrolize', 'Courier New', monospace;
  --font-body:     'Source Code Pro', 'Courier New', monospace;

  /* Layout */
  --nav-height:    60px;
  --container-max: 1200px;
  --hucard-clip:   polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

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

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

/* Circuit board SVG background */
body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cg stroke='%23253a50' stroke-width='0.8' fill='none' opacity='0.45'%3E%3Cpath d='M0 50 H30 V20 H70'/%3E%3Cpath d='M100 30 H80 V70 H50 V100'/%3E%3Cpath d='M0 80 H20 V50'/%3E%3Cpath d='M60 0 V30 H90 V50'/%3E%3Cpath d='M40 100 V60 H10 V40'/%3E%3C/g%3E%3Cg fill='%23253a50' opacity='0.55'%3E%3Ccircle cx='30' cy='50' r='2.5'/%3E%3Ccircle cx='30' cy='20' r='2.5'/%3E%3Ccircle cx='80' cy='70' r='2.5'/%3E%3Ccircle cx='50' cy='70' r='2.5'/%3E%3Ccircle cx='20' cy='80' r='2.5'/%3E%3Ccircle cx='20' cy='50' r='2.5'/%3E%3Ccircle cx='60' cy='30' r='2.5'/%3E%3Ccircle cx='90' cy='30' r='2.5'/%3E%3Ccircle cx='10' cy='40' r='2.5'/%3E%3Ccircle cx='40' cy='60' r='2.5'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  padding-top: var(--nav-height);
}

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

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

a:hover, a:focus { color: var(--accent-dim); outline: none; }

ul, ol { list-style: none; }

hr {
  border: none;
  border-top: 2px solid var(--accent);
  opacity: 0.35;
  margin: 3rem 0;
}

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

h1 { font-size: clamp(2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h4 { font-size: 1.1rem; }

p + p { margin-top: 0.9em; }
strong { color: var(--text); }

/* --------------------------------------------------------------------------
   Skip Link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* --------------------------------------------------------------------------
   Navigation — frosted glass circuit board effect
   -------------------------------------------------------------------------- */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(26, 42, 58, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--accent);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-brand:hover, .nav-brand:focus { color: var(--accent-dim); }

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  margin-left: auto;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 0.3rem 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s, border-bottom-color 0.2s;
  border-bottom: 2px solid transparent;
}
.nav-link:hover, .nav-link:focus { color: var(--text); border-bottom-color: var(--accent); }
.nav-link--active { color: var(--accent); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  margin-left: auto;
}
.burger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  transition: background 0.2s;
}
.nav-toggle:hover .burger, .nav-toggle:focus .burger { background: var(--accent); }

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s;
  cursor: pointer;
  border-radius: 0;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}
.btn-primary:hover, .btn-primary:focus {
  background: transparent;
  color: var(--accent);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-secondary:hover, .btn-secondary:focus {
  border-color: var(--accent);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
#hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  padding: 4rem 1.25rem;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(255,95,31,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.25;
  filter: sepia(0.4) brightness(0.7);
}

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

.hero-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(3.5rem, 10vw, 9rem);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
  line-height: 1;
}
.hero-title span { color: var(--accent); }
.hero-tagline {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.hero-stat .num {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  color: var(--accent);
  line-height: 1;
}
.hero-stat .label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Page Hero (inner pages)
   -------------------------------------------------------------------------- */
.page-hero {
  padding: 6rem 0 4rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--text);
  margin-bottom: 1rem;
}
.page-hero__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.site-section {
  padding: 6rem 0;
  background: var(--bg);
  position: relative;
}
.site-section:nth-child(even) { background: var(--bg-alt); }

.section-header { margin-bottom: 3rem; text-align: center; }
.section-label {
  display: inline-block;
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title { color: var(--text); margin-bottom: 0.75rem; }
.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Scroll Reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Cards / Games Grid — container queries + :has() + HuCard motif
   -------------------------------------------------------------------------- */
/* Container context for responsive card grid */
.games-container {
  container-type: inline-size;
  container-name: games;
}

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

/* Container-responsive grid: card layout adapts to container width */
@container games (max-width: 420px) {
  .games-grid { grid-template-columns: 1fr; }
  .game-card__img { aspect-ratio: 16/9; }
}
@container games (min-width: 421px) and (max-width: 700px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}
@container games (min-width: 701px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); }
}

/* HuCard shape motif — angled top-right corner */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  clip-path: var(--hucard-clip);
  transition: border-color 0.2s, transform 0.2s;
  overflow: visible;
}

.game-card:hover { border-color: var(--accent); transform: translateY(-2px); }

/* :has() selector — highlight card when any child has focus */
.game-card:has(:focus-visible) {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(0, 200, 255, 0.2);
}
.game-card:has(:focus-visible) .game-card__title { color: var(--secondary); }

.game-card__img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.game-card__body { padding: 1.25rem; }
.game-card__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}
.game-card__year {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.game-card__platform {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Card placeholder
   -------------------------------------------------------------------------- */
.card-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

/* --------------------------------------------------------------------------
   Tags — HuCard/CD-ROM color-coded via CSS custom properties
   -------------------------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
/* HuCard = orange (var(--color-hucard)) */
.tag--platform { border-color: var(--color-hucard); color: var(--color-hucard); }
/* CD-ROM² = cyan (var(--color-cdrom)) */
.tag--format   { border-color: var(--color-cdrom);  color: var(--color-cdrom);  }
.tag--genre    { border-color: var(--border); }
.tag--flagship { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------------------
   Filter Bar
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.filter-bar label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.filter-bar select {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23ff5f1f'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
}
.filter-bar select:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.filter-count { margin-left: auto; font-size: 0.8rem; color: var(--text-muted); }
.filter-count strong { color: var(--accent); }

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.timeline-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 1.25rem;
}
.timeline-year { font-family: var(--font-heading); font-size: 2rem; color: var(--accent); line-height: 1; margin-bottom: 0.3rem; }
.timeline-event { font-weight: 600; font-size: 0.85rem; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.timeline-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* --------------------------------------------------------------------------
   History Body
   -------------------------------------------------------------------------- */
.history-body { max-width: 820px; margin: 0 auto; }
.history-chapter { margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--border); }
.history-chapter:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.history-chapter h3 { color: var(--accent); margin-bottom: 1rem; }
.history-chapter p { color: var(--text-muted); }
.history-chapter p strong { color: var(--text); }

/* --------------------------------------------------------------------------
   Callout / Did You Know
   -------------------------------------------------------------------------- */
.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.callout__label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.callout__text { font-size: 0.95rem; color: var(--text-muted); }
.callout__text strong { color: var(--text); }

/* --------------------------------------------------------------------------
   Trivia Callout (<aside class="trivia">)
   -------------------------------------------------------------------------- */
aside.trivia {
  background: rgba(0, 200, 255, 0.05);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-left: 4px solid var(--secondary);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}
.trivia__label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.trivia__text { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; }
.trivia__text strong { color: var(--text); }

/* --------------------------------------------------------------------------
   Developer Quote (<blockquote class="dev-quote">)
   -------------------------------------------------------------------------- */
blockquote.dev-quote {
  border-left: 4px solid var(--accent);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: rgba(255, 95, 31, 0.05);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  position: relative;
}
blockquote.dev-quote::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.3;
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
  line-height: 1;
}
blockquote.dev-quote cite {
  display: block;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--accent);
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Specs Grid (hardware / flagship pages)
   -------------------------------------------------------------------------- */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  clip-path: var(--hucard-clip);
}
.spec-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.06em;
}
.spec-card table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.spec-card td { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.spec-card td:first-child { color: var(--text-muted); width: 45%; }
.spec-card td:last-child { color: var(--text); font-weight: 500; }
.spec-card tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------------------
   Video Grid
   -------------------------------------------------------------------------- */
.video-grid { display: grid; gap: 3rem; }
.video-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
}
.video-entry h3 { font-size: 1.3rem; color: var(--text); margin-bottom: 0.75rem; }
.video-entry p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-meta { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.75rem; grid-column: 1 / -1; }

/* --------------------------------------------------------------------------
   Hardware Grid
   -------------------------------------------------------------------------- */
.hardware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.hardware-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  clip-path: var(--hucard-clip);
  transition: border-color 0.2s, transform 0.2s;
}
.hardware-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.hardware-card__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center; display: block; }
.hardware-card__placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hardware-card__body { padding: 1.25rem; }
.hardware-card__name { font-family: var(--font-heading); font-size: 1.5rem; color: var(--text); margin-bottom: 0.25rem; }
.hardware-card__year { font-size: 0.75rem; color: var(--accent); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.75rem; }
.hardware-card__desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0.75rem; }

/* --------------------------------------------------------------------------
   Screenshot Strip
   -------------------------------------------------------------------------- */
.screenshot-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.screenshot-strip img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.screenshot-strip img:hover { border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Image with Caption
   -------------------------------------------------------------------------- */
.img-figure { margin: 2rem 0; }
.img-figure img { width: 100%; max-height: 400px; object-fit: cover; border: 1px solid var(--border); }
.img-figure figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
}

/* --------------------------------------------------------------------------
   Gallery Grid
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  clip-path: var(--hucard-clip);
  cursor: pointer;
  transition: border-color 0.2s;
}
.gallery-item:hover { border-color: var(--accent); }
.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 42, 58, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  transform: translateY(100%);
  transition: transform 0.25s;
}
.gallery-item:hover .gallery-item__caption { transform: translateY(0); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: rgba(18, 32, 48, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 2px solid var(--accent);
  padding: 3rem 0;
}
.site-footer__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
.site-footer__brand { font-family: var(--font-heading); font-size: 1.5rem; color: var(--accent); letter-spacing: 0.08em; }
.site-footer__text { font-size: 0.8rem; color: var(--text-muted); line-height: 1.7; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 2rem; }
.mt-lg { margin-top: 3rem; }
.placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Easter Egg Overlay — frosted glass
   -------------------------------------------------------------------------- */
.pce-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 42, 58, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pce-overlay__inner { text-align: center; padding: 3rem; max-width: 480px; }
.pce-overlay__eyebrow { font-size: 0.7rem; color: var(--accent); letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 1.5rem; }
.pce-overlay__logo { font-family: var(--font-heading); font-size: 5rem; color: var(--text); letter-spacing: 0.1em; line-height: 1; margin-bottom: 1.5rem; }
.pce-overlay__tagline { font-size: 1rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 2rem; }
.pce-overlay__close {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.pce-overlay__close:hover { background: var(--accent-dim); }

/* --------------------------------------------------------------------------
   Lightbox — frosted glass overlay
   -------------------------------------------------------------------------- */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 32, 48, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lb-inner { max-width: 900px; width: 100%; text-align: center; }
.lb-inner img { max-height: 80vh; width: auto; margin: 0 auto; border: 1px solid var(--border); }
.lb-close {
  display: block;
  margin: 0 auto 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.lb-caption { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(26, 42, 58, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--accent);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }
  .nav-menu--open { display: flex; }
  .nav-link { padding: 0.5rem 1rem; font-size: 0.85rem; }
  .video-entry { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: 1fr; }
}
