.featured-treks {
  --ft-white: #f9f9f9;
  --ft-orange: #e85002;
  --ft-sand: #d9c3ab;
  --featured-story-width: clamp(28.125rem, 41vw, 43.125rem);
  --featured-story-pad-left: max(1.5rem, calc((100vw - 75rem) / 2));
  position: relative;
  overflow: clip;
  background: #07111b;
  color: var(--ft-white);
  font-family: var(--ht-font-body);
}

.featured-treks__stage {
  position: relative;
  height: 100svh;
  min-height: 47.5rem;
  overflow: hidden;
  isolation: isolate;
  background: #07111b;
}

.featured-treks[data-treks-mode="desktop"] .featured-treks__stage {
  position: sticky;
  top: 0;
}

.featured-treks__stage::before,
.featured-treks__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.featured-treks__stage::before {
  z-index: -2;
  background: url("../../featured-treks-story-sunset.png") center / cover no-repeat;
  transform: scale(1.015);
}

.featured-treks__stage::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 12, 21, 0.98), rgba(4, 12, 21, 0.78) 39%, rgba(4, 12, 21, 0.24) 76%, rgba(4, 12, 21, 0.52)),
    linear-gradient(180deg, rgba(3, 9, 16, 0.18), rgba(3, 9, 16, 0.04) 45%, rgba(3, 9, 16, 0.76));
}

.featured-treks-story {
  position: absolute;
  z-index: 7;
  inset: 0 auto 0 0;
  display: flex;
  align-items: center;
  width: var(--featured-story-width);
  padding: clamp(2.75rem, 6vh, 4.625rem) clamp(1.625rem, 3vw, 3rem) clamp(3rem, 7vh, 5.125rem) var(--featured-story-pad-left);
  background: linear-gradient(90deg, rgba(3, 10, 18, 0.99), rgba(3, 10, 18, 0.97) 58%, rgba(3, 10, 18, 0.68) 86%, transparent);
}

.featured-treks-story__content {
  position: relative;
  z-index: 2;
  width: min(100%, 32.5rem);
}

.featured-treks-story__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(1rem, 2.3vh, 1.625rem);
  color: #ef7640;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.featured-treks-story__title {
  margin: 0;
  color: var(--ft-white);
  font-family: var(--ht-font-heading);
  font-size: clamp(2rem, 3.15vw, 4rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.featured-treks-story__title > span,
.featured-treks-story__title > strong {
  display: block;
}

.featured-treks-story__title > strong {
  color: #f16001;
  font-weight: inherit;
}

.featured-treks-story__route {
  position: relative;
  display: grid;
  gap: clamp(1rem, 2.2vh, 1.5rem);
  margin-top: clamp(1.75rem, 4.2vh, 2.875rem);
}

.featured-treks-story__step {
  position: relative;
  display: grid;
  grid-template-columns: 2.875rem minmax(0, 1fr);
  gap: 1.125rem;
  margin: 0;
  opacity: 0.88;
  transform: translate3d(0, 0, 0);
  transition: opacity 280ms cubic-bezier(0.23, 1, 0.32, 1), transform 280ms cubic-bezier(0.23, 1, 0.32, 1);
}

.featured-treks[data-treks-mode="desktop"] .featured-treks-story__step {
  opacity: 0.42;
  transform: translate3d(0, 0.3125rem, 0);
}

.featured-treks[data-treks-mode="desktop"] .featured-treks-story__step[data-story-active="true"] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.featured-treks-story__number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.875rem;
  height: 2.875rem;
  border: 1px solid rgba(240, 105, 42, 0.84);
  border-radius: 50%;
  background: rgba(5, 13, 22, 0.9);
  color: #f07b46;
  font-family: var(--ht-font-body);
  font-size: 0.82rem;
}

.featured-treks-story__step p {
  margin: 0.1875rem 0 0;
  color: rgba(249, 249, 249, 0.76);
  font-size: clamp(0.78rem, 0.86vw, 0.94rem);
  line-height: 1.56;
}

