/* Quarantinu ($QUARANTINU). Tokens pulled from the approved avatar/banner:
   sage-grey clinical walls, charcoal floor, warm fluorescent cream, rust-orange shiba fur. */

@font-face { font-family: 'IBM Plex Sans'; src: url('assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('assets/fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --void: #16180f;
  --panel: #20231b;
  --panel-raised: #262a20;
  --wall: #7c8a79;
  --floor: #2c2f27;
  --fluor: #ede6c9;
  --ink: #e9ece2;
  --ink-dim: #a9b1a1;
  --orange: #c87a3e;
  --orange-bright: #dd9253;
  --cream: #f0dec0;
  --hazard: #e3c13c;
  --hazard-ink: #1c1a10;
  --danger: #b0291f;
  --border: rgba(237, 230, 201, 0.14);
  --radius: 3px;
  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: var(--void); }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2 { margin: 0; font-weight: 700; }
p { margin: 0; }

#js-error-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99999;
  background: var(--danger); color: #fff;
  font: 600 13px/1.4 var(--mono);
  padding: 10px 14px;
}

.letterhead {
  background: var(--panel);
  color: var(--ink-dim);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

/* ---------- HERO ---------- */
.hero { border-bottom: 1px solid var(--border); background: var(--panel); }
.hero-grid { display: flex; flex-direction: column; max-width: 1280px; margin: 0 auto; }
.hero-right { order: -1; padding: 18px 18px 0; }
.hero-left { padding: 22px 18px 28px; display: flex; flex-direction: column; gap: 18px; }

/* the isolation box: hazard-stripe border, status plate, fluorescent flicker */
.box-frame {
  position: relative; max-width: 560px; margin: 0 auto;
  padding: 14px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, var(--hazard-ink) 14px 28px);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
}
.box-plate {
  position: absolute; z-index: 6; top: -13px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; white-space: nowrap;
  background: var(--hazard-ink); color: var(--cream); border: 1px solid var(--hazard);
  padding: 7px 12px; border-radius: 2px;
  font: 600 11px/1 var(--mono); letter-spacing: .12em;
}
.box-id { color: var(--hazard); }
.box-status { display: inline-flex; align-items: center; gap: 7px; }
.box-light { width: 9px; height: 9px; border-radius: 50%; background: #ff3b2e; box-shadow: 0 0 8px 2px rgba(255,59,46,.8); animation: light-blink 1.3s steps(1, end) infinite; }
@keyframes light-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; box-shadow: none; } }

.hero-image-wrap {
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--floor); border: 3px solid var(--hazard-ink);
}
.hero-img { width: 100%; height: 100%; object-fit: cover; animation: ward-flicker 5s steps(1, end) infinite; }
@keyframes ward-flicker {
  0%, 3%, 6%, 100% { filter: brightness(1); }
  4% { filter: brightness(0.72); }
  5% { filter: brightness(1.08); }
  58% { filter: brightness(1); }
  59% { filter: brightness(0.68); }
  60% { filter: brightness(1); }
}
/* CCTV scanline sweep plus fine horizontal lines over the frame */
.hero-scan {
  position: absolute; left: 0; right: 0; height: 22%; top: -22%;
  background: linear-gradient(180deg, rgba(143,214,168,0) 0%, rgba(143,214,168,0.28) 50%, rgba(143,214,168,0) 100%);
  mix-blend-mode: screen; pointer-events: none;
  animation: ward-scan 5.5s linear infinite;
}
@keyframes ward-scan { 0% { top: -22%; } 100% { top: 100%; } }
.hero-image-wrap::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.14) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 60px rgba(0,0,0,.35);
}
@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-scan, .box-light { animation: none; }
}

