/* ==========================================================================
   TRAIN TRACKS — OFFICIAL STYLESHEET
   Impeccable editorial railway design, fluid responsiveness, native Apple polish
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400;1,6..72,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  /* Color Palette */
  --pine-950: #0a1710;
  --pine-900: #102419;
  --pine-850: #142e20;
  --pine-800: #1c3d2c;
  --pine-700: #244e38;
  --pine-600: #31684c;
  --pine-100: #e2ede6;
  --pine-50:  #f0f6f2;

  --brass-500: #c6923b;
  --brass-400: #d8a54d;
  --brass-300: #eac070;
  --brass-600: #a77728;
  --brass-light: rgba(198, 146, 59, 0.12);

  --crimson-500: #be3226;
  --crimson-400: #d64539;

  --paper-bg: #f8f6f0;
  --paper-card: #ffffff;
  --paper-card-subtle: #fbf9f4;
  --paper-border: #e3ded4;
  --paper-border-strong: #cac3b5;

  --text-main: #19241e;
  --text-muted: #57655d;
  --text-subtle: #7d8b83;
  --text-inverse: #f4f7f4;

  /* Typography */
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(16, 36, 25, 0.06), 0 1px 2px rgba(16, 36, 25, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 36, 25, 0.08), 0 2px 4px rgba(16, 36, 25, 0.04);
  --shadow-lg: 0 12px 28px rgba(16, 36, 25, 0.12), 0 4px 10px rgba(16, 36, 25, 0.06);
  --shadow-xl: 0 24px 48px rgba(16, 36, 25, 0.16), 0 8px 18px rgba(16, 36, 25, 0.08);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --tr-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --tr-med: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --tr-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Container */
  --container-max: 1200px;
  --container-narrow: 840px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--paper-bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

/* Typography styles */
h1, h2, h3, h4 {
  color: var(--pine-900);
  line-height: 1.2;
  font-weight: 600;
}

.serif-headline {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--pine-800);
  text-decoration: none;
  transition: color var(--tr-fast);
}

a:hover {
  color: var(--brass-600);
}

/* Badges & Eyebrows */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-600);
  background: var(--brass-light);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(198, 146, 59, 0.25);
  margin-bottom: 1rem;
}

.eyebrow-pine {
  color: var(--pine-700);
  background: var(--pine-50);
  border-color: var(--pine-100);
}

/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 240, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--paper-border);
  transition: background var(--tr-fast), border-color var(--tr-fast);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: transform var(--tr-fast);
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.03);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--pine-900);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--pine-800);
  position: relative;
  padding: 0.3rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brass-500);
  transition: width var(--tr-fast);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--pine-800) 0%, var(--pine-950) 100%);
  color: #ffffff !important;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(16, 36, 25, 0.25);
  transition: all var(--tr-fast);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 36, 25, 0.35);
  background: linear-gradient(135deg, var(--pine-700) 0%, var(--pine-900) 100%);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--paper-card);
  color: var(--pine-900) !important;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--paper-border-strong);
  transition: all var(--tr-fast);
}

.btn-cta-secondary:hover {
  background: var(--paper-card-subtle);
  border-color: var(--brass-500);
  color: var(--brass-600) !important;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--pine-900);
  cursor: pointer;
  padding: 0.4rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
  background: var(--paper-bg);
}

.hero-backdrop-graphic {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.46;
  background-image: url('/assets/09-interface-and-effects/paywall_hero.avif');
  background-size: cover;
  background-position: center 48%;
  pointer-events: none;
}

.hero-scrim {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(250, 247, 242, 0.94) 0%,
    rgba(250, 247, 242, 0.85) 36%,
    rgba(250, 247, 242, 0.45) 68%,
    rgba(250, 247, 242, 0.2) 100%
  );
}

@media (max-width: 900px) {
  .hero-scrim {
    background: linear-gradient(
      180deg,
      rgba(250, 247, 242, 0.95) 0%,
      rgba(250, 247, 242, 0.90) 50%,
      rgba(250, 247, 242, 0.65) 80%,
      rgba(250, 247, 242, 0.35) 100%
    );
  }
}

.hero-rail-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-linear-gradient(90deg, #c4b9a7 0px, #c4b9a7 8px, transparent 8px, transparent 18px),
              linear-gradient(to bottom, #746d61 0, #746d61 3px, transparent 3px, transparent 9px, #746d61 9px, #746d61 12px);
  opacity: 0.35;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 640px;
}

.hero-title {
  font-size: clamp(2.35rem, 5vw, 3.85rem);
  line-height: 1.12;
  color: var(--pine-950);
  margin-bottom: 1.25rem;
}

.hero-title span.accent {
  color: var(--brass-600);
  font-style: italic;
}

.hero-description {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2.25rem;
}

.hero-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--paper-border);
}

