/* ==========================================================================
   F-Zero Fan Page — css/style.css
   Identity: "5 machines. 15 tracks. 500 km/h. Mode 7 was the future."
   Background: #00041a (deep dark navy — the void between circuits)
   Accent:     #00ffff (cyan — the F-Zero energy strip and HUD glow)
   Secondary:  #ff4400 (Fire Stingray orange-red — Goroh's machine and boost flames)
   Headings:   Bebas Neue 400 — condensed racing display lettering
   Body:       Asap 400
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Asap:wght@400;600&display=swap');

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --bg:              #00041a;
  --bg-card:         #000d33;
  --bg-alt:          #00020e;
  --bg-overlay:      rgba(0, 4, 26, 0.95);
  --text:            #c8e8ff;
  --text-muted:      #3a6080;
  --accent:          #00ffff;
  --accent-dim:      rgba(0, 255, 255, 0.08);
  --accent-glow:     rgba(0, 255, 255, 0.3);
  --secondary:       #ff4400;
  --secondary-dim:   rgba(255, 68, 0, 0.12);
  --border:          #001040;
  --border-accent:   rgba(0, 255, 255, 0.18);
  --font-heading:    'Bebas Neue', 'Arial Black', 'Impact', sans-serif;
  --font-body:       'Asap', 'Helvetica Neue', Arial, sans-serif;

  --nav-height:      58px;
  --container-max:   1160px;
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */
@keyframes speed-lines {
  from { background-position: 0 0; }
  to   { background-position: 200px 0; }
}

@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 8px var(--accent-glow), 0 0 24px rgba(0,255,255,0.15); }
  50%       { text-shadow: 0 0 16px var(--accent-glow), 0 0 48px rgba(0,255,255,0.25); }
}

@keyframes boost-appear {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scan-line {
  from { transform: translateY(-100%); }
  to   { transform: translateY(100vh); }
}

@keyframes ribbon-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .speed-header::before,
  .track-ribbon,
  .track-ribbon-inner { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; animation: none !important; }
}

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

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.8;
  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, opacity 0.2s;
}

a:hover,
a:focus { color: #80ffff; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.1;
  color: var(--text);
  letter-spacing: 0.02em;
}

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

ul, ol { padding-left: 1.5rem; }

/* --------------------------------------------------------------------------
   Skip Link
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

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

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: var(--bg-overlay);
  border-bottom: 1px solid var(--border-accent);
  z-index: 1000;
  backdrop-filter: blur(6px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 0 12px var(--accent-glow);
}

.nav-brand:hover { color: #80ffff; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.nav-link {
  display: block;
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus { color: var(--accent); }

.nav-link--active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--bg-overlay);
    border-bottom: 1px solid var(--border-accent);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .nav-menu--open { display: flex; }
  .nav-link { padding: 0.6rem 1.5rem; font-size: 0.92rem; }
  .nav-link--active { border-bottom: none; border-left: 3px solid var(--accent); }
}

/* --------------------------------------------------------------------------
   Speed Lines — animated header decoration
   -------------------------------------------------------------------------- */
.speed-header {
  position: relative;
  overflow: hidden;
}

.speed-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 18px,
    rgba(0, 255, 255, 0.025) 18px,
    rgba(0, 255, 255, 0.025) 20px
  );
  animation: speed-lines 3s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   Track Ribbon — scroll-driven horizontal scroll
   -------------------------------------------------------------------------- */
.track-ribbon {
  overflow: hidden;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-accent);
  border-bottom: 1px solid var(--border-accent);
  padding: 0.6rem 0;
}

.track-ribbon-inner {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: ribbon-slide 20s linear infinite;
  width: max-content;
}

.track-ribbon-inner span {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.track-ribbon-inner span.accent { color: var(--accent); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
#hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-accent);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: hue-rotate(180deg) saturate(1.4) brightness(0.7);
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 9vw, 7rem);
  color: var(--accent);
  line-height: 0.95;
  margin-bottom: 0.5rem;
  animation: glow-pulse 4s ease-in-out infinite;
  letter-spacing: 0.04em;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  color: var(--secondary);
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.stat-block { text-align: left; }

.stat-block .num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.04em;
}

