:root {
  --ink: #f4f1ea;
  --muted: #b9b0a4;
  --red: #e23b2f;
  --red-glow: rgba(226, 59, 47, 0.55);
  --green: #3dff7a;
  --glass: rgba(8, 10, 12, 0.62);
  --line: rgba(226, 59, 47, 0.55);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: #07080a;
  color: var(--ink);
  font-family: var(--font);
}

body { overflow-x: hidden; }

.scene {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr) minmax(14rem, 18rem);
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "top top top"
    "compass compass compass"
    "targets hero status"
    "cta cta cta";
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem 1.15rem;
  isolation: isolate;
}

.bg, .wash, .vignette, .scan, .frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg {
  z-index: 0;
  background:
    url("/wipe/bg.jpg") center 42% / cover no-repeat;
}

.wash {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(6, 7, 9, 0.55) 0%, rgba(6, 7, 9, 0.12) 22%, rgba(6, 7, 9, 0.08) 55%, rgba(6, 7, 9, 0.72) 100%);
}

.vignette {
  z-index: 2;
  box-shadow: inset 0 0 18vw 4vw rgba(0, 0, 0, 0.55);
}

.scan {
  z-index: 3;
  opacity: 0.07;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.55) 2px 3px
  );
}

.frame {
  z-index: 4;
  border: 14px solid #1a120c;
  box-shadow:
    inset 0 0 0 2px #3a2a1d,
    inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.top, .compass, .panel, .hero, .cta, .reticle {
  position: relative;
  z-index: 5;
}

.top {
  grid-area: top;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.brand strong {
  font-size: 1.15rem;
  letter-spacing: 0.22em;
}

nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
nav a:hover { color: var(--ink); }

.compass {
  grid-area: compass;
  height: 28px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.compass-track {
  display: flex;
  align-items: flex-end;
  gap: 0;
  height: 100%;
  color: rgba(244, 241, 234, 0.72);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tick {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 18px;
  flex: 0 0 18px;
}

.tick i {
  display: block;
  width: 1px;
  height: 7px;
  background: rgba(244, 241, 234, 0.35);
}

.tick.major i { height: 12px; background: #fff; }
.tick.card i { height: 14px; background: var(--red); }
.tick b { font-weight: 600; margin-top: 1px; }
.tick.card b { color: var(--red); }

.panel {
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  padding: 0.85rem 0.9rem 0.95rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 10px 30px rgba(0, 0, 0, 0.28);
}

.targets { grid-area: targets; align-self: center; }
.status { grid-area: status; align-self: center; }

.panel-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.7rem;
}

.targets ul { list-style: none; display: grid; gap: 0.55rem; }

.targets li {
  display: grid;
  grid-template-columns: 1.55rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.55rem;
  align-items: center;
}

.ico {
  grid-row: 1 / span 2;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid rgba(226, 59, 47, 0.4);
  display: grid;
  place-items: center;
  background: rgba(226, 59, 47, 0.08);
}

.ico svg {
  width: 0.85rem;
  height: 0.85rem;
  fill: var(--red);
}

.t-name {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.t-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.hero {
  grid-area: hero;
  align-self: center;
  justify-self: center;
  width: min(44rem, 100%);
  text-align: center;
  padding: 1.4rem 0.5rem 1.6rem;
  background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.22) 58%, transparent 74%);
}

.kicker {
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  text-shadow: 0 0 16px var(--red-glow);
  margin-bottom: 0.55rem;
}

.kicker::before { content: "⚠ "; }

h1 { line-height: 0; }

.title-mark {
  width: min(38rem, 100%);
  height: auto;
  display: block;
  margin: 0 auto;
}

.when {
  margin: 0.35rem 0 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.device {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(8, 10, 12, 0.72);
  box-shadow: 0 0 24px rgba(226, 59, 47, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.cell {
  min-width: 4.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.15rem);
  letter-spacing: 0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(244, 241, 234, 0.22);
}

.unit {
  margin-top: 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 800;
}

.sep {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  color: var(--red);
  align-self: center;
  margin-bottom: 0.85rem;
  text-shadow: 0 0 12px var(--red-glow);
}

.live {
  margin-top: 0.85rem;
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}

.status dl { display: grid; gap: 0.55rem; }

.status dl div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.86rem;
  border-bottom: 1px solid rgba(244, 241, 234, 0.08);
  padding-bottom: 0.45rem;
}

.status dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status dd { font-weight: 700; }
.status .ok { color: var(--green); }
.status .hot { color: var(--red); }

.pulse {
  height: 28px;
  margin: 0.75rem 0 1rem;
  background:
    linear-gradient(90deg, transparent 0%, var(--green) 18%, transparent 22%, transparent 40%, var(--green) 48%, transparent 54%, transparent 72%, var(--green) 86%, transparent 100%);
  opacity: 0.7;
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 28'><polyline fill='none' stroke='white' stroke-width='2' points='0,16 20,16 28,8 36,22 48,16 90,16 98,6 110,24 122,16 200,16'/></svg>");
  mask-size: cover;
  animation: pulse 1.8s linear infinite;
}

@keyframes pulse {
  from { transform: translateX(-8%); }
  to { transform: translateX(8%); }
}

.stay { margin-top: 0.2rem; }

.links { display: flex; flex-direction: column; gap: 0.35rem; }
.links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
}
.links a:hover { color: var(--red); }

.reticle {
  position: absolute;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.82);
  padding: 0.35rem 0.45rem 0.3rem;
  pointer-events: none;
}

.reticle::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(244, 241, 234, 0.35);
  clip-path: polygon(0 0, 10px 0, 10px 1px, 1px 1px, 1px 10px, 0 10px, 0 0, 100% 0, 100% 10px, calc(100% - 1px) 10px, calc(100% - 1px) 1px, calc(100% - 10px) 1px, calc(100% - 10px) 0, 100% 0, 100% 100%, calc(100% - 10px) 100%, calc(100% - 10px) calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) calc(100% - 10px), 100% calc(100% - 10px), 100% 100%, 0 100%, 0 calc(100% - 10px), 1px calc(100% - 10px), 1px calc(100% - 1px), 10px calc(100% - 1px), 10px 100%, 0 100%);
}

