:root {
  --bg-main: #060608;
  --bg-alt: #0c0e12;
  --bg-panel: #11141a;
  --text-main: #f4f5f7;
  --text-muted: #a9afb9;
  --line-subtle: #2a2e36;
  --line-strong: #3a3f49;
  --accent-red: #b20f1e;
  --accent-red-deep: #6b0913;
  --accent-white: #ffffff;
  --max-width: 1180px;
  --transition-fast: 180ms ease;
  --transition-mid: 280ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: "Barlow", "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 35%),
    linear-gradient(24deg, rgba(178, 15, 30, 0.16) 0%, rgba(178, 15, 30, 0) 42%),
    linear-gradient(310deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(120deg, #07080b 0%, #040406 55%, #0a0b0f 100%);
}

body::after {
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 80%) 0 0 / 44% 28% no-repeat,
    linear-gradient(210deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 76%) 100% 0 / 42% 34% no-repeat,
    linear-gradient(40deg, rgba(178, 15, 30, 0.2) 0%, rgba(178, 15, 30, 0) 82%) 0 100% / 38% 34% no-repeat,
    linear-gradient(320deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 72%) 100% 100% / 32% 30% no-repeat;
  opacity: 0.12;
  mix-blend-mode: screen;
}

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

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

.container {
  width: min(100% - 2.6rem, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 5.4rem 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid rgba(178, 15, 30, 0.25);
}

.shard-divider::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 82px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 42%);
  clip-path: polygon(0 0, 100% 0, 84% 100%, 0 60%);
  opacity: 0.42;
  pointer-events: none;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-family: "Rajdhani", "Barlow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.1;
}

.section-heading h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.4rem);
}

.section-heading p {
  max-width: 700px;
  margin: 0;
  color: var(--text-muted);
}

.section-kicker {
  margin: 0 0 0.8rem;
  font-family: "Rajdhani", "Barlow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #d7dce4;
  font-size: 0.82rem;
}

.separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(178, 15, 30, 0) 0%, rgba(178, 15, 30, 0.75) 25%, rgba(178, 15, 30, 0.2) 100%);
  margin: 1.3rem 0 2rem;
}

.accent-line {
  width: 76px;
  height: 2px;
  background: var(--accent-red);
  margin-top: 0.6rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line-strong);
  padding: 0.28rem 0.7rem;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #dde1e8;
  background: rgba(255, 255, 255, 0.02);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 6, 9, 0.88);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid rgba(178, 15, 30, 0.35);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
}

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

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand strong {
  font-family: "Rajdhani", "Barlow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.95rem;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #d3d7df;
  padding: 0.45rem 0.15rem;
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent-white);
  border-color: var(--accent-red);
}

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

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.hero {
  padding: 6.4rem 0 5.4rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  margin: 0;
  font-family: "Rajdhani", "Barlow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.02;
  font-size: clamp(2rem, 5vw, 4rem);
}

.hero p {
  margin: 1.2rem 0 0;
  max-width: 760px;
  color: #c5cad3;
}

.hero-metrics {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.metric {
  border: 1px solid var(--line-subtle);
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.01);
}

.metric strong {
  display: block;
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.1em;
  font-size: 1.2rem;
}

.metric span {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.hero-logo-wrap {
  justify-self: end;
  width: min(100%, 360px);
  border: 1px solid var(--line-strong);
  padding: 1.1rem;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(35deg, rgba(178, 15, 30, 0.24) 0%, rgba(178, 15, 30, 0) 58%),
    rgba(255, 255, 255, 0.01);
  position: relative;
}

.hero-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-logo-wrap img {
  width: 100%;
  object-fit: contain;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  padding: 0.72rem 1.05rem;
  min-height: 44px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.button.primary {
  background: linear-gradient(180deg, #c51627 0%, #8f0f1b 100%);
  color: #fff;
  border-color: #cb2132;
}

.button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 22px rgba(178, 15, 30, 0.22);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.01);
  color: #fff;
  border-color: #b8bfca;
}

.button.secondary:hover {
  transform: translateY(-1px);
  border-color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 1rem;
}

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

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

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

.card {
  border: 1px solid var(--line-subtle);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0) 42%),
    rgba(10, 12, 16, 0.88);
  padding: 1.1rem;
  position: relative;
  transition: border-color var(--transition-mid), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-red) 0%, rgba(178, 15, 30, 0) 60%);
}

.card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 18px rgba(178, 15, 30, 0.14);
}

.card h3,
.card h4 {
  margin: 0 0 0.8rem;
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  line-height: 1.2;
}

.card p,
.card li {
  margin: 0;
  color: #c7ccd5;
  font-size: 0.96rem;
}

.card ul {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
}

