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

html {
  scroll-behavior: smooth;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: #000810;
}

/* ─── Design Tokens ──────────────────────────────────────────── */
:root {
  --c-bg:           #000810;
  --c-panel-bg:     #00091a;
  --c-border:       #1a6ea8;
  --c-border-dim:   #0d3a5a;
  --c-accent:       #00c8ff;
  --c-accent-dim:   rgba(0, 200, 255, 0.15);
  --c-text-primary: #c8e8ff;
  --c-text-dim:     #4a7a9b;
  --c-text-label:   #7ab8d4;
  --c-danger:       #ff4040;
  --c-danger-dim:   rgba(255, 64, 64, 0.15);
  --c-gold:         #c8a832;
  --c-gold-dim:     rgba(200, 168, 50, 0.15);
  --c-success:      #40c880;

  --font-primary:  'Share Tech Mono', 'Courier New', monospace;
  --font-display:  'Orbitron', 'Arial Narrow', sans-serif;
  --font-codex:    'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  /* Bode's Galaxy brand palette */
  --c-cream:   #F0E8D8;
  --c-ink:     #1A1612;
  --c-red:     #7A1F1F;
  --c-paper:   #2A241E;
  --c-galaxy:  #0B6F8F;

  --chamfer: 8px;
  --panel-border-width: 1px;
  --panel-glow:         0 0 8px rgba(0, 200, 255, 0.2);
  --panel-glow-active:  0 0 16px rgba(0, 200, 255, 0.45);
}

/* ─── Base Typography ─────────────────────────────────────────── */
body {
  font-family: var(--font-primary);
  font-size: 14px;
  color: var(--c-text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a:hover {
  color: #fff;
}

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

/* ─── Scanline Overlay ────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 200, 255, 0.015) 2px,
    rgba(0, 200, 255, 0.015) 4px
  );
}

/* ─── Three.js Canvas ─────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ─── Panel Component ─────────────────────────────────────────── */
.kp-panel {
  background: var(--c-panel-bg);
  border: var(--panel-border-width) solid var(--c-border);
  box-shadow: var(--panel-glow);
  clip-path: polygon(
    var(--chamfer) 0%,
    100% 0%,
    100% calc(100% - var(--chamfer)),
    calc(100% - var(--chamfer)) 100%,
    0% 100%,
    0% var(--chamfer)
  );
  padding: 16px 20px;
  position: relative;
}

/* ─── Button Component ────────────────────────────────────────── */
.kp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: var(--panel-border-width) solid var(--c-border);
  color: var(--c-text-primary);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  clip-path: polygon(
    var(--chamfer) 0%,
    100% 0%,
    100% calc(100% - var(--chamfer)),
    calc(100% - var(--chamfer)) 100%,
    0% 100%,
    0% var(--chamfer)
  );
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.kp-btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-dim);
  box-shadow: var(--panel-glow-active);
}

.kp-btn--primary {
  border-color: var(--c-accent);
  color: var(--c-accent);
  box-shadow: var(--panel-glow);
}

.kp-btn--lg {
  padding: 14px 28px;
  font-size: 14px;
}

.kp-btn--xl {
  padding: 18px 40px;
  font-size: 16px;
  gap: 12px;
}

.kp-btn--nav {
  padding: 8px 16px;
  font-size: 11px;
}

/* ─── ProgressBar ─────────────────────────────────────────────── */
.kp-progressbar {
  width: 100%;
  height: 6px;
  background: var(--c-border-dim);
  clip-path: polygon(4px 0%, 100% 0%, calc(100% - 4px) 100%, 0% 100%);
  overflow: hidden;
  position: relative;
  flex: 1;
}

.kp-progressbar__fill {
  height: 100%;
  background: var(--c-accent);
  transition: width 0.6s ease;
}

