/* ==========================================================================
   Legacy Cargo — Editorial landing
   System: design.md (darkroom product editorial) × Legacy brand palette
   ========================================================================== */

@font-face {
  font-family: "Avenir Next";
  src: url("assets/fonts/AvenirNext-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Next";
  src: url("assets/fonts/AvenirNext-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Avenir Next";
  src: url("assets/fonts/AvenirNext-DemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Halyard Display";
  src: url("assets/fonts/HalyardDisplay.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root,
[data-theme="black"] {
  /* Black — deepest canvas, maximum contrast for the red */
  --canvas: #0a0909;
  --canvas-alt: #131111;
  --surface: #1f1b1a;
  --surface-hover: #2b2625;
  --border: #34302e;
  --muted: #8a827c;
  --sand: #d6d1cc;
  --cream: #f7f3f0;
  --sea: #7ec8e3;
  --glow: 0.26;
}

/* White — Off White canvas; --cream stays the foreground role, so it flips to Off Black */
[data-theme="white"] {
  --canvas: #f7f3f0;
  --canvas-alt: #efe9e4;
  --surface: #ffffff;
  --surface-hover: #f2ede9;
  --border: #d6d1cc;
  --muted: #7a726c;
  --sand: #5c5754;
  --cream: #0f0e0e;
  --sea: #1f86ad;
  --glow: 0.14;
}

/* Photographic surfaces and the un-scrolled nav over the hero stay dark in every theme */
[data-theme="white"] .hero,
[data-theme="white"] .interlude,
[data-theme="white"] .ops__item,
[data-theme="white"] .video-modal,
[data-theme="white"] .nav:not(.is-scrolled) {
  --canvas: #0a0909;
  --surface: #1f1b1a;
  --border: #34302e;
  --muted: #8a827c;
  --sand: #d6d1cc;
  --cream: #f7f3f0;
  color: var(--cream);
}
[data-theme="white"] .nav.is-scrolled .nav__logo img { filter: brightness(0); }
[data-theme="white"] .footer__logo { filter: brightness(0); }
[data-theme="white"] .wh-card__native { background: var(--canvas-alt); }

:root {
  /* Legacy brand colours (same as legacycargove.com) */
  --red: #e20613;
  --red-deep: #c10510;
  --red-bright: #ff282e;
  --accent: var(--red);
  --red-glow: rgba(226, 6, 19, var(--glow));

  --font-display: "Avenir Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Halyard Display", "Avenir Next", ui-sans-serif, system-ui, sans-serif;
  --font-legal: Arial, system-ui, sans-serif;

  --text-label: 12px;
  --text-subheading: 18px;
  --text-heading-sm: 24px;
  --text-body: clamp(20px, 2vw, 29px);
  --text-heading: clamp(30px, 3.2vw, 41px);
  --text-display: clamp(40px, 4.4vw, 51px);

  --gutter: 18px;
  --edge: 24px;
  --radius-card: 12px;
  --radius-ghost: 22.5px;
  --radius-pill: 36px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-label);
  line-height: 1.2;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; text-transform: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p, figure, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 1px dashed var(--cream);
  outline-offset: 4px;
}

/* ---------- Type primitives ---------- */

.label {
  font-size: var(--text-label);
  font-weight: 500;
  color: var(--sand);
  letter-spacing: 0;
}

.heading {
  font-size: var(--text-heading);
  line-height: 0.9;
  font-weight: 500;
}

.display {
  font-size: var(--text-display);
  line-height: 0.9;
  font-weight: 500;
}

/* The only mixed-case voice in the system */
.body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.26;
  font-weight: 400;
  text-transform: none;
  color: var(--cream);
}

.micro {
  font-size: 10px;
  color: var(--muted);
}

.dash {
  border: 0;
  border-top: 1px dashed var(--border);
  margin: var(--gutter) 0;
  width: 100%;
}

/* ---------- Buttons ---------- */

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--cream);
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn-pill:hover { background: var(--surface-hover); }

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-bright); }
.btn-red:active { transform: scale(0.98); }

.accent { color: var(--red); }
.sea { color: var(--sea); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7.5px 18px;
  border: 1px solid var(--cream);
  border-radius: var(--radius-ghost);
  color: var(--cream);
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn-ghost:hover { background: var(--cream); color: var(--canvas); }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--edge);
  pointer-events: none;
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0 0 -24px 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--canvas) 0%, color-mix(in srgb, var(--canvas) 85%, transparent) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.nav.is-scrolled::before { opacity: 1; }
.nav > * { pointer-events: auto; }

