/* La marca, el menú y la consulta comparten una banda continua. */
html {
  --alto-cabecera: 60px;
  scroll-padding-top: calc(var(--alto-cabecera) + 8px);
}
.site-header,
.site-header.scrolled,
.detail-page .site-header {
  --mast-gutter: max(32px, calc((100vw - 1320px) / 2));
  height: var(--alto-cabecera);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 var(--mast-gutter);
  color: var(--paper);
  background: var(--ink);
  border-bottom: 1px solid #38383a;
}
.site-header .brand {
  position: relative;
  isolation: isolate;
  justify-self: start;
  align-self: stretch;
  gap: 8px;
  margin-left: calc(-1 * var(--mast-gutter));
  padding: 0 35px 0 var(--mast-gutter);
}
.site-header .brand::before,
.site-header .header-cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
}
.site-header .brand::before {
  background: var(--red-deep);
  clip-path: polygon(0 0, 100% 0, calc(100% - 25px) 100%, 0 100%);
}
.site-header .brand::after {
  content: "";
  position: absolute;
  inset: 0 -9px 0 auto;
  width: 33px;
  background: var(--red);
  clip-path: polygon(25px 0, 100% 0, 8px 100%, 0 100%);
  pointer-events: none;
}
.site-header .brand img {
  width: 32px;
  height: 44px;
  object-fit: contain;
}
.site-header .brand > span {
  display: block;
  color: var(--paper);
  font: 700 30px/.95 var(--display);
  letter-spacing: -.025em;
}
.site-header .brand-line {
  display: block;
  margin: 3px 0 0 1px;
  color: var(--paper);
  font: 600 9px/1.1 Barlow, Arial, sans-serif;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.site-header #navigation {
  display: flex;
  position: static;
  flex-direction: row;
  height: 100%;
  max-height: none;
  overflow: visible;
  margin: 0;
  gap: 0;
  padding: 0;
  align-items: stretch;
  background: var(--ink);
}
.site-header .menu-toggle { display: none; }
.site-header #navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(14px, 1.5vw, 24px);
  border: 0;
  color: var(--paper);
  font: 700 17px/1.15 var(--display);
  text-transform: uppercase;
  letter-spacing: .025em;
  white-space: nowrap;
}
.site-header #navigation a + a::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(50% - 7px);
  height: 14px;
  border-left: 1px solid #424244;
  transform: skewX(-12deg);
}
.site-header #navigation a::after {
  inset: auto 14px 0;
  width: auto;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .15s ease-out;
}
.site-header #navigation a:is([aria-current], :hover, :focus-visible) { color: var(--yellow); }
.site-header #navigation a:is([aria-current], :focus-visible, :hover)::after { transform: scaleX(1); }
.site-header .header-cta {
  position: relative;
  isolation: isolate;
  justify-self: end;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 0 13px;
  color: var(--ink);
  background: transparent;
  font: 700 17px/1 var(--display);
}
.site-header .header-cta::before {
  inset-block: 4px;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}
.site-header .header-cta:hover::before { background: var(--paper); }
.site-header .header-cta svg { width: 16px; height: 16px; }
.site-header .brand:focus-visible,
.site-header #navigation a:focus-visible,
.site-header .menu-toggle:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: -4px;
}
.site-header .header-cta:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}
.site-header .scroll-progress { height: 1px; }

@media (min-width: 900px) and (max-width: 1150px) {
  .site-header, .site-header.scrolled, .detail-page .site-header {
    --mast-gutter: 20px;
    gap: 12px;
  }
  .site-header .brand { padding-right: 26px; }
  .site-header #navigation a { padding-inline: clamp(10px, 1.3vw, 15px); }
  .site-header #navigation a::after { inset-inline: 10px; }
}

@media (max-width: 899px) {
  html { --alto-cabecera: 56px; }
  .site-header,
  .site-header.scrolled,
  .detail-page .site-header {
    --mast-gutter: clamp(14px, 3.8vw, 36px);
    grid-template-columns: minmax(0, 1fr) auto 44px;
    gap: 12px;
  }
  .site-header .brand { gap: 7px; padding-right: 26px; }
  .site-header .brand img { width: 28px; height: 39px; }
  .site-header .brand > span { font-size: 27px; }
  .site-header .brand-line { font-size: 8px; margin-top: 3px; }
  .site-header .menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }
  .site-header .menu-toggle span { width: 22px; }
  .site-header .menu-toggle:hover span { background: var(--yellow); }
  .site-header #navigation {
    display: none;
    position: absolute;
    flex-direction: column;
    inset: 100% 0 auto auto;
    width: min(100%, 360px);
    height: auto;
    max-height: calc(100dvh - var(--alto-cabecera));
    padding: 0 var(--mast-gutter);
    border-bottom: 2px solid var(--red);
    overflow-y: auto;
  }
  .site-header #navigation.open { display: flex; }
  .site-header #navigation a {
    min-height: 44px;
    padding: 8px 5px;
    justify-content: start;
    border-bottom: 1px solid #38383a;
    font-size: 16px;
  }
  .site-header #navigation a:last-child { border-bottom: 0; }
  .site-header #navigation a + a::before { content: none; }
  .site-header #navigation a::after { inset: auto auto 7px 5px; width: 22px; height: 2px; }
}
@media (max-width: 540px) {
  html { --alto-cabecera: 52px; }
  .site-header,
  .site-header.scrolled,
  .detail-page .site-header { gap: 6px; }
  .site-header .brand { gap: 7px; padding-right: 22px; }
  .site-header .brand::before { clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 100%, 0 100%); }
  .site-header .brand::after { width: 17px; right: -5px; clip-path: polygon(13px 0, 100% 0, 4px 100%, 0 100%); }
  .site-header .brand img { width: 24px; height: 34px; }
  .site-header .brand > span { font-size: 26px; }
  .site-header .brand-line { display: none; }
  .site-header .header-cta { gap: 6px; padding: 0 10px; font-size: 16px; }
  .site-header .header-cta svg { width: 16px; height: 16px; }
  .site-header #navigation { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header #navigation a::after { transition: none; }
}