.featured-treks-story__cue {
  display: inline-flex;
  align-items: center;
  gap: 0.8125rem;
  margin-top: clamp(1.25rem, 3vh, 2rem);
  padding-left: 4rem;
  color: rgba(249, 249, 249, 0.62);
  font-size: 0.59rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.featured-treks-story__cue i {
  display: grid;
  place-items: center;
  width: 1.9375rem;
  height: 1.9375rem;
  border: 1px solid rgba(232, 80, 2, 0.62);
  border-radius: 50%;
  color: #f16001;
  font-style: normal;
}

.featured-treks__background-title {
  position: absolute;
  z-index: 1;
  top: 6%;
  left: calc(var(--featured-story-width) + 3vw);
  color: rgba(249, 249, 249, 0.07);
  font-family: var(--ht-font-heading);
  font-size: clamp(6.5rem, 11vw, 13rem);
  font-weight: 700;
  line-height: 0.76;
  letter-spacing: -0.075em;
  white-space: nowrap;
  pointer-events: none;
}

.featured-treks__viewport {
  position: absolute;
  z-index: 2;
  inset: 0 0 0 var(--featured-story-width);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.featured-treks__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: clamp(6rem, 9vw, 10.5rem);
  padding: 0 clamp(11.25rem, 24vw, 28.75rem) 0 max(6vw, 11rem);
  will-change: transform;
}

.trek-card {
  flex: 0 0 clamp(19.5rem, 25vw, 25rem);
  width: clamp(19.5rem, 25vw, 25rem);
  perspective: 62.5rem;
}

.trek-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.trek-card__visual {
  --mouse-x: 50%;
  --mouse-y: 50%;
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 1rem;
  background: #151719;
  box-shadow: 0 1.5rem 4.375rem rgba(0, 0, 0, 0.2);
  isolation: isolate;
  transform-style: preserve-3d;
}

.trek-card__media,
.trek-card__shade,
.trek-card__glare,
.trek-card__image {
  position: absolute;
  inset: 0;
}

.trek-card__media { z-index: 1; overflow: hidden; }
.trek-card__image { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.015); }
.trek-card__image--fallback { display: grid; place-items: center; background: #151719; color: var(--ft-sand); }
.trek-card__shade { z-index: 3; background: linear-gradient(180deg, rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.14) 55%, rgba(0, 0, 0, 0.89)); pointer-events: none; }
.trek-card__glare { z-index: 4; inset: -50%; opacity: 0; background: radial-gradient(circle, rgba(217, 195, 171, 0.42), rgba(232, 80, 2, 0.22) 6.5%, transparent 29%); pointer-events: none; }

.trek-card__content {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.875rem;
  transform: translateZ(3.375rem);
}

.trek-card__region { display: block; margin-bottom: 0.5625rem; color: var(--ft-sand); font-size: 0.67rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.trek-card__title { margin: 0; color: var(--ft-white); font-family: var(--ht-font-heading); font-size: clamp(1.55rem, 2.05vw, 2.25rem); line-height: 1.02; letter-spacing: -0.045em; }
.trek-card__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.375rem; padding-top: 1rem; border-top: 1px solid rgba(249, 249, 249, 0.24); }
.trek-card__stat + .trek-card__stat { margin-left: 1rem; padding-left: 1rem; border-left: 1px solid rgba(249, 249, 249, 0.18); }
.trek-card__stat small { display: block; margin-bottom: 0.3125rem; color: rgba(249, 249, 249, 0.58); font-size: 0.64rem; letter-spacing: 0.09em; text-transform: uppercase; }
.trek-card__stat strong { display: block; overflow: hidden; color: var(--ft-white); font-family: var(--ht-font-body); font-size: clamp(0.86rem, 1.2vw, 1.5rem); text-overflow: ellipsis; white-space: nowrap; }
.trek-card:focus-within .trek-card__visual { outline: 3px solid var(--ft-orange); outline-offset: 0.375rem; }

