@import url("https://cdn.jsdelivr.net/npm/@fontsource/cinzel/400.css");
@import url("https://cdn.jsdelivr.net/npm/@fontsource/cinzel/700.css");
@import url("https://cdn.jsdelivr.net/npm/@fontsource/cormorant-garamond/500.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: dark;
  background: var(--void);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--parchment);
  background:
    radial-gradient(circle at 50% -18%, rgb(230 166 86 / 10%), transparent 33rem),
    linear-gradient(115deg, rgb(58 42 27 / 22%), transparent 28%, rgb(7 6 5 / 88%) 72%),
    var(--void);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header {
  position: relative;
  z-index: 20;
  height: var(--header-height);
  border-bottom: 1px solid var(--hairline-faint);
  background:
    linear-gradient(90deg, transparent, rgb(7 6 5 / 72%) 20%, rgb(7 6 5 / 88%) 80%, transparent),
    linear-gradient(180deg, rgb(7 6 5 / 42%), rgb(7 6 5 / 82%));
  box-shadow: 0 12px 35px rgb(0 0 0 / 48%);
}

.site-header__inner {
  position: relative;
  width: min(100%, var(--shell-max));
  height: 100%;
  margin-inline: auto;
}

.site-wordmark {
  position: absolute;
  top: 8px;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  color: var(--gold-hot);
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 3vw, 3.125rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.075em;
  text-align: center;
  text-shadow:
    0 1px 0 #5b3516,
    0 0 7px rgb(255 213 138 / 48%),
    0 0 22px rgb(230 166 86 / 18%);
  white-space: nowrap;
}

.site-wordmark::before,
.site-wordmark::after {
  position: absolute;
  left: 50%;
  pointer-events: none;
  content: "";
}

.site-wordmark::before {
  bottom: -13px;
  width: 68%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-hot), var(--gold), transparent);
  box-shadow: var(--gold-glow);
}

.site-wordmark::after {
  bottom: -17px;
  width: 7px;
  height: 7px;
  transform: translateX(-50%) rotate(45deg);
  border: 1px solid var(--gold-hot);
  background: var(--gold-hot);
  box-shadow: var(--gold-glow);
}

.site-nav {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
}

.site-nav__list {
  display: flex;
  gap: clamp(2.2rem, 2.85vw, 3rem);
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: block;
  padding: 8px 2px 13px;
  color: var(--parchment);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1;
  text-shadow: 0 2px 5px #000;
  transition: color 160ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link[aria-current="page"] {
  color: var(--gold-hot);
}

.site-nav__link[aria-current="page"]::after {
  position: absolute;
  right: -12px;
  bottom: 3px;
  left: -12px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold-hot) 16%, var(--gold-hot) 84%, transparent);
  box-shadow: var(--gold-glow);
}

.site-search {
  position: absolute;
  top: 24px;
  right: 30px;
  display: flex;
  width: min(22vw, 365px);
  min-width: 280px;
  height: 40px;
  align-items: center;
  gap: 13px;
  padding: 0 17px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgb(7 6 5 / 78%);
  box-shadow: inset 0 0 14px rgb(0 0 0 / 55%), 0 0 0 1px rgb(0 0 0 / 38%);
}

.site-search:focus-within {
  border-color: var(--gold-hot);
  box-shadow: inset 0 0 14px rgb(0 0 0 / 55%), var(--gold-glow);
}

.site-search__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--gold-hot);
}

.site-search__input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--parchment);
  background: transparent;
  font-size: 0.93rem;
  line-height: 1;
}

.site-search__input::placeholder {
  color: color-mix(in srgb, var(--ash) 86%, transparent);
  opacity: 1;
}

.page-stage {
  position: relative;
  isolation: isolate;
  width: min(100%, var(--shell-max));
  min-height: calc(100svh - var(--header-height));
  margin-inline: auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgb(230 166 86 / 7%), transparent 35%),
    repeating-linear-gradient(117deg, transparent 0 42px, rgb(239 227 204 / 1.4%) 43px, transparent 44px 84px);
}