.reticle span {
  display: block;
  color: var(--muted);
  font-size: 0.6rem;
}

.r-left { top: 38%; left: 24%; }
.r-right { top: 42%; right: 22%; }

.cta {
  grid-area: cta;
  justify-self: center;
  width: min(38rem, 100%);
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  backdrop-filter: blur(8px);
}

.cta-title {
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.3rem;
}

.cta-title::before { content: "⚠ "; }
.cta p:last-child { color: var(--ink); font-size: 0.88rem; line-height: 1.45; }

@media (max-width: 1100px) {
  .frame { display: none; }
  .reticle { display: none; }
  .scene {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "top top"
      "compass compass"
      "hero hero"
      "targets status"
      "cta cta";
    padding: 0.85rem 0.85rem 1rem;
  }
  .targets, .status { align-self: stretch; }
}

@media (max-width: 720px) {
  .scene {
    grid-template-columns: 1fr;
    grid-template-areas:
      "top"
      "hero"
      "targets"
      "status"
      "cta";
    min-height: auto;
    padding: 0.75rem 0.75rem 1.4rem;
  }

  .top { align-items: flex-start; }
  nav { gap: 0.75rem; }
  nav a { font-size: 0.72rem; }

  .bg { background-position: 68% 40%; }
  .compass { display: none; }
  .wash {
    background:
      linear-gradient(180deg, rgba(6, 7, 9, 0.62) 0%, rgba(6, 7, 9, 0.28) 28%, rgba(6, 7, 9, 0.45) 100%);
  }

  .hero { padding: 1.35rem 0 0.25rem; }
  .title-mark { width: min(22rem, 100%); }
  .device { gap: 0.15rem; padding: 0.75rem 0.5rem 0.65rem; }
  .cell { min-width: 3.2rem; }

  .targets ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem 0.65rem;
  }

  .status dl div { padding-bottom: 0.35rem; }
  .links { flex-direction: row; flex-wrap: wrap; gap: 0.75rem 1rem; }
}

@media (max-width: 420px) {
  .sep { display: none; }
  .device {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .cell { min-width: 0; }
}