.nav__logo img {
  height: 40px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 31px;
  margin-left: auto;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 31px;
}

.theme-switch {
  display: flex;
  margin-left: 0;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-ghost);
  background: color-mix(in srgb, var(--canvas) 60%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.theme-switch button {
  padding: 6px 12px;
  border-radius: var(--radius-ghost);
  font-size: 10px;
  color: var(--sand);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.theme-switch button[aria-pressed="true"] { background: var(--red); color: #fff; }

.nav__login {
  padding: 8px 18px;
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav__link {
  position: relative;
  font-size: 12px;
  padding-bottom: 4px;
  opacity: 0.72;
  transition: opacity 0.3s var(--ease);
}
.nav__link:hover { opacity: 1; }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 2px solid var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav__link.is-active { opacity: 1; }
.nav__link.is-active::after { transform: scaleX(1); }

/* ---------- Vertical sidebar label ---------- */

.side-label {
  position: fixed;
  right: var(--edge);
  top: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: var(--sand);
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  pointer-events: none;
}
.side-label__dash {
  display: block;
  height: 41px;
  border-left: 1px solid var(--red);
}

/* ---------- 3D stage ---------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(ellipse 30% 34% at 50% 54%, var(--red-glow), transparent 70%),
    radial-gradient(ellipse 60% 60% at 50% 52%, rgba(247, 243, 240, 0.05), transparent 70%);
}
.stage__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

main { position: relative; }

/* ---------- Hero (photographic mode) ---------- */

.hero {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: var(--canvas);
}

.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.95) contrast(1.08) brightness(0.72);
  transform: scale(1.06);
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 60% at 0% 100%, rgba(226, 6, 19, 0.38), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--canvas) 70%, transparent) 0%, transparent 38%),
    linear-gradient(0deg, var(--canvas) 0%, color-mix(in srgb, var(--canvas) 50%, transparent) 26%, transparent 58%);
}

.hero__lockup {
  position: absolute;
  left: var(--edge);
  top: 112px;
  z-index: 2;
}
.hero__tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: var(--gutter);
  color: var(--sand);
}
.hero__tagline::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(226, 6, 19, 0.6);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(226, 6, 19, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(226, 6, 19, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 6, 19, 0); }
}
.hero__wordmark {
  font-size: clamp(56px, min(12.5vw, 24vh), 200px);
  line-height: 0.86;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero__wordmark span { display: block; }
.hero__wordmark span + span { color: var(--red); }

.info-card {
  position: absolute;
  left: var(--edge);
  bottom: var(--edge);
  z-index: 2;
  width: min(360px, calc(100vw - 2 * var(--edge)));
  padding: 24px;
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--canvas) 45%, transparent);
  border: 1px solid rgba(247, 243, 240, 0.12);
  border-top: 2px solid var(--red);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.info-card__title {
  font-size: 14px;
  line-height: 1.1;
}
.info-card__body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 400;
  text-transform: none;
  color: var(--sand);
  margin-bottom: var(--gutter);
}
.info-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.info-card__video { display: none; }

.video-card {
  position: absolute;
  right: calc(var(--edge) + 34px);
  bottom: var(--edge);
  z-index: 2;
  width: 240px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  text-align: left;
}
.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.6) brightness(0.7);
  transition: transform 0.8s var(--ease), filter 0.5s var(--ease);
}
.video-card:hover video { transform: scale(1.05); filter: saturate(0.8) brightness(0.85); }
.video-card__brand {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}
.video-card__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 2px;
  background: var(--red);
  color: #fff;
  transition: transform 0.4s var(--ease);
}
.video-card:hover .video-card__play { transform: scale(1.12); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: var(--edge);
  z-index: 2;
  font-size: 10px;
  color: var(--sand);
  transform: translateX(-50%);
}
.hero__scroll::after {
  content: "";
  display: block;
  width: 1px;
  height: 31px;
  margin: 10px auto 0;
  border-left: 1px dashed var(--sand);
  animation: scroll-cue 2.2s var(--ease) infinite;
  transform-origin: top;
}
@keyframes scroll-cue {
  0% { transform: scaleY(0); }
  55% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- Reveal track (void mode) ---------- */

.reveal-track { position: relative; z-index: 2; }

.reveal {
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 40%) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: center;
  padding: 0 calc(var(--edge) + 48px) 0 var(--edge);
}
.reveal + .reveal { border-top: 1px dashed transparent; }

