:root {
  --bg: #08090a;
  --bg-soft: #0b0d0f;
  --surface: rgba(15, 17, 19, 0.72);
  --surface-line: rgba(255, 255, 255, 0.08);
  --accent: #87a892;
  --accent-strong: #a7c4af;
  --text: #f2f4f1;
  --text-soft: #b6beb7;
  --text-muted: #737c76;
  --font-sans: "Geist", "Satoshi", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Code", "Fira Code", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.site {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(135, 168, 146, 0.11), transparent 34%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.055), transparent 25%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 52%, var(--bg) 100%);
}

.site::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 74%, transparent 100%);
  opacity: 0.35;
}

.site::after {
  content: "";
  position: absolute;
  top: 0;
  right: 13vw;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(135, 168, 146, 0.36), transparent);
  opacity: 0.7;
}

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

.shell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1400px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px clamp(20px, 5vw, 72px) 30px;
}

.topbar,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.access-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  transition: color 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover {
  color: var(--accent-strong);
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--surface-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.access-pill {
  border: 1px solid var(--surface-line);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.access-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 2.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(320px, 0.76fr);
  gap: clamp(48px, 8vw, 132px);
  align-items: center;
  padding: clamp(56px, 9vh, 104px) 0 clamp(42px, 6vh, 72px);
}

.copy {
  max-width: 760px;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.2vw, 0.82rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: enter 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

h1 {
  max-width: 13ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.75rem, 6.4vw, 5.65rem);
  font-weight: 620;
  letter-spacing: -0.05em;
  line-height: 0.99;
  overflow-wrap: anywhere;
  animation: enter 780ms 80ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.lede {
  max-width: 59ch;
  margin: 28px 0 0;
  color: var(--text-soft);
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
  letter-spacing: -0.012em;
  line-height: 1.76;
  overflow-wrap: break-word;
  animation: enter 820ms 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.access-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin-top: 38px;
  animation: enter 840ms 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.access-state {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(135, 168, 146, 0.42);
  border-radius: 8px;
  padding: 0 18px;
  background: rgba(135, 168, 146, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 560;
  transition:
    transform 280ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 280ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

.access-state:hover {
  border-color: rgba(167, 196, 175, 0.7);
  background: rgba(135, 168, 146, 0.16);
}

.access-state:active {
  transform: translateY(1px) scale(0.985);
}

.access-note,
.footer {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.matrix {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--surface-line);
  border-radius: 10px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 24px 70px rgba(0, 0, 0, 0.28);
  animation: floatIn 900ms 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.matrix::before,
.matrix::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.matrix::before {
  inset: 64px 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(135, 168, 146, 0.55), transparent);
}

.matrix::after {
  inset: auto 24px 68px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.matrix-top,
.matrix-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #9aa49d;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matrix-top span:last-child {
  color: var(--accent-strong);
}

.matrix-map {
  display: block;
  width: 100%;
  min-height: 312px;
  margin: 34px 0 20px;
}

.matrix-line {
  fill: none;
  stroke: rgba(135, 168, 146, 0.36);
  stroke-width: 1;
}

.matrix-line-soft {
  stroke: rgba(255, 255, 255, 0.12);
}

.node {
  fill: rgba(255, 255, 255, 0.024);
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
  animation: nodeDrift 4.8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.node-primary {
  fill: url(#nodeFill);
  stroke: rgba(135, 168, 146, 0.36);
}

.node-muted {
  opacity: 0.56;
}

.node:nth-child(2) { animation-delay: 240ms; }
.node:nth-child(3) { animation-delay: 520ms; }
.node:nth-child(4) { animation-delay: 760ms; }
.node:nth-child(5) { animation-delay: 1040ms; }

.node-lines path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-linecap: round;
  stroke-width: 1;
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 28px;
}

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

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.58;
    transform: scale(0.82);
  }
  45% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes nodeDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  42% {
    transform: translate3d(0, -5px, 0);
  }
}

@media (max-width: 860px) {
  .shell {
    padding: 20px 18px 24px;
  }

  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 62px 0 46px;
  }

  h1 {
    max-width: 10ch;
  }

  .matrix {
    min-height: 360px;
    padding: 16px;
  }

  .matrix-map {
    min-height: 238px;
    margin-top: 24px;
  }
}

@media (max-width: 540px) {
  .access-pill {
    width: 100%;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    white-space: normal;
  }

  .access-pill span:last-child {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 10.8vw, 3rem);
    letter-spacing: -0.04em;
    word-break: break-word;
  }

  .lede {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .access-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .access-state {
    width: 100%;
  }
}

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