.hero-spec-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-spec-item svg {
  color: var(--brass-500);
  flex-shrink: 0;
}

/* Hero Showcase Frame */
.hero-visual {
  position: relative;
}

.hero-card-frame {
  position: relative;
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.hero-card-inner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #142e20;
  aspect-ratio: 4 / 3.5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-scenic-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.hero-card-overlay {
  position: relative;
  z-index: 2;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.hero-app-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.8rem 0.4rem 0.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.hero-app-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.hero-app-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pine-950);
  line-height: 1.1;
}

.hero-app-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hero-animated-track-stage {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
  margin-top: auto;
}

.hero-locomotive-runner {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
}

.hero-steam-locomotive {
  position: absolute;
  bottom: 12px;
  left: -220px;
  width: 200px;
  height: auto;
  animation: locomotiveRun 14s linear infinite;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
}

@keyframes locomotiveRun {
  0% { left: -240px; transform: scaleX(1); }
  45% { left: calc(100% + 50px); transform: scaleX(1); }
  50% { left: calc(100% + 50px); transform: scaleX(-1); }
  95% { left: -240px; transform: scaleX(-1); }
  100% { left: -240px; transform: scaleX(1); }
}

.hero-track-bar {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 10px;
  background: repeating-linear-gradient(90deg, #d3c7b3 0, #d3c7b3 6px, transparent 6px, transparent 16px),
              linear-gradient(to bottom, #424242 0, #424242 2px, transparent 2px, transparent 7px, #424242 7px, #424242 9px);
}

/* Interactive Mini-Puzzle Demo Section */
.demo-section {
  padding: clamp(3.5rem, 6vw, 6rem) 0;
  background: #ffffff;
  border-top: 1px solid var(--paper-border);
  border-bottom: 1px solid var(--paper-border);
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* Playable Mini-Game Board */
.mini-game-container {
  max-width: 860px;
  margin: 0 auto;
  background: var(--paper-bg);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-lg);
}

.puzzle-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--paper-border);
}

.puzzle-level-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.puzzle-level-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  background: var(--pine-800);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.puzzle-level-title {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--pine-950);
}

.puzzle-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--tr-fast);
}

.tool-btn:hover {
  border-color: var(--brass-500);
  background: #fff;
}

.tool-btn.btn-hint {
  background: var(--brass-light);
  color: var(--brass-600);
  border-color: rgba(198, 146, 59, 0.4);
}

.tool-btn.btn-hint:hover {
  background: rgba(198, 146, 59, 0.2);
}

/* Grid Layout */
.puzzle-board-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.puzzle-board-frame {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--pine-800);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  user-select: none;
}

.puzzle-grid-table {
  display: grid;
  grid-template-columns: 44px repeat(5, minmax(46px, 58px));
  grid-template-rows: 44px repeat(5, minmax(46px, 58px));
  gap: 0;
  border: 2px solid #203c2a;
  border-radius: 8px;
  overflow: hidden;
  background: #e8e4da;
}

.col-header-cell,
.row-header-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--pine-900);
  background: var(--pine-50);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--tr-fast);
}

.col-header-cell.is-satisfied,
.row-header-cell.is-satisfied {
  background: #d1fae5;
  color: #065f46;
  position: relative;
}

.col-header-cell.is-satisfied::after,
.row-header-cell.is-satisfied::after {
  content: '✓';
  position: absolute;
  font-size: 0.65rem;
  top: 2px;
  right: 4px;
  color: #059669;
}

.col-header-cell.is-exceeded,
.row-header-cell.is-exceeded {
  background: #fee2e2;
  color: #991b1b;
}

.puzzle-grid-corner {
  background: var(--pine-50);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.puzzle-cell {
  background: #fdfbf7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: visible;
  padding: 0;
  margin: 0;
  transition: background-color var(--tr-fast);
}

.puzzle-cell:hover {
  background-color: #f5f2e9;
}

.puzzle-cell.cell-barrier {
  background-color: #f3f4f6;
  cursor: pointer;
}

.puzzle-cell.cell-barrier::before {
  content: '✕';
  font-size: 1.25rem;
  font-weight: 700;
  color: #9ca3af;
  z-index: 3;
}

.puzzle-cell.cell-track {
  background-color: #fdfbf7;
}

.puzzle-cell.cell-track .track-graphic {
  position: absolute;
  top: -1px;
  left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: fill;
  display: block;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}

.puzzle-cell.cell-start,
.puzzle-cell.cell-end {
  background: #fdfbf7;
}

.puzzle-cell .portal-label {
  position: absolute;
  bottom: 2px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(16, 36, 25, 0.88);
  padding: 1px 4px;
  border-radius: 3px;
  z-index: 4;
  pointer-events: none;
}

/* Solved Celebration Card */
.puzzle-status-banner {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.puzzle-completion-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.puzzle-completion-emoji {
  font-size: 1.75rem;
  line-height: 1;
  flex-shrink: 0;
}

.puzzle-completion-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #14532d;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.puzzle-completion-desc {
  font-size: 0.875rem;
  color: #166534;
  line-height: 1.5;
  margin: 0;
}

.puzzle-completion-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(134, 239, 172, 0.6);
}