.reveal__col { max-width: 420px; }
.reveal__col--left { display: flex; flex-direction: column; gap: 24px; }
.reveal__col--right { justify-self: end; }

/* ---------- Interlude ---------- */

.interlude {
  position: relative;
  z-index: 2;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--canvas);
}
.interlude__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}
.interlude::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--canvas) 0%, transparent 45%);
}
.interlude__caption {
  position: absolute;
  left: var(--edge);
  bottom: 68px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- Ticker ---------- */

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--red);
  color: #fff;
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 40s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group {
  display: flex;
  align-items: center;
  gap: 31px;
  padding: 16px 31px 16px 0;
  font-size: 14px;
  white-space: nowrap;
}
.ticker__group img { width: 20px; height: auto; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Stats (brand-red block) ---------- */

.stats {
  position: relative;
  z-index: 2;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  gap: 68px var(--gutter);
  align-items: end;
  padding: 120px calc(var(--edge) + 48px) 120px var(--edge);
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
}
.stats::after {
  content: "";
  position: absolute;
  right: -6vw;
  top: 50%;
  width: 46vw;
  aspect-ratio: 1276 / 796;
  background: url("assets/logo/isotipo-white.png") center / contain no-repeat;
  opacity: 0.08;
  transform: translateY(-50%);
  pointer-events: none;
}
.stats .label { color: rgba(255, 255, 255, 0.78); }
.stats__head { display: flex; flex-direction: column; gap: 24px; align-self: start; }
.stats__list { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.stat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px dashed rgba(255, 255, 255, 0.5);
}
.stat__num { font-size: clamp(48px, 5.2vw, 96px); line-height: 0.9; font-variant-numeric: tabular-nums; }
.stat__txt { max-width: 220px; font-size: 12px; color: rgba(255, 255, 255, 0.85); }

/* ---------- Routes ---------- */

.routes {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--gutter);
  align-items: center;
  padding: 120px calc(var(--edge) + 48px) 120px var(--edge);
  background: var(--canvas);
}
.routes__head { display: flex; flex-direction: column; gap: 24px; align-self: start; padding-top: 12vh; }

.routes__list { border-top: 1px dashed var(--border); }
.route {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: baseline;
  gap: var(--gutter);
  padding: 31px 0;
  border-bottom: 1px dashed var(--border);
  transition: padding-left 0.5s var(--ease);
}
.route:hover { padding-left: 12px; }
.route__idx { font-size: 12px; color: var(--red); }
.route__name { font-size: var(--text-heading); line-height: 0.9; transition: color 0.4s var(--ease); }
.route:hover .route__name { color: var(--red); }
.route__modes { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10px; }
.tag {
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: var(--radius-ghost);
  line-height: 1;
}
.tag--air { color: var(--red-bright); }
.tag--sea { color: var(--sea); }
.tag--door { color: #fff; background: var(--red); border-color: var(--red); }

/* ---------- Operations ---------- */

.ops {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 68px;
  padding: 120px 0 0;
  background: var(--canvas);
  border-top: 1px dashed var(--border);
}
.ops__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gutter);
  padding: 0 calc(var(--edge) + 48px) 0 var(--edge);
  align-items: end;
}
.ops__head .body { max-width: 520px; justify-self: end; }

.ops__strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 62vh;
}
.ops__item {
  position: relative;
  overflow: hidden;
}
.ops__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.06) brightness(0.8);
  transform: scale(1.08);
  transition: filter 0.6s var(--ease), transform 1.2s var(--ease);
}
.ops__item:hover img { filter: saturate(1.1) contrast(1.04) brightness(0.95); transform: scale(1.02); }
.ops__item::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.ops__item:hover::after { transform: scaleX(1); }
.ops__item figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cream);
}
.ops__item figcaption::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

/* Global hidden utility */
[hidden] {
  display: none !important;
}

/* ---------- Warehouses (Minimalist Editorial) ---------- */

.warehouses {
  position: relative;
  z-index: 2;
  padding: 120px var(--edge);
  background: var(--canvas);
}

.warehouses__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* Header with Controls placed in the top-right space */
.warehouses__top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: end;
  justify-content: space-between;
}

.warehouses__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.warehouses__controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  width: 100%;
}

