:root {
  color-scheme: dark;
  --gutter: min(30px, 5vw);
  --section-gap: 2.25rem;
  --small-section-gap: 1.5rem;
  --wide: 1200px;
  --white: #fff;
  --graphite: #333;
  --red-gradient: linear-gradient(135deg, #6b003e, #fe2d2d 50%, #6b003e);
  --gray-gradient: linear-gradient(135deg, #232323, #4f4f4f);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--graphite);
  color: var(--white);
  font: 1.125rem/1.6 system-ui, sans-serif;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #ff7676; outline-offset: 3px; }
h1, h2, h3, h4 { margin-block: var(--gutter); line-height: 1.125; font-weight: 400; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
p { margin-block: 1em; }
figure { margin: 0; }
figure figcaption { text-align: center; margin-block: .5em 1em; }
.center-text { text-align: center; }
.small-text { font-size: 1rem; }
.bg-graphite { background-color: var(--graphite); }
.bg-white { background-color: white; }
.bg-gray { background-color: #abb8c3; }
.gradient-red { background-image: var(--red-gradient); }
.gradient-gray { background-image: var(--gray-gradient); }
.white-text { color: #fff; }
.gray-text { color: #f0f0f0; }

.site-shell { padding-inline: var(--gutter); }
.site-shell > * + * { margin-block-start: var(--gutter); }
.site-shell .alignfull { margin-inline: calc(-1 * var(--gutter)); }
.group.alignfull, .cover.alignfull, .group.background-panel, .site-footer-container {
  padding-inline: var(--gutter);
}
.group.background-panel { padding-block: var(--gutter); }
.group.background-panel.alignfull,
.site-shell > .group.background-panel,
.site-shell > .site-footer-container { margin-inline: calc(-1 * var(--gutter)); }
.constrained > :not(.alignfull) { max-width: var(--wide); margin-inline: auto; }
.constrained > .alignwide { max-width: var(--wide); }
.flow > * + *, .constrained > * + * { margin-block-start: var(--gutter); }
.flow > :first-child, .constrained > :first-child { margin-block-start: 0; }
.columns, .flex { display: flex; gap: var(--gutter); }
.flex { align-items: center; flex-wrap: wrap; }
.columns { align-items: stretch; }
.column { flex: 1 1 0; min-width: 0; }
.column.top { align-self: flex-start; }
.center-items { justify-content: center; }
.between-items { justify-content: space-between; }
.no-wrap { flex-wrap: nowrap; }
.aligncenter { margin-inline: auto; }
h2.background-panel, h3.background-panel, h4.background-panel { padding: 1.25em var(--gutter); }
.spacer { pointer-events: none; }
.banner-image img { display: block; width: 100%; height: auto; }
.content-image > a { color: inherit; }
.social-list { padding: 0; display: flex; flex-wrap: wrap; gap: .5em; list-style: none; }
.social-list li { display: inline-flex; align-items: center; border-radius: 999px; }
.social-list a { display: flex; align-items: center; gap: .35em; padding: .3em; text-decoration: none; }
.social-list svg { width: 24px; height: 24px; fill: currentColor; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { clip-path: none; width: auto; height: auto; z-index: 10; padding: 8px; background: #222; }

.site-header { justify-content: space-between; align-items: center; }
.site-brand img { display: block; width: min(329px, 45vw); }
.site-nav {
  min-width: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 1.125rem;
}
.nav-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; list-style: none; padding: 0; margin: 0; }
.nav-list a { display: block; padding: .5em 1em; text-decoration: none; }
.nav-list a:hover { color: #f0f0f0; }
.menu-open, .menu-close { display: none; background: transparent; border: 0; padding: 8px; line-height: 0; }
.cover { position: relative; isolation: isolate; display: flex; overflow: hidden; align-items: end; }
.cover-image, .cover-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-image { object-fit: cover; z-index: -2; }
.cover-shade { z-index: -1; opacity: .4; }
.cover-content { width: 100%; }
.video-card > div { position: relative; }
.youtube-card > div { aspect-ratio: 16 / 9; }
.youtube-card iframe { position: absolute; inset: 0; height: 100%; }

.zoomable { position: relative; }
.lightbox-trigger { position: absolute; inset: 10px 10px auto auto; display: grid; place-items: center; width: 34px; height: 34px; background: #222b; border: 0; border-radius: 4px; }
.zoomable > img { cursor: zoom-in; }
.site-lightbox { width: 100%; height: 100%; max-width: none; max-height: none; border: 0; padding: 12px; background: #111e; color: #fff; }
.site-lightbox[open] { display: grid; place-items: center; }
.site-lightbox::backdrop { background: #0008; }
.site-lightbox img { max-width: min(100%, 94vw); max-height: 88dvh; object-fit: contain; }
.site-lightbox button { position: absolute; border: 0; border-radius: 4px; background: #222d; padding: 6px 14px; font-size: 1.5rem; }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; }
.lightbox-next { right: 12px; top: 50%; }
html:has(.site-lightbox[open], .menu-panel.is-open) { overflow: hidden; }

@media (max-width: 1020px) {
  .site-header { flex-wrap: nowrap; }
  .menu-open, .menu-close { display: inline-block; }
  .menu-panel { display: none; }
  .menu-panel.is-open { display: block; position: fixed; inset: 0; overflow: auto; z-index: 20; padding: 24px; background: var(--graphite); }
  .menu-close { display: block; margin-left: auto; }
  .nav-list { flex-direction: column; align-items: center; gap: .5rem; font-size: 1.5rem; }
  .nav-list a { padding: 0; }
}
@media (max-width: 781px) {
  .columns { flex-direction: column; }
  .column { flex-basis: auto; width: 100%; }
}

main .content-image {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--content, 620px);
  margin-inline: auto;
}

main .content-image > a {
  display: block;
}

main .content-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

main .columns > .column:has(> .content-image) {
  min-width: 0;
}

main .train-formations {
  padding-block: clamp(20px, 4vw, 48px) !important;
}

main .train-formations > h2 {
  margin-block: 0 16px;
}

main .formation-image {
  display: block;
  width: min(100%, var(--wide, 1200px));
  margin: 16px auto 0;
}

main .formation-image img {
  display: block;
  width: 100%;
  height: auto;
}

.train-formations-page .spacer {
  height: clamp(16px, 3vw, 36px) !important;
}

.featured-locomotives.alignwide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(16px, 2vw, 30px);
}

.featured-locomotives > figure {
  min-width: 0;
  margin: 0;
}

.featured-locomotives figure > a {
  display: block;
  width: 100%;
}

.featured-locomotives figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (max-width: 600px) {
  .featured-locomotives.alignwide {
    grid-template-columns: minmax(0, 1fr);
  }
}

.site-shell > .page-title-band {
  margin-block: 8px 0;
  padding: clamp(14px, 2.5vw, 28px) clamp(20px, 4vw, 40px);
  background: #292929;
}

.page-title-band > .page-title {
  max-width: var(--wide, 1200px);
  margin: 0 auto;
  color: #fff;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  text-align: left;
}

.site-shell > main:has(> .page-hero) {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

main > .page-hero.alignfull {
  position: relative;
  width: auto;
  max-width: none;
  isolation: isolate;
  overflow: hidden;
}

main > .page-hero > figure.banner-image {
  margin: 0;
  width: 100%;
  max-width: none;
}

main > .page-hero > figure.banner-image > img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}

.page-hero > .page-title-band {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: clamp(24px, 5vw, 64px) clamp(20px, 4vw, 40px) clamp(16px, 3vw, 36px);
  background: linear-gradient(to top, rgb(0 0 0 / 78%), transparent);
  pointer-events: none;
}

.page-hero .page-title {
  font-size: clamp(28px, 4vw, 52px);
  text-shadow: 0 1px 8px rgb(0 0 0 / 65%);
}


.page-title::after {
  display: block;
  width: clamp(44px, 6vw, 76px);
  height: 4px;
  margin-top: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, #850b3e, #ff2728 48%, #750639);
  content: "";
}

@media (max-width: 781px) {
  .rolling-stock-grid.alignwide {
    box-sizing: border-box;
    width: min(100%, calc(100vw - 2 * var(--gutter, 20px)));
    margin-inline: auto;
  }
}

.column:has(> .tiktok-card) {
  background-color: transparent !important;
  min-inline-size: 0;
}

:is(.tiktok-card, .youtube-card).video-card {
  --video-frame-padding: 12px;
  box-sizing: border-box;
  margin-inline: auto !important;
  padding: var(--video-frame-padding);
  background: #fff;
  border-radius: 12px;
}

.tiktok-card.video-card {
  inline-size: min(100%, calc(325px + 2 * var(--video-frame-padding)));
}

.youtube-card.video-card {
  inline-size: min(100%, var(--wide, 1200px));
}

:is(.tiktok-card, .youtube-card) .video-frame {
  overflow: hidden;
  border-radius: 8px;
}

.tiktok-card .tiktok-embed,
.tiktok-card iframe,
.youtube-card iframe {
  display: block;
  inline-size: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  margin: 0 !important;
  border: 0;
}

@media (max-width: 820px) {
  .columns:has(> .column > .tiktok-card) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 20px;
  }

  .columns > .column:has(> .tiktok-card) {
    width: 100%;
  }
}

@media (min-width: 821px) {
  .columns.alignwide:has(> .column > .tiktok-card) {
    width: 100%;
    max-width: var(--wide, 1200px);
    justify-content: space-between;
  }

  .columns.alignwide > .column:has(> .tiktok-card) {
    flex: 0 1 349px;
  }
}

.site-shell .home-tabor > .group.alignfull {
  margin-inline: 0;
}

.site-footer-container a { text-decoration: none; }
