/* ==========================================================================
   BYTPRESS — layout.css
   ==========================================================================
   01. Header
   02. Logo
   03. Nav desktop
   04. Language switcher
   05. CTA header
   06. Hamburguesa
   07. Overlay móvil
   08. Footer
   09. Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   01. HEADER
   -------------------------------------------------------------------------- */

.bytmpress-header {
  position: sticky;
  top: 0;
  z-index: var(--bytmpress-z-header);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.bytmpress-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  transition: background-color 0.3s ease;
}

.bytmpress-header.is-scrolled::before {
  background: rgba(10, 10, 10, 0.92);
}

.bytmpress-header.is-scrolled {
  border-bottom-color: var(--wp--preset--color--border-dark);
}

.bytmpress-header__inner {
  max-width: var(--bytmpress-container);
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
}

.bytmpress-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.bytmpress-header__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   02. LOGO
   -------------------------------------------------------------------------- */

.bytmpress-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--wp--preset--color--base);
}

.bytmpress-logo__mark {
  display: block;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 85, 255, 0.35));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.bytmpress-logo:hover .bytmpress-logo__mark,
.bytmpress-logo:focus-visible .bytmpress-logo__mark {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 20px rgba(0, 85, 255, 0.5));
}

.bytmpress-logo__text {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   03. NAV DESKTOP
   -------------------------------------------------------------------------- */

.bytmpress-nav {
  display: none;
}

.bytmpress-nav__list {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bytmpress-nav__item {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bytmpress-nav__link {
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  color: var(--wp--preset--color--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.bytmpress-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--wp--preset--color--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.bytmpress-nav__link:hover,
.bytmpress-nav__link:focus-visible {
  color: var(--wp--preset--color--base);
}

.bytmpress-nav__link:hover::after,
.bytmpress-nav__link:focus-visible::after {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   04. LANGUAGE SWITCHER
   -------------------------------------------------------------------------- */

.bytmpress-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  padding: 0 0.75rem;
  flex-shrink: 0;
  border: 1px solid var(--wp--preset--color--border-dark);
  border-radius: var(--bytmpress-radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--wp--preset--color--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bytmpress-lang:hover,
.bytmpress-lang:focus-visible {
  background: var(--wp--preset--color--primary);
  color: #fff;
  border-color: var(--wp--preset--color--primary);
}

/* --------------------------------------------------------------------------
   05. CTA HEADER
   -------------------------------------------------------------------------- */

.bytmpress-header .bytmpress-header__cta {
  display: none;
}

/* --------------------------------------------------------------------------
   06. HAMBURGUESA
   -------------------------------------------------------------------------- */

.bytmpress-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--wp--preset--color--border-dark);
  border-radius: var(--bytmpress-radius-sm);
  color: var(--wp--preset--color--base);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.bytmpress-hamburger:hover,
.bytmpress-hamburger:focus-visible {
  background: rgba(0, 85, 255, 0.12);
  border-color: var(--wp--preset--color--primary);
}

.bytmpress-hamburger svg {
  display: block;
  width: 20px;
  height: 20px;
}

/* --------------------------------------------------------------------------
   07. OVERLAY MÓVIL
   -------------------------------------------------------------------------- */

.bytmpress-menu {
  position: fixed;
  inset: 0;
  z-index: var(--bytmpress-z-overlay);
  display: flex;
  flex-direction: column;
  padding: 5.5rem 1.5rem 2rem;
  background: #0A0A0A;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.bytmpress-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.bytmpress-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at top,
    rgba(0, 85, 255, 0.15) 0%,
    transparent 60%
  );
}

.bytmpress-menu > * {
  position: relative;
}

.bytmpress-menu__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--wp--preset--color--border-dark);
  border-radius: var(--bytmpress-radius-sm);
  color: var(--wp--preset--color--base);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.bytmpress-menu__close:hover,
.bytmpress-menu__close:focus-visible {
  background: var(--wp--preset--color--primary);
  border-color: var(--wp--preset--color--primary);
  color: #fff;
}

.bytmpress-menu__close svg {
  display: block;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.bytmpress-menu__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bytmpress-menu__list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bytmpress-menu__item {
  list-style: none;
  border-bottom: 1px solid var(--wp--preset--color--border-dark);
}

.bytmpress-menu__item:last-child {
  border-bottom: none;
}

.bytmpress-menu__link {
  display: block;
  width: 100%;
  padding: 1.25rem 0;
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--wp--preset--color--base);
  text-decoration: none;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.bytmpress-menu__link:hover,
.bytmpress-menu__link:focus-visible {
  color: var(--wp--preset--color--primary);
  padding-left: 0.5rem;
}

.bytmpress-menu__footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
}

body.bytmpress-menu-open {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   08. FOOTER
   -------------------------------------------------------------------------- */

.bytmpress-footer {
  background: var(--wp--preset--color--contrast);
  border-top: 1px solid var(--wp--preset--color--border-dark);
}

.bytmpress-footer a {
  color: var(--wp--preset--color--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.bytmpress-footer a:hover,
.bytmpress-footer a:focus-visible {
  color: var(--wp--preset--color--base);
}

/* --------------------------------------------------------------------------
   09. RESPONSIVE
   -------------------------------------------------------------------------- */

@media (min-width: 900px) {
  .bytmpress-header .bytmpress-nav {
    display: block;
  }

  .bytmpress-header .bytmpress-header__cta {
    display: inline-flex;
  }

  .bytmpress-header .bytmpress-hamburger {
    display: none;
  }

  .bytmpress-menu {
    display: none;
  }
}