/* ==========================================================================
   MODULES — travel-card carousel
   Nine full-photo module cards in a horizontal snap carousel over a cool
   silver-blue backdrop. The active card floats up with a deep soft shadow
   (like the elevated card in a travel app rail); a pill tab bar above and
   round glass arrows beside the rail drive the same selection. modules.js
   drives --sp (0→1 scroll-scrub progress as the section enters the
   viewport — every reveal below derives from it) and .is-on (active
   tab / card).
   ========================================================================== */

.mia-mods {
  position: relative;
  padding: clamp(72px, 9vh, 112px) 0 clamp(78px, 10vh, 120px);
  /* same near-white marine ground as features/vessels; ends exactly on the
     vessels section's #f4f8fc so the two run flush with no visible seam */
  background: linear-gradient(180deg, #f2f7fc 0%, #ffffff 34%, #f6fafd 70%, #f4f8fc 100%);
  overflow: hidden;
}

/* vintage nautical chart, pressed faintly into the ground like a
   watermark — blue-tinted linework only (multiply melts the paper away),
   masked so it fades in below the heading and out before the next section */
.mia-mods::after {
  content: '';
  position: absolute;
  /* vertical bleed = parallax travel room — the drift below can never
     pull an edge into view */
  inset: -70px 0;
  background: url("../all-images/white-map.webp") center / cover no-repeat;
  opacity: 0.28;
  mix-blend-mode: multiply;
  filter: sepia(1) hue-rotate(175deg) saturate(0.6);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 16%, #000 76%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 16%, #000 76%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  /* far plane: lags the page, sinking slowly as the section rises */
  translate: 0 calc(var(--pp, 0) * 46px);
  transition: translate 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

/* soft ambient glows so the silver ground doesn't feel flat */
.mia-mods::before {
  content: '';
  position: absolute;
  inset: -40px 0;
  background:
    radial-gradient(46% 34% at 16% 18%, rgba(125, 184, 232, 0.22), transparent 70%),
    radial-gradient(40% 30% at 86% 30%, rgba(255, 255, 255, 0.65), transparent 70%),
    radial-gradient(36% 28% at 62% 96%, rgba(43, 95, 143, 0.1), transparent 70%);
  filter: blur(24px);
  /* mid-far plane: drifts with the chart but shallower */
  translate: 0 calc(var(--pp, 0) * 24px);
  transition: translate 0.35s cubic-bezier(0.33, 1, 0.68, 1);
  /* fade the glows out before the section's bottom edge — their blurred
     clip line was reading as a faint seam against the next section */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, rgba(0, 0, 0, 0) 97%);
  mask-image: linear-gradient(180deg, #000 0%, #000 78%, rgba(0, 0, 0, 0) 97%);
  pointer-events: none;
}

/* ---------------- header ---------------- */

.mia-mods__head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 2vh, 22px);
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 56px);
  /* scroll-scrub progress for the two columns (the reveals themselves live
     on the children so each side can move its own way):
     --hp drives the heading, --dp the paragraph, lagging a beat behind */
  --hp: clamp(0, var(--sp, 0) / 0.45, 1);
  --dp: clamp(0, (var(--sp, 0) - 0.1) / 0.45, 1);
}

/* heading + eyebrow group; on phones it just mirrors the head's centering.
   Scroll reveal: rises + fades in with the section's entry progress; the
   --pp term is the parallax near plane — it keeps drifting slightly ahead
   of the page for the section's whole travel */
.mia-mods__head-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 2vh, 22px);
  opacity: var(--hp);
  transform: translateY(calc((1 - var(--hp)) * 30px - var(--pp, 0) * 18px));
  /* short ease smooths the stepped deltas of wheel scrolling */
  transition: opacity 0.35s cubic-bezier(0.33, 1, 0.68, 1), transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

