:root {
  color-scheme: dark;
  --ink-950: #0d1517;
  --ink-900: #111c1f;
  --ink-800: #18272a;
  --spruce-700: #315f57;
  --spruce-500: #5e9588;
  --spruce-300: #a7cfc3;
  --paper: #ebe9df;
  --fog: #aeb8b3;
  --fog-dark: #72817d;
  --copper: #c77952;
  --line: rgba(235, 233, 223, 0.14);
  --line-strong: rgba(167, 207, 195, 0.32);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--ink-950);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background:
    linear-gradient(115deg, rgba(49, 95, 87, 0.14), transparent 34%),
    linear-gradient(180deg, var(--ink-900), var(--ink-950));
  font-family: var(--body);
}

button,
input {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}

::selection {
  color: var(--ink-950);
  background: var(--spruce-300);
}

.site-shell {
  position: relative;
  z-index: 2;
  width: min(1480px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
}

.site-header {
  display: grid;
  min-height: 92px;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}

.brand-symbol {
  width: 24px;
  height: 29px;
  fill: none;
  stroke: var(--spruce-300);
  stroke-width: 1.4;
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.brand-copy small {
  color: var(--fog-dark);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.28em;
}

.build-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fog-dark);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.status-beacon {
  position: relative;
  width: 7px;
  height: 7px;
  border: 1px solid var(--spruce-300);
  border-radius: 50%;
}

.status-beacon::after {
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--spruce-300);
  content: "";
  animation: beacon 2.4s ease-in-out infinite;
}

.header-link {
  justify-self: end;
  color: var(--fog);
  font-family: var(--mono);
  font-size: 10px;
  text-decoration: none;
  transition: color 180ms ease;
}

.header-link:hover {
  color: var(--paper);
}

.hero {
  display: grid;
  min-height: calc(100vh - 164px);
  align-items: center;
  gap: clamp(46px, 7vw, 112px);
  grid-template-columns: minmax(0, 0.95fr) minmax(480px, 0.85fr);
  padding: clamp(70px, 8vw, 126px) 0 76px;
}

