:root {
  color-scheme: dark;
  --ink: #050607;
  --graphite: #0d1110;
  --graphite-2: #131916;
  --panel: rgba(14, 20, 18, 0.78);
  --panel-solid: #101614;
  --porcelain: #eee8d8;
  --muted: #aaa99d;
  --faint: #72776e;
  --line: rgba(238, 232, 216, 0.14);
  --line-strong: rgba(238, 232, 216, 0.28);
  --mint: #55f2c9;
  --cyan: #6ac9f1;
  --copper: #f09a43;
  --field: #88c98e;
  --shadow: rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--porcelain);
  background:
    linear-gradient(90deg, rgba(238, 232, 216, 0.035) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(rgba(238, 232, 216, 0.028) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(140deg, rgba(85, 242, 201, 0.08), transparent 32%),
    linear-gradient(320deg, rgba(240, 154, 67, 0.08), transparent 34%),
    var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a { color: inherit; }

#system-scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.64;
  pointer-events: none;
  z-index: 0;
}

.page-shell {
  position: relative;
  z-index: 1;
}

.site-header {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 10;
  width: min(1296px, calc(100% - 48px));
  height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 13, 12, 0.72);
  box-shadow: 0 24px 80px var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-weight: 720;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 242, 201, 0.38);
  border-radius: 6px;
  background: rgba(85, 242, 201, 0.11);
  color: var(--mint);
  font-size: 12px;
}

.nav-links {
  justify-self: center;
  display: flex;
  gap: 30px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
}

.nav-links a,
.nav-action,
.button {
  text-decoration: none;
}

.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(85, 242, 201, 0.34);
  border-radius: 6px;
  background: rgba(17, 24, 22, 0.88);
  color: var(--porcelain);
  font-size: 14px;
  font-weight: 720;
}

main {
  overflow: hidden;
}

.hero {
  min-height: calc(100vh - 34px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1fr);
  gap: 56px;
  align-items: center;
  width: min(1296px, calc(100% - 48px));
  margin: 0 auto;
  padding: 132px 0 64px;
}

.hero-copy {
  padding-top: 44px;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  max-width: 620px;
  font-size: clamp(76px, 10vw, 136px);
  line-height: 0.86;
  font-weight: 820;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 630px;
  margin-top: 36px;
  color: var(--muted);
  font-size: clamp(21px, 2.1vw, 30px);
  line-height: 1.28;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 6px;
  font-weight: 760;
}

.button.primary {
  background: var(--porcelain);
  color: var(--ink);
}

.button.secondary {
  border: 1px solid var(--line-strong);
  background: rgba(16, 22, 20, 0.8);
  color: var(--porcelain);
}

.operations-board {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(238, 232, 216, 0.05) 1px, transparent 1px) 0 0 / 52px 52px,
    linear-gradient(rgba(238, 232, 216, 0.035) 1px, transparent 1px) 0 0 / 52px 52px,
    rgba(7, 12, 11, 0.84);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.46), inset 0 0 80px rgba(85, 242, 201, 0.04);
  overflow: hidden;
}

.operations-board::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(85, 242, 201, 0.12);
  border-radius: 8px;
  pointer-events: none;
}