/* Minimalist Segmented Mode Selector - Max format */
.wh-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-ghost);
  background: var(--surface);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.wh-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: var(--radius-ghost);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sand);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.wh-switch__btn:hover {
  color: var(--cream);
  background: var(--surface-hover);
}

.wh-switch__btn.is-active {
  background: var(--canvas);
  color: var(--cream);
  border: 1px solid var(--border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

.wh-switch__btn svg {
  transition: transform 0.25s var(--ease);
}

.wh-switch__btn:hover svg {
  transform: scale(1.1);
}

.wh-switch__btn.is-active svg {
  color: var(--red);
}

/* Minimal Initial Cue */
.wh-hint {
  font-family: var(--font-body);
  font-size: 13px;
  text-transform: none;
  color: var(--muted);
  margin: 0;
  text-align: right;
  max-width: 480px;
}

/* Minimal Alert Banner */
.wh-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  font-size: 12px;
  color: var(--sand);
  text-transform: none;
  width: 100%;
  max-width: 480px;
  animation: whPopIn 0.3s var(--ease) forwards;
}

.wh-alert__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  flex-shrink: 0;
}

.wh-alert__text {
  font-family: var(--font-body);
  line-height: 1.4;
}

/* Minimal Warehouse Cards Grid */
.wh-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.wh-panel {
  animation: whPopIn 0.35s var(--ease) forwards;
}

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

/* Minimal Warehouse Item */
.wh-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: border-color 0.25s var(--ease);
}

.wh-item:hover {
  border-color: color-mix(in srgb, var(--cream) 30%, transparent);
}

.wh-item--alert {
  border-color: color-mix(in srgb, var(--red) 30%, var(--border));
}

.wh-item__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.wh-item__idx {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.wh-item__title {
  flex: 1;
}

.wh-item__title h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 2px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.wh-item__title .label {
  color: var(--sand);
}

.wh-item__warn {
  font-size: 11px;
  line-height: 1.4;
  color: #ff9da1;
  padding: 6px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--red) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 25%, transparent);
  text-transform: none;
}

.wh-item__desc {
  color: var(--sand);
  text-transform: none;
  line-height: 1.4;
  margin: 0;
}

/* Minimal Language Switch */
.wh-item__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.wh-item__lang-btn {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s var(--ease);
}

.wh-item__lang-btn:hover {
  color: var(--cream);
}

.wh-item__lang-btn.is-active {
  color: var(--cream);
  font-weight: 600;
  border-bottom: 1px solid var(--red);
}

.wh-item__lang-sep {
  color: var(--border);
}

.wh-item__address {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--cream);
  padding: 12px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--canvas) 60%, transparent);
  border: 1px solid var(--border);
  user-select: all;
  word-break: break-word;
  text-transform: none;
  min-height: 64px;
}

.wh-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.wh-item__link {
  font-size: 11px;
  color: var(--sand);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s var(--ease);
}

.wh-item__link:hover {
  color: var(--cream);
}

/* ---------- Calculator ---------- */

.calc {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--gutter);
  padding: 140px calc(var(--edge) + 48px) 120px var(--edge);
  background:
    radial-gradient(ellipse 45% 55% at 0% 100%, var(--red-glow), transparent 70%),
    var(--canvas-alt);
}
.calc [hidden] { display: none !important; }

.calc__head {
  position: sticky;
  top: 120px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 460px;
}

.calc__main {
  width: 100%;
  max-width: 680px;
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 41px;
}

.calc__form { display: flex; flex-direction: column; gap: 31px; }

.calc fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.calc legend { padding: 0; margin-bottom: 14px; }

.calc .calc__group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--border);
}

.calc__options { display: flex; flex-wrap: wrap; gap: 12px 31px; }

.opt { position: relative; cursor: pointer; }
.opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.opt span {
  display: block;
  padding-bottom: 4px;
  font-size: var(--text-heading-sm);
  line-height: 1.09;
  border-bottom: 1px dashed transparent;
  opacity: 0.4;
  transition: opacity 0.3s var(--ease), border-color 0.3s var(--ease);
}
.opt:hover span { opacity: 0.75; }
.opt input:checked + span { opacity: 1; border-bottom: 2px solid var(--red); }
.opt input:focus-visible + span { outline: 1px dashed var(--cream); outline-offset: 4px; }
.calc__options--sm .opt span { font-size: var(--text-label); }

.calc__row { display: grid; gap: var(--gutter) 31px; }
.calc__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calc__row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.calc__row--submit { grid-template-columns: 120px auto; justify-content: space-between; align-items: end; }

