:root {
  --ink: #111827;
  --muted: #5d6878;
  --soft: #edf2f7;
  --line: #d9e2ec;
  --panel: #ffffff;
  --charcoal: #10151d;
  --ember: #e84832;
  --amber: #e7a31a;
  --green: #16a26a;
  --cyan: #0f92a5;
  --shadow: 0 24px 70px rgba(16, 21, 29, 0.16);
  --mono: "JetBrains Mono", Consolas, monospace;
  --sans: "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f7f9fb;
  font-family: var(--sans);
}
a { color: inherit; text-decoration: none; }
p { color: var(--muted); line-height: 1.72; }
h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: 0;
}
h3 { margin: 0; font-size: 1.05rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(217, 226, 236, 0.82);
  background: rgba(247, 249, 251, 0.9);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.05rem;
}
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--ember), #9f1f1f);
  font-family: var(--mono);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #4a5564;
  font-size: 0.94rem;
  font-weight: 600;
}
.site-nav a:hover { color: var(--ember); }
.nav-action {
  padding: 10px 14px;
  border: 1px solid rgba(232, 72, 50, 0.28);
  border-radius: 8px;
  color: var(--ember);
  background: rgba(232, 72, 50, 0.06);
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  align-items: center;
  gap: 48px;
  min-height: calc(100vh - 72px);
  padding: 72px 5vw 92px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(90deg, rgba(16, 21, 29, 0.94), rgba(16, 21, 29, 0.76)),
    url("assets/pyrosense-system.png") right 11vw center / 360px auto no-repeat,
    #10151d;
}
.hero-background {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, black, transparent 75%);
}
.hero-content, .hero-panel { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-content h1 {
  margin: 0;
  font-size: clamp(4rem, 11vw, 8.6rem);
  line-height: 0.88;
  letter-spacing: 0;
}
.hero-subtitle {
  max-width: 760px;
  margin: 28px 0 0;
  color: #dce5ee;
  font-size: clamp(1.08rem, 2vw, 1.36rem);
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
}
.button.primary { color: white; background: var(--ember); }
.button.secondary {
  border: 1px solid rgba(255,255,255,0.28);
  color: white;
  background: rgba(255,255,255,0.08);
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.panel-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5df;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #20d195;
  box-shadow: 0 0 0 8px rgba(32, 209, 149, 0.14);
}
.risk-readout {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0;
}
.risk-readout span, .sensor-grid span, .metric span {
  color: #8e9aaa;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}
.risk-readout strong {
  color: #ff6b54;
  font-family: var(--mono);
  font-size: 3.7rem;
  line-height: 1;
}
.mini-map, .sensor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.mini-map { grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; }
.zone {
  display: grid;
  min-height: 82px;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-family: var(--mono);
  font-weight: 800;
}
.zone.safe { background: rgba(22, 162, 106, 0.18); border: 1px solid rgba(22, 162, 106, 0.45); }
.zone.warn { background: rgba(231, 163, 26, 0.22); border: 1px solid rgba(231, 163, 26, 0.48); }
.zone.act { background: rgba(232, 72, 50, 0.26); border: 1px solid rgba(232, 72, 50, 0.62); }
.sensor-grid div {
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(16, 21, 29, 0.64);
}
.sensor-grid strong {
  display: block;
  margin-top: 8px;
  color: white;
  font-family: var(--mono);
}

.overview-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: -36px 5vw 0;
  position: relative;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow);
}
.metric { padding: 24px; background: white; }
.metric strong {
  display: block;
  margin-top: 9px;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

.section { padding: 88px 5vw; }
.intro-section, .future-section, .demo-section, .results-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 52px;
  align-items: start;
}
.section-heading { max-width: 760px; margin-bottom: 34px; }
.feature-grid, .tech-grid, .workflow, .level-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature-grid article, .tech-grid article, .workflow article, .level, .comparison-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 36px rgba(16, 21, 29, 0.07);
}
.feature-grid article, .tech-grid article, .workflow article { padding: 24px; }
.feature-icon {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--ember);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
}
.workflow-section, .future-section { background: #eef3f7; }
.workflow article span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 36px;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--charcoal);
  font-family: var(--mono);
  font-weight: 800;
}
.levels-section { color: white; background: var(--charcoal); }
.levels-section h2 { color: white; }
.level {
  min-height: 242px;
  padding: 24px;
  color: white;
  background: #151b24;
  border-color: rgba(255,255,255,0.1);
}
.level span {
  display: inline-block;
  margin-bottom: 58px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}