/* intro copy — desktop-only: phones keep the centered heading alone */
.mia-mods__desc {
  display: none;
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(14.5px, 1.15vw, 16.5px);
  line-height: 1.65;
  color: #45607a;
  opacity: var(--dp);
  transform: translateY(calc((1 - var(--dp)) * 30px - var(--pp, 0) * 18px));
  transition: opacity 0.35s cubic-bezier(0.33, 1, 0.68, 1), transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

/* the title's two-line break exists only on desktop; phones wrap naturally */
.mia-mods__title-br { display: none; }

/* pc / big screens: heading big on the left, paragraph on the right,
   both pushed out near the section edges (full-bleed, no max-width) */
@media (min-width: 900px) {
  .mia-mods__head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    text-align: left;
    max-width: none;
    gap: clamp(40px, 5vw, 90px);
    padding: 0 clamp(18px, 2.6vw, 48px);
  }

  /* rigid: the heading's two lines never re-wrap — the paragraph column
     is the one that narrows (and grows taller) when space gets tight.
     Scroll reveal turns sideways here: the heading slides in from the
     left edge, the paragraph from the right, meeting as the scrub lands
     (the section's overflow:hidden clips the off-edge starts) */
  .mia-mods__head-left {
    align-items: flex-start;
    text-align: left;
    flex: 0 0 auto;
    transform:
      translateX(calc((1 - var(--hp)) * -72px))
      translateY(calc(var(--pp, 0) * -18px));
  }

  .mia-mods__title-br { display: inline; }

  /* vw-scaled so the two forced lines keep fitting as the viewport shrinks;
     if space still runs out the lines just wrap — nothing overflows */
  .mia-mods__title {
    font-size: clamp(28px, 3.3vw, 68px);
    line-height: 1.08;
  }

  .mia-mods__desc {
    display: block;
    flex: 0 1 420px;
    min-width: 0;
    /* tuck the paragraph's baseline up level with the heading's last line */
    padding-bottom: 0.4em;
    transform:
      translateX(calc((1 - var(--dp)) * 72px))
      translateY(calc(var(--pp, 0) * -18px));
  }
}

