:root {
  --bg: #0A1628;
  --surface: #111D2E;
  --surface-2: #162236;
  --strip: #0D1B2E;
  --blue: #0052FF;
  --blue-text: #5B9BFF;
  --blue-dark: #003FCC;
  --blue-tint: #0A1A3A;
  --green: #00D68F;
  --amber: #F59E0B;
  --red: #EF4444;
  --purple: #8B5CF6;
  --teal: #06B6D4;
  --gold: #D97706;
  --text: #F1F5F9;
  --muted: #B0BEC5;
  --faint: #7A8A9E;
  --border: #1E2D42;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --max: 1180px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Calibri, "Segoe UI", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 72%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 82, 255, 0.08), transparent 42%, rgba(6, 182, 212, 0.04));
  z-index: -3;
}

::selection {
  background: rgba(6, 182, 212, 0.32);
}

a {
  color: var(--blue-text);
  text-decoration: none;
}

a:hover {
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(30, 45, 66, 0.82);
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(18px);
}

.nav {
  max-width: var(--max);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.nav-links a {
  color: var(--muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  position: relative;
  font-size: 0;
}

.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text);
}

.menu-toggle::before {
  top: 15px;
}

.menu-toggle::after {
  top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  text-align: center;
}

.button.primary {
  background: var(--blue);
}

.button.primary:hover {
  background: var(--blue-dark);
}

.button.secondary {
  border-color: var(--border);
  background: rgba(17, 29, 46, 0.78);
}

.button.secondary:hover {
  border-color: var(--blue-text);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 72px));
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 22, 40, 0.98) 0%, rgba(10, 22, 40, 0.9) 48%, rgba(10, 22, 40, 0.55) 100%),
    url("assets/brand/control-plane-diagram.svg");
  background-size: cover;
  background-position: center;
  opacity: 0.82;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.75), transparent);
  z-index: -1;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 88px;
  padding-bottom: 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 29, 46, 0.82);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--teal);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 720px;
  font-size: clamp(48px, 7vw, 84px);
  font-weight: 700;
}

h2 {
  font-size: clamp(32px, 4.7vw, 54px);
  max-width: 820px;
}

h3 {
  font-size: 26px;
}

h4 {
  font-size: 20px;
}

.lead {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 21px;
  text-wrap: pretty;
}

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

.brief {
  max-width: 920px;
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 27, 46, 0.82);
  color: var(--muted);
}

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

.band {
  padding: 84px 0;
  border-bottom: 1px solid var(--border);
}

.band.alt {
  background: var(--strip);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 0.55fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 36px;
}

.section-kicker {
  color: var(--blue-text);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
}

.section-copy {
  color: var(--muted);
  margin: 14px 0 0;
  max-width: 710px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric b {
  display: block;
  color: var(--text);
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.trust-line {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--faint);
  font-size: 15px;
  font-weight: 700;
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 0.52fr);
  gap: 34px;
  align-items: start;
}

.stack-list {
  display: grid;
  gap: 14px;
}

.stack-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 29, 46, 0.78);
}

.stack-item b {
  display: block;
  color: var(--text);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.15;
}

.stack-item span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 15px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

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

.card {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card.subtle {
  background: var(--surface-2);
  box-shadow: none;
}

.card h3,
.card h4 {
  margin-bottom: 10px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(10, 22, 40, 0.55);
  font-size: 13px;
  font-weight: 700;
}

.module-card {
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent, var(--blue));
}

.module-card h3 {
  color: var(--text);
}

.module-status {
  color: var(--accent, var(--blue-text));
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.diagram-wrap {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.diagram-wrap img {
  width: 100%;
}

.route-hero {
  padding: 96px 0 70px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(10, 22, 40, 0.96), rgba(10, 22, 40, 0.74)),
    url("assets/brand/control-plane-diagram.svg");
  background-size: cover;
  background-position: center;
}

.route-hero .lead {
  max-width: 820px;
}

.route-hero h1 {
  font-size: clamp(44px, 6vw, 72px);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: 42px;
  align-items: start;
}

.list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
}

