:root {
  color-scheme: dark;
  --milk: #f1eee6;
  --muted: #aeb8af;
  --sage: #b8ceb6;
  --line: #63766a;
  --graphite: #181e1b;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--graphite);
  color: var(--milk);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 5px;
}

.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 76px;
  padding: .75rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid #343e38;
  background: #181e1b;
}

.brand, .contact { display: inline-flex; align-items: center; gap: .75rem; }
.brand { font-size: .95rem; font-weight: 700; line-height: 1.15; }
.brand img { flex: none; object-fit: contain; filter: grayscale(1) brightness(0) invert(.94); }
.contact {
  flex: none;
  min-height: 44px;
  padding: .5rem .875rem;
  border: 1px solid #627166;
  color: var(--sage);
  font-size: .875rem;
}
.contact:hover { border-color: var(--sage); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100svh - 76px);
  padding: clamp(2rem, 7vh, 5rem) 1rem 0;
  background:
    radial-gradient(ellipse at 50% 64%, #38473d 0%, #252f29 32%, transparent 67%),
    #181e1b;
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(#b8ceb609 1px, transparent 1px), linear-gradient(90deg, #b8ceb609 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 5%, transparent 73%);
  content: '';
  pointer-events: none;
}
.intro { position: relative; z-index: 2; text-align: center; }
.intro h1, .collection-heading h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 6rem);
  line-height: .97;
  font-weight: 650;
  letter-spacing: -.075em;
}
.intro p, .collection-heading p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: clamp(.9rem, 1.5vw, 1.15rem);
  line-height: 1.45;
}