.icon-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.icon {
  width: 18px;
  height: 18px;
  color: #f5f7fa;
  flex: 0 0 auto;
}

.phase {
  border-left: 1px solid rgba(178, 15, 30, 0.55);
  padding-left: 1rem;
  margin-left: 0.4rem;
}

.phase + .phase {
  margin-top: 1.3rem;
}

.phase strong {
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.callout {
  border-left: 3px solid var(--accent-red);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.95rem 1rem;
  color: #d6dbe3;
  margin: 1rem 0;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat-item {
  border: 1px solid var(--line-subtle);
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.01);
}

.stat-item strong {
  display: block;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

.stat-item span {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.74rem;
}

.intel-feed {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.snapshot-time {
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
  color: #d6dbe4;
}

.cta-block {
  border: 1px solid var(--line-strong);
  padding: 1.6rem;
  background:
    linear-gradient(152deg, rgba(178, 15, 30, 0.18) 0%, rgba(178, 15, 30, 0) 56%),
    rgba(10, 12, 16, 0.95);
  position: relative;
}

.cta-block::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 180px;
  height: 100%;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.2;
  pointer-events: none;
}

.cta-block h3 {
  margin: 0 0 0.6rem;
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.architecture-diagram {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.015);
  padding: 1.2rem;
}

.layer-stack {
  display: grid;
  gap: 1.1rem;
  position: relative;
}

.layer-stack::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 20px;
  width: 1px;
  background: linear-gradient(180deg, rgba(178, 15, 30, 0.18), rgba(178, 15, 30, 0.92), rgba(178, 15, 30, 0.18));
}

.layer-node {
  border: 1px solid var(--line-subtle);
  padding: 0.85rem 0.9rem 0.85rem 2.2rem;
  background: rgba(255, 255, 255, 0.01);
  position: relative;
}

.layer-node::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent-red);
  background: #0b0d12;
}

.layer-node h4 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.layer-node p {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
}

pre {
  margin: 0;
  border: 1px solid var(--line-subtle);
  background: #090b10;
  padding: 0.95rem;
  overflow-x: auto;
  font-size: 0.84rem;
  color: #d7dce5;
}

code {
  font-family: "IBM Plex Mono", "Menlo", monospace;
}

.case-flow {
  display: grid;
  gap: 0.8rem;
}

.case-step {
  border: 1px solid var(--line-subtle);
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.01);
}

.case-step strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toc {
  border: 1px solid var(--line-subtle);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.toc h3 {
  margin: 0 0 0.7rem;
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.toc ol {
  margin: 0;
  padding-left: 1.1rem;
}

.toc a {
  color: #dbe0e8;
}

.toc a:hover {
  color: #fff;
}

.article {
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.01);
  padding: 1.25rem;
}

.article + .article {
  margin-top: 1rem;
}

.article h3 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article-meta {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article h4 {
  margin: 1rem 0 0.4rem;
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d2d8e1;
}

.form-field input,
.form-field select,
.form-field textarea {
  appearance: none;
  border: 1px solid var(--line-subtle);
  background: rgba(7, 9, 13, 0.88);
  color: #f4f6f9;
  padding: 0.68rem 0.75rem;
  font: inherit;
  min-height: 42px;
}

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

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 1px rgba(178, 15, 30, 0.25);
}

.site-footer {
  border-top: 1px solid rgba(178, 15, 30, 0.35);
  padding: 2.1rem 0 1.6rem;
  background: rgba(6, 7, 10, 0.95);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1rem;
}

.footer-title {
  margin: 0 0 0.65rem;
  font-family: "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

.footer-links a {
  font-size: 0.93rem;
  color: #d3d8df;
}

.footer-links a:hover {
  color: #fff;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.social-btn:hover {
  border-color: var(--accent-red);
  box-shadow: 0 0 12px rgba(178, 15, 30, 0.2);
}

.social-btn svg {
  width: 17px;
  height: 17px;
}

.footer-bottom {
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.84rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo-wrap {
    justify-self: start;
    width: min(100%, 290px);
  }

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

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

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

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 78px;
    background: rgba(7, 8, 12, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(178, 15, 30, 0.32);
    display: grid;
    gap: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--transition-fast);
  }

  .site-nav a {
    padding: 0.8rem 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  body.menu-open .site-nav {
    transform: scaleY(1);
  }

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

  .grid-2,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.5rem, var(--max-width));
  }

  .section {
    padding: 4.2rem 0;
  }

  .hero {
    padding: 5rem 0 4rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .grid-3,
  .grid-4,
  .intel-feed,
  .footer-grid,
  .stats-band {
    grid-template-columns: 1fr;
  }

  .brand strong {
    letter-spacing: 0.13em;
    font-size: 0.82rem;
  }
}
