/* ============================================================
   FUENTE AILERON — @font-face
   ============================================================ */
@font-face {
  font-family: 'Aileron';
  src: url('../fonts/aileron/Aileron-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('../fonts/aileron/Aileron-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('../fonts/aileron/Aileron-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('../fonts/aileron/Aileron-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('../fonts/aileron/Aileron-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aileron';
  src: url('../fonts/aileron/Aileron-Thin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 36px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}

.site-header.is-scrolled {
  background: var(--color-bg);
  padding-top: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--color-border);
}

/* ── Logo ── */
.site-logo,
.custom-logo-link {
  font-family: 'Aileron', sans-serif;
  font-size: 1.2625rem;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
}

/* "Creativo" en Black, "Estudio" en Regular */
.site-logo .logo-bold   { font-weight: 900; }
.site-logo .logo-regular{ font-weight: 400; }

/* Logo imagen (altura controlada desde Customizer) */
.custom-logo-link img,
.custom-logo {
  height: 65px;
  width: auto;
  display: block;
}

/* ── Nav right wrapper ── */
.header-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* (separador eliminado) */

/* ── Nav links ── */
.nav-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 0;
}

/*
 * Efecto Hiroshi:
 * Cada <a> tiene un <span> dentro.
 * El span tiene un ::after de 1px ancho × 100% alto (línea vertical)
 * que crece con scaleY(0→1) desde el bottom.
 */
.nav-primary a {
  font-family: 'Aileron', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-text);
  opacity: 0.75;
  text-decoration: none;
  transition: color 0.2s ease-out, opacity 0.2s ease-out, font-weight 0s;
  display: inline-flex;
  align-items: center;
}

/* El span wrappea el texto */
.nav-primary a span {
  position: relative;
  padding-left: 20px;
  margin-left: 20px;
  /* Reserva el espacio del texto en bold desde el inicio
     para que el layout no se mueva al hacer hover */
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Pseudo-elemento invisible con el texto en bold
   ocupa el espacio desde el inicio — evita el layout shift */
.nav-primary a span::before {
  content: attr(data-text);
  height: 0;
  visibility: hidden;
  overflow: hidden;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  speak: none;
}

/* Línea vertical a la izquierda — estado base (invisible) */
.nav-primary a span::after {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background-color: currentColor;
  transform: scaleY(0);
  transform-origin: center bottom;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.35, 0.94),
              background-color 0.2s ease-out;
}

/* Hover — línea sube + bold */
.nav-primary a:hover {
  opacity: 1;
  color: var(--color-text);
  font-weight: 700;
}

.nav-primary a:hover span::after {
  transform: scaleY(1);
}

/* Activo — línea siempre visible + bold */
.nav-primary a.is-active {
  opacity: 1;
  color: var(--color-text);
  font-weight: 700;
}

.nav-primary a.is-active span::after {
  transform: scaleY(1);
}

/* ── Menú móvil ── */
.nav-mobile {
  position: fixed;
  inset: 0;
  background: var(--color-bg-dark);
  z-index: 102; /* encima del header (100) y del categories-overlay (101) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--gutter) 48px;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.nav-mobile.is-open {
  opacity: 1;
  pointer-events: all;
}

/* Links de navegación dentro del menú */
.nav-mobile__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.nav-mobile__links li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-mobile__links a {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 300;
  color: var(--color-bg);
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-mobile__links a:hover { opacity: 0.5; }

/* Logo arriba centrado */
.nav-mobile__top {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 16px;
}

.nav-mobile__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-mobile__logo-img {
  height: 55px;
  width: auto;
  filter: brightness(0) invert(1); /* blanco sobre fondo oscuro */
  display: block;
}

/* Contacto al fondo */
.nav-mobile__footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile__footer a {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-bg);
  opacity: 0.45;
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-mobile__footer a:hover { opacity: 0.8; }

/* Botón cerrar */
.nav-mobile-close {
  position: absolute;
  top: 20px; right: var(--gutter);
  color: var(--color-bg);
  font-size: 1.25rem;
  opacity: 0.6;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Aileron', sans-serif;
  font-weight: 300;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

/* Hamburger en mobile (reemplaza el círculo) */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav-primary  { display: none; }
  .header-divider { display: none; }
  .nav-mobile-toggle { display: flex; }
}

@media (max-width: 600px) {
  .site-header { padding: 24px 20px; }
  .custom-logo-link img,
  .custom-logo { height: 55px; }
}
