/* FEMO landing.
   Layout: one fixed 3D stage sits behind the whole page. Copy runs in a left column on wide
   screens and at the bottom of each screen on phones, so the globe always has room to move. */

:root {
  color-scheme: dark;

  /* colour: night sea, port sodium light, cold data lines */
  --ink: #050a13;
  --deep: #0a1322;
  --panel: #0e1a2e;
  --line: rgba(150, 185, 235, 0.16);
  --line-2: rgba(150, 185, 235, 0.32);
  --text: #e8f0fa;
  --muted: #9fb0c8;
  --dim: #7a8eab;
  --signal: #ff8a1f;
  --signal-2: #ffc14d;
  --on-signal: #1a0d00;
  --ice: #62c6ff;
  --ok: #4ade9a;
  --err: #ff9a8a;

  /* type: container-stencil display, plain body, waybill mono */
  --f-display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", "PingFang SC",
    "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK SC", sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK SC", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gut: clamp(20px, 5vw, 72px);
  --header-h: 64px;
  --col: 560px;

  /* display type is tuned for a condensed face; CJK and Hangul fall back to wide system fonts */
  --d-scale: 1;
  --d-lh: 0.9;
  --d-track: 0;
}

:root:lang(zh),
:root:lang(ko) {
  --d-scale: 0.66;
  --d-lh: 1.16;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  font: 400 17px/1.55 var(--f-body);
  color: var(--text);
  background: var(--ink);
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.cab-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

svg {
  flex: none;
}

:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

::selection {
  background: var(--signal);
  color: var(--on-signal);
}

.skip {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--ink);
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}

/* ---------- stage ---------- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.stage canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  display: block;
  transition: opacity 0.7s ease;
}

.stage.is-dim canvas {
  opacity: 0.28;
}

.stage__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 10, 19, 0.95) 0%, rgba(5, 10, 19, 0.82) 26%, rgba(5, 10, 19, 0.28) 52%, rgba(5, 10, 19, 0) 68%);
  transition: opacity 0.7s ease;
}

.stage.is-end .stage__scrim {
  opacity: 0;
}

.no-webgl .stage canvas {
  display: none;
}

.no-webgl .stage {
  background:
    radial-gradient(42vmin 42vmin at 72% 46%, rgba(40, 110, 210, 0.45) 0%, rgba(20, 60, 130, 0.28) 55%, rgba(5, 10, 19, 0) 100%),
    var(--ink);
}

.glabels {
  position: absolute;
  inset: 0;
  transition: opacity 0.5s ease;
}

.stage.is-dim .glabels {
  opacity: 0;
}

.glabel {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform;
}

.glabel i {
  position: absolute;
  left: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal-2);
  box-shadow: 0 0 0 3px rgba(255, 193, 77, 0.2);
}

.glabel b {
  position: absolute;
  top: -11px;
  left: 12px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(5, 10, 19, 0.6);
  font: 500 11px/1.2 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
}

.glabel--l b {
  left: auto;
  right: 12px;
}

/* ---------- header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.header.is-scrolled {
  background: rgba(5, 10, 19, 0.8);
  border-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 800 30px/1 var(--f-display);
  letter-spacing: 0.07em;
  color: var(--text);
}

.logo--sm {
  font-size: 26px;
}

.nav {
  display: flex;
  gap: clamp(16px, 2.2vw, 32px);
  margin-left: auto;
}

.nav a {
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

.lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 19, 34, 0.5);
}

.lang button {
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  font: 500 12px/1 var(--f-mono);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.lang button:hover {
  color: var(--text);
}

.lang button.is-on {
  background: var(--text);
  color: var(--ink);
}

.header__cab {
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

.header__cab-short {
  display: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 15px/1 var(--f-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn--signal {
  background: var(--signal);
  color: var(--on-signal);
}

.btn--signal:hover {
  background: var(--signal-2);
}

.btn--line {
  border-color: var(--line-2);
  background: rgba(14, 26, 46, 0.55);
  color: var(--text);
}

.btn--line:hover {
  border-color: var(--text);
}

/* ---------- journey rail ---------- */
.rail {
  position: fixed;
  right: max(22px, env(safe-area-inset-right, 0px));
  top: 50%;
  z-index: 20;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.rail.is-on {
  opacity: 1;
  pointer-events: auto;
}

.rail ol {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail ol::before,
.rail ol::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 6px;
  width: 1px;
}

.rail ol::before {
  bottom: 6px;
  background: var(--line-2);
}

.rail ol::after {
  height: calc((100% - 12px) * var(--p, 0));
  background: var(--signal);
}

.rail a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-right: 18px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.3s ease;
}

