/* ==========================================================================
   Mud Flaps page — Storyteller GXV HILT layout
   ========================================================================== */

/* ---------- Hero: layered parallax (bg / mid / torn foreground) ---------- */
.mf-hero {
  position: relative;
  height: calc(100svh - var(--header-h));
  min-height: 560px;
  overflow: hidden;
  background: #2a130a;
}

.mf-hero__layer {
  position: absolute;
  left: 0;
  width: 100%;
  will-change: transform;
  pointer-events: none;
}

.mf-hero__bg { top: 0; height: 100%; object-fit: cover; object-position: center 40%; }
.mf-hero__mid { bottom: 4%; height: auto; }
.mf-hero__front { bottom: -2px; height: auto; z-index: 3; }

.mf-hero__content {
  position: absolute;
  right: clamp(20px, 8vw, 140px);
  top: 50%;
  z-index: 2;
  width: min(560px, 100% - 40px);
  margin-top: -170px;
  text-align: right;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.mf-hero__content .st-eyebrow { text-align: right; }

.mf-hero__title {
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: 0.81px;
  text-transform: uppercase;
}

.mf-hero__stats {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.mf-hero__stats li { display: inline-flex; align-items: center; gap: 8px; }
.mf-hero__stats .ico { width: 20px; height: 20px; }

.mf-hero__text {
  margin: 0 0 24px auto;
  max-width: 440px;
  font-size: 18px;
  font-weight: 300;
  line-height: 27px;
}

/* ---------- Intro band (interior with torn edges) ---------- */
.mf-intro {
  position: relative;
  z-index: 4;
  margin-top: -5vw;
  padding: 10vw 0 12vw;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: #fff;
}

.mf-intro::before {
  content: "";
  position: absolute;
  inset: 8% 0 8%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72) 55%);
  pointer-events: none;
}

.mf-intro__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.mf-intro__inner > * { width: min(520px, 100%); }
.mf-intro__inner p { margin: 0 0 14px; line-height: 24px; }

.mf-intro__sign {
  margin-top: 8px !important;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--st-orange);
}

/* ---------- Night features ---------- */
.mf-night {
  z-index: 3;
  margin-top: -8vw;
  padding-top: 16vw;
  background-color: #07142b;
  background-position: center 30%;
}

.mf-night::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 10, 24, 0.2), rgba(4, 10, 24, 0.75) 55%);
}

.mf-night .st-container { position: relative; }
.mf-night .st-features { margin-top: 48px; }

/* ---------- Sand strip ---------- */
.mf-sand { background-color: #6b3219; background-size: 100% 100%; }

.mf-strip {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  margin-top: 48px;
}

.mf-strip img { width: 100%; height: 360px; object-fit: cover; background: #3b1d10; }

/* ---------- Vehicle picker ---------- */
.mf-fit__stage {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  aspect-ratio: 16 / 7;
}

.mf-fit__stage .kit-img {
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 30px 30px rgba(0, 0, 0, 0.55));
}

.kit-swatch__dot .ico { width: 18px; height: 18px; color: currentColor; }
.kit-swatch[aria-selected="true"] .kit-swatch__dot .ico { color: #fff; }

/* ---------- Performance ---------- */
.mf-perf { background-color: #2b1f19; background-size: cover; }

.mf-perf__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.mf-perf .st-feature { margin-top: 32px; }
.st-feature--dark p { color: #1b1b1b; }

.mf-perf__imgs { display: grid; gap: 16px; }
.mf-perf__imgs img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #b77f52; }
.mf-perf__imgs img:last-child { object-fit: contain; background: #1d1d1d; }

/* ---------- Technology ---------- */
.mf-tech { background-color: #6a3218; background-size: cover; }

.mf-tech__imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 64px;
}

.mf-tech__imgs img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #3b1d10; }
.mf-tech .st-features { margin-top: 24px; }
.st-stats--light .st-stat { color: #fff; }

/* ---------- Cross-sell cards ---------- */
.mf-cards { background-color: #3a1a0d; background-size: cover; }

.mf-cards__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mf-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  color: #fff;
}

.mf-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.mf-card:hover img { transform: scale(1.04); }

.mf-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.1) 70%);
}

.mf-card__body {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  padding: 32px;
  max-width: 60%;
}

.mf-card__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
  letter-spacing: 0.81px;
  text-transform: uppercase;
}

.mf-card__text { font-size: 15px; line-height: 1.5; }

/* ---------- Exterior masonry ---------- */
.mf-gallery { background-color: #2b1c14; background-size: 100% auto; }

.mf-masonry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 260px;
  margin-top: 48px;
}

.mf-masonry img { width: 100%; height: 100%; object-fit: cover; background: #3b2a20; }
.mf-masonry .g1 { grid-column: 1 / -1; grid-row: span 2; }
.mf-masonry .g3,
.mf-masonry .g4 { grid-row: span 2; }
.mf-masonry .g5,
.mf-masonry .g6 { grid-row: span 1; }

/* ---------- Specs on the desert-dune background ---------- */
.mf-specs { color: #fff; background-color: #7b3717; background-size: cover; }
.mf-specs .specs-card__title,
.mf-specs .st-fine { color: #fff; }
.mf-specs .st-fine { opacity: 0.8; }
.st-accordion--light details { border-color: rgba(255, 255, 255, 0.25); }
.st-accordion--light details > :not(summary),
.st-accordion--light .spec-list dt { color: rgba(255, 255, 255, 0.9); }
.st-btn--ghost-light { color: #fff; box-shadow: inset 0 0 0 1.5px #fff; }
.st-btn--ghost-light:hover { background: #fff; color: #1b1b1b; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .mf-hero__content { left: 20px; right: 20px; width: auto; text-align: left; margin-top: -140px; }
  .mf-hero__content .st-eyebrow { text-align: left; }
  .mf-hero__stats { justify-content: flex-start; }
  .mf-hero__text { margin-left: 0; }
  .mf-intro { background-size: cover; }
  .mf-intro__inner { align-items: flex-start; }
  .mf-perf__grid,
  .mf-cards__grid { grid-template-columns: 1fr; }
  .mf-strip { grid-template-columns: 1fr; }
  .mf-strip img { height: 240px; }
  .mf-card__body { max-width: 100%; }
}

@media (max-width: 600px) {
  .mf-masonry { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .mf-masonry .g3,
  .mf-masonry .g4 { grid-row: span 1; }
  .mf-tech__imgs { grid-template-columns: 1fr; }
}