.stat-block .label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-body);
}

/* --------------------------------------------------------------------------
   Parallelogram clip-path section label
   -------------------------------------------------------------------------- */
.section-label-bar {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  padding: 0.2rem 1.2rem 0.2rem 0.8rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  margin-bottom: 0.75rem;
}

.section-label-bar--secondary {
  background: var(--secondary);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
}

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

.site-section--alt {
  background: var(--bg-alt);
}

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

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

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text);
  letter-spacing: 0.03em;
}

.section-intro {
  color: var(--text-muted);
  max-width: 720px;
  font-size: 1rem;
  margin-top: 0.75rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.08em;
  border-radius: 0;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.btn-primary:hover {
  background: #80ffff;
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   Screenshot Strip
   -------------------------------------------------------------------------- */
.screenshot-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.screenshot-strip figure {
  margin: 0;
  border: 1px solid var(--border-accent);
  overflow: hidden;
  background: var(--bg-alt);
  perspective: 600px;
}

.screenshot-strip figcaption {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  text-align: center;
}

.screenshot-strip img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  transition: transform 0.3s ease;
}

.screenshot-strip figure:hover img {
  transform: scale(1.03);
}

@media (max-width: 640px) {
  .screenshot-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .screenshot-strip { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Perspective screenshot (flagship)
   -------------------------------------------------------------------------- */
.perspective-wrap {
  perspective: 800px;
  perspective-origin: center top;
  margin: 1.5rem 0;
}

.perspective-wrap img {
  transform: rotateX(4deg) scale(1.02);
  transform-origin: center top;
  transition: transform 0.4s ease;
  border: 1px solid var(--border-accent);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(0,255,255,0.08);
}

.perspective-wrap:hover img {
  transform: rotateX(0deg) scale(1);
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 16px rgba(0,255,255,0.06);
}

.card-body { padding: 1.25rem; }

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Game Cards
   -------------------------------------------------------------------------- */
.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

article.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

article.game-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 20px rgba(0,255,255,0.07);
}

.game-card__img {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-alt);
}

.game-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .game-card__img img { transform: scale(1.04); }

.game-card__body { padding: 1.25rem; flex: 1; }

.game-card__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.game-card__year {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--secondary);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.game-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.platform-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-accent);
  color: var(--accent);
  background: var(--accent-dim);
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
}

.platform-badge--secondary {
  color: var(--secondary);
  border-color: rgba(255,68,0,0.3);
  background: var(--secondary-dim);
}

.game-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.game-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.game-card__features li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  border-top: 1px solid var(--border);
  padding-left: 1rem;
  position: relative;
}

.game-card__features li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.55rem;
  top: 0.45rem;
}

.game-card__stat {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.stat-item { text-align: left; }

.stat-item .n {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.04em;
}

.stat-item .l {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Racer Cards — parallelogram clip-path
   -------------------------------------------------------------------------- */
.racers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.racer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.racer-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 24px rgba(0,255,255,0.08);
}

.racer-card__header {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg-card) 100%);
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-accent);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.racer-card__name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.racer-card__machine {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--secondary);
}

.racer-card__portrait {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt);
}

.racer-card__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.racer-card__body { padding: 1.25rem; }

.racer-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.stat-cell {
  text-align: center;
  background: var(--bg-alt);
  padding: 0.4rem;
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
}

.stat-cell .grade {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
  letter-spacing: 0.04em;
}

.stat-cell .grade--b { color: var(--text); }
.stat-cell .grade--c { color: var(--secondary); }

