/* Fixed black site header and primary navigation */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgb(11 11 11 / 0.92);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

@supports (backdrop-filter: blur(8px)) {
  .site-header {
    background: rgb(11 11 11 / 0.78);
    backdrop-filter: saturate(1.3) blur(10px);
  }
}

.site-header.is-scrolled {
  background: rgb(11 11 11 / 0.96);
  border-color: rgb(212 175 55 / 0.25);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.3);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  text-decoration: none;
}

.brand__circle {
  width: 44px;
  height: 44px;
}

.brand__word {
  width: auto;
  height: 36px;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgb(212 175 55 / 0.4);
  border-radius: 12px;
  background: transparent;
  color: var(--oro);
  font-size: 1.6rem;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.site-nav__link {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--blanco);
  text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link[aria-current="true"] {
  color: var(--oro);
  background: rgb(212 175 55 / 0.1);
}

.site-nav__cta {
  width: 100%;
  margin-top: var(--space-4);
  white-space: nowrap;
}

@media (max-width: 1023.98px) {
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: var(--space-4) var(--gutter) var(--space-6);
    background: var(--negro);
    border-bottom: 2px solid var(--oro);
    box-shadow: var(--shadow-lg);
  }

  .js .site-nav {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }

  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s;
  }

  html:not(.js) .nav-toggle {
    display: none;
  }

  html:not(.js) .site-header {
    position: static;
    height: auto;
  }

  html:not(.js) .site-nav {
    position: static;
    box-shadow: none;
  }
}

@media (max-width: 359.98px) {
  .brand__word {
    display: none;
  }
}

@media (min-width: 1024px) {
  :root {
    --header-h: 80px;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
  }

  .site-nav__list {
    flex-direction: row;
    gap: 0;
  }

  .site-nav__link {
    padding: var(--space-2) 0.75rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .site-nav__cta {
    width: auto;
    margin-top: 0;
    min-height: 44px;
  }

  .brand__circle {
    width: 52px;
    height: 52px;
  }

  .brand__word {
    height: 40px;
  }
}

/* Tools group: language switch + menu toggle (toggle hidden on desktop) */
.site-header__tools {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid rgb(212 175 55 / 0.4);
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
}

.lang-switch__current,
.lang-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  min-width: 44px;
  min-height: 40px;
  padding: 0 var(--space-3);
  border-radius: 999px;
  letter-spacing: 0;
}

.lang-switch__current {
  background: var(--oro);
  color: var(--negro);
}

.lang-switch__link {
  color: var(--blanco);
  text-decoration: none;
}

.lang-switch__link:hover {
  color: var(--oro);
}

@media (min-width: 1024px) {
  .site-header__tools {
    order: 3;
    margin-left: var(--space-3);
  }

  .site-nav {
    margin-left: auto;
  }
}

/* Phones: compact language words; below 380px hide the wordmark (the round logo stays) */
@media (max-width: 429.98px) {
  .lang-switch__current,
  .lang-switch__link {
    padding: 0 var(--space-2);
    font-size: 0.8rem;
  }
}

@media (max-width: 379.98px) {
  .brand__word {
    display: none;
  }
}

.lang-switch__sep {
  padding: 0 2px;
  color: var(--oro);
  font-weight: 400;
}
