/* ==========================================================================
   CARGOVA — tokens & base
   Values measured from the reference at 1440×900 and kept 1:1.
   ========================================================================== */

@font-face {
  font-family: 'Departure Mono';
  src: url('../assets/fonts/DepartureMono-Regular.woff2') format('woff2'),
       local('Departure Mono'), local('DepartureMono-Regular');
  font-display: swap;
}

:root {
  --blue: #288dfe;          /* body background */
  --navy: #073252;          /* ink */
  --orange: #fc5c21;        /* accent */
  --white: #ffffff;
  --white-15: rgba(255, 255, 255, 0.15);
  --white-50: rgba(255, 255, 255, 0.5);

  --font-mono: 'Departure Mono', 'DepartureMono', 'Space Mono', ui-monospace, monospace;
  --font-sans: 'GT Pressura', 'Archivo', Arial, sans-serif;

  --ease-ui: cubic-bezier(0.39, 0.575, 0.565, 1);
  --ease-snap: cubic-bezier(0.165, 0.84, 0.44, 1);

  --frame: 16px;            /* border-container padding */
  --radius: 4px;
  --tile: url('../assets/svg/background-tile.svg');
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;           /* experience is driven by GSAP Observer, not native scroll */
  overscroll-behavior: none;
}

body {
  background-color: var(--blue);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 21.6px;
  letter-spacing: -0.48px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; font-weight: 400; }

.page-wrapper, .main-wrapper { position: relative; width: 100%; height: 100%; }

/* ---------- Typography (reference type scale) ---------- */
.label {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 21.6px;
  color: var(--white);
  opacity: 0.5;
}
.display {
  font-family: var(--font-mono);
  font-size: 28px;
  line-height: 33.6px;
  letter-spacing: -0.48px;
  color: var(--white);
}
.display.medium { font-size: 36px; line-height: 39.6px; }
.display.small { font-size: 20px; line-height: 24px; }
.display.very-small { font-size: 18px; line-height: 21.6px; }

.heading { font-family: var(--font-mono); color: var(--white); }
.heading.h1 { font-size: 64px; line-height: 70.4px; }
.heading.h2 { font-size: 48px; line-height: 52.8px; }
.heading.h3 { font-size: 36px; line-height: 39.6px; letter-spacing: -0.48px; }
.heading.h6 { font-family: var(--font-sans); font-size: 24px; line-height: 26.4px; color: var(--orange); }
.heading.h7 { font-family: var(--font-sans); font-size: 20px; line-height: 24px; color: var(--orange); text-align: left; }

.paragraph { font-family: var(--font-sans); font-size: 16px; line-height: 21.6px; color: var(--navy); }
.text-align-center { text-align: center; }

/* ---------- Page frame ---------- */
.border-container {
  position: fixed;
  inset: 0;
  padding: var(--frame);
  pointer-events: none;
  z-index: 40;
}
.border-frame {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0;
}

.background-tiles {
  position: fixed;
  inset: 0;
  background-image: var(--tile);
  background-size: 48px 48px;
  opacity: 0;
  pointer-events: none;
}

/* utility */
.is-hidden { visibility: hidden; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--blue) var(--tile);
  background-size: 48px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader-units {
  display: flex;
  gap: 56px;
  align-items: center;
  transform: translateY(-24px);
}
.preloader-unit { width: 140px; height: 140px; will-change: transform; }
@media (max-width: 767px) { .preloader-units { gap: 8px; } .preloader-unit { width: 80px; height: 80px; } }

