@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #070808;
  --fg: #f3f0e8;
  --muted: rgba(243, 240, 232, 0.46);
  --line: rgba(243, 240, 232, 0.14);
  --accent: #ff513d;
  --panel: rgba(12, 13, 13, 0.64);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body {
  background:
    radial-gradient(circle at 50% 43%, rgba(106, 72, 44, 0.14), transparent 24rem),
    radial-gradient(circle at 50% 50%, #111312 0, #090a0a 45%, #050606 100%);
}

a { color: inherit; }

.app {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  cursor: grab;
}

#scene:active { cursor: grabbing; }

.topbar {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .13em;
  font-weight: 600;
}

.brand__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 81, 61, .9);
}

.brand__muted { color: var(--muted); }

.counter {
  min-width: 205px;
  display: grid;
  gap: 5px;
  text-align: right;
}

.counter__label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .13em;
}

.counter__value {
  font-family: "Inter", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.045em;
}

.specimen-card {
  position: absolute;
  z-index: 5;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 170px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 7px;
  pointer-events: none;
  font-size: 10px;
  color: var(--muted);
}

.specimen-card strong {
  color: var(--fg);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: -.02em;
}

.specimen-card__eyebrow {
  color: var(--accent);
  letter-spacing: .12em;
  font-size: 8px;
}

.reticle {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 164px;
  height: 164px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: .44;
}

.reticle__ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(243, 240, 232, .12);
  border-radius: 50%;
}

.reticle__ring::before,
.reticle__ring::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(243, 240, 232, .09);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.reticle__ring::before { width: 82px; height: 82px; }
.reticle__ring::after { width: 12px; height: 12px; border-color: rgba(255, 81, 61, .65); }

.reticle__h,
.reticle__v {
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(243, 240, 232, .12);
  transform: translate(-50%, -50%);
}

.reticle__h { width: 210px; height: 1px; }
.reticle__v { width: 1px; height: 210px; }

.status {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: rgba(6, 7, 7, .68);
  backdrop-filter: blur(10px);
  color: rgba(243, 240, 232, .65);
  font-size: 9px;
  letter-spacing: .08em;
  white-space: nowrap;
  pointer-events: none;
}

.status__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #95ff9f;
  box-shadow: 0 0 12px rgba(149, 255, 159, .8);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .4; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.1); }
}

.hint {
  position: absolute;
  z-index: 5;
  right: 28px;
  bottom: 28px;
  color: rgba(243, 240, 232, .34);
  font-size: 9px;
  pointer-events: none;
}

.footer {
  position: absolute;
  z-index: 7;
  left: 28px;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(243, 240, 232, .35);
  font-size: 9px;
  pointer-events: none;
}

.footer a {
  color: rgba(243, 240, 232, .82);
  text-decoration: none;
  pointer-events: auto;
  transition: color .2s ease;
}

.footer a:hover { color: var(--accent); }

.grain {
  position: absolute;
  z-index: 8;
  inset: -50%;
  pointer-events: none;
  opacity: .035;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  animation: noise 1s steps(2) infinite;
}

@keyframes noise {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2%, -3%); }
  50% { transform: translate(-3%, 2%); }
  75% { transform: translate(3%, 4%); }
  100% { transform: translate(-2%, -2%); }
}

.vignette {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 180px 60px rgba(0, 0, 0, .42);
}

.noscript {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  padding: 14px 18px;
  background: #111;
  border: 1px solid #333;
}

@media (max-width: 720px) {
  .topbar { padding: 18px; }
  .brand__muted { display: none; }
  .specimen-card { left: 18px; top: auto; bottom: 78px; transform: none; }
  .footer { left: 18px; right: 18px; bottom: 18px; }
  .footer > span { display: none; }
  .hint { display: none; }
  .status { bottom: 64px; max-width: calc(100vw - 36px); overflow: hidden; }
  .counter { min-width: 130px; }
}
