@font-face {
  font-family: Barlow Condensed;
  src: url("assets/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Barlow Condensed;
  src: url("assets/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: DM Sans;
  src: url("assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: IBM Plex Mono;
  src: url("assets/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #101310;
  --surface: #181c18;
  --paper: #f2eee2;
  --muted: #bcbbb0;
  --signal: #efb77f;
  --rule: #343932;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "DM Sans", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 1rem/1.55 var(--body);
}

body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
button, .button { touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }

.shell { width: min(100% - 7rem, 78rem); margin-inline: auto; }
.visually-hidden,
.skip-link:not(:focus) {
  position: absolute;
  clip-path: inset(50%);
  block-size: 1px;
  inline-size: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 5;
  background: var(--signal);
  color: var(--ink);
  padding: 0.65rem 1rem;
}

.site-header {
  position: relative;
  z-index: 2;
  background: #121612;
  border-bottom: 1px solid #2b302a;
}

.header-inner {
  min-height: 4.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper);
  font: 800 1.65rem/1 var(--display);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark { width: 1.65rem; height: 1.6rem; display: inline-flex; align-items: center; gap: 2px; }
.brand-mark i { display: block; height: 0.55rem; flex: 1; background: var(--signal); transform: skewX(-13deg); }
.brand-mark i:nth-child(2) { height: 0.95rem; }
.brand-mark i:nth-child(3) { height: 1.42rem; }
.brand-mark i:nth-child(4) { height: 0.8rem; }
.brand-mark i:nth-child(5) { height: 0.4rem; }

.site-nav, .site-footer nav { display: flex; gap: clamp(1.15rem, 2.4vw, 2.25rem); align-items: center; }
.site-nav a, .site-footer nav a {
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover, .site-footer nav a:hover { color: var(--signal); }
.menu-toggle { display: none; }
.header-reading { justify-self: end; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #252727;
}

.hero-image, .hero-shade, .world-image, .art-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-image { object-position: 63% 59%; z-index: -3; }
.hero-shade {
  z-index: -2;
  background:
    linear-gradient(0deg, rgba(13,17,14,.91), rgba(13,17,14,.03) 34%, transparent 72%),
    linear-gradient(90deg, rgba(11,15,13,.94), rgba(11,15,13,.72) 26%, rgba(11,15,13,.23) 57%, transparent 82%);
}

.hero-inner { min-height: clamp(32.5rem, 43vw, 40rem); display: flex; align-items: center; position: relative; padding-block: 3.75rem 4.75rem; }
.hero-content { max-width: 38rem; }
.kicker, .art-label, .meta {
  font: 500 0.83rem/1.45 var(--mono);
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.kicker { color: var(--signal); margin: 0 0 0.75rem; }
.kicker span { display: inline-block; vertical-align: 0.25em; width: 1.5rem; height: 1px; margin-right: 0.65rem; background: currentColor; }
.hero h1 {
  margin: 0 0 1.1rem -0.02em;
  font: 800 clamp(7rem, 11.9vw, 11.4rem)/0.76 var(--display);
  letter-spacing: -0.022em;
  white-space: nowrap;
  text-shadow: 0 0.12em 0.28em #0c0e0b65;
}

.hero-line { margin: 1.55rem 0 0; font: 700 clamp(2rem, 3.25vw, 3.25rem)/0.97 var(--display); }
.hero-description { max-width: 27rem; margin: 1rem 0 1.65rem; color: #deddd3; font-size: 1.06rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: fit-content;
  min-height: 3rem;
  padding: 0.65rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--paper);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-small { min-height: 2.4rem; padding: 0.45rem 0.8rem; }
.primary { color: #1c1a13; background: var(--signal); border-color: var(--signal); }
.primary:hover { background: #fbd3a9; border-color: #fbd3a9; }
.outline { border-color: #b5b4a77b; background: #11150f50; }
.outline:hover { border-color: var(--signal); color: var(--signal); background: #1a1b15; }

.hero-location {
  position: absolute;
  bottom: 1.7rem;
  right: 0;
  margin: 0;
  padding-left: 0.65rem;
  border-left: 1px solid var(--signal);
  color: #e5dfd1;
  font: 500 0.78rem/1.55 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px #0e100b;
}

.hero-location span { color: var(--signal); }
.hero-location b { font-weight: 500; }
.universe { padding: 3.25rem 0 4.75rem; border-top: 1px solid var(--rule); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 1.55rem; }
.section-head h2, .world h2, .detail h2 { margin: 0; font: 800 clamp(2.75rem, 5.2vw, 4.7rem)/0.92 var(--display); letter-spacing: -0.01em; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.25rem; border: 1px solid var(--rule); }
html:not(.has-script) .filter-bar { display: none; }
.filter-bar button {
  min-height: 2.2rem;
  padding: 0.2rem 0.65rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font: 600 0.88rem/1.4 var(--body);
  cursor: pointer;
}

.filter-bar button:hover { color: var(--paper); background: #232820; }
.filter-bar button[aria-pressed="true"] { color: var(--signal); border-color: #655336; background: #30291c; }

.catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.project {
  background: var(--surface);
  border: 1px solid var(--rule);
  scroll-margin-top: 1.25rem;
  transition: border-color 160ms ease;
}
.project:focus-within { border-color: #976d4b; }
.project:target { border-color: #977c4e; }
.project-art { position: relative; isolation: isolate; height: clamp(12.75rem, 23vw, 20.5rem); overflow: hidden; background: #232820; }
.project-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, #0e130e50, transparent 50%); pointer-events: none; }
.art-fill { z-index: -2; }
.art-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  margin: 0;
  color: var(--paper);
  background: #151913e8;
  border: 1px solid #d7d2bd49;
  padding: 0.28rem 0.52rem;
}

.book-art { display: grid; place-items: center; }
.books-art { background: radial-gradient(ellipse at 54% 53%, #624433, #282a23 63%, #1b1f1b); }
.graphic-art { background: radial-gradient(ellipse at 58% 53%, #54665f, #29342e 63%, #202723); }
.cover-pair {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.65rem, 1.5vw, 1.35rem);
  padding: 1.75rem 0.75rem 0.25rem;
}
.cover-pair img {
  width: auto;
  height: clamp(8.65rem, 17.8vw, 15.35rem);
  max-width: 43%;
  object-fit: contain;
  object-position: bottom;
  outline: 1px solid #e3d5c52c;
  box-shadow: 0.2rem 0.55rem 1.4rem #0d0f0dc4;
}

.cover-pair img:first-child { transform: translateY(0.2rem) rotate(-3deg); }
.cover-pair img:last-child { transform: translateY(-0.2rem) rotate(3deg); }
.series-image { object-position: 50% 47%; }
.game-image { object-position: 50% 53%; }
.audio-image { object-position: 51% 54%; }
.project-body { padding: 1.15rem 1.35rem 1.45rem; border-top: 1px solid #e7d8b519; }
.project-body h3, .detail h3 { font: 700 clamp(2.15rem, 3.15vw, 3rem)/0.98 var(--display); margin: 0; }
.project-body p { margin: 0.65rem 0 0.8rem; color: var(--muted); }
.text-link { display: inline-block; width: fit-content; color: var(--signal); font-weight: 700; text-decoration-color: #b78f56; text-underline-offset: 0.25rem; }
.text-link:hover { color: #ffda97; text-decoration-thickness: 2px; }
.audio-project { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
.audio-project .project-art { height: 13rem; }
.audio-project .project-body { align-self: center; padding-inline: 1.75rem; }

.world { position: relative; isolation: isolate; overflow: hidden; background: #29332b; }
.world-image { z-index: -2; object-position: 60% 55%; }
.world::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #101510f7, #111611bf 37%, #11161132 76%); }
.world-inner { min-height: 26rem; display: grid; align-items: center; padding-block: 3.1rem; }
.world-inner > div { max-width: 36rem; }
.world-inner p:not(.kicker) { max-width: 28rem; margin: 1.1rem 0 1.4rem; color: #e4e2d8; }
.site-footer { padding: 1.65rem 0 1.85rem; border-top: 1px solid var(--rule); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.footer-inner p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.footer-inner nav { margin-left: auto; }

.detail {
  width: min(100% - 2rem, 43rem);
  max-height: min(51rem, 100% - 2rem);
  background: #1a1e19;
  border: 1px solid #5b5c50;
  color: var(--paper);
  padding: 0;
}

.detail::backdrop { background: #090b09d9; }
.detail-inner { padding: 2rem; }
.detail:target:not([open]) { display: block; position: relative; }
.detail h2 { font-size: clamp(2.7rem, 6vw, 4rem); padding-right: 2.5rem; }
.detail p:not(.kicker, .meta) { color: #d0cfc3; }
.detail .button { margin-top: 0.25rem; }
.detail .kicker { padding-right: 2.5rem; }
.close-button {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 2.6rem;
  width: 2.6rem;
  padding: 0 0 0.17rem;
  border: 1px solid #64665a;
  background: #151913ef;
  color: var(--paper);
  font: 400 1.7rem/1 var(--body);
  cursor: pointer;
}

.close-button:hover { color: var(--signal); border-color: var(--signal); }
.detail-banner { width: calc(100% + 4rem); max-width: none; height: clamp(10rem, 34vw, 16rem); object-fit: cover; margin: -2rem -2rem 1.55rem; }
.series-figure { margin: 0 0 1.4rem; }
.series-figure .detail-banner { height: auto; margin-bottom: 0.55rem; }
.series-figure figcaption { color: var(--muted); font-size: 0.83rem; }
.audio-banner { object-position: center 55%; }
.detail-list { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.edition { display: flex; align-items: start; gap: 1.15rem; padding: 1.05rem 0; border-top: 1px solid var(--rule); }
.edition img { flex: 0 0 auto; width: clamp(3.5rem, 11vw, 5rem); height: auto; border: 1px solid var(--rule); }
.edition h3 { font-size: 2.1rem; }
.edition p:not(.meta) { margin: 0.4rem 0; }
.meta { color: var(--signal); margin: 0 0 0.3rem; }
.detail audio { display: block; width: 100%; margin: 0.9rem 0; }
.transcript { margin: 0.85rem 0 1rem; color: var(--muted); }
.transcript summary { width: fit-content; cursor: pointer; }
.transcript p { margin-bottom: 0; }
.lore-list { margin-bottom: 0; }
.lore-list div { border-top: 1px solid var(--rule); padding: 0.65rem 0; }
.lore-list dt { font: 700 1.6rem/1.3 var(--display); color: var(--signal); }
.lore-list dd { margin: 0; color: var(--muted); }

@media (max-width: 60rem) {
  .shell { width: calc(100% - 4rem); }
  .header-inner { gap: 1rem; }
  .site-nav { gap: 1.05rem; }
  .section-head h2 { font-size: clamp(2.7rem, 6vw, 4.3rem); }
}

@media (max-width: 46rem) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: 3.8rem; grid-template-columns: 1fr auto; gap: 0; }
  .header-reading { display: none; }
  .has-script .menu-toggle {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--paper);
    cursor: pointer;
  }
  .site-nav {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 0.85rem 1.1rem;
    border-top: 1px solid var(--rule);
    padding: 0.8rem 0 1rem;
    margin-top: 0.25rem;
  }
  .has-script .site-nav:not(.is-open) { display: none; }
  .hero-inner { min-height: 34rem; padding-block: 3.25rem 5rem; }
  .hero-image { object-position: 84% 50%; }
  .hero-shade {
    background:
      linear-gradient(0deg, #101410e8, #10141017 45%, #10141060),
      linear-gradient(90deg, #0b0f0ddf, #0b0f0da3 49%, #0b0f0d25 100%);
  }
  .hero h1 { font-size: clamp(5.9rem, 18.5vw, 9rem); }
  .hero-line { margin-top: 1.25rem; }
  .hero-description { max-width: 21rem; }
  .hero-location { bottom: 1.25rem; left: 0; right: auto; }
  .section-head { align-items: start; flex-direction: column; margin-bottom: 1rem; gap: 1rem; }
  .universe { padding-block: 2.6rem 3rem; }
  .catalog { gap: 0.9rem; }
  .project-body { padding: 1rem; }
  .cover-pair img { height: clamp(8.75rem, 23vw, 10.75rem); }
  .audio-project .project-body { padding-inline: 1rem; }
  .world::after { background: linear-gradient(90deg, #101510f4, #11161193 73%, #11161157); }
  .footer-inner { gap: 0.75rem 1rem; }
  .footer-inner nav { width: 100%; margin-left: 0; }
}

@media (max-width: 33rem) {
  .catalog, .audio-project { grid-template-columns: minmax(0, 1fr); }
  .project-art { height: 13.5rem; }
  .cover-pair img { height: 9.5rem; }
  .audio-project .project-art { height: 10.5rem; }
  .detail-inner { padding: 1.35rem; }
  .detail-banner { width: calc(100% + 2.7rem); margin: -1.35rem -1.35rem 1.15rem; }
}

@media (max-width: 23rem) {
  .hero h1 { font-size: clamp(4.15rem, 20vw, 5.35rem); }
  .hero .button { padding-inline: 0.7rem; font-size: 0.85rem; }
  .filter-bar { gap: 0.15rem; }
  .filter-bar button { padding-inline: 0.47rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button, .project { transition: none; }
}