.field { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.field__line {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-bottom: 1px solid var(--cream);
}
.field__line input,
.field__line select {
  flex: 1;
  min-width: 0;
  padding: 10px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font: 500 var(--text-heading-sm) / 1.09 var(--font-display);
  text-transform: uppercase;
  outline: none;
  -moz-appearance: textfield;
}
.field__line input::placeholder { color: var(--muted); }
.field__line input::-webkit-outer-spin-button,
.field__line input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__line { transition: border-color 0.3s var(--ease); }
.field__line:focus-within { border-bottom-color: var(--red); }
.field__line em { font-style: normal; font-size: var(--text-label); color: var(--sand); }

.field__line select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  font-size: var(--text-subheading);
  cursor: pointer;
}
.field__line select option { background: var(--canvas); color: var(--cream); }
.field__line--select::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--cream);
  border-bottom: 1px solid var(--cream);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}

.calc__submit { min-height: 46px; padding: 14px 31px; }
.calc__submit:disabled { opacity: 0.5; cursor: progress; }

.calc__error { font-size: var(--text-label); color: var(--red-bright); }

.calc__result {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: var(--radius-card);
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, var(--red-glow), transparent 70%),
    var(--surface);
}
.calc__result .dash { margin: 4px 0; }
.calc__price {
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
  font-weight: 500;
}
.calc__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px var(--gutter); margin: 0; }
.calc__facts div { display: flex; flex-direction: column; gap: 8px; }
.calc__facts dd { margin: 0; font-size: var(--text-heading-sm); line-height: 1.09; }
.calc__notes { display: flex; flex-direction: column; gap: 6px; font-size: 10px; line-height: 1.3; color: var(--muted); }
.calc__wa { align-self: start; min-height: 46px; padding: 7.5px 22px; margin-top: 4px; }

/* ---------- Contact ---------- */

.contact {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: var(--gutter) var(--gutter);
  padding: 140px calc(var(--edge) + 48px) var(--edge) var(--edge);
  background:
    radial-gradient(ellipse 50% 60% at 100% 0%, var(--red-glow), transparent 70%),
    var(--canvas);
  border-top: 1px dashed var(--border);
}
.contact__left .display span { color: var(--red); }
.contact__left { display: flex; flex-direction: column; gap: 24px; }
.contact__right { max-width: 560px; justify-self: end; display: flex; flex-direction: column; gap: 41px; }

.track { display: flex; flex-direction: column; gap: 12px; }
.track__field {
  position: relative;
  border-bottom: 1px solid var(--cream);
}
.track__field input {
  width: 100%;
  padding: 10px 36px 10px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font: 500 var(--text-heading-sm) / 1.09 var(--font-display);
  text-transform: uppercase;
  outline: none;
}
.track__field input::placeholder { color: var(--muted); }
.track__field button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s var(--ease);
}
.track__field button:hover { transform: translate(4px, -50%); }
.track__field button:disabled { opacity: 0.4; cursor: progress; }
.track__field:focus-within { border-bottom-color: var(--red); }
.track__msg { font-size: var(--text-label); color: var(--sand); }

.track-result {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  margin-top: -18px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: var(--radius-card);
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, var(--red-glow), transparent 70%),
    var(--surface);
}
.track-result[hidden] { display: none; }
.track-result .dash { margin: 0; }
.track-result__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.track-result__code { font-size: 14px; }
.track-result__status {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--text-heading);
  line-height: 0.9;
}
.track-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.track-dot--active { background: var(--red); animation: pulse 2.4s var(--ease) infinite; }
.track-dot--ok { background: #2fb36b; }
.track-dot--bad { background: var(--muted); outline: 1px solid var(--red); outline-offset: 2px; }

.track-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.track-step { display: flex; flex-direction: column; gap: 8px; }
.track-step__bar { height: 4px; border-radius: 2px; background: var(--border); }
.track-step.is-done .track-step__bar { background: var(--red-deep); }
.track-step.is-current .track-step__bar { background: var(--red); }
.track-step__label { font-size: 9px; line-height: 1.2; color: var(--muted); }
.track-step.is-done .track-step__label,
.track-step.is-current .track-step__label { color: var(--cream); }

.track-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px var(--gutter); margin: 0; }
.track-facts div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.track-facts dd { margin: 0; font-size: 16px; line-height: 1.1; overflow-wrap: anywhere; }