.completion-appstore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #14532d;
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(20, 83, 45, 0.3);
  text-decoration: none;
  transition: all var(--tr-fast);
}

.completion-appstore-btn:hover {
  background: #166534;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 83, 45, 0.4);
}

.completion-replay-btn {
  font-size: 0.8125rem;
  padding: 0.5rem 0.85rem;
}

.puzzle-hint-callout {
  margin-top: 1rem;
  padding: 0.9rem 1.25rem;
  background: #fffbeb;
  border-left: 4px solid var(--brass-500);
  border-radius: 4px;
  font-size: 0.9375rem;
  color: #92400e;
  line-height: 1.5;
}

/* Hero Game Card Integration */
.hero-game-card {
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--paper-border-strong);
  background: var(--paper-card);
  padding: 1.25rem;
}

/* Single Journey Block: From England through Siberia to Japan */
.journey-section {
  padding: clamp(3.5rem, 6vw, 6rem) 0;
  background: var(--paper-bg);
  border-top: 1px solid var(--paper-border);
}

.journey-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.journey-card {
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--tr-med);
  display: flex;
  flex-direction: column;
}

.journey-card:hover {
  transform: translateY(-4px);
  border-color: var(--brass-400);
  box-shadow: var(--shadow-md);
}

.journey-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--pine-900);
  overflow: hidden;
}

.journey-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

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

.journey-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(16, 36, 25, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.journey-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.journey-card-era {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brass-600);
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.journey-card-title {
  font-size: 1.25rem;
  color: var(--pine-950);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.journey-card-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.journey-card-feature {
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--pine-800);
  background: var(--pine-50);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--pine-600);
}

/* Feature 2: Historical Train Fleet Depot */
.trains-section {
  padding: clamp(3.5rem, 6vw, 6rem) 0;
  background: #ffffff;
  border-top: 1px solid var(--paper-border);
  border-bottom: 1px solid var(--paper-border);
}

.train-hangar {
  margin-top: 2.5rem;
}

.train-selector-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.25rem;
  scrollbar-width: thin;
}

.train-pill-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--paper-bg);
  border: 1px solid var(--paper-border);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pine-900);
  cursor: pointer;
  transition: all var(--tr-fast);
}

.train-pill-btn:hover {
  border-color: var(--brass-500);
  background: #fff;
}

.train-pill-btn.is-active {
  background: var(--pine-900);
  color: #fff;
  border-color: var(--pine-900);
}

/* Train Spotlight Card */
.train-spotlight-card {
  background: radial-gradient(circle at 50% 10%, #204230 0%, #102419 80%);
  border-radius: var(--radius-xl);
  color: #ffffff;
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-xl);
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}

.train-spotlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 32px);
  pointer-events: none;
}

.train-profile-display {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 3rem) 0 1.5rem;
  position: relative;
  z-index: 2;
}

.train-profile-img {
  max-width: 90%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5));
  transition: transform var(--tr-med);
}

.train-profile-img:hover {
  transform: scale(1.03) translateY(-3px);
}

.train-rails-ground {
  width: 100%;
  height: 8px;
  background: repeating-linear-gradient(90deg, #8a7c64 0, #8a7c64 6px, transparent 6px, transparent 14px),
              linear-gradient(to bottom, #d4af37 0, #d4af37 2px, transparent 2px, transparent 6px, #d4af37 6px, #d4af37 8px);
  margin-top: 1rem;
  opacity: 0.65;
}

.train-topdown-composition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 1.5rem 0;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.topdown-train-sprite {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.train-details-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
}

.train-meta-header {
  margin-bottom: 1rem;
}

.train-era-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brass-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.train-name-title {
  color: #fff;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
}

.train-historical-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.train-specs-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.train-specs-table {
  width: 100%;
  border-collapse: collapse;
}

.train-specs-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.train-specs-table tr:last-child {
  border-bottom: none;
}

.train-specs-table td {
  padding: 0.65rem 0;
  font-size: 0.875rem;
}

.train-specs-table td.label {
  color: #94a3b8;
  font-weight: 500;
  width: 40%;
}

.train-specs-table td.val {
  color: #ffffff;
  font-weight: 600;
  text-align: right;
}

/* Feature 3: Mechanics & Terrain Grid */
.mechanics-section {
  padding: clamp(3.5rem, 6vw, 6rem) 0;
  background: var(--paper-bg);
}

.mechanics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.mechanic-card {
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--tr-med);
  display: flex;
  flex-direction: column;
}

.mechanic-card:hover {
  transform: translateY(-3px);
  border-color: var(--brass-400);
  box-shadow: var(--shadow-md);
}

.mechanic-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mechanic-icon-box {
  width: 60px;
  height: 60px;
  background: var(--pine-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pine-100);
  flex-shrink: 0;
}

.mechanic-icon-img {
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
}

.mechanic-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brass-600);
  background: var(--brass-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  margin-left: auto;
}

