:root {
  color-scheme: dark;
  --bg: #08090a;
  --panel: rgba(19, 22, 24, 0.82);
  --panel-strong: #15191b;
  --text: #f4f1ea;
  --muted: #b7b0a4;
  --line: rgba(244, 241, 234, 0.14);
  --red: #d54436;
  --red-dark: #7f1f1b;
  --amber: #d7a44a;
  --green: #72b36c;
  --blue: #7ca8bd;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 30% 0%, rgba(213, 68, 54, 0.16), transparent 34rem),
    radial-gradient(circle at 80% 20%, rgba(124, 168, 189, 0.08), transparent 30rem),
    var(--bg);
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-shell {
  overflow: hidden;
}

[data-glass] {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 16px;
  left: 50%;
  display: flex;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 10px 12px 10px 16px;
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a,
.mobile-nav a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 10px 12px;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  background: currentColor;
}

.mobile-nav {
  position: fixed;
  z-index: 19;
  top: 92px;
  left: 16px;
  right: 16px;
  display: none;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(12, 14, 15, 0.96);
}

.mobile-nav.open {
  display: flex;
}

.hero {
  position: relative;
  display: grid;
  min-height: 820px;
  align-items: center;
  padding: 132px max(24px, calc((100vw - 1180px) / 2)) 72px;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.85;
}

.facility {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 9, 10, 0.95) 0 34%, transparent 52%, rgba(8, 9, 10, 0.94) 78%),
    linear-gradient(180deg, rgba(8, 9, 10, 0.14), rgba(8, 9, 10, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 96px);
}

.facility::before {
  position: absolute;
  inset: 12% 22% auto;
  height: 430px;
  border: 1px solid rgba(244, 241, 234, 0.14);
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(213, 68, 54, 0.72) 50%, transparent 50.5%),
    linear-gradient(180deg, rgba(244, 241, 234, 0.07), rgba(244, 241, 234, 0.01));
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.7);
  content: "";
}

.door {
  position: absolute;
  top: 17%;
  width: 18%;
  height: 420px;
  border: 1px solid rgba(244, 241, 234, 0.14);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 40px),
    linear-gradient(135deg, #15191b, #0d0f10);
}

.door-left {
  left: 23%;
}

.door-right {
  right: 23%;
}

.scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(180deg, transparent, rgba(213, 68, 54, 0.14), transparent);
  animation: scan 6s linear infinite;
}

.warning {
  position: absolute;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(213, 68, 54, 0.44);
  border-radius: 50%;
}

.warning::before,
.warning::after {
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(215, 164, 74, 0.42);
  border-radius: 50%;
  content: "";
}

.warning::after {
  inset: 55px 20px;
  border-radius: 0;
}

.warning-a {
  top: 24%;
  left: 9%;
}

.warning-b {
  right: 11%;
  bottom: 24%;
  transform: scale(0.76);
}

.floor-grid {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -10%;
  height: 360px;
  background:
    linear-gradient(rgba(244, 241, 234, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 234, 0.1) 1px, transparent 1px);
  background-size: 86px 48px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: center bottom;
}