.list li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.timeline-item b {
  color: var(--text);
}

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
}

.faq summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.faq p {
  margin: 12px 0 0;
  color: var(--muted);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #091423;
  color: var(--text);
  font: inherit;
  padding: 11px 12px;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.form-note {
  color: var(--faint);
  font-size: 14px;
}

.success {
  display: none;
  padding: 16px;
  border: 1px solid rgba(0, 214, 143, 0.35);
  border-radius: var(--radius);
  color: var(--green);
  background: rgba(0, 214, 143, 0.08);
}

.success.show {
  display: block;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  table-layout: fixed;
}

pre {
  margin: 0;
}

pre.card {
  overflow: auto;
}

pre code {
  display: block;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.table th,
.table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--text);
  background: var(--surface-2);
}

.table td {
  color: var(--muted);
  background: var(--surface);
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 48px 0;
  background: #07111f;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 0.5fr);
  gap: 32px;
}

.footer-grid h4 {
  font-family: var(--sans);
  font-size: 15px;
  margin-bottom: 12px;
}

.footer-grid a,
.footer-grid p {
  display: block;
  color: var(--muted);
  margin: 7px 0;
  font-size: 15px;
}

.accent-walletkit { --accent: var(--teal); }
.accent-shieldos { --accent: var(--green); }
.accent-riskguard { --accent: var(--amber); }
.accent-policykit { --accent: var(--purple); }
.accent-reconflow { --accent: var(--blue-text); }
.accent-vaultcore { --accent: var(--red); }
.accent-treasuryai { --accent: var(--gold); }
.accent-tokenforge { --accent: var(--teal); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px) {
  .nav {
    flex-wrap: wrap;
    padding: 14px 20px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    padding: 12px 0 4px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

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

  .nav-actions .button.secondary {
    display: none;
  }

  .section-head,
  .story-grid,
  .two-column,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .grid.cols-3,
  .grid.cols-4,
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  body::before {
    background-size: 42px 42px;
  }

  .site-header {
    position: sticky;
  }

  .nav {
    min-height: 64px;
    padding: 10px 14px;
    gap: 10px;
  }

  .brand {
    gap: 8px;
    font-size: 23px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-actions .button.primary {
    min-height: 40px;
    width: auto;
    padding: 9px 12px;
    font-size: 14px;
    white-space: nowrap;
  }

  .hero {
    min-height: auto;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(10, 22, 40, 0.97) 0%, rgba(10, 22, 40, 0.92) 58%, rgba(10, 22, 40, 0.78) 100%),
      url("assets/brand/control-plane-diagram.svg");
    background-size: 820px auto;
    background-position: center 20px;
    opacity: 0.72;
  }

  .hero .container {
    padding-top: 54px;
    padding-bottom: 60px;
  }

  h1,
  .route-hero h1 {
    font-size: clamp(40px, 12vw, 52px);
    line-height: 1.04;
  }

  h2 {
    font-size: clamp(29px, 9vw, 38px);
  }

  .lead {
    font-size: 18px;
    line-height: 1.5;
  }

  .band {
    padding: 58px 0;
  }

  .route-hero {
    padding: 64px 0 50px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .section-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .brief,
  .card,
  .metric,
  .stack-item,
  .faq details {
    padding: 18px;
  }

  .table {
    display: grid;
    gap: 12px;
    border: 0;
    overflow: visible;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: grid;
    gap: 12px;
  }

  .table tr {
    display: grid;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }

  .table td {
    display: grid;
    gap: 5px;
    min-width: 0;
    border-bottom: 1px solid var(--border);
  }

  .table td:last-child {
    border-bottom: 0;
  }

  .table td::before {
    color: var(--faint);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .table td:nth-child(1)::before {
    content: "Category";
  }

  .table td:nth-child(2)::before {
    content: "Typical strength";
  }

  .table td:nth-child(3)::before {
    content: "Where Alloy fits";
  }
}

@media (max-width: 340px) {
  .brand span {
    display: none;
  }
}