.level p { color: #b9c2cd; }
.level.monitor { border-top: 4px solid var(--green); }
.level.warn { border-top: 4px solid var(--amber); }
.level.act { border-top: 4px solid var(--ember); }
.level.contain { border-top: 4px solid #7b1f2a; }

.dashboard-mockup {
  border: 1px solid #202938;
  border-radius: 8px;
  overflow: hidden;
  color: white;
  background: #0d1219;
  box-shadow: var(--shadow);
}
.mock-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #222c39;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.mock-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 16px;
  padding: 18px;
}
.mock-map {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-auto-rows: 140px;
  gap: 12px;
}
.room {
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--mono);
  font-weight: 800;
}
.room-a { background: rgba(232,72,50,0.26); border: 1px solid rgba(232,72,50,0.7); }
.room-b { background: rgba(231,163,26,0.22); border: 1px solid rgba(231,163,26,0.55); }
.room-c, .room-d { background: rgba(15,146,165,0.18); border: 1px solid rgba(15,146,165,0.5); }
.mock-side {
  padding: 20px;
  border: 1px solid #222c39;
  border-radius: 8px;
  background: #131a23;
}
.badge {
  display: inline-flex;
  margin-bottom: 36px;
  padding: 7px 10px;
  border-radius: 8px;
  color: white;
  background: var(--ember);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}
.mock-side strong { display: block; font-size: 1.5rem; }
.mock-side p { color: #b9c2cd; }
.bar {
  height: 8px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #293443;
}
.bar span { display: block; height: 100%; border-radius: inherit; background: var(--ember); }
.technology-section { background: white; }
.technology-section .tech-grid article { background: #f7f9fb; }

.table-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.7fr;
  gap: 16px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.table-row:first-child { border-top: 0; }
.table-row.head {
  color: #667486;
  background: #eef3f7;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}
.table-row strong { color: var(--ember); font-family: var(--mono); }
.future-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.future-list span {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 800;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 34px 5vw;
  color: #c3cad4;
  background: var(--charcoal);
}
.site-footer strong, .site-footer span { display: block; }
.site-footer span, .site-footer p { color: #8f9baa; }
.button.github {
  border: 1px solid rgba(255,255,255,0.28);
  color: white;
  background: rgba(255,255,255,0.08);
  font-size: 0.9rem;
}
.button.github:hover { background: rgba(255,255,255,0.14); }

@media (max-width: 1080px) {
  .hero-section, .intro-section, .demo-section, .results-section, .future-section { grid-template-columns: 1fr; }
  .feature-grid, .tech-grid, .workflow, .level-grid { grid-template-columns: repeat(2, 1fr); }
  .overview-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .site-header { padding: 0 20px; }
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 20px;
    border-bottom: 1px solid var(--line);
    background: white;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; }
  .nav-action { text-align: center; }
  .hero-section {
    min-height: auto;
    padding: 62px 20px 86px;
    background: linear-gradient(90deg, rgba(16,21,29,0.96), rgba(16,21,29,0.84)), #10151d;
  }
  .section { padding: 64px 20px; }
  .overview-band {
    margin-left: 20px;
    margin-right: 20px;
    grid-template-columns: 1fr;
  }
  .feature-grid, .tech-grid, .workflow, .level-grid, .future-list, .mock-layout, .sensor-grid { grid-template-columns: 1fr; }
  .mock-map { grid-template-columns: 1fr; grid-auto-rows: 96px; }
  .mini-map { grid-template-columns: repeat(2, 1fr); }
  .site-footer { flex-direction: column; }
}
