/*
 * Universal Computational navigation scaffold.
 *
 * This file is loaded by the application and each preserved full-page work.
 * Keep its tokens and geometry as the single source of truth for the primary
 * navigation; individual artworks may only set their surrounding field.
 */
:root {
  --navigation-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --navigation-size: 14px;
  --navigation-leading: 1.35;
  --navigation-gap: 26px;
  --navigation-compact-gap: 16px;
  --navigation-phone-gap: 6px;
  --navigation-ink: #000;
  --navigation-rule: #b7b7b1;
}

:root[data-theme="dark"],
:root[data-theme-lock="dark"] {
  --navigation-ink: #fff;
  --navigation-rule: #48484e;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 9px;
  color: var(--navigation-ink);
  border-bottom: 1px solid var(--navigation-rule);
}

.site-header,
.wordmark,
.site-header nav {
  font-family: var(--navigation-font);
}

.wordmark {
  font-size: var(--navigation-size) !important;
  font-weight: 700;
  line-height: var(--navigation-leading);
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  gap: var(--navigation-gap);
  margin-left: auto;
  font-size: var(--navigation-size) !important;
  line-height: var(--navigation-leading);
}

.site-header nav a {
  cursor: pointer;
  color: inherit;
  border-bottom: 0px;
  text-decoration: none !important;
  text-transform: uppercase;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* The immersive work routes keep the same navigation component, placed above
 * a dark runtime field. The paired local values prevent a visitor's saved
 * light-mode preference from changing an artwork's authored scaffold. */
:is(.horizons-presentation-page, .screen-work-presentation-page) {
  --navigation-ink: #fff;
  --navigation-rule: #444;
}

:is(.horizons-presentation-page, .screen-work-presentation-page) .site-header {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--page-gutter-block, 20px) var(--page-gutter, 20px) 9px;
}

:is(.horizons-presentation-page, .screen-work-presentation-page) .site-header nav a,
:is(.horizons-presentation-page, .screen-work-presentation-page) :is(.horizons-presentation-work-link a, .screen-work-presentation-work-link a) {
  border-bottom: 0 !important;
  text-decoration: none !important;
}

:is(.horizons-presentation-work-link, .screen-work-presentation-work-link) {
  position: relative;
  z-index: 1;
  margin: 8px var(--page-gutter, 20px) 0;
  color: var(--navigation-ink);
  font-family: var(--navigation-font);
  font-size: var(--navigation-size);
  font-weight: 400;
  line-height: var(--navigation-leading);
}

:is(.horizons-presentation-work-link, .screen-work-presentation-work-link) a { color: inherit; }

@media (max-width: 760px) {
  .site-header {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 7px;
  }

  .site-header nav {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: var(--navigation-compact-gap);
  }

  :is(.horizons-presentation-page, .screen-work-presentation-page) .site-header {
    padding: 16px 8px 9px;
  }

  :is(.horizons-presentation-work-link, .screen-work-presentation-work-link) {
    margin-right: 8px;
    margin-left: 8px;
  }
}

@media (max-width: 440px) {
  .site-header {
    align-items: baseline;
    flex-direction: row;
    gap: var(--navigation-phone-gap);
  }

  .site-header nav, .wordmark {
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: var(--navigation-phone-gap);
    font-size: 13px !important;
  }
}