.mia-mods__eyebrow {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid rgba(34, 54, 74, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2b5f8f;
}

/* same marine gradient display title as the other section headings */
.mia-mods__title {
  margin: 0;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #16324f;
}

.mia-mods__title em {
  font-style: normal;
  color: #4a97d8;
}

/* line — anchor — line rule under the heading */
.mia-mods__title::after {
  content: '';
  display: block;
  width: 190px;
  height: 16px;
  margin: 20px auto 0;
  background-color: #4a97d8;
  -webkit-mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='3'/%3E%3Cline x1='12' y1='22' x2='12' y2='8'/%3E%3Cpath d='M5 12H2a10 10 0 0 0 20 0h-3'/%3E%3C/svg%3E") center / 15px 15px no-repeat,
    linear-gradient(#000, #000) left center / 70px 1.5px no-repeat,
    linear-gradient(#000, #000) right center / 70px 1.5px no-repeat;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='3'/%3E%3Cline x1='12' y1='22' x2='12' y2='8'/%3E%3Cpath d='M5 12H2a10 10 0 0 0 20 0h-3'/%3E%3C/svg%3E") center / 15px 15px no-repeat,
    linear-gradient(#000, #000) left center / 70px 1.5px no-repeat,
    linear-gradient(#000, #000) right center / 70px 1.5px no-repeat;
}


/* ---------------- tab bar ---------------- */

/* outer wrap centers the pill and allows sideways overflow on phones */
.mia-mods__tabswrap {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: clamp(24px, 4vh, 40px) auto clamp(30px, 5vh, 52px);
  padding: 0 clamp(16px, 4vw, 56px);
  /* scroll-scrubbed, starting a beat after the heading */
  --tp: clamp(0, (var(--sp, 0) - 0.08) / 0.45, 1);
  opacity: var(--tp);
  transform: translateY(calc((1 - var(--tp)) * 26px));
  transition: opacity 0.35s cubic-bezier(0.33, 1, 0.68, 1), transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

/* frosted glass segmented control — the active pill is a separate "ink"
   layer that glides between tabs (Apple-style) */
.mia-mods__tabs {
  position: relative;
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow:
    0 18px 40px -20px rgba(22, 50, 79, 0.35),
    0 4px 12px -8px rgba(22, 50, 79, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mia-mods__tabs::-webkit-scrollbar { display: none; }

/* the gliding pill — modules.js keeps left/width on the active tab */
.mia-mods__ink {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #1d3d5f 0%, #16324f 100%);
  box-shadow:
    0 10px 22px -10px rgba(22, 50, 79, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

/* only animate after the first placement, with a gentle Apple-ish spring */
.mia-mods__tabs.is-ready .mia-mods__ink {
  transition:
    left 0.5s cubic-bezier(0.3, 1.15, 0.35, 1),
    width 0.5s cubic-bezier(0.3, 1.15, 0.35, 1);
}

.mia-mods__tab {
  position: relative;
  z-index: 1;               /* text above the gliding ink */
  flex: 0 0 auto;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(13px, 1.1vw, 15.5px);
  letter-spacing: 0.01em;
  color: #45607a;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.mia-mods__tab:hover { color: #16324f; }

.mia-mods__tab.is-on { color: #f2f7fc; }

.mia-mods__tab:focus-visible {
  outline: 2px solid #2b5f8f;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .mia-mods__tabs.is-ready .mia-mods__ink { transition: none; }
}

/* ---------------- carousel stage ---------------- */

.mia-mods__stage {
  position: relative;
  z-index: 1;
  /* scroll-scrubbed after the tabs; kept subtle because each card also
     runs its own deeper scrub below */
  --gp: clamp(0, (var(--sp, 0) - 0.14) / 0.5, 1);
  opacity: var(--gp);
  transform: translateY(calc((1 - var(--gp)) * 18px));
  transition: opacity 0.35s cubic-bezier(0.33, 1, 0.68, 1), transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

.mia-mods__track {
  display: flex;
  gap: clamp(14px, 1.8vw, 26px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* generous inline padding so the first / last card can center, top room
     for the active card's lift, and enough bottom room that the lifted
     card's deep shadow isn't clipped by the scroll container's edge */
  padding: 30px max(calc(50% - clamp(230px, 23vw, 290px) / 2), 20px) 78px;
  cursor: grab;
}

.mia-mods__track:active { cursor: grabbing; }
.mia-mods__track::-webkit-scrollbar { display: none; }
.mia-mods__track:focus-visible { outline: 2px solid #2b5f8f; outline-offset: -2px; }

/* ---------------- card ---------------- */

.mia-mods__card {
  position: relative;
  flex: 0 0 clamp(230px, 23vw, 290px);
  aspect-ratio: 3 / 4.15;
  border-radius: 26px;
  overflow: hidden;
  scroll-snap-align: center;
  isolation: isolate;
  /* glass rim — a bright hairline edge like light catching the pane */
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 24px 44px -22px rgba(22, 50, 79, 0.5),
    0 8px 18px -8px rgba(22, 50, 79, 0.28),
    0 2px 5px -2px rgba(22, 50, 79, 0.2);
  transition: transform 0.45s cubic-bezier(0.22, 0.85, 0.3, 1), box-shadow 0.45s ease;
}

/* inner glass depth: top rim light, faint inner ring, and a soft dark
   vignette pressed into the lower edge (pointer-events off, sits over
   the photo but under nothing clickable) */
.mia-mods__card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 18px 34px -20px rgba(255, 255, 255, 0.3),
    inset 0 -30px 46px -24px rgba(8, 20, 34, 0.22);
}

/* the elevated "Dubai card" state — floats above the rail with a deep
   marine glow pooled beneath it like a reflection */
.mia-mods__card.is-on {
  transform: translateY(-18px);
  box-shadow:
    0 46px 64px -28px rgba(22, 50, 79, 0.58),
    0 26px 70px -18px rgba(43, 95, 143, 0.4),
    0 10px 24px -10px rgba(22, 50, 79, 0.32),
    0 2px 6px -2px rgba(22, 50, 79, 0.22);
}

@media (hover: hover) {
  .mia-mods__card:not(.is-on):hover { transform: translateY(-8px); }
}

.mia-mods__img {
  position: absolute;
  /* taller than the card = travel room for the window parallax below */
  inset: -28px 0;
  width: 100%;
  height: calc(100% + 56px);
  object-fit: cover;
  z-index: -2;
  transform: scale(1.02);
  /* window parallax: the photo slides inside the card frame as the
     section travels, deeper the further the card is from the center
     (--d) — the scrim, text and glass rim stay fixed on the card.
     translate composes with the scale transforms, so it never fights
     the .is-on zoom. Amplitude (max 26px) stays inside the 28px bleed. */
  translate: 0 calc(var(--pp, 0) * (14px + var(--d, 0) * 3px));
  transition:
    transform 0.6s ease,
    translate 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

.mia-mods__card.is-on .mia-mods__img { transform: scale(1.08); }

/* soft dark pool behind the centred text (keeps the white type legible
   without washing the photo out) plus a marine haze along the bottom edge */
.mia-mods__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      80% 58% at 50% 52%,
      rgba(8, 20, 34, 0.32) 0%,
      rgba(8, 20, 34, 0.16) 46%,
      rgba(8, 20, 34, 0) 74%
    ),
    linear-gradient(
      180deg,
      rgba(8, 20, 34, 0.12) 0%,
      rgba(8, 20, 34, 0) 24%,
      rgba(8, 20, 34, 0) 62%,
      rgba(8, 20, 34, 0.42) 100%
    );
}

/* everything sits centred in the middle of the card, over the glow */
.mia-mods__info {
  position: absolute;
  inset: 0;
  z-index: 2;               /* above the ::after glass vignette */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: clamp(16px, 1.8vw, 24px);
}

/* two-line uppercase title: small kicker ("PARTS &") over the big word */
.mia-mods__name {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'Outfit', 'Inter', sans-serif;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(8, 20, 34, 0.45);
}

.mia-mods__name-top {
  font-weight: 600;
  font-size: clamp(14px, 1.25vw, 18px);
  letter-spacing: 0.14em;
  line-height: 1.15;
}

.mia-mods__name-main {
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.mia-mods__meta {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(11.5px, 0.95vw, 13.5px);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 10px rgba(8, 20, 34, 0.5);
}

/* frosted "Explore Now" pill, centred under the title */
.mia-mods__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: clamp(12px, 1.4vw, 18px);
  padding: 11px clamp(24px, 2.4vw, 34px);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 8px 20px -10px rgba(8, 20, 34, 0.45);
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 500;
  font-size: clamp(13px, 1.05vw, 15px);
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(8, 20, 34, 0.35);
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.mia-mods__cta:hover {
  background: rgba(255, 255, 255, 0.32);
  border-color: #ffffff;
  transform: translateY(-1px);
}

/* per-card scroll scrub: each card's own progress --pc lags the section
   progress --sp by its distance from the center (--d, set by modules.js),
   so the rail fans out from Inspections as you scroll in — and folds back
   if you scroll up. Rests at the distance-based --fade dim (1 on the
   active card, dimmer the further away). translate/scale are used so the
   scrub never fights the .is-on / hover lifts, which live on transform.
   The distance dim is a blur + slight darken (never opacity — fading over
   the near-white ground washed the photos out to a white tint). */
.mia-mods__card {
  --pc: clamp(0, (var(--sp, 0) - 0.12 - var(--d, 0) * 0.06) / 0.45, 1);
  opacity: var(--pc);
  filter:
    blur(calc((1 - var(--fade, 1)) * 5px))
    brightness(calc(0.62 + var(--fade, 1) * 0.38));
  translate: 0 calc((1 - var(--pc)) * 56px);
  scale: calc(0.92 + var(--pc) * 0.08);
  transition:
    opacity 0.35s cubic-bezier(0.33, 1, 0.68, 1),
    filter 0.35s cubic-bezier(0.33, 1, 0.68, 1),
    translate 0.35s cubic-bezier(0.33, 1, 0.68, 1),
    scale 0.35s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.45s cubic-bezier(0.22, 0.85, 0.3, 1),
    box-shadow 0.45s ease;
}

/* pointing at a dimmed card brings it back to full strength */
@media (hover: hover) {
  .mia-mods__card:hover { filter: none; }
}

/* once the scrub first reaches full progress, modules.js adds
   .is-settled: run every state change on buttery ease-out curves */
.mia-mods.is-settled .mia-mods__card {
  will-change: transform, filter;
  transition:
    opacity 0.4s cubic-bezier(0.33, 1, 0.68, 1),
    filter 0.4s cubic-bezier(0.33, 1, 0.68, 1),
    translate 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    scale 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------- arrows ---------------- */

.mia-mods__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(34, 54, 74, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px -14px rgba(22, 50, 79, 0.4);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.mia-mods__nav:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.06);
}

.mia-mods__nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #16324f;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mia-mods__nav--prev { left: clamp(10px, 2.4vw, 40px); }
.mia-mods__nav--next { right: clamp(10px, 2.4vw, 40px); }

.mia-mods__nav[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

/* ---------------- responsive ---------------- */

@media (max-width: 760px) {
  .mia-mods__nav { display: none; }

  .mia-mods__tabswrap { justify-content: flex-start; }

  .mia-mods__track {
    /* wider cards with a peek of the neighbours */
    padding: 24px max(calc(50% - 68vw / 2), 16px) 64px;
  }

  .mia-mods__card { flex-basis: 68vw; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  /* modules.js also pins --sp to 1 and skips the scroll listener */
  .mia-mods { --sp: 1; }

  .mia-mods__head,
  .mia-mods__head-left,
  .mia-mods__desc,
  .mia-mods__tabswrap,
  .mia-mods__stage,
  .mia-mods__card {
    opacity: 1;
    transform: none;
    translate: 0 0;
    scale: none;
    transition: none;
  }

  .mia-mods .mia-mods__card {
    opacity: 1;
    filter:
      blur(calc((1 - var(--fade, 1)) * 5px))
      brightness(calc(0.62 + var(--fade, 1) * 0.38));
  }

  .mia-mods__card.is-on { transform: translateY(-18px); }
  .mia-mods__track { scroll-behavior: auto; }
}

/* ---------------- dark theme ---------------- */

[data-theme="dark"] .mia-mods {
  background: linear-gradient(160deg, #04101d 0%, #081c30 45%, #04101d 100%);
}

/* dark: invert the engraving so the chart glows as faint light linework */
[data-theme="dark"] .mia-mods::after {
  mix-blend-mode: screen;
  opacity: 0.16;
  filter: invert(1) sepia(1) hue-rotate(175deg) saturate(0.5) brightness(1.1);
}

[data-theme="dark"] .mia-mods::before {
  background:
    radial-gradient(46% 34% at 16% 18%, rgba(43, 95, 143, 0.28), transparent 70%),
    radial-gradient(40% 30% at 86% 30%, rgba(74, 144, 194, 0.12), transparent 70%);
}

[data-theme="dark"] .mia-mods__eyebrow {
  background: rgba(13, 32, 52, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  color: #7db8e8;
}

[data-theme="dark"] .mia-mods__title { color: #e6eef7; }
[data-theme="dark"] .mia-mods__title em { color: #7db8e8; }
[data-theme="dark"] .mia-mods__title::after { background-color: #6fb1de; }

[data-theme="dark"] .mia-mods__desc { color: #9db4c9; }

[data-theme="dark"] .mia-mods__tabs {
  background: rgba(13, 32, 52, 0.55);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    0 18px 40px -20px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .mia-mods__ink {
  background: linear-gradient(180deg, #8ec2ee 0%, #7db8e8 100%);
  box-shadow:
    0 10px 24px -10px rgba(125, 184, 232, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .mia-mods__tab { color: #9db4c9; }
[data-theme="dark"] .mia-mods__tab:hover { color: #e6eef7; }
[data-theme="dark"] .mia-mods__tab.is-on { color: #04101d; }

[data-theme="dark"] .mia-mods__card {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 18px 34px -20px rgba(0, 0, 0, 0.7),
    0 4px 12px -6px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .mia-mods__card.is-on {
  box-shadow:
    0 42px 58px -28px rgba(0, 0, 0, 0.8),
    0 22px 60px -18px rgba(43, 95, 143, 0.45),
    0 6px 16px -6px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .mia-mods__nav {
  background: rgba(13, 32, 52, 0.8);
  border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .mia-mods__nav:hover { background: rgba(20, 44, 68, 0.95); }
[data-theme="dark"] .mia-mods__nav svg { stroke: #cfe2f2; }

/* =====================================================================
   SECTION CTAs — Sign up + Book a demo. Same pill UI as the Portal CTA's
   "Sign Up" / "Login" (bright blue gradient + outlined blue ghost).
   ===================================================================== */
.mia-mods__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: clamp(30px, 4.5vh, 52px);
  justify-content: center;
  padding: 0 20px;
}
.mia-mods__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  padding: 15px 34px;
  border-radius: 999px;
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  font-weight: 500;
  font-size: clamp(15px, 1.3vw, 17px);
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    background 0.3s ease,
    color 0.3s ease;
  will-change: transform;
}
.mia-mods__btn--signup {
  color: #ffffff;
  background: linear-gradient(180deg, #2f7ff2 0%, #0a63e6 100%);
  box-shadow:
    0 12px 28px -8px rgba(10, 99, 230, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.mia-mods__btn--signup:hover {
  transform: translateY(-2px) scale(1.04);
  background: linear-gradient(180deg, #4a90f5 0%, #1a70ec 100%);
  box-shadow:
    0 18px 38px -10px rgba(10, 99, 230, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.mia-mods__btn--demo {
  color: #0a63e6;
  border: 1.5px solid rgba(10, 99, 230, 0.45);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mia-mods__btn--demo:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: #0a63e6;
  background: rgba(10, 99, 230, 0.07);
  box-shadow: 0 12px 28px -12px rgba(10, 99, 230, 0.35);
}
.mia-mods__btn:active { transform: scale(0.97); }
.mia-mods__btn:focus-visible { outline: 3px solid rgba(10, 99, 230, 0.4); outline-offset: 3px; }

/* phone: both pills centered, equal width */
@media (max-width: 720px) {
  .mia-mods__actions { justify-content: center; gap: 10px; }
  .mia-mods__btn { flex: 1 1 0; min-width: 0; max-width: 220px; padding: 13px 18px; }
}