.studio-map {
  --studio-gap: clamp(.75rem, 2vw, 1.5rem);
  --studio-columns: minmax(0, 1fr) min(52%, 560px) minmax(0, 1fr);
  position: relative;
  display: grid;
  grid-template-columns: var(--studio-columns);
  column-gap: var(--studio-gap);
  align-items: center;
  max-width: 1200px;
  min-height: clamp(440px, 63vh, 640px);
  margin: .5rem auto 0;
  padding-bottom: 1.5rem;
}
.specimen {
  position: relative;
  z-index: 1;
  grid-area: 1 / 2;
  display: grid;
  justify-items: center;
  gap: .5rem;
  min-width: 0;
  margin: 0;
}
.specimen-display {
  width: min(100%, clamp(320px, 55vh, 520px));
  overflow: clip;
}
.specimen-image {
  aspect-ratio: 1;
}
.specimen-image picture, .specimen-image img, .specimen-image video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.specimen-image [hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .studio-map:has(.flesh a:is(:hover, :focus-visible)) .specimen-image > :not([hidden]) {
    animation: specimen-acquire .72s step-end both;
  }
  .is-opening .studio-map .specimen-image > :not([hidden]) {
    animation: specimen-open .42s step-end both;
  }
}
@keyframes specimen-acquire {
  0%, 54%, 100% { transform: none; }
  10% { transform: translate(-5%, -2%) scale(1.19); }
  22% { transform: translate(5%, 1%) scale(1.27); }
  38% { transform: translate(-2%, -1%) scale(1.08); }
}
@keyframes specimen-open {
  0% { transform: scale(1.12); }
  24% { transform: translate(9%, -3%) scale(1.32); }
  46% { transform: translate(-8%, 2%) scale(1.22); }
  74%, 100% { transform: scale(1.29); }
}
.specimen figcaption {
  display: grid;
  gap: .38rem;
  text-align: center;
  font-size: .93rem;
  font-weight: 600;
}
.specimen-playback {
  justify-self: center;
  min-height: 44px;
  padding: .25rem .65rem;
  border: 1px solid #63766a;
  color: var(--sage);
  background: #212b24;
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
  pointer-events: auto;
}
.specimen-playback:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}
.station small {
  color: var(--muted);
  font: .71rem/1.3 'Cascadia Mono', Consolas, monospace;
  letter-spacing: .075em;
}
.scan {
  position: absolute;
  z-index: 2;
  inset: 42% 5% auto;
  height: 1px;
  opacity: .75;
  background: linear-gradient(90deg, transparent, #a9d9a9 35%, #deebcd 50%, #a9d9a9 65%, transparent);
  box-shadow: 0 4px 12px 2px #93c0953b;
  animation: scan 3.8s ease-in-out 1;
}
@keyframes scan {
  from { transform: translateY(-94px); opacity: .2; }
  65% { transform: translateY(104px); opacity: .9; }
  to { transform: none; opacity: .75; }
}

.routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.routes-mobile { display: none; }
.routes polyline, .pulse { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.routes .route-active { stroke: #8eaa90; }
.routes rect { fill: var(--sage); }
.routes .pulse { visibility: hidden; stroke: #e5f7ce; stroke-width: 2; stroke-dasharray: 13 100; filter: drop-shadow(0 0 4px #c6e8b7); }
.studio-map:has(.flesh a:is(:hover, :focus-visible)) .pulse,
.is-opening .pulse { visibility: visible; animation: pulse .9s linear both; }
@keyframes pulse { from { stroke-dashoffset: 13; } to { stroke-dashoffset: -100; } }

.studios {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1 / 2 / 4;
  display: grid;
  grid-template-columns: var(--studio-columns);
  grid-template-rows: repeat(2, minmax(min-content, 1fr));
  align-self: stretch;
  align-items: center;
  gap: 1rem var(--studio-gap);
  list-style: none;
  padding: clamp(1.75rem, 6vh, 3.75rem) 0;
  margin: 0;
  pointer-events: none;
}
.station {
  min-width: 0;
  --badge: clamp(64px, 7vw, 88px);
  overflow-wrap: anywhere;
}
.flesh { grid-area: 1 / 1; }
.trench { grid-area: 2 / 1; }
.loot { grid-area: 1 / 3; }
.bestiarum { grid-area: 2 / 3; }
.station-body { display: flex; flex-direction: column; align-items: center; gap: .34rem; text-align: center; line-height: 1.18; }
.station a { width: max-content; max-width: 100%; margin: auto; pointer-events: auto; }
.station-logo {
  display: grid;
  place-items: center;
  width: var(--badge);
  height: var(--badge);
  margin-bottom: .55rem;
  overflow: hidden;
  border: 1px solid #728278;
  border-radius: 50%;
  padding: 5px;
  background: #202824;
}
.station-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: grayscale(1); }
.station:not(.flesh) img { opacity: .8; }
.station strong { font-size: clamp(.95rem, 1.7vw, 1.25rem); font-weight: 650; }
.flesh small { color: var(--sage); }
.flesh .station-logo { border-color: var(--sage); box-shadow: 0 0 22px #b8ceb62b; }
.flesh a:is(:hover, :focus-visible) .station-logo { box-shadow: 0 0 35px #b8ceb663; }

.is-opening .hero::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 12px, #a9c1a899 13px 15px, #101812b3 16px 38px);
  animation: glitch .42s steps(1, end) both;
  content: '';
  pointer-events: none;
}
@keyframes glitch {
  0% { opacity: 0; }
  12% { opacity: .55; clip-path: inset(36% 0 47% 0); }
  30% { opacity: .72; clip-path: polygon(0 29%, 100% 29%, 100% 37%, 0 37%, 0 59%, 100% 59%, 100% 70%, 0 70%); }
  51% { opacity: .8; clip-path: polygon(0 40%, 100% 40%, 100% 54%, 0 54%, 0 78%, 100% 78%, 100% 90%, 0 90%); }
  73% { opacity: .95; clip-path: inset(25% 0 21% 0); background: #181e1b; }
  94%, 100% { opacity: 1; clip-path: none; background: #181e1b; }
}

.collection-main { max-width: 1280px; margin: auto; padding: 2rem clamp(1.25rem, 5vw, 4rem) 4rem; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--sage); }
.back-link:hover { text-decoration: underline; }
.collection-heading { margin: 2rem 0; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.collection-grid li { background: #222a25; border: 1px solid #49564e; }
.collection-grid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.collection-grid h2 { margin: 0; padding: 1rem; font-size: 1.15rem; }

@media (max-width: 640px) {
  .site-header { min-height: 64px; gap: .6rem; }
  .brand { gap: .42rem; max-width: 165px; }
  .brand img { width: 31px; height: 31px; }
  .contact { gap: .4rem; padding-inline: .5rem; }
  .hero { min-height: calc(100svh - 64px); padding-top: 2.5rem; }
}

@media (max-width: 760px) {
  .studio-map { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .specimen { grid-area: 1 / 1; margin-bottom: 1rem; }
  .specimen-display { width: min(100%, 400px); }
  .specimen figcaption {
    padding: .45rem .75rem;
    background: #2d3931;
  }
  .routes-desktop { display: none; }
  .routes-mobile { display: block; grid-area: 2 / 1; }
  .studios {
    grid-area: 2 / 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    align-items: start;
    gap: 1.5rem .75rem;
    padding: 1.25rem 0 0;
  }
  .station { --badge: 64px; }
  .loot, .bestiarum { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .is-opening .hero::after { display: none; }
}
