.language-switcher {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  color: var(--ink, #2b0a3b);
}
.language-switcher::after {
  content: "⌄";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-60%);
  pointer-events: none;
  font-size: 16px;
}
.language-select {
  appearance: none;
  -webkit-appearance: none;
  width: 65px;
  height: 38px;
  padding: 7px 22px 7px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.language-select:focus-visible { outline: 2px solid #8051c0; outline-offset: 3px; }
.language-select option { background: #fffefa; color: #2b0a3b; }
.language-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.request-header .language-switcher, .legal-header .language-switcher { margin-left: 14px; }
.request-header .request-back { margin-left: auto; }
.language-noscript { display: flex; gap: 12px; font-size: 12px; }
@media (max-width: 400px) {
  .header-actions { gap: 8px; }
  .header-call { font-size: 11px; }
  .language-select { width: 60px; padding-left: 9px; }
  .request-header .language-switcher, .legal-header .language-switcher { margin-left: 8px; }
}

@media (min-width: 768px) {
  html[lang="es"] .hero-ctas .button { width: 330px; max-width: 100%; }
  .hero-marker { width: 72px; right: 0; bottom: -58px; }
}

/* A shared mobile rhythm, with a slightly larger English headline. */
@media (max-width: 767px) {
  .hero > .header {
    margin-bottom: 32px;
  }
  .hero h1 {
    font-weight: 800;
    line-height: 1.13;
    letter-spacing: -0.025em;
    word-spacing: 0;
    font-variant-ligatures: none;
  }
  html[lang="en"] .hero h1 {
    font-size: clamp(29px, 9.2vw, 44px);
  }
  .hero .circled {
    display: inline-block;
    line-height: 1.06;
  }
  .hero .circled::after {
    inset: 6% -0.07em 4%;
    border-width: 2px;
    transform: rotate(-1deg);
  }
  .hero-description {
    font-size: 15px;
    line-height: 1.55;
    letter-spacing: -0.01em;
    margin-top: 22px;
    max-width: 350px;
  }
  .hero-ctas {
    margin-top: 22px;
  }
  .hero-marker {
    display: none;
  }
}


/* A short mobile cue points to the CTA without taking up layout space. */
.hero-cta-arrow {
  display: none;
}
@media (max-width: 767px) {
  .hero-ctas {
    position: relative;
    margin-top: 22px;
  }
  .hero-ctas .hero-cta-arrow {
    display: block;
    width: 56px;
    height: 18px;
    top: auto;
    bottom: 100%;
    right: 20px;
    stroke: #a57cc9;
    stroke-width: 1.7;
    transform: none;
  }
}


/* Leave a clear gap after the logo on narrow phone headers. */
@media (max-width: 389px) {
  .hero .header-actions {
    gap: 6px;
  }
  .hero .header-call {
    height: 34px;
    padding-inline: 8px;
    font-size: 10.5px;
  }
  .hero .header-call span {
    padding-left: 4px;
  }
  .hero .language-select {
    width: 52px;
    height: 34px;
    padding: 7px 18px 7px 8px;
    font-size: 10.5px;
  }
  .hero .language-switcher::after {
    right: 7px;
    font-size: 13px;
  }
}

/* Phone cards fit the space below the copy, including browser toolbar height.
   JS refines the fallback using the rendered translation and font metrics. */
@media (max-width: 767px) {
  .hero {
    --hero-card-height: clamp(224px, calc(100dvh - 430px), min(103vw, 498px));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
  .hero > .header { margin-bottom: 24px; }
  .hero-description { margin-top: 18px; }
  .hero-showcase { margin-top: 6px; padding-top: 20px; }
  .hero-stage { height: calc(var(--hero-card-height) + 20px); }
  .hero-video-card {
    width: calc(var(--hero-card-height) * 0.5625);
    height: var(--hero-card-height);
    max-width: none;
  }
  .hero-carousel-nav { margin-top: 24px; }
}

/* A viewport-sized observer target is independent of the carousel's own size. */
.hero-viewport-probe {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100vh;
  height: 100dvh;
  visibility: hidden;
  pointer-events: none;
}

/* The single-column tablet hero needs less spacing than the desktop layout. */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero {
    padding-top: 20px;
    padding-bottom: 28px;
  }
  .hero > .header {
    margin-bottom: 24px;
  }
  .hero-description {
    margin-top: 18px;
  }
  .hero-ctas {
    margin-top: 20px;
  }
  .hero-showcase {
    margin-top: 16px;
    padding-top: 16px;
  }
}