/* ─── Navbar ──────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.navbar--scrolled {
  background: rgba(0, 9, 26, 0.95);
  border-bottom-color: var(--c-border-dim);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-text-primary);
}

.navbar__logo:hover {
  color: var(--c-accent);
}

.navbar__wordmark {
  font-family: var(--font-codex);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar__links a {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  transition: color 0.15s;
}

.navbar__links a:hover {
  color: var(--c-accent);
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.navbar__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--c-text-primary);
  transition: transform 0.3s, opacity 0.3s;
}

.navbar__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 40px;
}

.hero__content {
  max-width: 700px;
}

.hero__mark {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--c-cream);
  opacity: 0.92;
  filter: drop-shadow(0 0 18px rgba(11, 111, 143, 0.4));
}

.hero__mark svg {
  width: clamp(80px, 12vw, 120px);
  height: auto;
}

.hero__title {
  font-family: var(--font-codex);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--c-cream);
  text-shadow:
    0 0 30px rgba(240, 232, 216, 0.18),
    0 2px 0 rgba(0, 0, 0, 0.4);
  animation: titleGlow 3s ease-in-out infinite alternate;
  margin-bottom: 16px;
}

@keyframes titleGlow {
  from {
    text-shadow:
      0 0 20px rgba(0, 200, 255, 0.3),
      0 0 60px rgba(0, 200, 255, 0.1);
  }
  to {
    text-shadow:
      0 0 30px rgba(0, 200, 255, 0.6),
      0 0 80px rgba(0, 200, 255, 0.25),
      0 0 120px rgba(0, 200, 255, 0.1);
  }
}

.hero__phonetic {
  font-family: var(--font-primary);
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  color: var(--c-galaxy);
  letter-spacing: 0.15em;
  margin-top: 6px;
  margin-bottom: 14px;
  opacity: 0.85;
}

.hero__beta {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 1.2vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.4em;
  padding: 6px 18px;
  margin: 0 auto 18px;
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.18);
}

:root[data-skin="cartography"] .hero__beta {
  border-color: rgba(232, 212, 160, 0.55);
  background: rgba(40, 25, 12, 0.35);
  color: var(--c-accent);
}

.hero__subtitle {
  font-family: var(--font-codex);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--c-cream);
  letter-spacing: 0.08em;
  opacity: 0.9;
  margin-bottom: 18px;
}

.hero__registry {
  font-family: var(--font-primary);
  font-size: clamp(0.65rem, 1.1vw, 0.78rem);
  color: var(--c-text-dim);
  letter-spacing: 0.3em;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  color: var(--c-text-dim);
  letter-spacing: 0.3em;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: 15px;
  color: var(--c-text-label);
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 32px;
  color: var(--c-text-dim);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* ─── Sections ────────────────────────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}

.section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section__heading {
  font-family: var(--font-codex);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 700;
  color: var(--c-cream);
  letter-spacing: 0.2em;
  margin-bottom: 48px;
  position: relative;
}

.section__heading--center {
  text-align: center;
}

.section__heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--c-accent);
  margin-top: 12px;
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.4);
}

.section__heading--center::after {
  margin-left: auto;
  margin-right: auto;
}

/* ─── Overview ────────────────────────────────────────────────── */
.overview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.overview__text p {
  font-size: 15px;
  color: var(--c-text-label);
  line-height: 1.8;
  margin-bottom: 16px;
}

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

.overview__viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#ship-canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--c-border-dim);
  background: rgba(0, 8, 16, 0.6);
  cursor: grab;
}

#ship-canvas:active {
  cursor: grabbing;
}

.ship-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.ship-selector__btn {
  background: transparent;
  border: 1px solid var(--c-border-dim);
  color: var(--c-text-dim);
  font-family: var(--font-primary);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.ship-selector__btn:hover,
.ship-selector__btn.active {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: var(--c-accent-dim);
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.2);
}

/* ─── Features Grid ───────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--panel-glow-active);
}

.feature-card__icon {
  font-size: 28px;
  color: var(--c-accent);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 6px rgba(0, 200, 255, 0.4));
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--c-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.feature-card__desc {
  font-size: 13px;
  color: var(--c-text-dim);
  line-height: 1.6;
}

/* ─── Fleet Carousel ──────────────────────────────────────────── */
.fleet-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--c-border-dim) transparent;
}

.fleet-carousel::-webkit-scrollbar {
  height: 6px;
}