.preloader-text {
  position: absolute;
  bottom: 52px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--white);
  opacity: 0.7;
}
.preloader-border {
  position: absolute;
  left: var(--frame);
  right: var(--frame);
  bottom: 22px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.preloader-bar {
  width: 100%;
  height: 100%;
  background: var(--white);
  transform-origin: left center;
  transform: scaleX(0);
}

/* ---------- Navigation ---------- */
.nav-bar {
  position: fixed;
  top: 32px;
  left: 32px;
  right: 32px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  pointer-events: none;
}
.nav-bar > * { pointer-events: auto; }

.home-button { position: relative; display: block; width: 200px; height: 48px; }
.logo-brandname { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; }
.logo-brandname.ontop { opacity: 0; }
.logo-mark { width: 40px; height: 40px; display: block; flex: none; }
.logo-mark svg { display: block; }
.logo-word { width: 132px; height: 40px; overflow: visible; display: block; }
.wordmark { font-family: var(--font-mono); font-size: 30px; letter-spacing: -0.5px; }
.wordmark--blueprint { fill: none; stroke: var(--white); stroke-width: 1.2px; }
.wordmark--color { fill: var(--orange); stroke: var(--navy); stroke-width: 1.4px; paint-order: stroke; }

.navigation {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0;
  transition: background-color 0.3s var(--ease-ui);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 16px;
  color: var(--white);
  background: var(--blue);
  transition: background-color 0.3s var(--ease-ui), color 0.3s var(--ease-ui);
}
.nav-link + .nav-link { border-left: 1px solid var(--white); }
.nav-link:hover { background: var(--white); color: var(--navy); }
.nav-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: background-color 0.3s var(--ease-ui);
}
.nav-link.is-current .nav-dot { background: var(--orange); border-color: var(--orange); }

/* ---------- Buttons (shared) ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 21.6px;
  letter-spacing: -0.48px;
  color: var(--navy);
  background: var(--orange);
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  padding: 9px 24px;
  cursor: pointer;
  transition: background-color 0.3s var(--ease-ui), color 0.3s var(--ease-ui);
}
.button:hover { background: var(--navy); color: var(--white); }
.button.nav { height: 44px; opacity: 0; }

.scramble-container { position: relative; display: inline-block; }
.shadow-text { visibility: hidden; white-space: nowrap; }
.scramble-text { position: absolute; left: 0; top: 0; white-space: nowrap; }

/* ---------- Mobile menu ---------- */
.mobile-menu { display: none; position: relative; }
.mobile-menu-toggle { width: 44px; padding: 0; }
.mobile-menu_dropdown {
  position: absolute;
  right: 0;
  top: 56px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease-ui), transform 0.3s var(--ease-ui);
}
.mobile-menu.is-open .mobile-menu_dropdown { opacity: 1; pointer-events: auto; transform: none; }
.navigation.is-mobile { position: static; transform: none; flex-direction: column; opacity: 1; }
.navigation.is-mobile .nav-link + .nav-link { border-left: 0; border-top: 1px solid var(--white); }
.button.nav.visible { opacity: 1; }
.mobile-menu .button.nav { opacity: 1; }

