/* =========================================================================
   Language switcher — EN / PT / ES
   Sits in the header on desktop, inside the drawer nav on mobile.
   ========================================================================= */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  line-height: 1;
  transition: color 0.16s ease, background 0.16s ease;
}

.lang-btn:hover { color: var(--text); }

.lang-btn.is-active {
  background: var(--accent);
  color: var(--accent-text);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Screen-reader-only full language name, so "EN" isn't the only label. */
.sr-only-lang {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Desktop: the standalone switcher shows, the in-nav one hides. */
.lang-switch--header { margin-right: 12px; }
.site-nav .lang-switch { display: none; }

@media (max-width: 900px) {
  .lang-switch--header { display: none; }
  .site-nav .lang-switch {
    display: inline-flex;
    margin: 6px 0 4px;
    align-self: flex-start;
  }
  .site-nav .lang-btn { padding: 9px 16px; font-size: 13px; }
}