.mechanic-title {
  font-size: 1.25rem;
  color: var(--pine-950);
}

.mechanic-subtitle {
  font-size: 0.8125rem;
  color: var(--text-subtle);
  font-style: italic;
}

.mechanic-summary {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.mechanic-rule-box {
  margin-top: auto;
  background: var(--pine-50);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: var(--pine-800);
  border-left: 3px solid var(--pine-600);
}

/* Feature 4: Custom Games & Game Features Showcase */
.custom-section {
  padding: clamp(3.5rem, 6vw, 6rem) 0;
  background: #ffffff;
  border-top: 1px solid var(--paper-border);
}

.features-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.feature-bullet {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-check-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d1fae5;
  color: #065f46;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-bullet-title {
  font-weight: 700;
  color: var(--pine-950);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.feature-bullet-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.feature-visual-card {
  background: var(--pine-900);
  border-radius: var(--radius-xl);
  padding: 2rem;
  color: #fff;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.feature-visual-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(198, 146, 59, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

/* FAQ Accordion Section */
.faq-section {
  padding: clamp(3.5rem, 6vw, 6rem) 0;
  background: var(--paper-bg);
  border-top: 1px solid var(--paper-border);
}

.faq-accordion {
  max-width: 800px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--tr-fast);
}

.faq-item:hover {
  border-color: var(--brass-400);
}

.faq-question-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--pine-950);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--brass-500);
  transition: transform var(--tr-fast);
  flex-shrink: 0;
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer-content {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  display: none;
}

.faq-item.is-open .faq-answer-content {
  display: block;
}

/* Download CTA Banner */
.app-cta-banner {
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
  background: linear-gradient(135deg, var(--pine-900) 0%, var(--pine-950) 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  position: relative;
  z-index: 2;
}

.cta-title {
  color: #ffffff;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  margin-bottom: 1rem;
}

.cta-desc {
  color: #cbd5e1;
  font-size: 1.125rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.cta-specs-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.cta-badge {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.cta-device-preview {
  text-align: center;
}

.cta-app-icon-large {
  width: 160px;
  height: 160px;
  border-radius: 36px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Footer */
.site-footer {
  background: #0d1a12;
  color: #94a3b8;
  padding: 4.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 3.5rem;
}

.footer-brand-logo {
  height: 48px;
  width: auto;
  margin-bottom: 1.15rem;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  color: #cbd5e1;
  font-size: 0.95rem;
  max-width: 320px;
  margin-bottom: 1.25rem;
}

.footer-col-title {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color var(--tr-fast);
}

.footer-link:hover {
  color: var(--brass-400);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* Sub-page Specific Layouts */
.page-hero {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--paper-bg);
  border-bottom: 1px solid var(--paper-border);
}

.page-title {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.page-lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.6;
}

.editorial-content {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-main);
}

.editorial-content h2 {
  font-size: 2rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--paper-border);
}

.editorial-content h3 {
  font-size: 1.4rem;
  margin: 1.75rem 0 0.75rem;
}

.editorial-content p {
  margin-bottom: 1.25rem;
}

.editorial-content ul,
.editorial-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-muted);
}

.editorial-content li {
  margin-bottom: 0.5rem;
}

.rule-callout-box {
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  border-left: 4px solid var(--pine-700);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.press-factsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.press-fact-item {
  background: var(--paper-card);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.press-fact-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brass-600);
  margin-bottom: 0.25rem;
}

.press-fact-val {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--pine-950);
}

/* Responsive Queries */
@media (max-width: 992px) {
  .hero-grid,
  .features-two-col,
  .cta-grid,
  .train-details-grid {
    grid-template-columns: 1fr;
  }

  .hero-game-card {
    max-width: 520px;
    margin: 0 auto;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper-bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--paper-border);
    box-shadow: var(--shadow-lg);
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .puzzle-grid-table {
    grid-template-columns: 40px repeat(5, minmax(42px, 52px));
    grid-template-rows: 40px repeat(5, minmax(42px, 52px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
