/* Site header: the horizontal SILO logo and three links. Pages that open
   with a full-bleed image set data-header="overlay" on <body>, the header
   then sits on the image in white. Pages that open with the light blue
   page head set data-header="panel". */

@layer components {
  .site-header {
    position: relative;
    z-index: 10;
    color: var(--theme-color-text);
  }

  .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--theme-space-sm);
    min-height: var(--theme-header-height);
    padding-block: var(--theme-space-xs);
  }

  .site-header__logo {
    display: block;
    flex-shrink: 0;
    width: clamp(5.5rem, 4.5rem + 4vw, 8rem);
    color: inherit;
  }

  .site-header__logo svg {
    width: 100%;
    height: auto;
    fill: currentcolor;
  }

  .site-header__nav ul {
    display: flex;
    gap: clamp(0.875rem, 0.4rem + 2vw, 2.25rem);
  }

  .site-header__nav a {
    display: inline-block;
    padding-block: var(--theme-space-3xs);
    font-size: var(--theme-text-sm);
    font-weight: var(--theme-weight-semibold);
    text-decoration: none;
    border-bottom: 2px solid transparent;
  }

  .site-header__nav a:hover,
  .site-header__nav a[aria-current='page'] {
    border-bottom-color: var(--theme-color-accent);
  }

  [data-header='overlay'] .site-header {
    position: absolute;
    inset: 0 0 auto;
    color: var(--theme-color-on-dark);
    background: linear-gradient(
      to bottom,
      color-mix(in oklab, var(--theme-color-dark) 85%, transparent),
      color-mix(in oklab, var(--theme-color-dark) 45%, transparent) 70%,
      transparent
    );
    text-shadow: 0 1px 8px color-mix(in oklab, var(--theme-color-dark) 70%, transparent);
  }

  [data-header='panel'] .site-header {
    background: var(--theme-color-panel);
  }

  @media (width <= 30rem) {
    .site-header__nav a {
      font-size: var(--theme-text-xs);
    }
  }
}
