/* LocoSim: the app's own palette (Themes/Theme.xaml) - deep green panels and brass. */
:root {
  --deep: #141d18;         /* PanelDeepBrush: page ground */
  --panel: #1c2822;        /* PanelBrush */
  --raised: #23322a;       /* RaisedBrush: cards */
  --line: #344a3e;         /* PanelLineBrush */
  --chosen: #4e6b3a;       /* ChosenBrush */
  --brass: #d9b65c;        /* BrassBrush, the accent */
  --brass-hover: #e8c878;
  --on-brass: #1e1a0e;
  --text: #ede8da;         /* TextBrush */
  --muted: #a9b3a8;        /* DimTextBrush */
  --faint: #7c887f;
  --danger: #a8392d;
  --signal: #6fcf7f;       /* GoodBrush */
  --display: "Zilla Slab", Rockwell, Georgia, serif;
  --body: Inter, "Segoe UI", system-ui, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brass); }
a:hover { color: var(--brass-hover); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; }
p { margin: 0; }
.brass { color: var(--brass); }
.defs { position: absolute; }
kbd {
  display: inline-block;
  min-width: 28px; padding: 1px 8px;
  border: 1px solid var(--brass); border-bottom-width: 2px; border-radius: 6px;
  background: var(--raised);
  font: 600 13px/1.6 var(--body); color: var(--text); text-align: center;
  white-space: nowrap;
}

/* Buttons: Primary (brass) and Panel, as in the app. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 20px;
  border: 1px solid var(--brass); border-radius: 8px;
  background: var(--brass);
  color: var(--on-brass); font: 600 16px/1.2 var(--body); text-decoration: none;
  box-shadow: 0 6px 24px rgba(217, 182, 92, 0.18);
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--brass-hover); color: var(--on-brass); transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-lg { padding: 14px 26px; font-size: 17px; }
.btn-sm { padding: 8px 14px; font-size: 14px; box-shadow: none; }
.btn-ghost { background: var(--raised); color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: #35493e; color: var(--text); border-color: var(--brass); }

/* Nav: the app's bar, a dark rounded strip. */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 12px max(16px, calc((100% - var(--max)) / 2));
  background: rgba(20, 29, 24, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 22px/1 var(--display); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--brass); }

/* Hero: words over the whole table. */
.hero { padding: 80px 16px 0; text-align: center; background: radial-gradient(ellipse at 50% 0%, #23322a 0%, var(--deep) 70%); }
.hero-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.eyebrow { color: var(--brass); font: 600 13px/1.4 var(--body); letter-spacing: 0.18em; text-transform: uppercase; }
.logo { margin-top: 10px; font-size: clamp(64px, 12vw, 132px); letter-spacing: -0.01em; }
.tagline { margin-top: 18px; max-width: 46ch; color: #d8d3c4; font-size: clamp(18px, 2.2vw, 21px); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.hero-meta { margin-top: 18px; color: var(--muted); font-size: 14px; }
/* Made in the USA: the flag beside the words, in the hero, by the download and in the footer. */
.usa {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 18px 0 0; color: var(--text);
  font: 700 15px/1.3 var(--display); letter-spacing: 0.14em; text-transform: uppercase;
}
.usa .flag { width: 38px; height: 20px; border-radius: 2px; }
.flag { width: 21px; height: 11px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); flex: none; }
.hero-shot {
  display: block; max-width: 1600px; margin: 56px auto 0;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; overflow: hidden;
  box-shadow: 0 -10px 60px rgba(0, 0, 0, 0.45);
}

/* Sections */
.section { padding: 96px 16px; }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-alt { background: var(--panel); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 44px; }
.section-head h2 { margin-top: 8px; font-size: clamp(36px, 5.5vw, 56px); }
.lede { margin-top: 16px; max-width: 62ch; color: #d8d3c4; font-size: 18px; }

/* Trailer: the video in a brass-edged frame, a big play button over the poster. */
.js-watch svg { fill: currentColor; stroke: none; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(217, 182, 92, 0.3), 0 24px 80px rgba(0, 0, 0, 0.5);
}
.trailer-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute; inset: 0; margin: auto;
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--brass);
  background: rgba(20, 29, 24, 0.7);
  color: var(--brass); cursor: pointer;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, background 0.2s, opacity 0.2s;
}
.video-play svg { width: 40px; height: 40px; fill: currentColor; margin-left: 5px; }
.video-play:hover, .video-play:focus-visible { transform: scale(1.06); background: rgba(20, 29, 24, 0.85); outline: none; }
.video-frame.playing .video-play { opacity: 0; pointer-events: none; }

/* Features: the app's cards. */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; }
.feature-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 18px;
  border-radius: 10px; background: var(--chosen);
}
.feature-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--brass); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 23px; }
.feature p { margin-top: 10px; color: var(--muted); font-size: 16px; }