.page-stage::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(ellipse at center, transparent 30%, rgb(7 6 5 / 48%) 75%, rgb(7 6 5 / 88%));
}

.placeholder-region {
  position: relative;
  min-width: 0;
  border-color: var(--hairline-faint);
  background: linear-gradient(145deg, rgb(58 42 27 / 11%), rgb(7 6 5 / 44%));
}

.placeholder-region::after {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgb(230 166 86 / 10%);
  pointer-events: none;
  content: "";
}

.dial-stage {
  display: grid;
  grid-template-columns: clamp(150px, 13vw, 220px) minmax(420px, 1fr) clamp(290px, 24vw, 405px);
  grid-template-rows: 1fr 104px;
  gap: 20px;
  padding: 22px 24px 16px;
}

.dial-stage__rail {
  grid-row: 1 / -1;
  border-left: 1px solid var(--hairline);
}

.dial-stage__dial {
  align-self: center;
  justify-self: center;
  width: min(68vh, 53vw);
  max-width: 720px;
  aspect-ratio: 1;
  border: 1px solid var(--hairline-faint);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 18px rgb(58 42 27 / 15%),
    inset 0 0 0 20px var(--hairline-faint),
    0 0 50px rgb(230 166 86 / 6%);
}

.dial-stage__event {
  align-self: start;
  min-height: min(58vh, 570px);
}

.dial-stage__fact {
  align-self: end;
  min-height: 92px;
}

.dial-stage__teaser {
  align-self: end;
  min-height: 92px;
}

.dial-stage__scrubber {
  grid-column: 1 / -1;
  min-height: 54px;
  border-top: 1px solid var(--hairline-faint);
}

.timeline-stage {
  display: grid;
  grid-template-columns: clamp(130px, 15vw, 235px) 1fr clamp(300px, 26vw, 430px);
  gap: 22px;
  padding: 24px;
}

.timeline-stage__gauge {
  border-right: 1px solid var(--hairline-faint);
}

.timeline-stage__strata {
  min-height: calc(100svh - var(--header-height) - 48px);
}

.timeline-stage__panel {
  align-self: start;
  min-height: min(66vh, 620px);
}

.vault-stage {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) clamp(310px, 26vw, 420px);
  grid-template-rows: 58px 1fr;
  gap: 18px 24px;
  padding: 18px 24px 24px;
}

.vault-stage__filters {
  width: min(100%, 720px);
  justify-self: center;
}

.vault-stage__niches {
  min-height: calc(100svh - var(--header-height) - 118px);
}

.vault-stage__panel {
  grid-row: 1 / -1;
  grid-column: 2;
  min-height: min(76vh, 720px);
}

@media (max-width: 1050px) {
  .site-search {
    right: 18px;
    width: 250px;
    min-width: 0;
  }

  .site-wordmark {
    font-size: 2.7rem;
  }

  .dial-stage,
  .timeline-stage,
  .vault-stage {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .dial-stage__event,
  .timeline-stage__panel,
  .vault-stage__panel {
    display: none;
  }

  .vault-stage__filters,
  .vault-stage__niches {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 174px;
  }

  .site-wordmark {
    top: 11px;
    font-size: clamp(2rem, 8.4vw, 2.7rem);
    letter-spacing: 0.055em;
  }

  .site-nav {
    top: 70px;
  }

  .site-nav__list {
    gap: clamp(1.1rem, 7vw, 2.5rem);
  }

  .site-nav__link {
    font-size: 0.72rem;
  }

  .site-search {
    top: 119px;
    right: 18px;
    left: 18px;
    width: auto;
    height: 38px;
  }

  .dial-stage,
  .timeline-stage,
  .vault-stage {
    display: block;
    padding: 16px;
  }

  .dial-stage__rail,
  .timeline-stage__gauge,
  .vault-stage__filters {
    min-height: 54px;
    margin-bottom: 16px;
    border: 1px solid var(--hairline-faint);
  }

  .dial-stage__dial {
    width: min(88vw, 560px);
  }

  .dial-stage__fact,
  .dial-stage__teaser,
  .dial-stage__scrubber {
    display: none;
  }
}

/* ------------------------------------------------------------ header search results (packet 08)
   A dark glass panel under the field: gold hairline and corner ornament from .ornament-frame, Cinzel titles,
   a painted thumbnail per hit. Theoretical events and mysterious artifacts turn blue, like everywhere else. */
.search-results.ornament-frame {
  --panel-surface: rgb(12 9 7 / 84%);
  position: absolute;
  top: 72px;
  right: 30px;
  z-index: 40;
  width: min(480px, calc(100vw - 36px));
  padding: 9px;
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow:
    inset 0 0 0 5px rgb(7 6 5 / 70%),
    inset 0 0 0 6px var(--hairline-faint),
    0 22px 60px rgb(0 0 0 / 62%),
    0 0 36px rgb(230 166 86 / 10%);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.search-results[hidden] {
  display: none;
}

.search-results.is-open {
  opacity: 1;
  transform: none;
}

.search-results__scroll {
  max-height: min(66vh, 600px);
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--gold) transparent;
  scrollbar-width: thin;
}

.search-result {
  --gold: #e6a656;
  --gold-hot: #ffd58a;
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 8px 12px 8px 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--parchment);
  cursor: pointer;
}