.board-topline,
.status-strip {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.board-topline {
  padding: 28px 34px;
}

.board-topline span:first-child { color: var(--mint); }

.board-stage {
  position: relative;
  height: 380px;
  margin: 0 30px;
}

.slab {
  position: absolute;
  min-width: 300px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(16, 23, 21, 0.86);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

.slab span {
  display: block;
  color: var(--faint);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.slab strong {
  display: block;
  margin-top: 10px;
  font-size: 24px;
}

.slab-a { top: 36px; left: 34px; border-color: rgba(85, 242, 201, 0.34); transform: perspective(700px) rotateX(2deg) rotateZ(-2deg); }
.slab-b { top: 142px; right: 62px; border-color: rgba(106, 201, 241, 0.34); transform: perspective(700px) rotateX(4deg) rotateZ(2deg); }
.slab-c { left: 100px; bottom: 20px; border-color: rgba(240, 154, 67, 0.36); transform: perspective(700px) rotateX(3deg) rotateZ(1deg); }

.node {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 6px rgba(85, 242, 201, 0.12), 0 0 24px rgba(85, 242, 201, 0.58);
  animation: nodePulse 4.4s ease-in-out infinite;
}

.n1 { left: 78px; top: 28px; }
.n2 { right: 86px; top: 86px; background: var(--copper); box-shadow: 0 0 0 6px rgba(240,154,67,.12), 0 0 24px rgba(240,154,67,.45); }
.n3 { left: 240px; bottom: 72px; background: var(--cyan); box-shadow: 0 0 0 6px rgba(106,201,241,.12), 0 0 24px rgba(106,201,241,.45); }
.n4 { right: 190px; bottom: 38px; }

.route {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(238, 232, 216, 0.46), transparent);
}

.r1 { left: 88px; top: 48px; width: 470px; transform: rotate(11deg); }
.r2 { right: 104px; top: 110px; width: 420px; transform: rotate(135deg); }
.r3 { left: 250px; bottom: 84px; width: 390px; transform: rotate(-17deg); }

.status-strip {
  gap: 1px;
  margin: 0 30px 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.status-strip div {
  flex: 1;
  padding: 18px 20px;
  background: rgba(238, 232, 216, 0.04);
}

.status-strip span,
.status-strip strong {
  display: block;
}

.status-strip strong {
  margin-top: 6px;
  color: var(--porcelain);
  font-size: 17px;
  text-transform: none;
}

.section {
  width: min(1296px, calc(100% - 48px));
  margin: 0 auto;
  padding: 116px 0;
}

.section-kicker {
  margin-bottom: 18px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 820;
  text-transform: uppercase;
}

.section-kicker.dark {
  color: #6d4b20;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.58fr);
  gap: 80px;
  align-items: end;
  margin-bottom: 54px;
}

.section-head.narrow {
  display: block;
  max-width: 860px;
}

h2 {
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  font-weight: 820;
}

.section-head p,
.model p,
.contact p {
  color: var(--muted);
  font-size: 22px;
  line-height: 1.36;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.system-card {
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 21, 19, 0.82);
}

.system-card.mint { border-color: rgba(85, 242, 201, 0.36); }
.system-card.cyan { border-color: rgba(106, 201, 241, 0.36); }
.system-card.copper { border-color: rgba(240, 154, 67, 0.38); }

.card-index {
  color: var(--faint);
  font-size: 13px;
  font-weight: 820;
}

.system-card h3 {
  margin-top: 54px;
  font-size: 30px;
  line-height: 1.08;
}

.system-card p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.38;
}

.model {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 0.7fr);
  gap: 90px;
  align-items: center;
  padding: 116px max(24px, calc((100vw - 1296px) / 2));
  background: #ded7c4;
  color: var(--ink);
}

.model h2 {
  color: var(--ink);
}

.model p {
  margin-top: 28px;
  color: #292820;
}

.model-steps {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.model-steps li {
  display: grid;
  grid-template-columns: 52px 140px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid rgba(5, 6, 7, 0.22);
}

.model-steps span {
  color: #8f5a23;
  font-weight: 840;
}

.model-steps strong {
  font-size: 30px;
}

.model-steps em {
  color: #4d4a3d;
  font-style: normal;
  font-size: 17px;
  line-height: 1.32;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.capability-grid article {
  min-height: 150px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(238, 232, 216, 0.035);
}

.capability-grid article:nth-child(4n) { border-right: 0; }
.capability-grid article:nth-child(n+5) { border-bottom: 0; }

.capability-grid span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 820;
}

.capability-grid h3 {
  margin-top: 46px;
  font-size: 23px;
  line-height: 1.1;
}

.workflow-list {
  display: grid;
  gap: 16px;
  margin-top: 54px;
}

.workflow-list article {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.workflow-list span {
  font-size: 24px;
  font-weight: 760;
}

.workflow-list p {
  max-width: 720px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.35;
}

.principle-panel {
  padding: 56px;
  border: 1px solid rgba(85, 242, 201, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(85, 242, 201, 0.08), rgba(240, 154, 67, 0.05)), rgba(14, 20, 18, 0.86);
}

.principle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 42px;
}

.principle-grid span {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(5, 6, 7, 0.28);
}

.contact {
  min-height: 520px;
  display: grid;
  align-content: center;
  justify-items: start;
}

.contact h2 {
  max-width: 880px;
}

.contact p {
  max-width: 720px;
  margin-top: 28px;
}

.contact .button {
  margin-top: 36px;
}

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

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

@keyframes nodePulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.28);
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .site-header {
    width: calc(100% - 28px);
    top: 14px;
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 116px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .operations-board {
    min-height: 430px;
  }

  .section-head,
  .model,
  .workflow-list article {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .system-grid,
  .capability-grid {
    grid-template-columns: 1fr 1fr;
  }

  .capability-grid article,
  .capability-grid article:nth-child(4n),
  .capability-grid article:nth-child(n+5) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .site-header {
    height: 60px;
    padding: 0 14px;
  }

  .brand span:last-child {
    font-size: 14px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav-action {
    min-height: 38px;
    max-width: 142px;
    padding: 0 12px;
    font-size: 12px;
    text-align: center;
  }

  .hero,
  .section {
    width: calc(100% - 36px);
  }

  .hero {
    gap: 34px;
    padding-top: 104px;
  }

  h1 {
    font-size: clamp(58px, 18vw, 76px);
  }

  .hero-copy p {
    margin-top: 26px;
    font-size: 18px;
  }

  .button {
    width: 100%;
  }

  .operations-board {
    min-height: 390px;
  }

  .board-stage {
    height: 260px;
    margin: 0 18px;
  }

  .slab {
    min-width: 190px;
    padding: 14px;
  }

  .slab strong {
    font-size: 17px;
  }

  .slab-a { left: 12px; top: 18px; }
  .slab-b { right: 8px; top: 104px; }
  .slab-c { left: 36px; bottom: 2px; }

  .status-strip {
    margin: 0 18px 18px;
  }

  .status-strip div {
    padding: 12px;
  }

  .status-strip strong {
    font-size: 13px;
  }

  .system-grid,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .model {
    padding: 78px 18px;
  }

  .model-steps li {
    grid-template-columns: 38px 1fr;
  }

  .model-steps em {
    grid-column: 2;
  }

  .principle-panel {
    padding: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #system-scene { display: none; }
  .node,
  .reveal {
    animation: none;
    transition: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