.stat-cell .attr {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.racer-card__bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   Trivia Asides
   -------------------------------------------------------------------------- */
aside.trivia {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

aside.trivia::before {
  content: 'F';
  display: inline-block;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  line-height: 22px;
  text-align: center;
  position: absolute;
  top: 1rem;
  left: -12px;
}

aside.trivia p { font-size: 0.91rem; color: var(--text); margin: 0; }
aside.trivia strong { color: var(--accent); }

/* --------------------------------------------------------------------------
   Dev Quotes
   -------------------------------------------------------------------------- */
blockquote.dev-quote {
  border-left: 3px solid var(--secondary);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: var(--secondary-dim);
  font-style: italic;
}

blockquote.dev-quote p {
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

blockquote.dev-quote cite {
  font-size: 0.8rem;
  color: var(--secondary);
  font-style: normal;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   YouTube Embeds
   -------------------------------------------------------------------------- */
.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid var(--border-accent);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.video-card__label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.video-card__wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  overflow: hidden;
  border: 1px solid var(--border-accent);
}

.video-card__wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card__title {
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
}

.video-card__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Filter Bar
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.35rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}

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

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

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
  background: var(--bg-alt);
}

.gallery-item:hover {
  border-color: var(--border-accent);
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Timeline (history)
   -------------------------------------------------------------------------- */
.timeline { padding: 0; list-style: none; }

.timeline-entry {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 3rem;
}

.timeline-entry::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: -3rem;
  width: 1px;
  background: var(--border-accent);
}

.timeline-entry:last-child::before { display: none; }

.timeline-dot {
  position: absolute;
  left: 4px;
  top: 0.4rem;
  width: 14px;
  height: 14px;
  background: var(--accent);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-year {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 0.2rem;
}

.timeline-entry h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.timeline-img {
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border-accent);
  margin: 1rem 0;
}

/* --------------------------------------------------------------------------
   Track list (flagship)
   -------------------------------------------------------------------------- */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.track-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 1rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: border-color 0.2s;
}

.track-card:hover { border-color: var(--border-accent); }

.track-card__name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.track-card__tracks {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
}

.track-card__desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Machine stat table
   -------------------------------------------------------------------------- */
.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.machine-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: border-color 0.2s;
}

.machine-card:hover { border-color: var(--border-accent); }

.machine-card__name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.machine-card__pilot {
  font-size: 0.78rem;
  color: var(--secondary);
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.machine-stats-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.grade-pill {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.grade-pill span {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: block;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Placeholder
   -------------------------------------------------------------------------- */
.placeholder {
  background: var(--bg-card);
  border: 1px dashed var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
  text-align: center;
  padding: 1rem;
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 4, 26, 0.96);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lb-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
  cursor: default;
}

.lb-inner img {
  max-width: 100%;
  max-height: 80vh;
  border: 1px solid var(--border-accent);
  box-shadow: 0 0 60px rgba(0,255,255,0.1);
}

.lb-close {
  position: absolute;
  top: -2rem;
  right: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.lb-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-family: var(--font-heading);
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Easter Egg Overlay
   -------------------------------------------------------------------------- */
.easter-egg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 4, 26, 0.97);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.easter-egg-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--accent);
  letter-spacing: 0.15em;
  animation: glow-pulse 1.5s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.easter-egg-sub-title {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 3vw, 2rem);
  color: var(--secondary);
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}

.easter-egg-text {
  font-size: 1rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  letter-spacing: 0.12em;
  margin-top: 1rem;
}

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

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Page Hero (inner pages)
   -------------------------------------------------------------------------- */
.page-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-accent);
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 18px,
    rgba(0,255,255,0.02) 18px,
    rgba(0,255,255,0.02) 20px
  );
  animation: speed-lines 4s linear infinite;
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Two-col layout
   -------------------------------------------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */
.mt-sm { margin-top: 0.75rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 3rem; }
.mb-sm { margin-bottom: 0.75rem; }
.mb-md { margin-bottom: 1.5rem; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-secondary { color: var(--secondary); }
.font-heading { font-family: var(--font-heading); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Mode 7 info box
   -------------------------------------------------------------------------- */
.mode7-box {
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  padding: 1.5rem;
  margin: 2rem 0;
}

.mode7-box h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  opacity: 0.5;
}
