/* ===== Header ===== */
.s-header{
  --header-h: 76px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-primary);
  border-bottom: 1px solid color-mix(in srgb, var(--c-secondary) 42%, transparent);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.s-header::after{
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--c-secondary) 70%, transparent) 22%,
    var(--c-secondary) 50%,
    color-mix(in srgb, var(--c-secondary) 70%, transparent) 78%,
    transparent 100%);
  opacity: .55;
  pointer-events: none;
}
.s-header.is-scrolled{
  background: color-mix(in srgb, var(--c-primary) 92%, #000);
  box-shadow: var(--shadow-md);
}

.s-header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

/* Brand — takes an equal share so the nav sits exactly in the middle */
.s-header .brand{
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  text-align: center;
  font-family: var(--font-head);
  font-size: .95rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-text);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Navigation — auto width, centered within the bar */
.s-header__nav{
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  text-align: center;
}
.s-header__nav ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 38px);
}
.s-header__nav a{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-inline: 2px;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-text);
  text-decoration: none;
  transition: color .2s ease;
}
.s-header__nav a::after{
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 8px;
  height: 1px;
  background: var(--c-secondary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}
.s-header__nav a:hover,
.s-header__nav a:focus-visible{ color: var(--c-secondary); }
.s-header__nav a:hover::after,
.s-header__nav a:focus-visible::after{ transform: scaleX(1); }

/* Actions — mirror the brand width so the nav stays centered */
.s-header__actions{
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.s-header__cta{
  min-height: 44px;
  padding-inline: 22px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Toggle */
.s-header__toggle{
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--c-secondary);
  border: 1px solid color-mix(in srgb, var(--c-secondary) 55%, transparent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.s-header__toggle:hover,
.s-header__toggle:focus-visible{
  background: color-mix(in srgb, var(--c-secondary) 14%, transparent);
  border-color: var(--c-secondary);
}

@media (prefers-reduced-motion: reduce){
  .s-header,
  .s-header__nav a,
  .s-header__nav a::after,
  .s-header__toggle{ transition: none; }
}

/* ===== Tablet / Mobile ===== */
@media (max-width: 900px){
  .s-header{ --header-h: 68px; }
  .s-header__inner{ gap: 12px; }

  .s-header .brand{ flex: 1 1 auto; }

  .s-header__nav{
    position: absolute;
    top: 100%;
    inset-inline: 0;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    background: var(--c-surface);
    border-bottom: 1px solid color-mix(in srgb, var(--c-secondary) 42%, transparent);
    box-shadow: var(--shadow-md);
    padding: 8px 24px 20px;
  }
  .s-header.is-open .s-header__nav{ display: flex; }
  .s-header__nav ul{
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
  }
  .s-header__nav li + li{
    border-top: 1px solid var(--c-border);
  }
  .s-header__nav a{
    min-height: 52px;
    justify-content: flex-start;
    font-size: .82rem;
    letter-spacing: .14em;
  }
  .s-header__nav a::after{ display: none; }

  .s-header__toggle{ display: inline-flex; }
}

@media (max-width: 600px){
  .s-header{ --header-h: 64px; }
  .s-header .brand{
    font-size: .78rem;
    letter-spacing: .14em;
  }
  .s-header__cta{
    padding-inline: 16px;
    font-size: .72rem;
    letter-spacing: .1em;
  }
  .s-header__nav{ padding-inline: 18px; }
}

@media (max-width: 400px){
  .s-header__cta{ display: none; }
}

