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

:root {
  --bg: #20151d;
  --bg-deep: #151015;
  --surface: rgba(255,255,255,.045);
  --surface-strong: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.105);
  --text: #ffffff;
  --muted: rgba(255,255,255,.7);
  --soft: rgba(255,255,255,.5);
  --accent: #ff5a19;
  --accent-soft: rgba(255,90,25,.12);
  --shadow: 0 28px 80px rgba(0,0,0,.25);
  --ease: cubic-bezier(.4,0,.2,1);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255,90,25,.035), transparent 440px),
    var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
}

img {
  max-width: 100%;
}

strong {
  font-weight: 750;
}

::selection {
  background: var(--accent);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 0;
  height: 2px;
  background: var(--accent);
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--bg);
  transition: opacity .55s var(--ease), visibility .55s var(--ease);
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  animation: splashIn .8s var(--ease) both;
}

.splash-mark {
  width: 78px;
  height: auto;
}

.splash-wordmark {
  width: 188px;
  height: auto;
}

.loading-bar {
  width: 230px;
  height: 3px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
}

.loading-progress {
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: loadingBar 1.1s var(--ease) both;
}

.splash-screen p {
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 58px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(32,21,29,.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  transition: background .25s var(--ease);
}

.top-nav.scrolled {
  background: rgba(32,21,29,.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 28px;
  display: block;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.hero {
  position: relative;
  min-height: 88svh;
  padding: 120px 5% 78px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.88) contrast(1.05);
  transform: scale(1.02);
  animation: heroImageIn 1.2s var(--ease) both;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(21,16,21,.96) 0%, rgba(21,16,21,.8) 42%, rgba(21,16,21,.28) 76%, rgba(21,16,21,.6) 100%),
    linear-gradient(0deg, rgba(32,21,29,.92) 0%, transparent 48%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  animation: heroCopyIn .75s var(--ease) .14s both;
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 860px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: .95;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.hero-copy {
  max-width: 760px;
  margin-top: 22px;
  color: rgba(255,255,255,.78);
  font-size: 19px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.hero-copy span {
  display: block;
}

.hero-stats {
  width: min(1060px, 100%);
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.1);
}

.hero-stats div {
  min-width: 0;
  padding: 18px;
  background: rgba(32,21,29,.72);
}

.hero-stats span,
.kpi span,
.meta-panel span,
.totals-grid span,
.source-strip span {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-stats strong,
.meta-panel strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

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

.action-btn {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .25s var(--ease), filter .25s var(--ease), border-color .25s var(--ease);
}

.action-btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
}

.action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.screen-nav {
  position: sticky;
  top: 58px;
  z-index: 80;
  padding: 14px 5%;
  background: rgba(32,21,29,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.screen-tabs,
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.screen-tab,
.filter-btn {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}

.screen-tab i {
  margin-right: 7px;
}

.screen-tab.active,
.screen-tab:hover,
.filter-btn.active,
.filter-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text);
}

.screen {
  display: none;
  max-width: 1220px;
  margin: 0 auto;
  padding: 76px 5% 92px;
}

.screen.active {
  display: block;
  animation: screenIn .42s var(--ease) both;
}

.screen-heading {
  display: grid;
  grid-template-columns: minmax(0, .4fr) minmax(0, .6fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.screen-heading h2 {
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.05;
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 42px;
  align-items: start;
}

.copy-stack {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.78;
}

.copy-stack p + p {
  margin-top: 18px;
}

.copy-stack strong {
  color: var(--text);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kpi,
.source-strip article,
.zone-list article,
.architecture-grid article,
.automation-flow div,
.report-grid article,
.conditions-grid article,
.meta-panel,
.note-panel,
.integration-panel,
.gallery-preview figure {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.kpi {
  min-height: 158px;
  padding: 20px;
}

.kpi strong {
  display: block;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.1;
}

.kpi.accent {
  background: linear-gradient(135deg, rgba(255,90,25,.18), rgba(255,255,255,.035));
  border-color: rgba(255,90,25,.32);
}

.kpi.accent strong {
  color: var(--accent);
}

.kpi small,
.source-strip p,
.zone-list p,
.architecture-grid span,
.automation-flow p,
.report-grid p,
.note-panel p {
  color: rgba(255,255,255,.64);
  font-size: 13px;
  line-height: 1.52;
}

.source-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 44px;
}

.source-strip article,
.zone-list article,
.architecture-grid article,
.automation-flow div,
.report-grid article,
.conditions-grid article {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), border-color .25s var(--ease);
}

.source-strip article.visible,
.zone-list article.visible,
.architecture-grid article.visible,
.automation-flow div.visible,
.report-grid article.visible,
.conditions-grid article.visible,
.screen.active .source-strip article,
.screen.active .zone-list article,
.screen.active .architecture-grid article,
.screen.active .automation-flow div,
.screen.active .report-grid article,
.screen.active .conditions-grid article {
  opacity: 1;
  transform: translateY(0);
}

.source-strip article,
.zone-list article {
  padding: 18px;
}

.source-strip strong,
.zone-list strong,
.architecture-grid strong,
.automation-flow strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.meta-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 24px;
  background: rgba(255,255,255,.1);
}

.meta-panel div {
  min-width: 0;
  padding: 18px;
  background: rgba(32,21,29,.82);
}

.table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  position: sticky;
  top: 0;
  padding: 14px 16px;
  text-align: left;
  background: rgba(255,90,25,.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,90,25,.26);
}

tbody td {
  padding: 15px 16px;
  color: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(255,255,255,.075);
  vertical-align: top;
}

tbody tr:hover td {
  background: rgba(255,90,25,.045);
}

tbody td:first-child {
  color: var(--text);
  font-weight: 750;
}

tbody td:nth-child(3) {
  text-align: center;
}

tbody td:nth-child(4),
tbody td:nth-child(5) {
  white-space: nowrap;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.totals-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.totals-grid div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.totals-grid strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.totals-grid .total-emphasis {
  background: linear-gradient(135deg, rgba(255,90,25,.18), rgba(255,255,255,.035));
  border-color: rgba(255,90,25,.36);
}

.totals-grid .total-emphasis strong {
  color: var(--accent);
}

.note-panel {
  margin-top: 18px;
  padding: 18px;
}

.note-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
}

.zone-list,
.architecture-grid,
.automation-flow {
  display: grid;
  gap: 12px;
}

.zone-list {
  grid-template-columns: 1fr;
}

.zone-list span {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.architecture-grid article,
.automation-flow div {
  padding: 18px;
}

.architecture-grid i {
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
}

.automation-flow span {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
}

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

.report-grid.compact {
  margin-top: 42px;
}

.report-grid article {
  padding: 24px;
}

.report-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  margin-bottom: 18px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.report-grid h3,
.conditions-grid h3,
.integration-panel h3 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 18px;
}

.integration-panel {
  margin-top: 16px;
  padding: 24px;
}

.integration-panel ul,
.conditions-grid ul {
  padding-left: 19px;
  color: rgba(255,255,255,.7);
  line-height: 1.68;
}

.integration-panel li + li,
.conditions-grid li + li {
  margin-top: 8px;
}

.gallery-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
}

.gallery-preview figure {
  overflow: hidden;
  margin: 0;
}

.gallery-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery-preview figcaption {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
}

.filter-row {
  margin-bottom: 22px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.evidence-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.evidence-card:hover {
  border-color: rgba(255,90,25,.44);
  transform: translateY(-2px);
}

.evidence-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: rgba(0,0,0,.26);
}

.evidence-card figcaption {
  padding: 12px;
  color: rgba(255,255,255,.68);
  font-size: 12px;
  line-height: 1.45;
}

.evidence-card figcaption span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.conditions-grid article {
  padding: 24px;
}

.footer {
  padding: 44px 5%;
  text-align: center;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
}

.footer-brand {
  justify-content: center;
  margin-bottom: 12px;
}

.footer p {
  color: rgba(255,255,255,.56);
  font-size: 13px;
}

@keyframes splashIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loadingBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes heroImageIn {
  from {
    opacity: .72;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes heroCopyIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .nav-meta span:last-child {
    display: none;
  }

  .hero-stats,
  .meta-panel,
  .split-layout,
  .screen-heading {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .top-nav {
    height: 56px;
    padding: 0 4%;
  }

  .brand img {
    height: 26px;
  }

  .nav-meta {
    display: none;
  }

  .hero {
    min-height: 90svh;
    padding: 92px 4% 48px;
  }

  .hero-inner,
  .hero h1,
  .hero-stats {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .hero-copy {
    width: 100%;
    max-width: calc(100vw - 60px);
  }

  .hero h1 {
    font-size: 42px;
    line-height: 1;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .hero-stats div,
  .meta-panel div {
    padding: 14px;
  }

  .hero-actions {
    gap: 10px;
  }

  .action-btn {
    min-height: 44px;
    padding: 0 14px;
    font-size: 13px;
  }

  .screen-nav {
    top: 56px;
    padding: 10px 4%;
  }

  .screen-tab,
  .filter-btn {
    min-height: 38px;
    padding: 0 11px;
    font-size: 12px;
  }

  .screen {
    padding: 52px 4% 66px;
  }

  .screen-heading {
    gap: 12px;
    margin-bottom: 28px;
  }

  .screen-heading h2 {
    font-size: 30px;
  }

  .source-strip,
  .kpi-grid,
  .architecture-grid,
  .automation-flow,
  .report-grid,
  .conditions-grid,
  .gallery-preview,
  .totals-grid {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 760px;
  }

  thead th,
  tbody td {
    padding: 12px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 35px;
  }

  .splash-mark {
    width: 60px;
  }

  .splash-wordmark {
    width: 154px;
  }
}

@media print {
  .splash-screen,
  .top-nav,
  .screen-nav,
  .hero-actions,
  .filter-row,
  .progress-bar {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .hero {
    min-height: auto;
    padding: 34px 0;
    background: #fff;
  }

  .hero-image,
  .hero-shade {
    display: none;
  }

  .hero-copy,
  .copy-stack,
  .report-grid p,
  .conditions-grid ul,
  .integration-panel ul {
    color: #111;
  }

  .screen {
    display: block !important;
    padding: 24px 0;
  }

  .kpi,
  .source-strip article,
  .zone-list article,
  .architecture-grid article,
  .automation-flow div,
  .report-grid article,
  .conditions-grid article,
  .meta-panel,
  .note-panel,
  .integration-panel,
  .gallery-preview figure,
  .evidence-card {
    break-inside: avoid;
    background: #fff;
    border-color: #ddd;
  }
}
