/* Shared language control: a quiet instrument beside the primary business action. */
.language-switch {
  --language-index: 0;

  position: relative;
  isolation: isolate;

  display: inline-grid;
  grid-template-columns: repeat(2, 40px);
  flex: 0 0 auto;

  padding: 4px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.language-switch[data-language="en"] {
  --language-index: 1;
}

.language-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px auto 4px 4px;

  width: 40px;

  border-radius: 26px;
  background: #edf8f1;
  box-shadow: inset 0 1px 0 #ffffff70;

  transform: translateX(calc(var(--language-index) * 100%));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.language-switch button {
  appearance: none;
  display: grid;
  place-items: center;

  min-width: 0;
  min-height: 32px;
  padding: 0;

  border: 0;
  border-radius: 26px;
  background: transparent;

  color: rgba(255, 255, 255, 0.5);
  font: 600 10px/1 var(--font-mono, "JetBrains Mono", monospace);
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.2s;

  -webkit-tap-highlight-color: transparent;
}

.language-switch button[aria-pressed="true"] {
  color: #102319;
}

.language-switch button:focus-visible {
  outline: 2px solid #00ff66;
  outline-offset: 4px;
}

.language-announcement {
  position: absolute;

  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;

  border: 0;
}

.app-header .header-actions {
  gap: clamp(8px, 1vw, 16px);
}

.terminal-subfooter > .language-switch {
  justify-self: start;
  align-self: start;
}

.service-page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.service-page-footer .language-switch {
  align-self: start;
}

.header-quote-short {
  display: none;
}

.app-header .btn-header-glass {
  white-space: nowrap;

  flex-shrink: 0;
}

.app-header .brand-block {
  flex-shrink: 0;
}

.app-header .header-status {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .language-switch button:not([aria-pressed="true"]):hover {
    color: #fff;
  }
}

/* Reserve room for both languages without shrinking controls or colliding with the CTA. */
@media (max-width: 1450px) {
  .app-header .header-status,
  .app-header .scroll-tracker {
    display: none;
  }
}

@media (min-width: 861px) and (max-width: 1120px) {
  .app-header .brand-text-wrap {
    display: none;
  }
}

@media (max-width: 600px) {
  .app-header,
  .app-header.is-scrolled {
    padding-inline: 10px;
  }

  .app-header .header-inner,
  .app-header.is-scrolled .header-inner {
    gap: 6px;

    padding-inline: 8px;
  }

  .app-header .header-actions {
    gap: 6px;
  }

  .app-header .brand-text-wrap {
    display: none;
  }

  .app-header .services-mobile-trigger {
    padding-inline: 2px;

    font-size: 11px;
  }

  .app-header .btn-header-glass {
    padding-inline: 9px;

    white-space: nowrap;
  }

  .app-header .btn-header-glass svg {
    display: none;
  }

  .language-switch {
    grid-template-columns: repeat(2, 34px);
  }

  .language-switch::before {
    width: 34px;
  }

  .service-page-header {
    flex-wrap: wrap;
    gap: 18px;
  }
}

@media (max-width: 359px) {
  .app-header .header-quote-full {
    display: none;
  }

  .app-header .header-quote-short {
    display: inline;
  }
}

@media (hover: none), (pointer: coarse) {
  .language-switch button {
    min-height: 44px;
  }

  .language-switch {
    border-radius: 30px;
  }

  .language-switch::before,
  .language-switch button {
    border-radius: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-switch::before,
  .language-switch button {
    transition: none;
  }
}
