/* Keep the original visual design; extend the header with a language choice. */
main {
  overflow-x: clip;
}

.site-header {
  grid-template-columns: auto 1fr auto;
  gap: 24px;
}

.desktop-nav {
  justify-self: center;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
  padding: 3px;
  border: 1px solid #7760d224;
  border-radius: 11px;
  background: #f0eafa;
}

.language-switcher a {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 6px;
  border-radius: 8px;
  color: #655b78;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: color .2s, background .2s, box-shadow .2s;
}

.language-switcher a:hover {
  color: var(--purple-deep);
  background: #ffffff80;
}

.language-switcher a[aria-current="page"] {
  color: var(--purple-deep);
  background: #fff;
  box-shadow: 0 2px 7px #543a9014;
}

.language-switcher a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

/* Content stays readable when JavaScript or IntersectionObserver is unavailable. */
html:not(.reveal-ready) [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .desktop-nav { gap: 20px; }
  .site-header { gap: 16px; }
  .header-actions { gap: 10px; }
}

@media (max-width: 1040px) {
  .site-header { grid-template-columns: 1fr auto; }
}

@media (max-width: 760px) {
  .site-header { gap: 8px; }
  .header-actions { gap: 8px; }
  .header-button span::after { content: attr(data-short-label); }
}

@media (max-width: 360px) {
  .site-header { padding-inline: 8px; gap: 6px; }
  .brand-word { width: 60px; }
  .language-switcher a { min-width: 30px; padding-inline: 4px; }
  .header-button { padding-inline: 6px; gap: 6px; }
  .header-actions { gap: 4px; }
}