.fog-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.glass-hint, .snd-toggle {
  position: absolute; z-index: 3; font: 600 10.5px/1 var(--mono); letter-spacing: .1em;
  background: rgba(22,24,15,.72); color: var(--cream); border: 1px solid var(--border); padding: 8px 10px; border-radius: 2px;
}
.glass-hint { left: 12px; bottom: 12px; pointer-events: none; transition: opacity .6s ease; animation: hint-pulse 2.4s ease-in-out infinite; }
.glass-hint.gone { opacity: 0; animation: none; }
@keyframes hint-pulse { 0%, 100% { border-color: var(--border); } 50% { border-color: var(--hazard); } }
.snd-toggle { right: 12px; bottom: 12px; cursor: pointer; }
.snd-toggle[aria-pressed="true"] { color: var(--hazard); border-color: var(--hazard); }
.snd-toggle:focus-visible { outline: 2px solid var(--hazard); }
.ecg { width: 100%; height: 34px; display: block; margin-top: 4px; }
.chart-section { position: relative; }
.chart-stamp {
  position: absolute; right: 18px; bottom: 6px; font: 700 clamp(16px, 3vw, 24px)/1 var(--mono); letter-spacing: .14em; color: var(--danger);
  border: 3px double var(--danger); padding: 8px 12px; transform: rotate(-9deg); opacity: 0; pointer-events: none; mix-blend-mode: screen; filter: brightness(1.5);
}
.js-on .chart-stamp.in { animation: stamp-slam .5s cubic-bezier(.2,1.4,.4,1) .9s forwards; }
@keyframes stamp-slam { 0% { opacity: 0; transform: rotate(-9deg) scale(2.6); } 60% { opacity: 1; } 100% { opacity: .85; transform: rotate(-9deg) scale(1); } }
.js-on .rv { opacity: 0; transform: translateX(-18px); transition: opacity .5s ease, transform .5s ease; transition-delay: var(--d, 0s); }
.js-on .rv.in { opacity: 1; transform: none; }
.js-on .rise { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.js-on .rise.d2 { animation-delay: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.faq-section details { transition: background .25s ease, padding .25s ease; }
.faq-section details[open] { background: rgba(237,230,201,.04); padding-left: 10px; }
.faq-section details[open] p { animation: rise .45s ease both; }
@media (prefers-reduced-motion: reduce) { .js-on .rv, .js-on .rise { transition: none; animation: none; opacity: 1; transform: none; } .js-on .chart-stamp.in { animation: none; opacity: .85; } }

.hero-kicker { font: 600 11px/1 var(--mono); letter-spacing: .12em; color: var(--hazard); margin-bottom: 12px; }
.hero-copy h1 {
  font-size: clamp(28px, 6.4vw, 48px);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hero-copy .sub {
  margin-top: 6px;
  font-size: clamp(14px, 3vw, 18px);
  color: var(--ink-dim);
  font-weight: 500;
}

.chrome-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.monitor {
  position: relative;
  flex: 1 1 220px;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.monitor::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, #8fd6a8, transparent);
  box-shadow: 0 0 6px 1px #8fd6a8;
  animation: monitor-scan 3.2s linear infinite;
}
@keyframes monitor-scan {
  0% { top: 0; opacity: 0.9; }
  95% { opacity: 0.9; }
  100% { top: 100%; opacity: 0; }
}
.monitor-label {
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.monitor-value {
  font: 500 15px/1 var(--mono);
  color: #8fd6a8;
  animation: monitor-glow 2.4s ease-in-out infinite;
}
@keyframes monitor-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(143,214,168,0.4); }
  50% { text-shadow: 0 0 9px rgba(143,214,168,0.85); }
}
@media (prefers-reduced-motion: reduce) {
  .monitor::before, .monitor-value { animation: none; }
}

.id-plaque {
  flex: 1 1 260px;
  background: var(--cream);
  color: var(--hazard-ink);
  border: 1px solid rgba(28, 26, 16, 0.25);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  position: relative;
  font-family: var(--sans);
}
.id-label {
  font: 600 9.5px/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.65;
}
.id-value {
  font: 600 14px/1.2 var(--mono);
  word-break: break-all;
}
.id-copied {
  position: absolute; top: 8px; right: 10px;
  font: 700 10px/1 var(--mono);
  background: #2f6b47; color: #e9f5ec;
  padding: 3px 6px; border-radius: 2px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 140ms ease, transform 140ms ease;
}
.id-plaque.copied .id-copied { opacity: 1; transform: translateY(0); }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  font: 600 14px/1 var(--sans);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 120ms ease, background 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #1c1308; }
.btn-primary:hover { background: var(--orange-bright); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-bright); }
.btn-ghost img { filter: brightness(0) saturate(100%) invert(76%) sepia(27%) saturate(587%) hue-rotate(347deg) brightness(92%); }

/* ---------- SECTIONS ---------- */
main > section:not(.hero) {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 18px;
}
main > section h2 {
  font-size: clamp(20px, 4vw, 26px);
  color: var(--cream);
  margin-bottom: 20px;
}

.chart-section { border-top: 1px solid var(--border); }
.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}
.chart-grid > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.chart-grid dt {
  font: 600 11px/1.4 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.chart-grid dd { margin: 0; color: var(--ink); }

.faq-section { border-top: 1px solid var(--border); }
.faq-section details {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.faq-section summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::before { content: '+ '; color: var(--orange-bright); font-family: var(--mono); }
.faq-section details[open] summary::before { content: '\2212 '; }
.faq-section p { margin-top: 10px; color: var(--ink-dim); }


footer {
  border-top: 1px solid var(--border);
  padding: 20px 18px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  max-width: 760px;
  margin: 0 auto;
  font-size: 12.5px;
  color: var(--ink-dim);
}
footer .status { font: 600 11px/1 var(--mono); color: var(--hazard); letter-spacing: 0.04em; }
footer .mono { font-family: var(--mono); color: var(--ink); }
footer a { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--border); }
footer a:hover { color: var(--orange-bright); border-color: var(--orange-bright); }

@media (min-width: 640px) {
  .chart-grid > div { grid-template-columns: 170px 1fr; }
  .hero-left { padding: 28px 32px 34px; }
  .hero-right { padding: 24px 32px 0; }
  main > section:not(.hero) { padding: 64px 24px; }
}

@media (min-width: 900px) {
  .hero-grid { flex-direction: row; align-items: center; gap: 40px; padding: 56px 32px 56px; }
  .hero-left { flex: 1 1 52%; padding: 0; gap: 22px; }
  .hero-right { order: 0; flex: 1 1 48%; padding: 0; }
  .hero-copy h1 { font-size: clamp(40px, 4.4vw, 62px); line-height: 1.04; }
  .hero-copy .sub { font-size: clamp(16px, 1.6vw, 21px); }
  .box-frame { max-width: 600px; }
}

@media (max-width: 639px) {
  .box-plate { font-size: 10px; gap: 9px; padding: 6px 10px; }
  .glass-hint, .snd-toggle { font-size: 9.5px; padding: 6px 8px; bottom: 8px; }
  .glass-hint { left: 8px; }
  .snd-toggle { right: 8px; bottom: auto; top: 8px; }
}
