.gateway-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.gateway-page > .site-header {
  position: relative;
  width: 100%;
  margin-inline: 0;
  justify-content: center;
  padding-inline: max(48px, calc((100% - var(--max)) / 2));
  overflow: hidden;
  border-bottom: 0;
}

.gateway-page > .site-header .brand {
  position: relative;
  z-index: 1;
}

.language-gateway {
  flex: 1 0 auto;
  background: var(--navy);
}

.language-gateway-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(640px, calc(100svh - 285px), 900px);
  overflow: hidden;
  color: #f3f8f6;
  background:
    linear-gradient(180deg, rgba(7, 27, 40, 0.78) 0%, rgba(7, 27, 40, 0.48) 48%, rgba(7, 27, 40, 0.16) 78%, rgba(7, 27, 40, 0.58) 100%),
    linear-gradient(90deg, rgba(7, 27, 40, 0.34), transparent 30%, transparent 70%, rgba(7, 27, 40, 0.34)),
    url("/assets/reduce-care-language-earth.webp") center bottom / cover no-repeat,
    var(--navy);
}

.language-gateway-content {
  position: relative;
  z-index: 1;
  padding-block: clamp(72px, 9vw, 120px) clamp(130px, 15vw, 220px);
}

.language-gateway-heading {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.language-gateway-heading h1 {
  margin-top: 0;
  color: #f3f8f6;
  font-size: clamp(52px, 6.3vw, 88px);
}

.language-gateway-heading > p:last-child {
  margin: 18px auto 0;
  color: #bacbd2;
  font-size: clamp(16px, 1.5vw, 20px);
}

.language-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(44px, 6vw, 72px);
}

.language-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 68px;
  gap: 20px;
  overflow: hidden;
  padding: 18px 22px;
  border: 1px solid rgba(190, 237, 243, 0.58);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(7, 27, 40, 0.08) 42%, rgba(0, 190, 217, 0.05)),
    rgba(5, 25, 37, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(99, 226, 238, 0.08),
    0 12px 30px rgba(0, 7, 14, 0.16);
  color: #f3f8f6;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  backdrop-filter: blur(12px) saturate(1.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.language-option:hover {
  border-color: color-mix(in srgb, var(--mint) 72%, white);
  background-color: rgba(7, 48, 60, 0.3);
  transform: translateY(-1px);
}

.language-option:focus-visible {
  border-radius: 22px;
}

.language-option-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.language-option-chevron {
  flex: 0 0 auto;
  width: 13px;
  height: 19px;
  background: var(--mint);
  -webkit-mask: url("/assets/chevron-right-heavy.png") center / contain no-repeat;
  mask: url("/assets/chevron-right-heavy.png") center / contain no-repeat;
  transition: transform 0.2s ease;
}

.language-option:hover .language-option-chevron,
.language-option:focus-visible .language-option-chevron {
  transform: translateX(3px);
}

@media (max-width: 980px) {
  .language-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .gateway-page > .site-header {
    padding-inline: 20px;
  }

  .language-gateway-hero {
    min-height: 720px;
    background:
      linear-gradient(180deg, rgba(7, 27, 40, 0.9) 0%, rgba(7, 27, 40, 0.66) 48%, rgba(7, 27, 40, 0.28) 76%, rgba(7, 27, 40, 0.72) 100%),
      url("/assets/reduce-care-language-earth.webp") 51% bottom / auto 100% no-repeat,
      var(--navy);
  }

  .language-gateway-content {
    padding-block: 58px 150px;
  }

  .language-gateway-heading h1 {
    font-size: clamp(44px, 13vw, 58px);
  }

  .language-options {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 38px;
  }

  .language-option {
    min-height: 62px;
    padding: 16px 20px;
    border-radius: 20px;
  }
}

@media (prefers-color-scheme: dark) {
  .gateway-page > .site-header {
    background: #020b15;
  }

  .gateway-page > .site-header::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: auto 0 0;
    height: 10%;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--navy));
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-option,
  .language-option-chevron {
    transition: none;
  }
}