/* ---------- Hero ---------- */
.hero-content {
  position: fixed;
  inset: 0;
  padding: var(--frame);
  display: flex;
  background: var(--blue) var(--tile);
  background-size: 48px 48px;
  z-index: 20;
}
.hero-big-preview {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hero-unit {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-units-list { position: relative; width: 440px; height: 440px; }
.unit-big-preview {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s var(--ease-snap);
}
.unit-big-preview.is-active { opacity: 1; }

/* spec box — full width of the preview column, edge to edge with the sidebar */
.specification-box {
  --spec-row: 72px;           /* one row = Sector / Hex code row = Start dispatch button */
  display: flex;
  width: 100%;
  height: calc(var(--spec-row) * 2);
  border-top: 1px solid var(--white);
  color: var(--white);
}
.large-box { flex: 1; padding: 24px 64px 24px 24px; display: flex; flex-direction: column; justify-content: flex-end; }
.large-box .label { margin-bottom: 4px; }
.small-boxes { width: min(46%, 640px); display: flex; flex-direction: column; border-left: 1px solid var(--white); }
.small-box { height: var(--spec-row); padding: 12px 48px 12px 16px; display: flex; flex-direction: column; justify-content: center; }
.small-box.underline { box-sizing: border-box; }
.small-box.underline { border-bottom: 1px solid var(--white); }
.hex { cursor: default; }

/* sidebar — station list */
.hero-sidebar {
  width: 418px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--white);
}
.station-nav-list { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.station-nav-link {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 4px 32px;
  font-family: var(--font-mono);
  color: var(--white);
  transition: background-color 0.25s var(--ease-snap);
}
.station-nav-link:hover { background: var(--white-15); }
.station-icon { width: 48px; height: 48px; display: block; flex: none; }
.station-copy { display: flex; flex-direction: column; }

.button.hero {
  width: 100%;
  height: 72px;               /* = --spec-row: top edge sits on the Sector / Hex code divider */
  position: relative;
  width: calc(100% + 1px);    /* covers the sidebar's left border line */
  margin-left: -1px;
  flex: none;
  font-size: 16px;
  background: var(--white);
  color: var(--navy);
  border: 0;
  border-radius: 0;
}
.button.hero:hover { background: var(--orange); color: var(--navy); border: 0; box-shadow: none; }
.hide-on-desktop { display: none !important; }

/* ---------- Stations layer ---------- */
.stations-content { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.world-container {
  position: fixed;
  inset: 0;
  opacity: 0;
}
.world-container canvas { width: 100%; height: 100%; display: block; }

.stations { position: fixed; inset: 0; pointer-events: none; }
.station { position: absolute; inset: 0; visibility: hidden; }
.station.is-active { visibility: visible; }
.station-boxes { position: absolute; inset: 0; }
.station-boxes > * { position: absolute; pointer-events: auto; }

.white-text-box { width: 560px; display: flex; flex-direction: column; gap: 12px; pointer-events: none !important; }
.white-text-copy { display: flex; flex-direction: column; gap: 8px; }
.heading.plus { line-height: 36px; }

/* --- desktop placement (measured @1440×900, vertical in vh) --- */
#station-1 .white-text-box { left: 144px; top: 22vh; }
#station-1 .box-1-a      { left: 288px; top: 54vh; }
#station-1 .box-1-b      { left: 360px; top: 71.5vh; }

#station-2 .white-text-box { left: 56px; top: 11vh; }
#station-2 .box-2-a      { left: 216px; top: 63vh; }

#station-3 .white-text-box { left: 56px; top: 10.5vh; width: 420px; }
#station-3 .box-3-a      { left: 100px; top: 48vh; }

#station-4 .white-text-box { left: 56px; top: 14vh; width: 420px; }
#station-4 .box-4-a      { left: 160px; top: 36vh; }
#station-4 .box-4-b      { left: 280px; top: 61vh; }

#station-5 .white-text-box { left: 120px; top: 19vh; width: 420px; }
#station-5 .partners     { left: 120px; top: 41vh; }
#station-5 .community-buttons { left: 120px; top: 56vh; }

/* ---------- Draggable boxes ---------- */
.draggable-box {
  width: 352px;
  background: var(--white);
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  color: var(--navy);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.draggable-box.is-dragging { cursor: grabbing; }
.drag-handle {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--navy);
  border-radius: 50%;
  z-index: 2;
}
.accordeon-wrapper { display: flex; flex-direction: column; }
.accordeon-wrapper.is-no-accordion { padding: 16px 20px; gap: 8px; }
.accordeon-wrapper.underline,
.split-text-box + .split-text-box { border-top: 1px dashed rgba(252, 92, 33, 0.45); }
.accordeon-wrapper.underline + .accordeon-wrapper { border-top: 1px dashed rgba(252, 92, 33, 0.45); }
.accordeon-wrapper.underline:first-of-type { border-top: 0; }

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  text-align: left;
}
.accordion-header.small { padding: 12px 20px 12px 16px; }
.chev {
  width: 20px; height: 20px; flex: none;
  background: no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 5l5 5 5-5' fill='none' stroke='%23fc5c21' stroke-width='1.6'/%3E%3C/svg%3E");
  transition: transform 0.3s var(--ease-ui);
}
.is-open > .accordion-header .chev,
.is-open .accordion-small > .accordion-header .chev { transform: rotate(180deg); }
.accordion-content { height: 0; overflow: hidden; }
.is-open > .accordion-content,
.is-open .accordion-small > .accordion-content { height: auto; }
.paragraph.accordion { padding: 0 20px 16px; }
.paragraph.accordion.small { padding: 0 20px 16px 16px; }

.split-text-box { display: flex; }
.icon-container {
  width: 64px;
  flex: none;
  display: flex;
  justify-content: center;
  padding: 16px 20px;
  border-right: 1px dashed rgba(252, 92, 33, 0.45);
}
.icon-container .icon { width: 24px; height: 24px; color: var(--orange); }
.accordion-small { flex: 1; }

.button.inside-box {
  width: 100%;
  height: 48px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--navy);
}

/* under construction banner w/ moving hazard stripes */
.under-construction-banner {
  position: relative;
  height: 48px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-top: 1px solid var(--navy);
}
.stripes {
  position: absolute;
  left: -50%;
  top: 0;
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--orange) 0 14px, var(--navy) 14px 28px);
  opacity: 0.9;
  animation: stripes 1.2s linear infinite;
}
@keyframes stripes { to { transform: translateX(39.6px); } }
.text-shadow-small {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  color: var(--white);
  padding: 2px 10px;
  background: var(--navy);
  text-shadow: 1px 1px 0 var(--orange);
}