.fleet-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.fleet-carousel::-webkit-scrollbar-thumb {
  background: var(--c-border-dim);
  border-radius: 3px;
}

.fleet-card {
  min-width: 280px;
  max-width: 300px;
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fleet-card__class {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 2px 8px;
  border: 1px solid var(--c-accent);
  display: inline-block;
  align-self: flex-start;
}

.fleet-card__class--trader { color: var(--c-gold); border-color: var(--c-gold); }
.fleet-card__class--explorer { color: var(--c-success); border-color: var(--c-success); }
.fleet-card__class--combatant { color: var(--c-danger); border-color: var(--c-danger); }
.fleet-card__class--leisure { color: #c8a8ff; border-color: #c8a8ff; }

.fleet-card__name {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--c-text-primary);
  letter-spacing: 0.05em;
}

.fleet-card__desc {
  font-size: 12px;
  color: var(--c-text-dim);
  line-height: 1.5;
}

.fleet-card__stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-row__label {
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--c-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 60px;
  flex-shrink: 0;
}

.stat-row__val {
  font-size: 11px;
  color: var(--c-text-primary);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

.fleet-card__price {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--c-gold);
  letter-spacing: 0.08em;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--c-border-dim);
}

/* ─── Gallery ─────────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--c-border-dim);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.gallery__item:hover {
  border-color: var(--c-accent);
  box-shadow: var(--panel-glow-active);
  transform: scale(1.02);
}

.gallery__item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(transparent, rgba(0, 8, 16, 0.9));
}

/* ─── Lightbox ────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 8, 16, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(8px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--c-text-primary);
  font-size: 36px;
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
}

.lightbox__close:hover {
  color: var(--c-accent);
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid var(--c-border);
  box-shadow: var(--panel-glow-active);
}

/* ─── Timeline ────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 700px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c-border-dim);
}

.timeline__entry {
  position: relative;
  margin-bottom: 32px;
}

.timeline__entry:last-child {
  margin-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -28px;
  top: 16px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--c-accent);
  background: var(--c-bg);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.4);
}

.timeline__card {
  padding: 20px 24px;
}

.timeline__version {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--c-accent);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.timeline__date {
  font-size: 12px;
  color: var(--c-text-dim);
  margin-bottom: 12px;
}

.timeline__changes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline__changes li {
  font-size: 13px;
  color: var(--c-text-label);
  padding-left: 16px;
  position: relative;
}

.timeline__changes li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--c-accent);
  font-family: var(--font-primary);
}

/* ─── Download Section ────────────────────────────────────────── */
.download-section {
  text-align: center;
  padding: 120px 24px;
}

.download__sub {
  font-size: 16px;
  color: var(--c-text-dim);
  margin-bottom: 40px;
}

.download__buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Footer ──────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  background: var(--c-panel-bg);
  border-top: 1px solid var(--c-border-dim);
  padding: 32px 24px;
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--c-text-dim);
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  font-size: 12px;
  color: var(--c-text-dim);
}

.footer__links a:hover {
  color: var(--c-accent);
}

.footer__social {
  display: flex;
  gap: 16px;
}

.footer__social a {
  color: var(--c-text-dim);
  transition: color 0.15s, transform 0.15s;
}

.footer__social a:hover {
  color: var(--c-accent);
  transform: translateY(-2px);
}

/* ─── Reveal Animation ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .overview__viewer {
    order: -1;
  }
}

@media (max-width: 768px) {
  .navbar__hamburger {
    display: flex;
  }

  .navbar__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(0, 9, 26, 0.98);
    border-left: 1px solid var(--c-border-dim);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right 0.3s ease;
    backdrop-filter: blur(16px);
  }

  .navbar__links.open {
    right: 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery__item img {
    height: 180px;
  }

  .hero__title {
    letter-spacing: 0.1em;
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .fleet-card {
    min-width: 260px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 60px 16px;
  }

  .download-section {
    padding: 80px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__title {
    animation: none;
  }

  .hero__scroll-indicator {
    animation: none;
  }
}

/* ─── Trailer Reel (placeholder) ───────────────────────────── */
.reel {
  position: relative;
  margin: 24px auto 0;
  max-width: 1100px;
}