.rail a::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  z-index: 1;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--ink);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.rail b {
  font-weight: 500;
}

.rail span {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rail li.is-on span,
.rail:hover span {
  opacity: 1;
}

.rail li.is-past a::after,
.rail li.is-on a::after {
  border-color: var(--signal);
  background: var(--signal);
}

.rail li.is-on a {
  color: var(--text);
}

.rail li.is-on a::after {
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.24);
}

/* ---------- shared type ---------- */
.eyebrow {
  margin: 0;
  font: 500 12px/1.5 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ice);
}

.h2,
.chapter__title {
  margin: 0;
  font: 800 calc(clamp(40px, 5.2vw, 80px) * var(--d-scale)) / var(--d-lh) var(--f-display);
  text-transform: uppercase;
  text-wrap: balance;
}

.lead,
.chapter__text {
  max-width: 520px;
  margin: 0;
  font-size: clamp(16px, 1.2vw, 18px);
  color: var(--muted);
}

.note,
.hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
}

/* ---------- hero ---------- */
main {
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + 20px);
  padding-bottom: 28px;
}

.hero__in {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.hero__title {
  display: flex;
  flex-direction: column;
  margin: 0;
  font: 800 calc(clamp(58px, min(9.2vw, 15.5vh), 150px) * var(--d-scale)) / calc(var(--d-lh) * 0.94) var(--f-display);
  text-transform: uppercase;
}

.hero__title .is-signal {
  color: var(--signal);
}

.hero__lead {
  max-width: 500px;
  margin: 0;
  font-size: clamp(16px, 1.25vw, 19px);
  color: var(--muted);
}

.hero__msg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 14px;
  color: var(--muted);
}

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
}