/* partners marquee */
.partners {
  width: 352px;
  padding: 12px 12px 10px;
  border: 1px solid var(--white);
  border-radius: var(--radius);
}
.marquee-track { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-content { display: flex; width: max-content; }
.partner-link {
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 24px;
  line-height: 24px;
  color: var(--white);
  white-space: nowrap;
  transition: opacity 0.4s var(--ease-ui);
}
.marquee-content:hover .partner-link { opacity: 0.4; }
.marquee-content:hover .partner-link:hover { opacity: 1; }

/* community buttons — staggered diagonal like the reference */
.community-buttons { width: 640px; height: 112px; }
.community-buttons .button { position: absolute; height: 48px; padding: 0 24px; line-height: 14px; }
.community-buttons .community-1 { left: 0; top: 0; }
.community-buttons .community-2 { left: 162px; top: 32px; }
.community-buttons .community-3 { left: 341px; top: 64px; }
.community-buttons .icon { width: 18px; height: 18px; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Station selector (bottom-left) ---------- */
.station-selection {
  position: fixed;
  left: 32px;
  bottom: 32px;
  z-index: 45;
  opacity: 0;
  pointer-events: none;
}
.station-selection.is-visible { pointer-events: auto; }
.station-button-wrapper { display: flex; align-items: center; gap: 16px; }
.station-selection-button {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--white);
  border-radius: var(--radius);
  transition: background-color 0.2s var(--ease-snap);
}
.station-button-wrapper:hover .station-selection-button { background: var(--white-15); }
.station-selection-copy { display: flex; flex-direction: column; text-align: left; font-family: var(--font-mono); }
.station-selection-dropdown {
  position: absolute;
  left: 0;
  bottom: 80px;
  width: 300px;
  display: flex;
  flex-direction: column;
  background: var(--blue);
  border: 1px solid var(--white);
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease-snap), transform 0.3s var(--ease-snap);
}
.station-selection.is-open .station-selection-dropdown { opacity: 1; pointer-events: auto; transform: none; }
.station-selection-button.dropdown {
  width: 100%;
  height: auto;
  justify-content: flex-start;
  gap: 16px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
}
.station-selection-button.dropdown + .station-selection-button.dropdown { border-top: 1px solid var(--white-15); }
.station-selection-button.dropdown:hover,
.station-selection-button.dropdown.is-current { background: var(--white-15); }
.station-selection-button .station-icon { width: 40px; height: 40px; }