.reel__badge {
  position: absolute;
  top: -12px;
  left: 16px;
  z-index: 5;
  padding: 4px 12px;
  background: var(--c-bg);
  border: 1px solid var(--c-accent);
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--c-accent);
  box-shadow: var(--panel-glow);
}

.reel__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: var(--c-panel-bg);
  border: 1px solid var(--c-border);
  box-shadow: var(--panel-glow);
}

.reel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.reel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: opacity, transform;
  animation: reel-slide 18s ease-in-out infinite;
}

.reel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reel__slide--1 { animation-name: reel-slide-1; }
.reel__slide--2 { animation-name: reel-slide-2; }
.reel__slide--3 { animation-name: reel-slide-3; }

@keyframes reel-slide-1 {
  0%   { opacity: 1; transform: scale(1.00); }
  30%  { opacity: 1; transform: scale(1.06); }
  35%  { opacity: 0; transform: scale(1.06); }
  95%  { opacity: 0; transform: scale(1.00); }
  100% { opacity: 1; transform: scale(1.00); }
}

@keyframes reel-slide-2 {
  0%   { opacity: 0; transform: scale(1.06); }
  30%  { opacity: 0; transform: scale(1.00); }
  35%  { opacity: 1; transform: scale(1.00); }
  63%  { opacity: 1; transform: scale(1.06); }
  68%  { opacity: 0; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.06); }
}

@keyframes reel-slide-3 {
  0%   { opacity: 0; transform: scale(1.06); }
  63%  { opacity: 0; transform: scale(1.00); }
  68%  { opacity: 1; transform: scale(1.00); }
  96%  { opacity: 1; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.06); }
}

.reel__caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  padding: 10px 18px;
  background: rgba(0, 8, 16, 0.75);
  border-left: 2px solid var(--c-accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--c-text-primary);
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.reel__caption-label {
  display: inline-block;
  margin-right: 8px;
  color: var(--c-accent);
  font-size: 11px;
}

.reel__scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 200, 255, 0) 0px,
    rgba(0, 200, 255, 0) 2px,
    rgba(0, 200, 255, 0.04) 3px,
    rgba(0, 200, 255, 0) 4px
  );
  mix-blend-mode: screen;
}

.reel__corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reel__corners span {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--c-accent);
  box-shadow: 0 0 6px rgba(0, 200, 255, 0.5);
}

.reel__corners span:nth-child(1) { top: 8px;    left: 8px;    border-right: none;  border-bottom: none; }
.reel__corners span:nth-child(2) { top: 8px;    right: 8px;   border-left: none;   border-bottom: none; }
.reel__corners span:nth-child(3) { bottom: 8px; left: 8px;    border-right: none;  border-top: none;    }
.reel__corners span:nth-child(4) { bottom: 8px; right: 8px;   border-left: none;   border-top: none;    }

