:root {
  color-scheme: light;
  --ink: #15221f;
  --muted: #68736f;
  --paper: #f2f6f4;
  --surface: #ffffff;
  --line: #cbd6d1;
  --green-950: #03271f;
  --green-800: #07543f;
  --green-650: #147057;
  --gold: #e3b94f;
  --gold-soft: #f4df9a;
  --blue: #176d91;
  --cyan: #2ba4b6;
  --danger: #a74035;
  --shadow: 0 14px 34px rgba(3, 39, 31, 0.12);
  font-family: "Noto Sans Arabic", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a { color: inherit; }
button, select { font: inherit; }

.topbar {
  min-height: 70px;
  padding: 0 6vw;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  color: #fff;
  background: var(--green-950);
  border-bottom: 3px solid var(--gold);
}

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

.brand img { width: 43px; height: 43px; object-fit: contain; }
.brand span { display: grid; line-height: 1.15; }
.brand strong { color: var(--gold-soft); font-size: 17px; }
.brand small { font-size: 10px; color: #aebfba; }

.topbar nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.topbar nav a {
  padding: 9px 12px;
  border-radius: 5px;
  color: #dbe7e3;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav a.active { color: #fff; background: #21493f; }

.runtime-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #c8d7d2;
  font-size: 12px;
}

.runtime-state i {
  width: 8px;
  height: 8px;
  background: #8f9c98;
  border-radius: 50%;
}

.runtime-state i.ready { background: #55d28b; }
.runtime-state i.error { background: #e06d62; }

main { padding-bottom: 70px; }

.observatory {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: #fff;
  background: #061b19;
}

.observatory-image,
.observatory-shade,
#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.observatory-image { object-fit: cover; object-position: center 57%; }
.observatory-shade { background: rgba(2, 24, 20, 0.68); }
#network-canvas { z-index: 1; }

.observatory-copy {
  position: relative;
  z-index: 2;
  width: min(670px, 84vw);
  padding: 125px 7vw 90px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.observatory .eyebrow { color: var(--gold-soft); }

.observatory h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: 0;
}

.observatory-copy > p:not(.eyebrow) {
  max-width: 610px;
  margin: 24px 0 0;
  color: #e2ebe8;
  font-size: 20px;
  line-height: 1.9;
}

.observatory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.observatory-actions button,
.observatory-actions a {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--gold);
  border-radius: 5px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.observatory-actions button { color: #10211e; background: var(--gold); }
.observatory-actions a { color: #fff; background: rgba(3, 39, 31, 0.72); }

.architecture-badge {
  position: absolute;
  z-index: 2;
  left: 7vw;
  bottom: 58px;
  width: min(330px, 34vw);
  padding: 16px 18px;
  display: grid;
  gap: 4px;
  background: rgba(3, 39, 31, 0.86);
  border-right: 4px solid var(--cyan);
}

.architecture-badge span { color: var(--gold-soft); font-size: 11px; }
.architecture-badge strong { font-size: 15px; }
.architecture-badge small { color: #bcd0ca; line-height: 1.6; }

.metric-band {
  position: relative;
  z-index: 3;
  width: min(1240px, 90vw);
  margin: -28px auto 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metric-band article {
  min-width: 0;
  min-height: 116px;
  padding: 20px 18px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-left: 1px solid var(--line);
}

.metric-band article:last-child { border-left: 0; }
.metric-band span { color: var(--muted); font-size: 12px; }
.metric-band strong { color: var(--green-800); font-size: 27px; overflow-wrap: anywhere; }
.metric-band small { color: #84908c; font-size: 10px; line-height: 1.5; }

.pipeline-section,
.architecture-section,
.progress-section,
.products-section {
  width: min(1240px, 90vw);
  margin: 80px auto 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 450px);
  align-items: end;
  gap: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(29px, 4vw, 46px);
  letter-spacing: 0;
  line-height: 1.2;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.pipeline {
  position: relative;
  margin: 30px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}

.pipeline::after {
  content: "";
  position: absolute;
  top: 0;
  right: -18px;
  width: 18px;
  height: 4px;
  background: var(--cyan);
  animation: pipeline-scan 6s linear infinite;
}

.pipeline li {
  min-height: 145px;
  padding: 20px 16px;
  display: grid;
  align-content: center;
  gap: 7px;
  border-left: 1px solid var(--line);
}

.pipeline li:last-child { border-left: 0; }
.pipeline b { color: var(--gold); font-size: 13px; }
.pipeline strong { font-size: 18px; }
.pipeline span { color: var(--muted); font-size: 12px; }

@keyframes pipeline-scan {
  from { transform: translateX(0); }
  to { transform: translateX(-1260px); }
}

.architecture-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.architecture-columns > section {
  background: var(--surface);
  border: 1px solid var(--line);
}

.architecture-columns header {
  min-height: 82px;
  padding: 16px 20px;
  background: #e6eeeb;
  border-bottom: 1px solid var(--line);
}

.architecture-columns header span { color: var(--blue); font-size: 10px; font-weight: 900; }
.architecture-columns h3 { margin: 4px 0 0; font-size: 23px; }
.architecture-columns ul { margin: 0; padding: 0; list-style: none; }
.architecture-columns li {
  min-height: 64px;
  padding: 13px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e1e8e5;
}

.architecture-columns li:last-child { border-bottom: 0; }
.architecture-columns li span { color: var(--muted); font-size: 11px; direction: ltr; }

.architecture-boundary {
  margin-top: 18px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  background: #fff8e2;
  border: 1px solid #dfc46b;
}

.architecture-boundary strong { color: #765b08; }
.architecture-boundary p { margin: 0; color: #5f5a48; line-height: 1.8; }

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

.progress-item {
  min-height: 230px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green-650);
}

.progress-item header { display: flex; justify-content: space-between; gap: 12px; }
.progress-item h3 { margin: 0; font-size: 18px; }
.progress-item header span {
  max-width: 46%;
  color: var(--green-650);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.evidence-declared-status {
  min-height: 36px;
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 11px;
  direction: ltr;
  overflow-wrap: anywhere;
}

.evidence-flags {
  margin: 0;
  padding: 0;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.evidence-flags li {
  padding: 5px 7px;
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
}

.evidence-flags .verified {
  color: #075e45;
  background: #e6f6ef;
  border-color: #9bcdbd;
}

.evidence-flags .pending {
  color: #716a57;
  background: #f5f3ec;
}

.evidence-fingerprint {
  margin-top: 14px;
  color: #44635c;
  font-size: 10px;
  direction: ltr;
  overflow-wrap: anywhere;
}

.ai-lab {
  width: min(1240px, 90vw);
  margin: 80px auto 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  color: #e9f2ef;
  background: #071d1a;
  border-top: 4px solid var(--cyan);
}

.ai-copy { padding: 38px; }
.ai-copy .eyebrow { color: var(--gold-soft); }
.ai-copy h2 { margin: 0; font-size: 34px; }
.ai-copy > p:not(.eyebrow) { color: #b9ccc6; line-height: 1.9; }
.ai-copy dl { margin: 28px 0 0; }
.ai-copy dl div { padding: 11px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #27423b; }
.ai-copy dt { color: #9fb4ae; }
.ai-copy dd { margin: 0; color: var(--gold-soft); direction: ltr; }

.ai-console {
  min-width: 0;
  padding: 28px;
  background: #0c2521;
  border-right: 1px solid #29453e;
}

.ai-console header { display: flex; justify-content: space-between; gap: 16px; color: #cce0da; }
.ai-console header span { color: #7fc7b2; font-size: 12px; }
.ai-console pre {
  min-height: 165px;
  margin: 22px 0;
  padding: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #eff7f5;
  background: #051411;
  border: 1px solid #2b4a42;
  font: 14px/1.9 "Noto Sans Arabic", Tahoma, sans-serif;
}

.ai-console ol {
  min-height: 34px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
}

.ai-console li { padding: 5px 9px; color: #bcd1cb; background: #173b33; border: 1px solid #326355; font-size: 11px; direction: ltr; }

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

.tech-product {
  min-height: 210px;
  padding: 22px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.tech-product > span { color: var(--blue); font-size: 11px; font-weight: 800; }
.tech-product h3 { margin: 0; font-size: 20px; }
.tech-product p { margin: 6px 0 18px; color: var(--muted); line-height: 1.7; }
.tech-product a { justify-self: start; padding: 8px 12px; color: #fff; background: var(--green-800); border-radius: 4px; text-decoration: none; font-weight: 800; }

footer {
  margin-top: 80px;
  padding: 30px 6vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: #dbe7e3;
  background: var(--green-950);
}

footer strong { color: var(--gold-soft); }
footer span { color: #9db2ac; }
footer nav { display: flex; gap: 18px; }
footer a { color: #dbe7e3; text-decoration: none; }

@media (max-width: 1050px) {
  .topbar { grid-template-columns: auto 1fr; }
  .runtime-state { display: none; }
  .metric-band { grid-template-columns: repeat(3, 1fr); }
  .metric-band article:nth-child(3) { border-left: 0; }
  .progress-grid, .product-tech-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(4, 1fr); }
  .pipeline li:nth-child(4) { border-left: 0; }
}

@media (max-width: 760px) {
  .topbar { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 12px; }
  .topbar nav { order: 2; width: 100%; justify-content: flex-start; overflow-x: auto; }
  .topbar nav a { white-space: nowrap; }
  .observatory { min-height: 610px; }
  .observatory-copy { width: 100%; padding: 72px 24px 180px; }
  .observatory h1 { font-size: 47px; }
  .observatory-copy > p:not(.eyebrow) { font-size: 17px; }
  .architecture-badge { left: 20px; right: 20px; bottom: 28px; width: auto; }
  .metric-band { width: calc(100% - 24px); grid-template-columns: repeat(2, 1fr); }
  .metric-band article:nth-child(3) { border-left: 1px solid var(--line); }
  .metric-band article:nth-child(even) { border-left: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 12px; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline li:nth-child(even) { border-left: 0; }
  .architecture-columns, .ai-lab { grid-template-columns: 1fr; }
  .ai-console { border-right: 0; border-top: 1px solid #29453e; }
  .progress-grid, .product-tech-grid { grid-template-columns: 1fr; }
  .architecture-boundary { grid-template-columns: 1fr; gap: 6px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pipeline::after { animation: none; display: none; }
}