.featured-treks__progress { position: absolute; z-index: 8; right: 2.625rem; bottom: 1.5rem; left: calc(var(--featured-story-width) + 2.625rem); display: flex; align-items: center; gap: 1.125rem; color: rgba(249, 249, 249, 0.58); font-size: 0.62rem; letter-spacing: 0.11em; text-transform: uppercase; }
.featured-treks__progress-track { position: relative; flex: 1; height: 2px; overflow: hidden; background: rgba(249, 249, 249, 0.18); }
.featured-treks__progress-fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--ft-sand), var(--ft-orange)); transform: scaleX(0.04); transform-origin: left; will-change: transform; }

@media (max-width: 56.25rem), (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .featured-treks { --native-card-width: min(78vw, 24.375rem); --native-edge-space: max(1.125rem, calc((100vw - var(--native-card-width)) / 2)); overflow: hidden; }
  .featured-treks__stage { height: auto; min-height: 0; padding-bottom: 4.5rem; overflow: visible; }
  .featured-treks__stage::before { bottom: auto; height: min(92svh, 51.25rem); background-position: 54% center; }
  .featured-treks__stage::after { background: linear-gradient(180deg, rgba(4, 12, 21, 0.74), rgba(4, 12, 21, 0.58) 34%, rgba(4, 12, 21, 0.95) 74%, #07111b); }
  .featured-treks-story { position: relative; inset: auto; align-items: flex-end; width: 100%; min-height: min(92svh, 51.25rem); padding: clamp(5.375rem, 14vw, 8.125rem) 1.5rem clamp(4rem, 10vw, 5.75rem); background: linear-gradient(180deg, rgba(4, 12, 21, 0.16), rgba(4, 12, 21, 0.44) 32%, rgba(4, 12, 21, 0.94) 78%, #07111b); }
  .featured-treks-story__content { width: min(100%, 43.125rem); margin-inline: auto; }
  .featured-treks-story__title { font-size: clamp(2.35rem, 8.4vw, 4.7rem); }
  .featured-treks__background-title { position: relative; top: auto; left: auto; margin: 0 1.125rem -0.5rem; font-size: clamp(5.5rem, 22vw, 10rem); }
  .featured-treks__viewport { position: relative; inset: auto; display: block; margin-top: 1rem; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--native-edge-space); overscroll-behavior-inline: contain; scrollbar-width: none; touch-action: pan-x pan-y; }
  .featured-treks__viewport::-webkit-scrollbar { display: none; }
  .featured-treks__track { gap: 1.125rem; padding: 0.25rem var(--native-edge-space) 0.75rem; will-change: auto; }
  .trek-card { flex-basis: var(--native-card-width); width: var(--native-card-width); perspective: none; scroll-snap-align: center; }
  .trek-card__content { transform: none; }
  .featured-treks__progress { display: none; }
}

@media (max-width: 35rem) {
  .featured-treks { --native-card-width: 84vw; }
  .featured-treks-story { min-height: auto; padding: 5.375rem 1.125rem 3.875rem; }
  .featured-treks-story__title { font-size: clamp(2.1rem, 10.6vw, 3.25rem); }
  .featured-treks-story__step { grid-template-columns: 2.625rem minmax(0, 1fr); gap: 0.875rem; }
  .featured-treks-story__number { width: 2.625rem; height: 2.625rem; }
  .trek-card__content { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .featured-treks-story__step,
  .featured-treks__track,
  .trek-card,
  .trek-card__link,
  .trek-card__visual,
  .trek-card__image,
  .trek-card__content,
  .trek-card__glare { transition: none !important; transform: none !important; animation: none !important; }
  .featured-treks-story__step { opacity: 1 !important; }
  .featured-treks__viewport { scroll-behavior: auto; }
}