/* legibility over the moving conveyor */
.station .heading:not(.h6):not(.h7) { text-shadow: 0 2px 0 rgba(7, 50, 82, 0.35); }

/* ---------- Footer ---------- */
.footer-mask {
  position: fixed;
  inset: 0;
  background: var(--blue);
  z-index: 55;
  pointer-events: none;
  visibility: hidden;
}
.footer {
  position: fixed;
  inset: 0;
  z-index: 56;
  background: var(--blue) var(--tile);
  background-size: 48px 48px;
  color: var(--white);
  visibility: hidden;
}
.footer-wrapper { height: 100%; padding: calc(var(--frame) + 72px) 32px calc(var(--frame) + 24px); }
.footer-content { height: 100%; display: flex; flex-direction: column; align-items: center; }
.footer-top-part { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.logo-footer { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo-mark--xl { width: 60px; height: 60px; }
.logo-footer .logo-word { width: 198px; height: 60px; }

.footer-3d-embed { flex: 1; width: 100%; max-width: 922px; min-height: 0; margin: 20px 0 8px; }
#canvas-container {
  width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center;
}
#footer-canvas { width: 100%; height: 100%; display: block; cursor: grab; }

.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.button.footer-button { height: 48px; padding: 0 32px; background: var(--white); border-color: var(--white); }
.button.footer-button:hover { background: var(--orange); color: var(--navy); border-color: var(--navy); }
.copyright { font-family: var(--font-mono); font-size: 14px; opacity: 0.6; }

/* ==========================================================================
   Responsive — mirrors the reference's tablet (≤991) and mobile (≤767) transforms
   ========================================================================== */

@media (max-width: 1279px) {
  .hero-sidebar { width: 360px; }
  .small-boxes { width: 300px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
  :root { --frame: 12px; }

  .hide-on-desktop { display: flex !important; }
  .hero-sidebar { display: none; }
  .hero-content { flex-direction: column; }
  .hero-big-preview { border: 1px solid var(--white); border-radius: 0; overflow: hidden; }
  .hero-units-list { width: min(529px, 64vh, 80vw); height: min(529px, 64vh, 80vw); }
  .specification-box { flex-direction: column; border-right: 0; }
  .large-box { padding: 24px 16px; }
  .small-boxes { width: 100%; flex-direction: row; border-left: 0; border-top: 1px solid var(--white); }
  .small-box { padding: 16px; }
  .small-box.underline { border-bottom: 0; border-right: 1px solid var(--white); }
  .button.hero { border-radius: 0; height: 60px; }

  /* stations: boxes dock to the bottom, full width (reference: station-boxes fixed bottom) */
  .station-boxes {
    inset: auto 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .station-boxes > * { position: relative !important; left: auto !important; top: auto !important; }
  .white-text-box, #station-3 .white-text-box, #station-4 .white-text-box, #station-5 .white-text-box { width: 100%; }
  .draggable-box { width: 100%; }
  .heading.h1 { font-size: 56px; line-height: 61.6px; }
  .heading.h2 { font-size: 48px; line-height: 52.8px; }
  .heading.h3 { font-size: 34px; line-height: 37.4px; }
  .partners { width: 100%; }
  .community-buttons { width: 100%; }
  .station-selection { left: 24px; bottom: auto; top: 96px; }
  .station-selection .station-selection-copy { display: none; }
  .station-selection-dropdown { bottom: auto; top: 80px; }
  .station-selection-dropdown .station-selection-copy { display: flex; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .nav-bar { top: 24px; left: 24px; right: 24px; }
  .navigation:not(.is-mobile) { display: none; }
  .is-hidden-mobile { display: none !important; }
  .mobile-menu { display: block; opacity: 0; }
  .home-button { width: 170px; }
  .logo-word { width: 110px; }

  .label { font-size: 14px; line-height: 18px; }
  .display { font-size: 20px; line-height: 24px; }
  .display.small { font-size: 16px; line-height: 20px; }
  .large-box { padding: 16px; }
  .small-box { padding: 12px 16px; }

  .heading.h1 { font-size: 40px; line-height: 44px; }
  .heading.h2 { font-size: 36px; line-height: 39.6px; }
  .heading.h3 { font-size: 26px; line-height: 28.6px; }
  .heading.h7 { font-size: 18px; line-height: 22px; }
  .station-boxes { inset: auto 16px 16px 16px; gap: 8px; }
  .white-text-box { gap: 6px; }
  .accordion-header { padding: 12px 16px; }
  .accordeon-wrapper.is-no-accordion { padding: 12px 16px; }
  .paragraph { font-size: 15px; line-height: 20px; }
  .paragraph.accordion { padding: 0 16px 12px; }
  .community-buttons { height: auto; display: flex !important; gap: 8px; }
  .community-buttons .button { position: relative; left: auto !important; top: auto !important; width: 48px; padding: 0; }
  .station-selection { left: 16px; top: 84px; }
  .station-selection-button { width: 48px; height: 48px; }
  .station-selection-button .station-icon { width: 34px; height: 34px; }
  .footer-wrapper { padding: 96px 16px 24px; }
  .display.medium { font-size: 24px; line-height: 28px; }
  .logo-footer .logo-word { width: 150px; }
  .logo-mark--xl { width: 44px; height: 44px; }
}

@media (min-width: 768px) {
  .hide-on-mobile { display: block; }
}
@media (max-width: 767px) {
  .hide-on-mobile { display: none !important; }
}
@media (min-width: 768px) {
  .community-buttons.hide-on-desktop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .stripes { animation: none; }
}

/* ==========================================================================
   Hero dashboard HUD — control-room framing around the assembly unit
   Grid: KPIs | focus viewport | live log + route map
   ========================================================================== */

.hero-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  grid-template-rows: minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  justify-content: stretch;
  padding: 92px 24px 20px;
  min-height: 0;
}

/* ---------- panels ---------- */
.hud-panel {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0;
  background: rgba(7, 50, 82, 0.12);
  backdrop-filter: blur(2px);
  color: var(--white);
  font-family: var(--font-mono);
}
.hud-panel .label { font-size: 13px; line-height: 16px; }
.hud-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.hud-live-dot {
  width: 8px; height: 8px; border-radius: 0;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(252, 92, 33, 0.7);
  animation: hud-pulse 1.6s infinite;
  flex: none;
}
@keyframes hud-pulse {
  0% { box-shadow: 0 0 0 0 rgba(252, 92, 33, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(252, 92, 33, 0); }
  100% { box-shadow: 0 0 0 0 rgba(252, 92, 33, 0); }
}

/* ---------- focus viewport ---------- */
.hud-viewport {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 62%);
}
.hud-viewport .hero-units-list { width: min(440px, 100%, 52vh); height: min(440px, 100%, 52vh); position: relative; z-index: 2; touch-action: none; user-select: none; }
.hud-viewport .hero-units-list { width: min(560px, 100%, 62vh); height: min(560px, 100%, 62vh); }
#hero-truck-canvas { width: 100%; height: 100%; display: block; }
.hud-hint { color: var(--navy); background: var(--white); padding: 0 6px; opacity: 1; }
.hud-viewport-head {
  position: absolute; top: 10px; left: 14px; right: 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--white);
}
.hud-unit-id { opacity: 0.7; }
.hud-stage { display: flex; align-items: center; gap: 10px; }
.hud-stage-bar { display: flex; gap: 3px; }
.hud-stage-bar i { width: 18px; height: 6px; border: 1px solid var(--white); border-radius: 0; transition: background-color 0.25s var(--ease-snap); }
.hud-stage-bar i.on { background: var(--white); }
.hud-stage-bar i.on:last-of-type, .hud-stage-bar i.current { background: var(--orange); border-color: var(--orange); }

.hud-corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--white); pointer-events: none; }
.hud-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hud-cross {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)) center / 1px 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)) center / 100% 1px no-repeat;
}
.hud-scan { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hud-scan i {
  position: absolute; left: 0; right: 0; top: 0; height: 64px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.16) 85%, rgba(255, 255, 255, 0.55) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  animation: hud-scan 4.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
/* sweeps the full viewport height, clipped by .hud-scan so it never spills outside the frame */
@keyframes hud-scan { 0% { top: -64px; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

.hud-callout { position: absolute; display: flex; align-items: center; gap: 8px; pointer-events: none; font-family: var(--font-mono); font-size: 12px; color: var(--white); }
.hud-callout-line { display: block; height: 1px; width: 70px; background: var(--white); position: relative; }
.hud-callout-line::before { content: ''; position: absolute; width: 7px; height: 7px; border-radius: 0; background: var(--orange); border: 1px solid var(--white); top: -4px; }
.hud-callout-text { padding: 3px 8px; border: 1px solid var(--white); background: var(--blue); white-space: nowrap; }
.hud-callout.c1 { top: 24%; left: 50%; }
.hud-callout.c1 .hud-callout-line::before { left: -4px; }
.hud-callout.c2 { top: 64%; right: 50%; flex-direction: row-reverse; margin-right: min(150px, 14%); }
.hud-callout.c2 .hud-callout-line::before { right: -4px; }

.hud-dims {
  position: absolute; bottom: 10px; left: 14px; right: 14px;
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--white); opacity: 0.75;
}

/* ---------- right column: log + map ---------- */
.hud-right { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.hud-log { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hud-log-list { list-style: none; margin: 0; padding: 4px 0; flex: 1; min-height: 0; overflow: hidden; mask-image: linear-gradient(#000 80%, transparent); }
.hud-log-list li {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px;
  padding: 8px 14px; font-size: 12px; line-height: 15px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}
.hud-log-list li .id { color: var(--white); }
.hud-log-list li .st { justify-self: end; padding: 0 5px; border-radius: 0; background: rgba(255, 255, 255, 0.18); }
.hud-log-list li .st.ok { background: var(--white); color: var(--navy); }
.hud-log-list li .st.go { background: var(--orange); color: var(--navy); }
.hud-log-list li .rt { grid-column: 1 / -1; opacity: 0.7; }

.hud-map-count { font-size: 12px; opacity: 0.7; }
.hud-map-svg { display: block; width: 100%; height: auto; padding: 6px 10px 10px; }
.hud-map-svg .dot { fill: rgba(255, 255, 255, 0.38); }
.hud-map-svg .hub { fill: var(--orange); stroke: var(--white); stroke-width: 1; }
.hud-map-svg .lane { fill: none; stroke: var(--white); stroke-width: 1.2; stroke-dasharray: 3 4; animation: hud-dash 1.4s linear infinite; }
@keyframes hud-dash { to { stroke-dashoffset: -14; } }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .hero-unit { grid-template-columns: minmax(0, 1fr); }
  .hud-right { display: none; }
}
@media (max-width: 991px) {
  .hero-unit { grid-template-columns: minmax(0, 1fr); padding: 80px 12px 12px; }
  .hud-viewport { border: 0; background: none; }
  .hud-viewport .hero-units-list { width: min(529px, 64vh, 80vw); height: min(529px, 64vh, 80vw); }
  .hud-callout, .hud-cross { display: none; }
}
@media (max-width: 767px) {
  .hud-viewport-head .hud-unit-id, .hud-dims { display: none; }
  .hud-viewport-head { justify-content: center; top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-scan i, .hud-live-dot, .hud-map-svg .lane { animation: none; }
  .hud-scan { display: none; }
}