.facts3 {
  display: flex;
  gap: clamp(16px, 3vw, 44px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts3 li {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 236px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.facts3 b {
  font: 800 46px/1 var(--f-display);
  color: var(--text);
}

.cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
}

.cue svg {
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

/* ---------- tracking form ---------- */
.track {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
}

.track__label {
  font: 500 11px/1.4 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.track__row {
  display: flex;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(10, 19, 34, 0.78);
  transition: border-color 0.2s ease;
}

.track__row:focus-within {
  border-color: var(--signal);
}

.track input {
  flex: 1;
  min-width: 0;
  padding: 0 14px 0 16px;
  border: 0;
  outline: 0;
  background: none;
  font: 500 16px/1 var(--f-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.track input::placeholder {
  color: var(--dim);
}

.track__err {
  margin: 0;
  font-size: 14px;
  color: var(--err);
}

.track__hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.chip {
  padding: 6px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 6px;
  background: none;
  font: 500 12px/1 var(--f-mono);
  color: var(--ice);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  border-color: var(--signal-2);
  color: var(--signal-2);
}

/* ---------- messengers ---------- */
.msgs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(14, 26, 46, 0.6);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.msg:hover {
  border-color: var(--text);
}

.msgs--big .msg {
  min-height: 58px;
  padding: 0 26px;
  font-size: 17px;
}

/* ---------- journey chapters ---------- */
.chapter,
.routes {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 96px;
}

.chapter__in {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: var(--col);
}

.chapter__cta {
  margin: 4px 0 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-2);
}

.step b {
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-weight: 500;
}

.ticks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
}

.ticks li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 1px;
  background: var(--signal);
}

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 520px;
}

.mode {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  row-gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 19, 34, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.mode svg {
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  color: var(--ice);
  transition: color 0.2s ease;
}

.mode__name {
  font: 700 calc(24px * var(--d-scale)) / 1.1 var(--f-display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.mode__d {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.mode:hover {
  border-color: var(--line-2);
}

.mode.is-on {
  border-color: var(--signal);
  background: rgba(255, 138, 31, 0.1);
}

.mode.is-on svg {
  color: var(--signal);
}

/* ---------- lanes ---------- */
.routes__in {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 600px;
}

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

.lane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 19, 34, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.lane:hover {
  border-color: var(--line-2);
}

.lane.is-on {
  border-color: var(--signal);
  background: rgba(20, 30, 48, 0.82);
}

.lane__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 700 calc(clamp(24px, 2.2vw, 30px) * var(--d-scale)) / 1.1 var(--f-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lane__name::after {
  content: "+";
  font: 400 20px/1 var(--f-mono);
  color: var(--dim);
}

.lane.is-on .lane__name::after {
  content: "–";
  color: var(--signal);
}

.lane__more {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.lane.is-on .lane__more {
  display: flex;
}

.lane__hubs {
  font: 500 12px/1.5 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lane__modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lane__mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(98, 198, 255, 0.09);
  font-size: 14px;
}

.lane__mode svg {
  color: var(--ice);
}

.lane__mode b {
  font: 500 12px/1 var(--f-mono);
  color: var(--signal-2);
}

/* ---------- clients ---------- */
.clients,
.tracksec {
  padding-block: clamp(80px, 11vw, 150px);
}

.clients .h2 {
  max-width: 900px;
  margin-top: 14px;
}

.cgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 44px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
  list-style: none;
}

.ccard {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 28px 24px 34px;
  background: rgba(7, 14, 26, 0.93);
}

.ccard svg {
  width: 28px;
  height: 28px;
  color: var(--signal-2);
}

.ccard h3 {
  margin: 10px 0 0;
  font: 700 calc(28px * var(--d-scale)) / 1.08 var(--f-display);
  text-transform: uppercase;
}

.ccard p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- tracking teaser ---------- */
.tracksec__in {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.tracksec__copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.pv {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--deep);
  color: var(--text);
  transition: border-color 0.25s ease;
}

.pv:hover {
  border-color: var(--signal);
}

.pv__map {
  position: relative;
  height: clamp(260px, 34vw, 420px);
}

.pv__info {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 28px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.pv__id {
  display: block;
  font: 500 12px/1 var(--f-mono);
  color: var(--signal-2);
}

.pv__route {
  display: block;
  margin-top: 6px;
  font: 700 calc(26px * var(--d-scale)) / 1.05 var(--f-display);
  text-transform: uppercase;
}

.pv__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
}

.pv__facts dt,
.status__grid dt,
.facts dt {
  font: 500 10px/1.3 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.pv__facts dd {
  margin: 3px 0 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.pv__open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--signal-2);
}

/* ---------- contact + footer ---------- */
.contact {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: clamp(110px, 17vh, 190px);
  padding-bottom: 40px;
  text-align: center;
}

.contact__in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.contact__title {
  margin: 0;
  font: 800 calc(clamp(64px, 12vw, 190px) * var(--d-scale)) / var(--d-lh) var(--f-display);
  text-transform: uppercase;
}

.contact .msgs {
  justify-content: center;
  margin-top: 6px;
}

.footer {
  position: relative;
  z-index: 1;
  padding-block: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: rgba(5, 10, 19, 0.66);
  font-size: 13px;
  color: var(--muted);
}

.footer__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}

.footer__brand {
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.08em;
  color: var(--text);
}

.footer__top {
  margin-left: auto;
  color: var(--text);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ================= tracking map ================= */
.tmap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(120% 90% at 60% 40%, #0d1d36 0%, #081120 60%, #050a13 100%);
  -webkit-user-select: none;
  user-select: none;
}

.tmap--interactive {
  cursor: grab;
  touch-action: none;
}

.tmap--interactive.is-grab {
  cursor: grabbing;
}

.tmap__geo,
.tmap__svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.tmap__svg {
  overflow: visible;
  pointer-events: none;
}

.tmap__rest {
  fill: none;
  stroke: rgba(150, 185, 235, 0.6);
  stroke-width: 1.7;
  stroke-dasharray: 1.5 7;
  stroke-linecap: round;
}

.tmap__glow {
  fill: none;
  stroke: var(--signal);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.2;
}

.tmap__done {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tbadge {
  color: var(--muted);
}

.tbadge circle {
  fill: var(--deep);
  stroke: var(--line-2);
  stroke-width: 1;
}

.tbadge.is-done {
  color: var(--signal-2);
}

.tbadge.is-done circle {
  stroke: rgba(255, 193, 77, 0.6);
}

.tnode {
  outline: none;
}

.tmap--interactive .tnode {
  cursor: pointer;
  pointer-events: auto;
}

.tnode__hit {
  fill: transparent;
}

.tnode__ring {
  fill: var(--ink);
  stroke: rgba(150, 185, 235, 0.75);
  stroke-width: 1.5;
  transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.tnode__dot {
  fill: rgba(150, 185, 235, 0.75);
  transition: fill 0.2s ease;
}

.tnode.is-reached .tnode__ring {
  stroke: var(--signal);
}

.tnode.is-reached .tnode__dot {
  fill: var(--signal);
}

.tnode.is-sel .tnode__ring,
.tnode:focus-visible .tnode__ring,
.tnode:hover .tnode__ring {
  stroke: var(--text);
  stroke-width: 2.5;
}

.tnode__label {
  font: 500 12px var(--f-body);
  fill: var(--text);
  stroke: rgba(5, 10, 19, 0.92);
  stroke-width: 4px;
  stroke-linejoin: round;
  paint-order: stroke;
}

.tmap__cargo {
  color: var(--on-signal);
}

.tmap__cargodot {
  fill: var(--signal);
}

.tmap__ring {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: ping 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.tmap__ring--late {
  animation-delay: 1.1s;
}

@keyframes ping {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

.tmap__pop {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: max-content;
  max-width: min(290px, calc(100% - 16px));
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(14, 26, 46, 0.97);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  cursor: default;
}

.tmap__poprole {
  font: 500 10px/1.3 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal-2);
}

.tmap__popcity {
  margin: 4px 28px 10px 0;
  font: 700 calc(26px * var(--d-scale)) / 1.05 var(--f-display);
  text-transform: uppercase;
}

.tmap__pop ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tmap__pop li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  line-height: 1.35;
}

.tmap__pop li.is-todo span {
  color: var(--muted);
}

.tmap__pop li.is-active span {
  color: var(--signal-2);
}

.tmap__pop time {
  font: 500 11px/1.6 var(--f-mono);
  white-space: nowrap;
  color: var(--muted);
}

.tmap__popx {
  position: absolute;
  right: 6px;
  top: 6px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.tmap__popx:hover {
  color: var(--text);
}

.tctl {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tctl button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(10, 19, 34, 0.88);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.tctl button:hover {
  border-color: var(--text);
}

.tlegend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  max-width: calc(100% - 28px);
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 10, 19, 0.72);
  font-size: 12px;
  color: var(--muted);
  list-style: none;
  pointer-events: none;
}

.tlegend li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tlegend i {
  display: block;
  width: 18px;
  border-top: 2.5px solid var(--signal);
}

.tlegend .is-rest i {
  border-top: 2px dotted rgba(150, 185, 235, 0.8);
}

.tlegend .is-now i {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: var(--signal);
}

/* ================= account ================= */
.cab {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--ink);
}

.cab__bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 60px;
  padding-left: max(18px, env(safe-area-inset-left, 0px));
  padding-right: max(18px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line);
  background: rgba(5, 10, 19, 0.94);
}

.cab__title {
  font: 700 calc(22px * var(--d-scale)) / 1 var(--f-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.cab__demo {
  padding: 5px 8px;
  border: 1px dashed rgba(255, 193, 77, 0.5);
  border-radius: 4px;
  font: 500 10px/1.2 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-2);
}

.lang--cab {
  margin-left: auto;
}

.cab__back {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.cab__body {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "list map" "detail map";
  align-items: start;
}

.cab__listwrap {
  grid-area: list;
  min-width: 0;
  padding: 20px 20px 0;
}

.cab__h,
.cabcard__h {
  margin: 0 0 12px;
  font: 500 11px/1.3 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cab__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cab__mapwrap {
  grid-area: map;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  min-width: 0;
  border-left: 1px solid var(--line);
}

.cab__detail {
  grid-area: detail;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px 20px calc(32px + env(safe-area-inset-bottom, 0px));
}

.ship {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--deep);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ship:hover {
  border-color: var(--line-2);
}

.ship.is-on {
  border-color: var(--signal);
  background: rgba(255, 138, 31, 0.09);
}

.ship__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ship__id {
  font: 500 12px/1 var(--f-mono);
  color: var(--signal-2);
}

.ship__modes {
  display: flex;
  gap: 4px;
  color: var(--muted);
}

.ship__route {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ship__bar,
.status__bar {
  position: relative;
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
}

.ship__bar i,
.status__bar i {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 2px;
  background: var(--signal);
}

.ship__status {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
}

.ship__status.is-done {
  color: var(--ok);
}

.cabcard {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--deep);
}

.status {
  border-color: rgba(255, 138, 31, 0.38);
  background: linear-gradient(160deg, rgba(255, 138, 31, 0.15), rgba(14, 26, 46, 0.6) 58%);
}

.status.is-done {
  border-color: rgba(74, 222, 154, 0.38);
  background: linear-gradient(160deg, rgba(74, 222, 154, 0.14), rgba(14, 26, 46, 0.6) 58%);
}

.status.is-done .status__bar i {
  background: var(--ok);
}

.status__kicker {
  margin: 0;
  font: 500 12px/1.4 var(--f-mono);
  color: var(--muted);
}

.status__title {
  margin: 10px 0 4px;
  font: 800 calc(clamp(34px, 3.2vw, 46px) * var(--d-scale)) / 1 var(--f-display);
  text-transform: uppercase;
}

.status__place {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.status__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 16px 0 0;
}

.status__grid dd {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.status__bar {
  height: 4px;
  margin-top: 20px;
}

.status__bar b {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  background: var(--ink);
}

.tl {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tl__item {
  position: relative;
}

.tl__item::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 30px;
  bottom: -8px;
  width: 1px;
  background: var(--line-2);
}

.tl__item:last-child::before {
  display: none;
}

.tl__item.is-done::before {
  background: var(--signal);
}

.tl__btn {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  width: 100%;
  padding: 8px 6px 8px 0;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tl__btn:hover {
  background: rgba(150, 185, 235, 0.06);
}

.tl__item.is-hl .tl__btn {
  background: rgba(98, 198, 255, 0.1);
}

.tl__mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  background: var(--deep);
  color: var(--on-signal);
}

.is-done > .tl__btn .tl__mark {
  border-color: var(--signal);
  background: var(--signal);
}

.is-active > .tl__btn .tl__mark {
  border-color: var(--signal);
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.2);
}

.is-active > .tl__btn .tl__mark::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  animation: beat 1.6s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(0.75); opacity: 0.7; }
  50% { transform: scale(1); opacity: 1; }
}

.tl__name {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.is-todo > .tl__btn .tl__name {
  color: var(--muted);
}

.tl__meta {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--dim);
}

.tl__when {
  padding-top: 3px;
  font: 500 11px/1.3 var(--f-mono);
  white-space: nowrap;
  color: var(--muted);
}

.is-active > .tl__btn .tl__when {
  color: var(--signal-2);
}

.cargo__name {
  margin: 0 0 12px;
  font-weight: 600;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.facts dd {
  margin: 4px 0 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.docs {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.docs li:first-child {
  padding-top: 0;
  border-top: 0;
}

.docs li:last-child {
  padding-bottom: 0;
}

.docs svg {
  color: var(--dim);
}

.docs span {
  flex: 1;
  min-width: 0;
}

.pill {
  padding: 5px 9px;
  border-radius: 999px;
  font: 500 11px/1 var(--f-mono);
  white-space: nowrap;
}

.pill--ready {
  background: rgba(74, 222, 154, 0.13);
  color: var(--ok);
}

.pill--progress {
  background: rgba(255, 193, 77, 0.13);
  color: var(--signal-2);
}

.pill--pending {
  background: rgba(150, 185, 235, 0.1);
  color: var(--muted);
}

/* ================= responsive ================= */

/* portrait screens: the globe takes the top of every screen, copy sits below it */
@media (max-aspect-ratio: 4/5) {
  .stage__scrim {
    background: linear-gradient(180deg, rgba(5, 10, 19, 0.35) 0%, rgba(5, 10, 19, 0) 12%, rgba(5, 10, 19, 0) 26%, rgba(5, 10, 19, 0.84) 50%, rgba(5, 10, 19, 0.96) 100%);
  }

  .hero {
    padding-top: 33vh;
    padding-top: 33svh;
  }

  .hero__in {
    justify-content: flex-start;
    gap: 16px;
  }

  .hero__title {
    font-size: calc(clamp(52px, 17.5vw, 120px) * var(--d-scale));
  }

  .hero__foot {
    margin-top: 32px;
  }

  .chapter,
  .routes {
    align-items: flex-end;
    padding-top: 42vh;
    padding-top: 42svh;
    padding-bottom: 56px;
  }

  .contact {
    padding-top: 96px;
  }
}

@media (max-width: 1080px) {
  .rail {
    display: none;
  }
}

@media (max-width: 1000px) {
  .cgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 58px;
  }

  .nav {
    display: none;
  }

  .header {
    gap: 10px;
  }

  .lang {
    margin-left: auto;
  }

  .header__cab-full {
    display: none;
  }

  .header__cab-short {
    display: inline;
  }

  .header__cab {
    padding: 0 13px;
  }

  .tracksec__in {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts3 {
    flex-direction: column;
    gap: 10px;
  }

  .facts3 li {
    max-width: none;
  }

  .facts3 b {
    width: 26px;
    font-size: 38px;
  }

  .cue {
    display: none;
  }

  /* account: list, then map, then details in one scrolling column */
  .cab__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "list" "map" "detail";
  }

  .cab__listwrap {
    padding: 14px 0 12px;
  }

  .cab__h {
    padding-inline: 16px;
  }

  .cab__list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-inline: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .cab__list::-webkit-scrollbar {
    display: none;
  }

  .ship {
    flex: 0 0 232px;
    scroll-snap-align: center;
  }

  .cab__mapwrap {
    position: relative;
    top: auto;
    height: 46vh;
    height: 46svh;
    min-height: 300px;
    border-left: 0;
    border-block: 1px solid var(--line);
  }

  .cab__detail {
    padding-inline: 16px;
  }

  .cab__title {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .cgrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .logo {
    font-size: 26px;
  }

  .logo__mark {
    width: 24px;
    height: 24px;
  }

  .lang button {
    padding: 7px 7px;
  }

  .header__cab-short {
    display: none;
  }

  .header__cab {
    width: 42px;
    padding: 0;
  }

  /* the order button shrinks to its arrow; its label stays for screen readers */
  .track .btn {
    width: 48px;
    padding: 0;
  }

  .track .btn span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .msgs--big {
    flex-direction: column;
    align-self: stretch;
  }

  .msgs--big .msg {
    justify-content: center;
  }

  .mode {
    padding: 12px;
    column-gap: 10px;
  }

  .mode svg {
    width: 22px;
    height: 22px;
  }

  .cab__demo {
    display: none;
  }

  .cab__back span {
    display: none;
  }

  .cab__back {
    width: 40px;
    padding: 0;
  }

  .tlegend {
    left: 10px;
    bottom: 10px;
    font-size: 11px;
  }

  .tctl {
    right: 10px;
    top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