.track-history { display: flex; flex-direction: column; border-top: 1px dashed var(--border); }
.track-history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 12px;
}
.track-history__meta { color: var(--sand); text-align: right; }
.track-result__note { font-size: 10px; color: var(--muted); }

.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact__actions .btn-ghost { padding: 7.5px 22px; min-height: 46px; }

.contact__meta { display: flex; flex-wrap: wrap; gap: 12px 31px; font-size: 12px; color: var(--sand); margin-top: -18px; }
.contact__meta a { border-bottom: 1px solid transparent; transition: border-color 0.3s var(--ease); }
.contact__meta a:hover { border-color: var(--sand); }

/* ---------- Full Footer ---------- */

.footer {
  position: relative;
  z-index: 2;
  background: var(--canvas-alt);
  padding: 80px calc(var(--edge) + 48px) 40px var(--edge);
  border-top: 1px dashed var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin-bottom: 60px;
}

.footer__col--brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.footer__logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  align-self: flex-start;
}
.footer__col--brand .micro {
  max-width: 320px;
  line-height: 1.6;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  font-size: 12px;
}
.footer__links a {
  color: var(--sand);
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}
.footer__links a:hover {
  color: var(--cream);
  padding-left: 4px;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gutter);
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-legal);
  font-size: 9px;
  font-weight: 500;
}
.legal__note { color: var(--muted); }
.legal__credit { color: var(--accent); }

/* ---------- Video modal ---------- */

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 68px var(--edge);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
}
.video-modal[hidden] { display: none; }
.video-modal video {
  width: min(1100px, 100%);
  max-height: 80vh;
  border-radius: var(--radius-card);
  background: #000;
}
.video-modal__close {
  position: absolute;
  top: var(--edge);
  right: var(--edge);
}

/* ---------- Pre-animation states (only when JS/GSAP runs) ---------- */

.js [data-hero-in] { opacity: 0; }

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .nav__links { gap: 18px; }
  .side-label { display: none; }

  .reveal {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    align-items: stretch;
    padding: 96px var(--edge) 48px;
  }
  .reveal__col { max-width: none; }
  .reveal__col--right { justify-self: start; align-self: end; }

  .routes,
  .ops__head,
  .calc,
  .contact { grid-template-columns: 1fr; padding-right: var(--edge); }
  .warehouses { padding-top: 96px; padding-bottom: 96px; }
  .warehouses__top { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .warehouses__controls { align-items: flex-start; }
  .wh-hint { text-align: left; max-width: 100%; }
  .wh-switch,
  .wh-alert { max-width: 100%; }
  .wh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: 1fr; padding: 96px var(--edge); }
  .stats::after { width: 80vw; right: -20vw; }
  .calc { gap: 48px; padding-top: 96px; }
  .calc__head { position: static; }
  .calc__main { justify-self: start; }
  .routes__head { padding-top: 0; }
  .ops__head .body,
  .contact__right { justify-self: start; }
  .ops__strip { grid-template-columns: repeat(2, minmax(0, 1fr)); height: auto; }
  .ops__item { aspect-ratio: 4 / 5; }

  .footer { padding-right: var(--edge); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }

  .video-card { right: var(--edge); width: 180px; }
}

@media (max-width: 640px) {
  .nav { padding: 18px; }
  .nav__links { display: none; }
  .nav__logo img { height: 32px; }
  .nav__actions { margin-left: auto; gap: 10px; }
  .nav__login { padding: 6px 14px; font-size: 10px; }

  .hero__lockup { top: 96px; left: 18px; }
  .hero__wordmark { font-size: 18vw; }
  .info-card { left: 18px; bottom: 18px; width: calc(100vw - 36px); }
  .video-card { display: none; }
  .info-card__video { display: inline-flex; }
  .hero__scroll { display: none; }

  .stats__list { grid-template-columns: 1fr; gap: 31px; }
  .ticker__group { font-size: 12px; padding-block: 12px; }

  .wh-cards { grid-template-columns: 1fr; }
  .wh-switch { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); }
  .wh-switch__btn { justify-content: center; padding: 10px 14px; }

  .calc__row--2 { grid-template-columns: 1fr; }
  .calc__row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc__row--submit { grid-template-columns: 1fr; }
  .calc__submit { width: 100%; }
  .calc__facts { grid-template-columns: 1fr; }
  .track-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }

  .route { grid-template-columns: 36px 1fr; }
  .route__modes { grid-column: 2; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; align-items: start; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-hero-in] { opacity: 1; }
}
