/* The image and both walking baselines share the hero coordinate system.
   Keep the full image height: cover would crop the roads on narrow screens. */
.hero {
  height: 820px;
  padding: 48px 0 150px;
  isolation: isolate;
  background: #b77738 url('../images/silkroad-hero-v1.png') center / max(100%, 1100px) 100% no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(42, 24, 12, .28), transparent 40%, rgba(42, 24, 12, .40) 65%, transparent 82%);
  pointer-events: none;
}
.hero > .skyline,
.hero > .hero-dunes,
.hero > .hero-hills,
.hero > .hero-sun { display: none; }
.hero-inner { position: static; }
.hero-inner > :not(.mini-caravan) { position: relative; z-index: 2; }
.hero-title { line-height: 1.2; }
.hero-inner > .hero-subtitle,
.hero-inner > .hero-actions,
.hero-inner > .hero-stats {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, calc(100% - 40px));
  margin: 0;
}
.hero-inner > .hero-subtitle { top: 49%; max-width: 560px; text-shadow: 0 2px 8px #39210e; }
.hero-inner > .hero-actions { top: 60%; }
.hero-inner > .hero-stats { top: 67%; padding-top: 10px; text-shadow: 0 2px 8px #39210e; }
.hero-stats .stat-value { font-size: 1.5rem; }
.hero-stats .stat-label { font-size: .7rem; }
.hero .mini-caravan {
  position: absolute;
  top: 45.4%;
  left: 50%;
  transform: translate(-50%, -100%);
  width: 100%;
  max-width: none;
  height: 64px;
  margin: 0;
  opacity: .48;
  z-index: 1;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 78%, transparent 85%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 78%, transparent 85%);
}
.hero .mini-caravan-scale {
  position: absolute;
  bottom: 0;
  left: 0;
  transform: scale(.5);
  transform-origin: bottom left;
}
.hero .mini-caravan svg.cf[width="33"] { --person-shift: 0px; }
.hero .caravan-track {
  animation-name: upper-caravan-loop;
  animation-duration: var(--caravan-duration, 100s);
}
@keyframes upper-caravan-loop {
  from { transform: translateX(calc(-1 * var(--caravan-period, 0px))); }
  to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero .caravan-track { animation: none; }
}
.hero .trading-group { position: relative; transform: none; }
.hero .trading-group .cf { --offset-y: 0px; }
.hero .caravan-guide { --holding-arm: inline; --walking-arm: none; }
.hero .cargo-1 { --cargo-crate: inline; }
.hero .cargo-2 { --cargo-sack: inline; }
.hero .trading-group svg.cf[width="87"] {
  transform: scaleX(.92) scaleY(var(--camel-size, 1));
  transform-origin: center bottom;
}
.caravan-ropes {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 72px;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: #342417;
  stroke-width: 1.35;
  stroke-linecap: round;
  opacity: .95;
}
.trading-group::before,
.trading-group::after {
  content: '';
  position: absolute;
  pointer-events: none;
  left: 0;
  right: 0;
}
.trading-group::before {
  bottom: 0;
  height: 5px;
  background: radial-gradient(ellipse, #33231366, transparent 70%) 0 0 / 95px 5px repeat-x;
}
.trading-group::after {
  bottom: 1px;
  height: 12px;
  background: radial-gradient(ellipse at 40% 80%, #dbb47755, transparent 70%);
  filter: blur(2px);
  animation: caravan-dust 5s ease-in-out infinite alternate;
}
@keyframes caravan-dust {
  from { opacity: .2; transform: translateX(-8px) scaleY(.6); }
  to { opacity: .6; transform: translateX(-20px) scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .trading-group::after { animation: none; opacity: .25; }
}
.hero > .caravan {
  bottom: 15%;
  opacity: .78;
  z-index: 1;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}
@media (max-width: 780px) {
  .hero { height: 1100px; padding-top: 40px; padding-bottom: 150px; }
  .hero-title { font-size: clamp(2.5rem, 8vw, 4rem); }
  .hero-subtitle { font-size: 1.125rem; }
  .hero-inner > .hero-actions { top: 60%; gap: 10px; flex-wrap: nowrap; }
  .hero-actions .btn { padding: 12px 8px; font-size: .74rem; white-space: nowrap; min-width: 0; }
  .hero-inner > .hero-stats { top: 65%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
  .hero .mini-caravan { opacity: .55; }
}
@media (max-width: 400px) {
  .header-inner { gap: 10px; }
  .logo-text { font-size: 1.1rem; }
}