.reel__sub {
  margin-top: 20px;
  text-align: center;
  font-family: var(--font-primary);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--c-text-dim);
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .reel__caption {
    left: 12px;
    bottom: 12px;
    padding: 8px 12px;
    font-size: 11px;
  }
  .reel__corners span { width: 12px; height: 12px; }
  .reel__badge { font-size: 10px; padding: 3px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .reel__slide,
  .reel__slide--1,
  .reel__slide--2,
  .reel__slide--3 {
    animation: none;
  }
  .reel__slide--1 { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
 * SKIN: cartography
 *
 * Old-map / parchment aesthetic. Flips the core design tokens so
 * components that read from var(--c-bg), var(--c-accent), etc.
 * inherit the new palette automatically. A handful of components
 * with hardcoded cyan glows need direct overrides; those follow
 * below the token block.
 *
 * Port of the game-client cartography skin (ux-skins.css:447-749).
 * ═════════════════════════════════════════════════════════════ */

:root[data-skin="cartography"] {
  /* Palette — dark tan-leather, warm cream text, gold accents.
   * Matches the game's main-menu treatment in cartography mode
   * (ux-skins.css `.main-menu-screen`). */
  --c-bg:           #4a3520;
  --c-panel-bg:     #3a2818;
  --c-border:       #b89a70;
  --c-border-dim:   #7a5230;
  --c-accent:       #d8b870;
  --c-accent-dim:   rgba(216, 184, 112, 0.15);
  --c-text-primary: #e8d4a0;
  --c-text-dim:     rgba(232, 212, 160, 0.7);
  --c-text-label:   #d8b870;
  --c-danger:       #c8484a;
  --c-danger-dim:   rgba(200, 72, 74, 0.18);
  --c-gold:         #d8b870;
  --c-gold-dim:     rgba(216, 184, 112, 0.18);
  --c-success:      #8aa86a;

  --font-primary:  'IM Fell English', 'Special Elite', Georgia, serif;
  --font-display:  'IM Fell English SC', 'IM Fell English', 'Special Elite', Georgia, serif;
  --font-codex:    'IM Fell English SC', 'IM Fell English', Georgia, 'Times New Roman', serif;
  --font-marquee:  'Tangerine', 'IM Fell English SC', Georgia, cursive;

  --chamfer: 0px;
  --panel-glow:         0 1px 3px rgba(58, 36, 16, 0.18);
  --panel-glow-active:  0 2px 6px rgba(58, 36, 16, 0.28);
}

/* Page background — medium tan-leather with warm noise + vignette,
 * matching the game's cartography main-menu backdrop. */
:root[data-skin="cartography"] html,
:root[data-skin="cartography"] body {
  background: var(--c-bg);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.85  0 0 0 0 0.65  0 0 0 0 0.35  0 0 0 0.08 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse at center, rgba(120, 80, 35, 0.30) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(20, 10, 5, 0.55) 100%);
  background-attachment: fixed, fixed, fixed;
}

/* Three.js canvas under cartography renders warm-cream stars on the
 * dark-leather background. Screen blend so lights add up, darks vanish. */
:root[data-skin="cartography"] #bg-canvas {
  mix-blend-mode: screen;
  opacity: 0.9;
}

:root[data-skin="cartography"] body {
  color: var(--c-text-primary);
}

:root[data-skin="cartography"] a {
  color: var(--c-accent);
}
:root[data-skin="cartography"] a:hover {
  color: #f8eccc;
}

:root[data-skin="cartography"] body::before,
:root[data-skin="cartography"] body::after {
  display: none;
}

/* Navbar — dark leather strip across the top */
:root[data-skin="cartography"] .navbar {
  background: rgba(42, 24, 12, 0.78);
  border-bottom-color: var(--c-border-dim);
  backdrop-filter: blur(8px);
}
:root[data-skin="cartography"] .navbar--scrolled {
  background: rgba(30, 18, 10, 0.92);
}
:root[data-skin="cartography"] .navbar__logo,
:root[data-skin="cartography"] .navbar__icon {
  color: var(--c-accent);
}
:root[data-skin="cartography"] .navbar__wordmark {
  color: var(--c-text-primary);
  font-family: var(--font-display);
}
:root[data-skin="cartography"] .navbar__links a {
  color: var(--c-text-primary);
}
:root[data-skin="cartography"] .navbar__links a:hover {
  color: var(--c-accent);
}
:root[data-skin="cartography"] .navbar__hamburger span {
  background: var(--c-text-primary);
}

/* Hero */
:root[data-skin="cartography"] .hero {
  background: transparent;
}
:root[data-skin="cartography"] .hero__mark {
  color: var(--c-accent);
  filter: none;
  opacity: 1;
}
:root[data-skin="cartography"] .hero__title {
  color: var(--c-text-primary);
  text-shadow: none;
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  animation: none;
}
:root[data-skin="cartography"] .hero__phonetic {
  color: var(--c-text-dim);
  font-family: var(--font-primary);
  font-style: italic;
}
:root[data-skin="cartography"] .hero__subtitle {
  color: var(--c-accent);
  font-family: var(--font-marquee);
  font-style: normal;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55);
}