.hero-copy {
  max-width: 790px;
  animation: copyEnter 850ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.kicker {
  margin: 0 0 28px;
  color: var(--spruce-300);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(72px, 8.4vw, 148px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.78;
  text-transform: uppercase;
  text-wrap: balance;
}

h1 span {
  display: inline-block;
  margin-top: 0.12em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(235, 233, 223, 0.78);
}

.intro {
  max-width: 660px;
  margin: 38px 0 0;
  color: var(--fog);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.75;
}

.launch-line {
  display: flex;
  max-width: 660px;
  align-items: center;
  gap: 16px;
  margin-top: 31px;
  color: var(--copper);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
}

.launch-rule {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(199, 121, 82, 0.75), rgba(199, 121, 82, 0.05));
}

.access-form {
  display: grid;
  max-width: 660px;
  margin-top: 31px;
  grid-template-columns: 1fr auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.field-wrap {
  display: grid;
  gap: 6px;
  padding: 17px 18px 16px 0;
}

.field-wrap label {
  color: var(--fog-dark);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.field-wrap input {
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--paper);
  background: transparent;
  font-size: 15px;
}

.field-wrap input::placeholder {
  color: #64736f;
}

.access-form button {
  display: inline-flex;
  min-width: 190px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 20px;
  border: 0;
  color: var(--ink-950);
  background: var(--paper);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: background 180ms ease, color 180ms ease;
}

.access-form button:hover {
  color: #f7eee8;
  background: var(--copper);
}

.access-form button:disabled {
  cursor: default;
}

.button-arrow {
  font-size: 16px;
  transition: transform 180ms ease;
}

.access-form button:hover .button-arrow {
  transform: translate(2px, -2px);
}

.form-message {
  min-height: 17px;
  margin: 11px 0 0;
  color: var(--fog-dark);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
}

.form-message.error {
  color: #e3a18e;
}

.form-message.success {
  color: var(--spruce-300);
}

.access-form.is-success .field-wrap {
  display: none;
}

.access-form.is-success {
  grid-template-columns: 1fr;
}

.access-form.is-success button {
  min-height: 72px;
  justify-content: center;
  color: var(--spruce-300);
  background: rgba(94, 149, 136, 0.1);
}

.principles {
  display: grid;
  max-width: 660px;
  margin: 44px 0 0;
  padding: 0;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.principles li {
  display: grid;
  gap: 7px;
  padding-right: 16px;
  color: var(--fog);
  font-size: 11px;
}

.principles li + li {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.principles span {
  color: var(--spruce-500);
  font-family: var(--mono);
  font-size: 8px;
}

.topology-section {
  min-width: 0;
  perspective: 1200px;
}

.topology-frame {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  min-height: 718px;
  padding: 27px 28px 24px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(rgba(167, 207, 195, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 207, 195, 0.035) 1px, transparent 1px),
    rgba(13, 21, 23, 0.7);
  background-size: 28px 28px;
  box-shadow: 0 42px 90px rgba(0, 0, 0, 0.24);
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 180ms ease-out, border-color 220ms ease;
  animation: mapEnter 1000ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.topology-frame::before {
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(167, 207, 195, 0.08);
  border-radius: 50%;
  top: 140px;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.topology-frame::after {
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(167, 207, 195, 0.065);
  border-radius: 50%;
  top: 210px;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.frame-corner {
  position: absolute;
  z-index: 5;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.frame-corner-tl {
  top: 12px;
  left: 12px;
  border-top: 1px solid var(--copper);
  border-left: 1px solid var(--copper);
}

.frame-corner-br {
  right: 12px;
  bottom: 12px;
  border-right: 1px solid var(--copper);
  border-bottom: 1px solid var(--copper);
}

.topology-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.topology-header p,
.topology-header h2 {
  margin: 0;
}

.topology-header p,
.topology-code {
  color: var(--fog-dark);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.topology-header h2 {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.topology-canvas {
  position: relative;
  z-index: 3;
  height: 535px;
  margin-top: 4px;
}

.branch-map {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  overflow: visible;
}

.branch,
.trunk {
  fill: none;
  stroke: rgba(167, 207, 195, 0.28);
  stroke-width: 1.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  vector-effect: non-scaling-stroke;
  animation: growBranch 1.25s 430ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
  transition: stroke 180ms ease, stroke-width 180ms ease;
}

.trunk {
  stroke: rgba(199, 121, 82, 0.6);
  stroke-width: 1.7;
}

.junction {
  fill: var(--copper);
  opacity: 0;
  animation: nodeAppear 420ms 1.4s ease forwards;
}

.branch.is-active {
  stroke: var(--spruce-300);
  stroke-width: 2.3;
}

.map-node,
.core-node {
  position: absolute;
  z-index: 4;
  border: 0;
  color: var(--fog);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.map-node {
  width: 160px;
  padding: 10px 11px;
  border-left: 1px solid rgba(167, 207, 195, 0.22);
  opacity: 0;
  transform: translateY(8px);
  animation: nodeAppear 520ms 1.18s ease forwards;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.map-node:hover,
.map-node.is-active {
  border-left-color: var(--copper);
  color: var(--paper);
  background: linear-gradient(90deg, rgba(199, 121, 82, 0.09), transparent);
}

.node-index {
  display: block;
  margin-bottom: 4px;
  color: var(--spruce-500);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.13em;
}

.map-node strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
}

.node-models {
  top: 6%;
  left: calc(50% - 80px);
}

.node-knowledge {
  top: 22%;
  left: 4%;
}

.node-data {
  top: 68%;
  left: 0;
}

.node-monitoring {
  top: 21%;
  right: 0;
}

.node-crm {
  top: 69%;
  right: -2%;
}

.core-node {
  left: 50%;
  bottom: 7%;
  display: grid;
  width: 130px;
  height: 130px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(17, 28, 31, 0.92);
  box-shadow: 0 0 0 11px rgba(49, 95, 87, 0.06);
  transform: translateX(-50%);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.core-node:hover,
.core-node.is-active {
  border-color: var(--copper);
  box-shadow: 0 0 0 11px rgba(199, 121, 82, 0.06);
  transform: translateX(-50%) scale(1.025);
}

.core-node svg {
  width: 39px;
  fill: none;
  stroke: var(--spruce-300);
  stroke-width: 1.3;
}

.core-node span {
  margin-top: -18px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.topology-detail {
  position: relative;
  z-index: 4;
  display: grid;
  min-height: 64px;
  align-items: start;
  gap: 14px;
  grid-template-columns: 82px 1fr;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.detail-label {
  color: var(--copper);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.topology-detail p {
  max-width: 480px;
  margin: 0;
  color: var(--fog);
  font-size: 11px;
  line-height: 1.6;
}

.site-footer {
  display: grid;
  min-height: 72px;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  border-top: 1px solid var(--line);
  color: var(--fog-dark);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.site-footer p {
  margin: 0;
}

.site-footer p:nth-child(2) {
  text-align: center;
}

.site-footer a {
  justify-self: end;
  color: var(--fog);
  text-decoration: none;
}

.grain {
  position: fixed;
  z-index: 1;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.68'/%3E%3C/svg%3E");
}

.contours {
  position: fixed;
  z-index: 0;
  border: 1px solid rgba(167, 207, 195, 0.055);
  border-radius: 47% 53% 44% 56% / 53% 41% 59% 47%;
  pointer-events: none;
}

.contours::before,
.contours::after {
  position: absolute;
  border: 1px solid rgba(167, 207, 195, 0.05);
  border-radius: inherit;
  content: "";
}

.contours::before {
  inset: 30px;
}

.contours::after {
  inset: 62px;
}

.contours-a {
  top: -170px;
  right: -130px;
  width: 670px;
  height: 520px;
  transform: rotate(17deg);
}

.contours-b {
  bottom: -290px;
  left: -190px;
  width: 740px;
  height: 610px;
  transform: rotate(-21deg);
}

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

@keyframes mapEnter {
  from { opacity: 0; transform: translateY(28px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); }
  to { opacity: 1; transform: translateY(0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); }
}

@keyframes growBranch {
  to { stroke-dashoffset: 0; }
}

@keyframes nodeAppear {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes beacon {
  0%, 100% { opacity: 0.25; transform: scale(0.55); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 900px;
  }

  .topology-section {
    width: min(100%, 760px);
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 28px, 1480px);
  }

  .site-header {
    min-height: 76px;
    grid-template-columns: 1fr auto;
  }

  .build-status {
    display: none;
  }

  .header-link {
    font-size: 8px;
  }

  .hero {
    min-height: auto;
    gap: 64px;
    padding: 64px 0 58px;
  }

  h1 {
    font-size: clamp(64px, 19vw, 100px);
    line-height: 0.82;
  }

  .intro {
    margin-top: 30px;
  }

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

  .field-wrap {
    padding: 16px 0;
  }

  .access-form button {
    min-height: 54px;
  }

  .principles {
    gap: 18px;
    grid-template-columns: 1fr;
  }

  .principles li,
  .principles li + li {
    padding: 0;
    border-left: 0;
  }

  .topology-frame {
    min-height: 640px;
    padding: 22px 18px 20px;
  }

  .topology-header h2 {
    font-size: 28px;
  }

  .topology-code {
    display: none;
  }

  .topology-canvas {
    height: 470px;
  }

  .map-node {
    width: 128px;
    padding: 8px;
  }

  .node-models {
    left: calc(50% - 64px);
  }

  .map-node strong {
    font-size: 9px;
  }

  .node-knowledge {
    left: -3%;
  }

  .node-monitoring {
    right: -4%;
  }

  .node-data {
    left: -5%;
  }

  .node-crm {
    right: -6%;
  }

  .core-node {
    width: 112px;
    height: 112px;
  }

  .topology-detail {
    grid-template-columns: 62px 1fr;
  }

  .site-footer {
    min-height: 88px;
    gap: 8px;
    grid-template-columns: 1fr auto;
  }

  .site-footer p:nth-child(2) {
    display: none;
  }
}

@media (max-width: 430px) {
  .brand-copy strong {
    font-size: 16px;
  }

  .header-link {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topology-frame {
    min-height: 592px;
  }

  .topology-canvas {
    height: 430px;
  }

  .map-node {
    width: 112px;
  }

  .node-models {
    left: calc(50% - 56px);
  }

  .node-models {
    top: 5%;
  }

  .node-knowledge,
  .node-monitoring {
    top: 25%;
  }

  .node-data,
  .node-crm {
    top: 66%;
  }

  .core-node {
    bottom: 5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .topology-frame {
    transform: none !important;
  }
}