.search-result + .search-result {
  margin-top: 2px;
}

.search-result::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -1px;
  width: 2px;
  content: "";
  background: var(--gold-hot);
  box-shadow: var(--gold-glow);
  opacity: 0;
}

.search-result.is-theoretical {
  --gold: var(--blue);
  --gold-hot: var(--blue-hot);
  --gold-glow: var(--blue-glow);
}

.search-result.is-active {
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 18%, transparent), color-mix(in srgb, var(--gold) 4%, transparent));
}

.search-result.is-active::before {
  opacity: 1;
}

.search-result__thumb {
  position: relative;
  display: block;
  width: 76px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--gold) 60%, transparent);
  background: var(--rock) center / 320% auto;
  box-shadow: inset 0 0 10px rgb(0 0 0 / 55%), 0 0 10px color-mix(in srgb, var(--gold) 22%, transparent);
}

.search-result--artifact .search-result__thumb {
  background-color: #000;
}

.search-result__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result--artifact .search-result__thumb img {
  object-fit: contain;
}

.search-result__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 2px;
}

.search-result__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.search-result__title {
  min-width: 0;
  overflow: hidden;
  color: var(--parchment);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.25;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.search-result.is-active .search-result__title {
  color: var(--gold-hot);
}

.search-result__tag {
  flex: 0 0 auto;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.search-result__sub,
.search-result__snippet {
  overflow: hidden;
  color: var(--ash);
  font-size: 0.95rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result__snippet {
  font-style: italic;
  opacity: 0.86;
}

.search-result__era {
  color: color-mix(in srgb, var(--gold) 82%, var(--ash));
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.search-result mark {
  color: var(--gold-hot);
  background: transparent;
  text-shadow: 0 0 8px color-mix(in srgb, var(--gold) 55%, transparent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold) 60%, transparent);
  text-underline-offset: 3px;
}

.search-results__note {
  margin: 0;
  padding: 22px 16px;
  color: var(--ash);
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
}

.search-results__foot {
  margin: 4px 4px 0;
  padding: 7px 4px 1px;
  border-top: 1px solid var(--hairline-faint);
  color: color-mix(in srgb, var(--ash) 80%, transparent);
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.search-results__foot:empty {
  display: none;
}

@media (max-width: 1050px) {
  .search-results.ornament-frame {
    right: 18px;
  }
}

@media (max-width: 760px) {
  .search-results.ornament-frame {
    top: 164px;
    right: 18px;
    left: 18px;
    width: auto;
  }

  .search-results__scroll {
    max-height: calc(100svh - 164px - 36px - 24px);
  }

  .search-result {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
  }

  .search-result__thumb {
    width: 64px;
  }

  .search-results__foot {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-results {
    transition: none;
  }
}

.site-header.is-searching {
  z-index: 200;
}