:root[data-skin="cartography"] .hero__title {
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.55),
    0 0 12px rgba(0, 0, 0, 0.30);
}
:root[data-skin="cartography"] .hero__registry {
  color: var(--c-text-dim);
}
:root[data-skin="cartography"] .hero__tagline {
  color: var(--c-text-label);
  font-family: var(--font-display);
}
:root[data-skin="cartography"] .hero__sub {
  color: var(--c-text-primary);
}
:root[data-skin="cartography"] .hero__scroll-indicator {
  color: var(--c-accent);
}

/* Buttons — cream-bordered on dark leather, brighten on hover */
:root[data-skin="cartography"] .kp-btn {
  background: rgba(40, 25, 12, 0.55);
  border-color: rgba(232, 212, 160, 0.55);
  color: var(--c-text-primary);
  border-radius: 0;
}
:root[data-skin="cartography"] .kp-btn:hover:not(:disabled) {
  background: rgba(216, 184, 112, 0.20);
  color: #f8eccc;
  border-color: var(--c-accent);
  box-shadow: 0 0 14px rgba(216, 184, 112, 0.30);
}
:root[data-skin="cartography"] .kp-btn--primary {
  background: rgba(40, 25, 12, 0.65);
  border-color: var(--c-accent);
  color: #f0dcb0;
  border-width: 2px;
}
:root[data-skin="cartography"] .kp-btn--primary:hover:not(:disabled) {
  background: var(--c-accent);
  border-color: #f0dcb0;
  color: #2a1d12;
}

/* Section headings */
:root[data-skin="cartography"] .section__heading {
  color: var(--c-text-primary);
  font-family: var(--font-display);
  text-shadow: none;
}
:root[data-skin="cartography"] .section__heading::after {
  background: var(--c-accent);
  box-shadow: none;
}

/* Panels */
:root[data-skin="cartography"] .kp-panel {
  background: var(--c-panel-bg);
  border-color: var(--c-border);
  box-shadow: var(--panel-glow);
}

/* Trailer reel */
:root[data-skin="cartography"] .reel__badge {
  background: var(--c-bg);
  color: var(--c-accent);
  border-color: var(--c-accent);
  font-family: var(--font-primary);
  box-shadow: none;
}
:root[data-skin="cartography"] .reel__frame {
  background: var(--c-panel-bg);
  border-color: var(--c-border);
  box-shadow: var(--panel-glow);
}
:root[data-skin="cartography"] .reel__scanline {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(232, 212, 160, 0.05) 3px,
    transparent 4px
  );
  mix-blend-mode: screen;
}
:root[data-skin="cartography"] .reel__corners span {
  border-color: var(--c-accent);
  box-shadow: none;
}
:root[data-skin="cartography"] .reel__caption {
  background: rgba(30, 18, 10, 0.78);
  color: var(--c-text-primary);
  border-left-color: var(--c-accent);
  font-family: var(--font-display);
  backdrop-filter: blur(2px);
}
:root[data-skin="cartography"] .reel__caption-label {
  color: var(--c-accent);
}
:root[data-skin="cartography"] .reel__sub {
  color: var(--c-text-dim);
  font-family: var(--font-primary);
  font-style: italic;
}

/* Ship viewer */
:root[data-skin="cartography"] #ship-canvas {
  background: var(--c-panel-bg);
  border: 1px solid var(--c-border);
  box-shadow: var(--panel-glow);
}
:root[data-skin="cartography"] .ship-selector__btn {
  background: rgba(30, 18, 10, 0.45);
  border-color: var(--c-border-dim);
  color: var(--c-text-primary);
  border-radius: 0;
}
:root[data-skin="cartography"] .ship-selector__btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}
:root[data-skin="cartography"] .ship-selector__btn.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #2a1d12;
}

