/* CDS Header — fixed, borderless, with the scroll hairline */
.cds-frame { position: fixed; inset: 0; z-index: 9990; pointer-events: none; }
.cds-frame::before { content: ''; position: absolute; inset: var(--cds-frame); border-radius: 18px; box-shadow: 0 0 0 60px var(--cds-light); }
.admin-bar .cds-frame { top: 32px; }

.cds-header {
  --cds-h-fg: var(--cds-light);
  position: fixed; z-index: 9995; top: var(--cds-frame); left: var(--cds-frame); right: var(--cds-frame);
  height: var(--cds-header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 calc(var(--cds-gutter) - var(--cds-frame) + 8px);
  color: var(--cds-h-fg); font-family: var(--cds-mono); pointer-events: none;
}
.admin-bar .cds-header { top: calc(var(--cds-frame) + 32px); }
.cds-header > * { pointer-events: auto; }
.cds-header::before {
  content: ''; position: absolute; inset: -10px 0 -40px; z-index: -1; pointer-events: none; border-radius: 18px 18px 0 0;
  background: linear-gradient(var(--cds-veil, var(--cds-navy)) 35%, transparent); opacity: 0; transition: opacity 0.5s;
}
.cds-header.is-scrolled::before { opacity: 0.92; }
html.cds-menu-open .cds-header::before { opacity: 0; }

.cds-header__brand { justify-self: start; display: inline-flex; color: inherit; }
.cds-header__brand .cds-mark { width: 56px; height: 56px; display: block; object-fit: contain; }
.cds-header__brand .cds-mark polygon { transition: transform 0.6s var(--cds-ease-spring); }
.cds-header__brand:hover .m-slash { transform: translateX(3px); }
.cds-header__brand:hover .m-over, .cds-header__brand:hover .m-under, .cds-header__brand:hover .m-crease { transform: translateX(-2px); }

.cds-header__ticker {
  justify-self: center; display: flex; align-items: center; margin: 0;
  font-size: 0.75rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.25;
  transition: opacity 0.45s var(--cds-ease-out), transform 0.6s var(--cds-ease-out);
}
.cds-header__ticker > span:first-child { margin-right: 0.6em; }
.cds-ticker { display: inline-block; height: 1.25em; overflow: hidden; }
.cds-ticker__in { display: block; transition: transform 0.8s var(--cds-ease-io); }
.cds-ticker__in b { display: block; height: 1.25em; font-weight: 500; white-space: nowrap; }
.cds-header.is-scrolled .cds-header__ticker { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.cds-header__rule {
  position: absolute; top: 50%; height: 11px; margin-top: -5.5px; pointer-events: none;
  left: calc(var(--cds-gutter) - var(--cds-frame) + 8px + 56px + 24px);
  right: calc(var(--cds-gutter) - var(--cds-frame) + 8px + 52px + 24px);
}
.cds-header__rule::before { content: ''; position: absolute; left: 6px; right: 6px; top: 5px; height: 1px; background: currentColor; opacity: 0.55; transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--cds-ease-io); }
.cds-header__rule::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 5.5px 5.5px, transparent 3.2px, currentColor 3.6px 5px, transparent 5.5px) left / 11px 11px no-repeat,
    radial-gradient(circle at 5.5px 5.5px, transparent 3.2px, var(--cds-red) 3.6px 5px, transparent 5.5px) right / 11px 11px no-repeat;
  opacity: 0; transition: opacity 0.4s 0.5s;
}
.cds-header.is-scrolled .cds-header__rule::before { transform: scaleX(1); }
.cds-header.is-scrolled .cds-header__rule::after { opacity: 1; }
html.cds-menu-open .cds-header__rule { opacity: 0; }

.cds-header__actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.cds-menu-btn {
  width: 52px; height: 56px; padding: 0; border: 0 !important; border-radius: 10px; background: none !important;
  color: inherit !important; cursor: pointer; display: grid; place-items: center;
}
.cds-menu-btn:hover, .cds-menu-btn:focus { background: none !important; color: inherit !important; }

.cds-faders { position: relative; display: flex; gap: 10px; height: 44px; align-items: center; }
.cds-faders i { position: relative; display: block; width: 2px; border-radius: 2px; background: currentColor; transition: height 0.5s var(--cds-ease-out), transform 0.55s var(--cds-ease-spring); }
.cds-faders i:first-child { height: 44px; }
.cds-faders i:last-child { height: 30px; }
.cds-faders i::after {
  content: ''; position: absolute; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  border: 1.6px solid currentColor; background: var(--cds-navy); transition: top 0.55s var(--cds-ease-spring), border-color 0.3s, opacity 0.3s;
}
.cds-faders i:first-child::after { top: -2px; }
.cds-faders i:last-child::after { top: calc(100% - 7px); }
.cds-menu-btn:hover .cds-faders i:first-child::after { top: calc(100% - 7px); border-color: var(--cds-red); }
.cds-menu-btn:hover .cds-faders i:last-child::after { top: -2px; border-color: var(--cds-red); }
.cds-menu-btn[aria-expanded='true'] .cds-faders i { height: 34px; }
.cds-menu-btn[aria-expanded='true'] .cds-faders i:first-child { transform: translateX(6px) rotate(45deg); }
.cds-menu-btn[aria-expanded='true'] .cds-faders i:last-child { transform: translateX(-6px) rotate(-45deg); }
.cds-menu-btn[aria-expanded='true'] .cds-faders i::after { opacity: 0; }

/* full-screen menu */
.cds-menu {
  position: fixed; z-index: 9993; inset: var(--cds-frame); border-radius: 18px;
  background: var(--cds-deep); color: var(--cds-light); font-family: var(--cds-mono);
  display: flex; align-items: flex-end; overflow-y: auto;
  padding: calc(var(--cds-header-h) + 3vh) var(--cds-gutter) calc(var(--cds-gutter) + 1vh);
  clip-path: polygon(100% 0%, 130% 0%, 100% 100%, 70% 100%);
  transition: clip-path 0.8s var(--cds-ease-io);
}
.cds-menu[hidden] { display: none; }
.cds-menu.is-open { clip-path: polygon(-30% 0%, 130% 0%, 100% 100%, -60% 100%); }
.cds-menu__inner { width: 100%; display: grid; grid-template-columns: 1.6fr 1fr; gap: 6vw; align-items: end; }
.cds-menu__list { list-style: none; margin: 0; padding: 0; }
.cds-menu__list a {
  display: flex; align-items: flex-start; gap: 1rem; text-decoration: none; color: inherit;
  font-family: var(--cds-font); font-size: clamp(3.4rem, 1rem + 8vw, 9rem); font-weight: 900; font-stretch: 62%; text-transform: uppercase; line-height: 0.92;
  transition: color 0.3s, transform 0.5s var(--cds-ease-out);
}
.cds-menu__list a:hover, .cds-menu__list a:focus-visible { color: var(--cds-red); transform: translateX(14px); }
.cds-menu__n { font-family: var(--cds-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.06em; color: rgba(238, 238, 242, 0.6); padding-top: 0.9em; }
.cds-menu__label { display: flex; align-items: center; color: rgba(238, 238, 242, 0.6); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; margin: 0 0 1rem; }
.cds-menu__aside p { margin: 0.4rem 0 0; font-size: 1.15rem; }
html.cds-menu-open { overflow: hidden; }

@media (max-width: 1100px) { .cds-header__ticker, .cds-header__rule { display: none; } .cds-header { grid-template-columns: 1fr auto; } }
@media (max-width: 767px) { .cds-menu__inner { grid-template-columns: 1fr; } .cds-menu__aside { display: none; } }