/* Trains: nameboards, white on green, as the stations have. */
.trains { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trains li { padding: 22px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; }
.train-tag {
  display: inline-block; padding: 3px 12px;
  background: #1f5a37; border: 2px solid #e8e4d6; border-radius: 4px;
  color: #fff; font: 700 17px/1.3 var(--display);
}
.trains p { margin-top: 12px; color: var(--muted); font-size: 15px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shot { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.gallery .shot { transition: transform 0.2s, border-color 0.2s; }
.gallery .shot:hover { transform: translateY(-3px); border-color: var(--brass); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.shot-wide { grid-column: span 2; grid-row: span 2; }
.shot-wide img { aspect-ratio: auto; }

/* Keys */
.keys-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.keys { width: 100%; border-collapse: collapse; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.keys th, .keys td { padding: 12px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; }
.keys thead th { color: var(--brass); font: 600 13px/1.4 var(--body); letter-spacing: 0.14em; text-transform: uppercase; background: var(--panel); }
.keys tbody th { font-weight: 500; color: var(--muted); }
.keys tr:last-child th, .keys tr:last-child td { border-bottom: 0; }

/* Get it */
.download-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center;
  padding: 44px; background: var(--raised); border: 1px solid var(--line); border-radius: 18px;
}
.download-icon { width: 160px; height: 160px; border-radius: 32px; }
.download-body h2 { margin-top: 8px; font-size: clamp(36px, 5vw, 52px); }
.download-body .hero-cta { justify-content: flex-start; }
.specs { margin: 0; display: grid; gap: 12px; min-width: 240px; }
.specs div { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--brass); font: 600 12px/1.4 var(--body); letter-spacing: 0.14em; text-transform: uppercase; }
.specs dd { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

/* Footer */
.footer { padding: 48px 16px 56px; text-align: center; color: var(--muted); border-top: 1px solid var(--line); }
.footer p { margin: 6px 0; }
.footer p:first-child { color: var(--text); font: 700 20px/1.4 var(--display); }
.footer p:first-child a { font: 500 15px var(--body); }
.footer .made-in { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; letter-spacing: 0.04em; }
.footer .footer-small { font-size: 13px; color: var(--faint); }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(12, 18, 15, 0.95);
  color: var(--text);
}
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; }
.lightbox figcaption { color: var(--muted); font-size: 15px; text-align: center; }
.lightbox button { background: none; border: 0; color: var(--text); cursor: pointer; font: 48px/1 var(--body); opacity: 0.7; }
.lightbox button:hover { opacity: 1; color: var(--brass); }
.lightbox-close { position: absolute; top: 14px; right: 22px; font-size: 40px !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gallery .shot { transition: none; }
}

@media (max-width: 960px) {
  .features { grid-template-columns: 1fr 1fr; }
  .trains { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .keys-wrap { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 1fr; justify-items: start; padding: 32px; }
  .download-icon { width: 112px; height: 112px; border-radius: 24px; }
  .specs { width: 100%; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav .btn-sm { margin-left: auto; }
  .hero { padding-top: 56px; }
  .hero-shot { margin-top: 40px; border-radius: 10px 10px 0 0; }
  .section { padding: 72px 16px; }
  .features, .trains, .gallery { grid-template-columns: 1fr; }
  .shot-wide { grid-column: auto; grid-row: auto; }
  .shot-wide img { aspect-ratio: 16 / 9; }
  .keys th, .keys td { padding: 10px 12px; }
  .video-play { width: 72px; height: 72px; }
  .video-play svg { width: 30px; height: 30px; }
  .lightbox[open] { grid-template-columns: 40px 1fr 40px; }
}