/* Feature/fleet cards */
:root[data-skin="cartography"] .feature-card__icon,
:root[data-skin="cartography"] .fleet-card__class {
  color: var(--c-accent);
}
:root[data-skin="cartography"] .feature-card__title,
:root[data-skin="cartography"] .fleet-card__name {
  font-family: var(--font-display);
  color: var(--c-text-primary);
}
:root[data-skin="cartography"] .feature-card__desc,
:root[data-skin="cartography"] .fleet-card__desc {
  color: var(--c-text-primary);
}
:root[data-skin="cartography"] .stat-row__label {
  color: var(--c-text-dim);
}
:root[data-skin="cartography"] .stat-row__val {
  color: var(--c-text-primary);
  font-family: var(--font-primary);
}
:root[data-skin="cartography"] .kp-progressbar {
  background: rgba(30, 18, 10, 0.55);
}
:root[data-skin="cartography"] .kp-progressbar__fill {
  background: var(--c-accent);
  box-shadow: none;
}
:root[data-skin="cartography"] .fleet-card__price {
  color: var(--c-gold);
  font-family: var(--font-display);
}

/* Gallery */
:root[data-skin="cartography"] .gallery__item {
  border-color: var(--c-border);
  box-shadow: var(--panel-glow);
}
:root[data-skin="cartography"] .gallery__caption {
  background: rgba(30, 18, 10, 0.85);
  color: var(--c-text-primary);
  font-family: var(--font-display);
}
:root[data-skin="cartography"] .lightbox {
  background: rgba(42, 28, 12, 0.92);
}

/* News timeline */
:root[data-skin="cartography"] .timeline__item {
  border-left-color: var(--c-accent);
}
:root[data-skin="cartography"] .timeline__date {
  color: var(--c-text-dim);
  font-family: var(--font-primary);
}
:root[data-skin="cartography"] .timeline__title {
  color: var(--c-text-primary);
  font-family: var(--font-display);
}

/* Download */
:root[data-skin="cartography"] .download__sub {
  color: var(--c-text-dim);
}

/* Footer */
:root[data-skin="cartography"] .footer {
  border-top: 1px solid var(--c-border-dim);
  background: rgba(30, 18, 10, 0.55);
}
:root[data-skin="cartography"] .footer__icon path:nth-child(1) { fill: var(--c-accent); }
:root[data-skin="cartography"] .footer__icon path:nth-child(2) { fill: #b89a70; }
:root[data-skin="cartography"] .footer__brand,
:root[data-skin="cartography"] .footer__copyright {
  color: var(--c-text-primary);
}
:root[data-skin="cartography"] .footer__links a,
:root[data-skin="cartography"] .footer__social a {
  color: var(--c-text-dim);
}
:root[data-skin="cartography"] .footer__links a:hover,
:root[data-skin="cartography"] .footer__social a:hover {
  color: var(--c-accent);
}

/* Skin toggle */
.skin-toggle {
  display: inline-block;
  margin-left: 14px;
  padding: 0 8px;
  font-family: var(--font-primary);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.2s;
}
.skin-toggle:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
 * Request Invitation form
 * Token-based so it inherits codex or cartography automatically.
 * ═════════════════════════════════════════════════════════════ */
.invite__lede {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 36px;
  color: var(--c-text-label);
  font-size: 15px;
  line-height: 1.7;
}

.invite-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.invite-form__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.invite-form__row label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--c-text-label);
}

.invite-form__row input,
.invite-form__row textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--c-panel-bg);
  border: 1px solid var(--c-border);
  color: var(--c-text-primary);
  font-family: var(--font-primary);
  font-size: 14px;
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.invite-form__row textarea {
  resize: vertical;
  min-height: 90px;
}

.invite-form__row input:focus,
.invite-form__row textarea:focus {
  border-color: var(--c-accent);
}

.invite-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.invite-form__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.invite-form__status {
  text-align: center;
  font-family: var(--font-primary);
  font-size: 13px;
  color: var(--c-text-dim);
  min-height: 1.4em;
  letter-spacing: 0.05em;
}

/* Cartography softens the field surfaces (panel bg is dark on dark leather). */
:root[data-skin="cartography"] .invite-form__row input,
:root[data-skin="cartography"] .invite-form__row textarea {
  background: rgba(20, 12, 6, 0.55);
  border-color: rgba(232, 212, 160, 0.4);
}
:root[data-skin="cartography"] .invite-form__row input:focus,
:root[data-skin="cartography"] .invite-form__row textarea:focus {
  background: rgba(20, 12, 6, 0.75);
  border-color: var(--c-accent);
}
