/* One immersive hero: the Three.js stage fills #home and the copy floats above it. */
.hero {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-bottom: 1.4rem;
  background: #030a0d;
  isolation: isolate;
}
.hero::before,
.hero::after { z-index: 1; pointer-events: none; }
.hero::before {
  opacity: 1;
  background:
    linear-gradient(270deg, rgba(2, 10, 9, 0.93) 0%, rgba(2, 10, 9, 0.74) 25%, rgba(2, 10, 9, 0.18) 62%, rgba(2, 10, 9, 0.08)),
    linear-gradient(180deg, rgba(2, 10, 9, 0.75), transparent 24%, transparent 70%, rgba(2, 10, 9, 0.8));
}
html[dir="ltr"] .hero::before {
  background:
    linear-gradient(90deg, rgba(2, 10, 9, 0.93) 0%, rgba(2, 10, 9, 0.74) 25%, rgba(2, 10, 9, 0.18) 62%, rgba(2, 10, 9, 0.08)),
    linear-gradient(180deg, rgba(2, 10, 9, 0.75), transparent 24%, transparent 70%, rgba(2, 10, 9, 0.8));
}
.hero::after { background: linear-gradient(180deg, transparent 72%, #030a0d 94%); }
.hero-layer {
  flex: 1;
  display: flex;
  flex-direction: column;
  z-index: 3;
  pointer-events: none;
}
.hero .top-nav,
.hero-text-col,
.hero-scene-footer { pointer-events: auto; }
.hero .top-nav { backdrop-filter: none; }
.hero-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: clamp(2.5rem, 5svh, 4rem) 0 3rem;
}
.hero-text-col { width: min(42rem, 54%); }
.hero-title {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.3);
}
.hero-title .accent { color: #9cd2ae; }
.hero-sub { color: #b8c8be; font-size: 1.05rem; }
.hero-badge {
  border-radius: 2px;
  border-color: #506b5c;
  background: rgba(12, 28, 21, 0.5);
  color: #b6d2c1;
  font-size: 0.8rem;
}
.hero .btn-demo { border-radius: 2px; background: #9bc7a9; color: #0a1d11; box-shadow: none; }
.hero .btn-demo:hover { background: #b7dbc0; }
.hero .btn-video,
.hero .btn-panel { border-radius: 2px; border-color: #506258; background: rgba(5, 16, 12, 0.55); }
.hero-highlights { gap: 0.7rem 1.15rem; }
.hero-highlights span { color: #acbfb2; font-size: 0.8rem; }
.hero-highlights i { color: #91b89f; }
.hero .language-options,
.hero .nav-map-signal { border-radius: 2px; background: rgba(5, 16, 12, 0.55); }
.hero .language-option { border-radius: 1px; }
.hero .nav-map-signal { color: #a9c3b2; font: 0.7rem "SFMono-Regular", Consolas, monospace; }

/* The scene is a sibling of the foreground content, with no card or column. */
.hero-map-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #030a0d;
}
.hero-map-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: layout paint;
  background:
    linear-gradient(rgba(5, 18, 11, 0.66), rgba(5, 18, 11, 0.66)),
    url("../image/hero-airport.webp?v=1.3") center / cover;
  background-blend-mode: multiply, luminosity;
  background-color: #123222;
}
.hero-map-stage::before,
.hero-map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-map-stage::before {
  background:
    linear-gradient(rgba(173, 204, 180, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(173, 204, 180, 0.045) 1px, transparent 1px);
  background-size: 8.333% 12.5%;
}
.hero-map-stage::after {
  background:
    repeating-linear-gradient(0deg, rgba(0, 7, 3, 0.1) 0, rgba(0, 7, 3, 0.1) 1px, transparent 1px, transparent 4px),
    radial-gradient(ellipse at center, transparent 38%, rgba(1, 9, 5, 0.35) 100%);
}
.hero-map-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero-map.is-ready .hero-map-canvas { opacity: 1; }
.hero-map-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.hero-map-label {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid rgba(139, 171, 148, 0.4);
  border-inline-start: 2px solid var(--marker-color);
  border-radius: 1px;
  background: rgba(3, 15, 9, 0.87);
  color: #c4d7ca;
  font-size: 0.65rem;
  font-weight: 450;
  white-space: nowrap;
  will-change: transform;
}
.hero-map-label[hidden] { display: none; }
.hero-map-label::after {
  content: "";
  position: absolute;
  width: 1px;
  height: var(--leader-height, 14px);
  top: 100%;
  left: 50%;
  background: linear-gradient(var(--marker-color), transparent);
}
.hero-map-label i:first-child { display: none; }
.hero-map-label small {
  color: #879f8d;
  font: 0.55rem "SFMono-Regular", Consolas, monospace;
  direction: ltr;
  padding-inline-start: 0.25rem;
  border-inline-start: 1px solid #304437;
}
.hero-map-label .hero-map-gps-icon { display: none; color: #a6cfaf; font-size: 0.7rem; }
.hero-map-label.is-carrier .hero-map-gps-icon { display: inline; }
.hero-map-hud {
  position: absolute;
  inset: 6.5rem max(1.5rem, calc((100% - 1296px) / 2)) auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  direction: ltr;
  pointer-events: none;
  color: #a1b7a9;
  font: 0.6rem "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.1em;
  opacity: 0.8;
}
.hero-map-scan {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 72px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(161, 201, 155, 0.015) 70%, rgba(161, 201, 155, 0.07) 98%, rgba(184, 227, 175, 0.26));
  will-change: transform;
  display: none;
}
.hero-map.is-ready .hero-map-scan { display: block; }
.hero-map-place,
.hero-map-fallback {
  position: absolute;
  z-index: 3;
  top: 6.5rem;
  padding: 0.28rem 0.55rem;
  color: #a9bfae;
  font-size: 0.6rem;
  background: rgba(2, 12, 7, 0.5);
}
.hero-map-place { left: 50%; transform: translateX(-50%); }
.hero-map-fallback { inset-inline-end: 1rem; top: 8.5rem; }
.hero-map.is-ready .hero-map-fallback { display: none; }

/* Small, borderless journey readout remains on top of the same background. */
.hero-scene-footer {
  width: min(31rem, 100%);
  margin-inline-start: auto;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, rgba(3, 14, 9, 0.78), rgba(3, 14, 9, 0.3));
  padding: 0.75rem 1rem;
  border-inline-start: 1px solid rgba(154, 197, 165, 0.45);
}
.hero-map-topline,
.hero-map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.hero-map-status { display: inline-flex; align-items: center; gap: 0.45rem; color: #bfd7c8; font-size: 0.67rem; font-weight: 600; }
.hero-map-status-dot { width: 4px; height: 4px; border-radius: 50%; background: #9ccea7; }
.hero-map-coordinates,
#heroJourneyCount { color: #9ab5a3; direction: ltr; font: 0.6rem "SFMono-Regular", Consolas, monospace; }
.hero-map-story { padding: 0.65rem 0 0.6rem; }
.hero-map-story-heading { display: flex; justify-content: space-between; gap: 0.6rem; color: #deeadf; font-size: 0.8rem; }
.hero-map-story p { margin: 0.35rem 0 0.7rem; color: #a5bcac; font-size: 0.68rem; min-height: 2.7em; }
.hero-map-steps { display: flex; justify-content: space-between; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.hero-map-steps li { display: flex; align-items: center; gap: 0.3rem; color: #8aab97; font-size: 0.66rem; }
.hero-map-steps li.is-current { color: #e1f2e6; }
.hero-map-steps li.is-current i { color: #a5d4b2; }
.hero-map-steps li.is-complete { color: #96bca3; }
.hero-map-progress { height: 1px; margin-top: 0.7rem; overflow: hidden; background: rgba(109, 151, 122, 0.24); }
.hero-map-progress span { display: block; height: 100%; background: #b6d9bf; transform: scaleX(var(--journey-progress, 0)); transform-origin: right; }
html[dir="ltr"] .hero-map-progress span { transform-origin: left; }
.hero-map-toolbar { min-height: 2.2rem; }
.hero-map-legend { display: flex; flex-wrap: wrap; gap: 0.45rem 0.7rem; color: #a7bdad; font-size: 0.6rem; }
.hero-map-legend > span { display: inline-flex; align-items: center; gap: 0.3rem; }
.hero-map-key { width: 13px; height: 2px; }
.key-person { background: #80c8a1; }
.key-car { background: #d7b76b; }
.key-metro { background: #8eb5a9; }
.key-device { background: #8ebd9c; }
.hero-map-controls { display: flex; align-items: center; gap: 0.3rem; }
.hero-map-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  flex-shrink: 0;
  min-height: 2.25rem;
  min-width: 2.25rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(142, 185, 153, 0.4);
  border-radius: 1px;
  background: rgba(13, 28, 20, 0.5);
  color: #c1dbca;
  font: inherit;
  font-size: 0.65rem;
  cursor: pointer;
}
.hero-map-pause:hover { background: rgba(125, 168, 136, 0.15); }
.hero-map-pause:focus-visible { outline: 2px solid #b2d6ba; outline-offset: 3px; }
.hero-map-pause:disabled { display: none; }
.hero .stats-bar {
  position: relative;
  right: auto;
  bottom: auto;
  transform: none;
  margin: 0 auto;
  width: min(1320px, calc(100% - 2.8rem));
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(133, 168, 145, 0.3);
  background: rgba(3, 14, 9, 0.38);
  box-shadow: none;
  backdrop-filter: none;
  padding: 0.75rem 0 0;
}
.hero .stat-card { border-radius: 0; border-color: transparent; background: transparent; }
.hero .stat-value { color: #acd1b7; font-size: clamp(1.1rem, 1.4vw, 1.5rem); font-weight: 650; }
.hero .stat-label { color: #bdcfc2; }
.hero .stat-meta { color: #93af9c; }
.hero .stat-icon { border-radius: 2px; background: rgba(20, 39, 29, 0.65); color: #a6c3af; }

@media (max-width: 1199.98px) {
  .hero-text-col { width: min(36rem, 62%); }
  .hero-title { font-size: clamp(2.5rem, 4.8vw, 3.6rem); }
  .hero-scene-footer { width: min(29rem, 100%); }
}
@media (max-width: 767.98px) {
  .hero { min-height: 100svh; padding-bottom: 1rem; }
  .hero::before,
  html[dir="ltr"] .hero::before {
    background: linear-gradient(180deg, rgba(2, 10, 9, 0.85) 0%, rgba(2, 10, 9, 0.8) 32%, rgba(2, 10, 9, 0.15) 57%, rgba(2, 10, 9, 0.65) 78%, rgba(2, 10, 9, 0.9));
  }
  .hero::after { background: linear-gradient(180deg, transparent 85%, #030a0d); }
  .hero .top-nav .navbar-collapse { background: rgba(3, 14, 9, 0.95); }
  .hero-content { display: block; padding-top: 3.5rem; padding-bottom: calc(61vw + 2.5rem); }
  .hero-text-col { width: 100%; max-width: 36rem; }
  .hero-title { font-size: clamp(2rem, 6.8vw, 3.1rem); }
  .hero-sub { font-size: 0.96rem; line-height: 1.85; }
  .hero-highlights { gap: 0.65rem; }
  .hero-highlights span { font-size: 0.71rem; }
  .hero-map-hud { inset: 5.9rem 1rem auto; font-size: 0.48rem; }
  .hero-map-place { top: 5.8rem; font-size: 0.52rem; }
  .hero-scene-footer { width: 100%; margin-bottom: 1rem; padding: 0.6rem 0.7rem; }
  .hero-map-coordinates { font-size: 0.5rem; }
  .hero-map-status { font-size: 0.6rem; }
  .hero-map-label { padding: 0.17rem 0.28rem; font-size: 0.55rem; }
  .hero-map-label small { display: none; }
  .hero-map-story-heading { font-size: 0.72rem; }
  .hero-map-story p { font-size: 0.64rem; }
  .hero-map-steps li { gap: 0.2rem; font-size: 0.6rem; }
  .hero-map-legend { font-size: 0.56rem; gap: 0.3rem; }
  .hero-map-legend .key-device + span { max-width: 3rem; line-height: 1.3; }
  .hero-map-pause { min-width: 2.75rem; min-height: 2.75rem; padding: 0.25rem; font-size: 0.6rem; }
  .hero .stats-bar { width: calc(100% - 1.5rem); padding-top: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-map-canvas { transition: none; }
}