@keyframes scan {
  from {
    transform: translateY(-200px);
  }
  to {
    transform: translateY(820px);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(740px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(3.1rem, 8vw, 6.9rem);
  letter-spacing: 0;
  line-height: 0.91;
  text-wrap: balance;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 800;
  padding: 12px 18px;
}

.button.primary {
  background: var(--red);
  color: #fff;
}

.button.primary:hover {
  background: #f04f3f;
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.11);
}

.status-panel {
  position: absolute;
  z-index: 1;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 96px;
  display: grid;
  width: min(350px, calc(100% - 48px));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(10, 12, 13, 0.78);
}

.status-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.status-panel span {
  color: var(--muted);
  font-size: 0.84rem;
}

.status-panel strong {
  color: var(--green);
  font-size: 1.3rem;
}

.command-strip,
.section,
.mode-section,
.incident-section,
.footer {
  padding-right: max(24px, calc((100vw - 1180px) / 2));
  padding-left: max(24px, calc((100vw - 1180px) / 2));
}

.command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.command-strip article {
  min-height: 150px;
  background: rgba(15, 18, 19, 0.9);
  padding: 26px;
}

.metric {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
}

.command-strip p {
  margin-bottom: 0;
  color: var(--muted);
}

.section,
.mode-section,
.incident-section {
  padding-top: 92px;
  padding-bottom: 92px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-heading h2 {
  width: min(680px, 100%);
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  text-transform: uppercase;
}

.case-grid,
.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.case-card,
.mode-card,
.incident-board {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.case-card {
  min-height: 320px;
  background:
    linear-gradient(180deg, rgba(213, 68, 54, 0.08), transparent 42%),
    var(--panel-strong);
  padding: 22px;
}

.case-code {
  display: inline-flex;
  margin-bottom: 52px;
  border: 1px solid rgba(213, 68, 54, 0.42);
  border-radius: 4px;
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 900;
  padding: 5px 8px;
}

.case-card h3,
.mode-card h3,
.incident-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.case-card p,
.mode-card p,
.incident-card p {
  color: var(--muted);
}

.case-card dl {
  display: grid;
  gap: 8px;
  margin: 26px 0 0;
}

.case-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.case-card dt {
  color: var(--muted);
}

.case-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.mode-section {
  background:
    linear-gradient(180deg, rgba(213, 68, 54, 0.08), rgba(8, 9, 10, 0)),
    #0c0e0f;
}

.mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mode-card {
  min-height: 390px;
  padding: 28px;
  background: var(--panel-strong);
}

.mode-card.live {
  background:
    linear-gradient(135deg, rgba(213, 68, 54, 0.17), transparent 50%),
    var(--panel-strong);
}

.mode-card.delayed {
  background:
    linear-gradient(135deg, rgba(124, 168, 189, 0.16), transparent 50%),
    var(--panel-strong);
}

.mode-label,
.state {
  display: inline-flex;
  margin-bottom: 80px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 6px 10px;
  text-transform: uppercase;
}

.mode-label {
  background: rgba(255, 255, 255, 0.08);
  color: var(--amber);
}

.mode-card ul {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.mode-card li {
  border-top: 1px solid var(--line);
  color: var(--text);
  padding-top: 10px;
}

.incident-board {
  padding: 18px;
}

.queue-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 8px 12px;
}

.filter-button.active,
.filter-button:hover {
  background: var(--red);
  color: #fff;
}

.incident-list {
  display: grid;
  gap: 12px;
}

.incident-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 18px;
}

.incident-card.hidden {
  display: none;
}

.state {
  margin-bottom: 16px;
}

.state.turn {
  background: rgba(213, 68, 54, 0.18);
  color: #ff9388;
}

.state.waiting {
  background: rgba(124, 168, 189, 0.16);
  color: #a9d1e3;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--amber));
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-top: 28px;
  padding-bottom: 32px;
}

.footer p {
  margin-bottom: 0;
}

.footer a {
  color: var(--text);
  font-weight: 800;
}

@media (max-width: 920px) {
  .desktop-nav {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .hero {
    min-height: 760px;
  }

  .status-panel {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 34px;
  }

  .command-strip,
  .case-grid,
  .mode-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }
}

@media (max-width: 620px) {
  .topbar {
    top: 10px;
    width: calc(100% - 20px);
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 720px;
    padding-top: 112px;
  }

  .facility::before,
  .door {
    top: 25%;
    height: 310px;
  }

  .door-left {
    left: 12%;
    width: 38%;
  }

  .door-right {
    right: 12%;
    width: 38%;
  }

  .hero-actions,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .case-card,
  .mode-card {
    min-height: auto;
  }

  .mode-label {
    margin-bottom: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
