@font-face {
  font-family: "Inter Tight";
  src: url("fonts/of-inter-tight-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/of-inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --field: #151513;
  --lime: #faff69;
  --grey: #414141;
  --panel: #1c1c19;
  --panel-2: #242420;
  --ink: #f4f4ef;
  --pad: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.page {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.hd {
  padding: clamp(20px, 3.4vh, 36px) var(--pad) 0;
}

.hd h1 {
  margin: 0;
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.stage {
  display: grid;
  place-items: center;
  padding: clamp(10px, 1.6vh, 22px) clamp(16px, 3vw, 40px);
  min-height: 0;
}

.atlas {
  position: relative;
  width: 100%;
  max-width: 1440px;
  aspect-ratio: 1000 / 440;
}

.atlas.is-dim .dots { opacity: 0.42; }
.atlas.is-dim .site { opacity: 0.26; }
.atlas.is-dim .site.is-active { opacity: 1; }
.dots { transition: opacity 340ms ease; }
.site { transition: opacity 340ms ease; }

.dots,
.map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* live sites */
.site { cursor: pointer; outline: none; }
.site .hit { fill: transparent; }
.site .core { fill: var(--lime); }
.site .ring {
  fill: none;
  stroke: var(--lime);
  stroke-width: 1;
  opacity: 0.28;
}
.site .pulse {
  fill: none;
  stroke: var(--lime);
  stroke-width: 1;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 3.4s cubic-bezier(0.32, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%   { transform: scale(0.65); opacity: 0.6; }
  60%  { opacity: 0.12; }
  100% { transform: scale(2.9); opacity: 0; }
}

.site .leader {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.75;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}
.site .tag { opacity: 0; transition: opacity 160ms ease; pointer-events: none; }
.site .tag-bg { fill: var(--field); }
.site .tag-text {
  fill: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.18em;
}

.site.is-hot .leader,
.site.is-hot .tag,
.site.is-active .leader,
.site.is-active .tag { opacity: 1; }

.site.is-hot .ring,
.site.is-active .ring { opacity: 0.9; stroke-width: 1.25; }
.site.is-hot .leader,
.site.is-active .leader { stroke: var(--lime); opacity: 0.75; }

.site:focus-visible .ring { opacity: 1; stroke-width: 1.6; }

/* footer */
.ft {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0 var(--pad);
  padding-top: clamp(14px, 2vh, 20px);
  padding-bottom: clamp(20px, 3.4vh, 34px);
  border-top: 1px solid var(--panel-2);
}

.claim {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.005em;
  color: rgba(244, 244, 239, 0.58);
}

.link {
  color: var(--lime);
  font-size: 12.5px;
  text-decoration: none;
  border-bottom: 1px solid rgba(250, 255, 105, 0.45);
  padding-bottom: 2px;
  white-space: nowrap;
}
.link:hover { border-bottom-color: var(--lime); }

/* spec sheet */
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--panel);
  border-top: 1px solid var(--grey);
  transform: translateY(101%);
  transition: transform 340ms cubic-bezier(0.22, 0.61, 0.36, 1);
  max-height: 82dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet.is-open { transform: translateY(0); }

.sheet-in {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(20px, 2.8vw, 30px) var(--pad) clamp(22px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}

.sheet-id h2 {
  margin: 0;
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 2.5vw, 34px);
  line-height: 1;
  letter-spacing: -0.025em;
}

.sheet-region {
  margin: 10px 0 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: rgba(244, 244, 239, 0.66);
}

.sheet-spec {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.1fr;
  gap: clamp(14px, 2.4vw, 32px);
  min-width: 0;
}

.field { min-width: 0; }

.f-label {
  margin: 0 0 9px;
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 244, 239, 0.4);
  white-space: nowrap;
}

.f-value {
  margin: 0;
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-feature-settings: "tnum" 1;
  color: var(--ink);
}

.f-sub {
  display: block;
  margin-top: 3px;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: rgba(244, 244, 239, 0.42);
}

.f-lime { color: var(--lime); }
.f-lime .f-sub { color: rgba(250, 255, 105, 0.5); }

.mix {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.mix li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 1.3;
  font-feature-settings: "tnum" 1;
  color: rgba(244, 244, 239, 0.55);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(65, 65, 65, 0.45);
}
.mix li:last-child { border-bottom: 0; padding-bottom: 0; }
.mix li span:last-child { color: var(--ink); }

.close {
  position: absolute;
  top: clamp(14px, 2vw, 20px);
  right: var(--pad);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  font-family: "Inter", sans-serif;
  font-size: 17px;
  line-height: 1;
  color: rgba(244, 244, 239, 0.7);
  background: transparent;
  border: 1px solid var(--grey);
  border-radius: 1px;
  cursor: pointer;
}
.close:hover,
.close:focus-visible {
  color: var(--lime);
  border-color: rgba(250, 255, 105, 0.6);
  outline: none;
}

@media (max-width: 760px) {
  .stage { padding: 3vh 10px; }
  .ft {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .sheet-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-right: calc(var(--pad) + 34px);
  }
  .sheet-spec {
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
  }
  .field-mix { grid-column: 1 / -1; }
  .sheet-id h2 { font-size: 26px; }
  .site .tag-text { font-size: 29px; letter-spacing: 0.12em; }
  .site .leader { stroke-width: 1.9; }
  .atlas.is-dim .dots { opacity: 0.46; }
  .field:last-child { grid-column: 1 / -1; }
  .f-value { font-size: 18px; }
}

@media (max-width: 640px) {
  .atlas { aspect-ratio: 1000 / 620; }
}

@media (prefers-reduced-motion: reduce) {
  .site .pulse { animation: none; opacity: 0; }
  .sheet { transition: none; }
  .atlas,
  .dots,
  .site { transition: none; }
  .site .tag,
  .site .leader { transition: none; }
}
