:root {
  --bg: #020711;
  --bg-2: #06101d;
  --panel: rgba(2, 12, 24, 0.82);
  --panel-strong: rgba(3, 15, 29, 0.94);
  --line: rgba(29, 185, 255, 0.27);
  --line-strong: rgba(64, 209, 255, 0.62);
  --cyan: #36d7ff;
  --cyan-2: #77e8ff;
  --blue: #1788ff;
  --gold: #ffb52b;
  --text: #eef8ff;
  --soft: #b9cbe1;
  --muted: #7791aa;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.62);
  --display: "Orbitron", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--body);
  background:
    radial-gradient(circle at 50% -8%, rgba(20, 148, 255, 0.18), transparent 26rem),
    radial-gradient(circle at 100% 28%, rgba(255, 181, 43, 0.08), transparent 22rem),
    linear-gradient(180deg, #02050b 0%, #06101d 45%, #020711 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(54, 215, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 215, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 90%);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-shell {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.topbar,
.frame-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(54, 215, 255, 0.055), transparent 24%),
    linear-gradient(180deg, rgba(2, 13, 27, 0.92), rgba(1, 8, 18, 0.86));
  box-shadow: inset 0 1px 0 rgba(119, 232, 255, 0.08), var(--shadow);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 70px;
  padding: 12px 34px;
  backdrop-filter: blur(22px);
}

.brand,
.topnav,
.topbar-link {
  display: inline-flex;
  align-items: center;
}

.brand { gap: 14px; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 13px rgba(54, 215, 255, 0.65)); }
.topnav { justify-content: center; gap: clamp(14px, 3vw, 54px); }
.topnav a,
.topbar-link {
  min-height: 38px;
  padding: 0 14px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.88;
  border: 1px solid transparent;
}
.topnav a.is-active,
.topnav a:hover,
.topbar-link:hover {
  color: var(--cyan-2);
  border-color: rgba(54, 215, 255, 0.32);
  background: rgba(3, 22, 41, 0.72);
  box-shadow: 0 8px 26px rgba(23, 136, 255, 0.18), inset 0 -2px 0 var(--cyan);
}
.topbar-link { justify-content: center; gap: 8px; border-color: rgba(54, 215, 255, 0.26); }

main { display: grid; gap: 16px; margin-top: 16px; }
section { scroll-margin-top: 94px; }

.hero {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
}
.hero-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.96;
  filter: saturate(1.1) contrast(1.05);
  z-index: -3;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(1, 7, 16, 0.98) 0%, rgba(2, 8, 18, 0.86) 25%, rgba(2, 8, 18, 0.18) 58%, rgba(2, 8, 18, 0.08) 100%),
    linear-gradient(180deg, rgba(2, 7, 17, 0.08), rgba(2, 7, 17, 0.24));
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.12;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
}
.hero-copy {
  width: min(520px, 54%);
  padding: 56px 42px 38px;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.7rem, 7vw, 7.7rem);
  line-height: 0.9;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: #dff8ff;
  text-shadow: 0 0 12px rgba(54, 215, 255, 0.85), 0 0 40px rgba(23, 136, 255, 0.58);
}
.hero-kicker {
  margin: 24px 0 0;
  max-width: 470px;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.45vw, 1.45rem);
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}
.hero-text {
  max-width: 430px;
  margin: 28px 0 30px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.58;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 28px;
  border: 1px solid var(--line-strong);
  color: var(--cyan-2);
  background: rgba(1, 16, 31, 0.78);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 0 28px rgba(54, 215, 255, 0.28); }
.button-primary { background: linear-gradient(180deg, rgba(22, 145, 255, 0.34), rgba(1, 18, 36, 0.86)); }
.button-secondary { color: var(--text); border-color: rgba(54, 215, 255, 0.35); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.feature-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 20px 20px;
}
.feature-item {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  min-height: 106px;
  padding: 16px 18px;
  border-right: 1px solid rgba(54, 215, 255, 0.18);
  background: linear-gradient(180deg, rgba(2, 15, 30, 0.38), rgba(1, 9, 19, 0.18));
}
.feature-item:last-child { border-right: 0; }
.feature-item span {
  width: 48px;
  height: 48px;
  border: 2px solid var(--cyan);
  filter: drop-shadow(0 0 12px rgba(54, 215, 255, 0.45));
}
.feature-item h2,
.model-copy h2,
.living-section h2,
.info-panel h2,
.build-section h2 {
  margin: 0;
  color: var(--cyan-2);
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}
.feature-item p,
.model-copy p,
.living-card p,
.info-panel p,
.build-section p,
.connect-panel a {
  color: var(--soft);
  line-height: 1.52;
  font-size: 0.94rem;
}
.feature-item p { margin: 7px 0 0; font-size: 0.86rem; }

.icon-net { clip-path: polygon(50% 0, 62% 24%, 90% 20%, 72% 48%, 95% 78%, 58% 70%, 48% 100%, 36% 70%, 4% 80%, 26% 48%, 10% 20%, 38% 24%); }
.icon-peer { border-radius: 50%; }
.icon-cube { clip-path: polygon(50% 0, 94% 24%, 94% 74%, 50% 100%, 6% 74%, 6% 24%); }
.icon-shield { clip-path: polygon(50% 0, 92% 15%, 84% 68%, 50% 100%, 16% 68%, 8% 15%); }
.icon-lock { clip-path: polygon(20% 42%, 20% 100%, 80% 100%, 80% 42%, 68% 42%, 68% 26%, 50% 12%, 32% 26%, 32% 42%); }

.model-section {
  display: grid;
  grid-template-columns: 0.56fr 1fr;
  gap: 28px;
  padding: 34px 42px 26px;
  min-height: 520px;
}
.model-copy { padding-top: 8px; }
.model-copy h2,
.living-section h2 { font-size: clamp(1.45rem, 2vw, 2rem); }
.model-copy p { margin: 18px 0 0; max-width: 520px; }
.tower-diagram {
  position: relative;
  min-height: 480px;
  padding: 16px 240px 16px 170px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 48% 20%, rgba(54, 215, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(2, 13, 26, 0.88), rgba(1, 7, 16, 0.92));
  overflow: hidden;
}
.tower-reference {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.08) contrast(1.08);
}
.tower-diagram::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background-image:
    linear-gradient(rgba(54, 215, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 215, 255, 0.09) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: perspective(360px) rotateX(62deg);
  transform-origin: bottom;
  pointer-events: none;
}
#tower-canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 448px;
  background: transparent;
  opacity: 0.18;
  mix-blend-mode: screen;
}
.tower-label {
  position: absolute;
  z-index: 4;
  left: 34px;
  width: 170px;
  color: var(--cyan-2);
  font-family: var(--display);
  font-size: 0.98rem;
  line-height: 1.25;
  text-transform: uppercase;
  display: none;
}
.tower-label small { display: block; color: var(--soft); font-family: var(--body); font-size: 0.85rem; text-transform: none; }
.tower-label-business { top: 156px; }
.tower-label-foundation { top: 300px; color: var(--gold); }
.tower-callouts {
  position: absolute;
  top: 86px;
  right: 32px;
  z-index: 4;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text);
  display: none;
}
.tower-callouts li {
  min-width: 186px;
  font-size: 0.92rem;
}
.tower-callouts li::before {
  content: "";
  display: inline-block;
  width: 76px;
  height: 1px;
  margin: 0 12px 4px 0;
  background: linear-gradient(90deg, transparent, var(--cyan));
}
.tower-callouts li:nth-child(n+6)::before { background: linear-gradient(90deg, transparent, var(--gold)); }

.living-section { padding: 24px 20px 22px; }
.living-section h2 { margin: 0 0 18px 18px; }
.living-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.living-card {
  position: relative;
  min-height: 344px;
  padding: 14px 12px 16px;
  border: 1px solid var(--line);
  background: rgba(1, 12, 25, 0.8);
  overflow: hidden;
}
.living-card span {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  color: var(--cyan-2);
  font-family: var(--display);
  font-weight: 800;
  background: rgba(2, 16, 33, 0.86);
}
.living-card h3 {
  min-height: 52px;
  margin: 0 0 10px 42px;
  color: var(--cyan-2);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.25;
  text-transform: uppercase;
}
.living-card img {
  width: 100%;
  height: 182px;
  object-fit: cover;
  border: 1px solid rgba(54, 215, 255, 0.18);
  filter: saturate(1.1) contrast(1.05);
  transition: transform 300ms ease, filter 300ms ease;
}
.living-card:hover img { transform: scale(1.08); filter: saturate(1.25) brightness(1.08); }
.living-card p { margin: 14px 0 0; font-size: 0.82rem; }

.panel-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.05fr 0.85fr 1.3fr;
  gap: 12px;
}
.info-panel { min-height: 310px; padding: 24px 26px; }
.principle-list {
  display: grid;
  gap: 15px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.principle-list li {
  color: var(--soft);
  font-size: 0.94rem;
}
.principle-list li::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 22px;
  margin: 0 14px -5px 0;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(54, 215, 255, 0.28);
}
.stack-panel img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  margin-top: 18px;
}
.vision-panel {
  background:
    linear-gradient(90deg, rgba(2, 12, 25, 0.94), rgba(2, 12, 25, 0.62)),
    url("assets/crops/vision-world.png") right center/cover no-repeat;
}
.vision-panel p { max-width: 340px; }

.build-section {
  display: grid;
  grid-template-columns: 0.95fr 1.95fr 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 0;
  background: transparent;
}
.build-section > div {
  padding: 28px 34px;
  background: linear-gradient(180deg, rgba(2, 13, 26, 0.9), rgba(1, 8, 18, 0.86));
  border-right: 1px solid rgba(54, 215, 255, 0.16);
}
.build-brand {
  display: flex;
  gap: 22px;
  align-items: center;
}
.brand-mark-large {
  width: 82px;
  height: 82px;
  filter: drop-shadow(0 0 20px rgba(54, 215, 255, 0.7));
}
.build-actions h2 { font-size: 1.25rem; }
.connect-panel { display: grid; align-content: start; gap: 11px; }
.connect-panel h2 { margin-bottom: 4px; }
.connect-panel a:hover { color: var(--cyan-2); }

.footer {
  display: flex;
  justify-content: center;
  gap: 34px;
  padding: 22px 10px 0;
  color: var(--cyan-2);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.footer span:not(:last-child)::after {
  content: "•";
  margin-left: 34px;
  color: var(--cyan);
}

.reactive-panel {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.reactive-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(119, 232, 255, 0.18), transparent 22rem);
  transition: opacity 220ms ease;
}
.reactive-panel:hover {
  border-color: var(--line-strong);
  box-shadow: 0 22px 74px rgba(0, 0, 0, 0.54), 0 0 28px rgba(23, 136, 255, 0.12);
}
.reactive-panel:hover::before { opacity: 1; }

.simulation-shell {
  width: min(100%, 1800px);
}

.simulation-main {
  gap: 14px;
}

.simulation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.82fr);
  gap: 26px;
  align-items: end;
  padding: 28px 34px;
  min-height: 170px;
  background:
    linear-gradient(90deg, rgba(1, 9, 20, 0.96), rgba(1, 15, 30, 0.72)),
    url("assets/crops/hero-city.png") right center/cover no-repeat;
}

.simulation-hero h1 {
  margin: 0;
  max-width: 820px;
  color: #dff8ff;
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 5.2rem);
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(54, 215, 255, 0.64);
}

.simulation-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 1rem;
  line-height: 1.6;
}

.sim-readouts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sim-readouts article {
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(54, 215, 255, 0.22);
  background: rgba(1, 10, 21, 0.78);
}

.sim-readouts span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sim-readouts strong {
  display: block;
  margin-top: 8px;
  color: var(--cyan-2);
  font-family: var(--display);
  font-size: 1.18rem;
}

.explorer-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 286px);
}

.simulation-controls {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
}

.control-card,
.inspector-card {
  padding: 18px;
  border: 1px solid rgba(54, 215, 255, 0.18);
  background: linear-gradient(180deg, rgba(1, 14, 29, 0.82), rgba(1, 8, 18, 0.66));
}

.control-card h2,
.inspector-card h3 {
  margin: 0 0 12px;
  color: var(--cyan-2);
  font-family: var(--display);
  font-size: 0.96rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.control-card p,
.inspector-card p {
  margin: 7px 0 0;
  color: var(--soft);
  line-height: 1.48;
  font-size: 0.92rem;
}

.button-row {
  display: grid;
  gap: 9px;
}

.chip-button {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(54, 215, 255, 0.26);
  color: var(--text);
  background: rgba(1, 13, 27, 0.72);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.chip-button:hover,
.chip-button.is-active {
  color: var(--cyan-2);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(22, 145, 255, 0.26), rgba(1, 18, 36, 0.76));
  box-shadow: 0 0 22px rgba(54, 215, 255, 0.18);
  transform: translateY(-1px);
}

.event-log {
  display: grid;
  gap: 9px;
  max-height: 260px;
  overflow: auto;
}

.event-item {
  padding: 12px;
  border: 1px solid rgba(54, 215, 255, 0.12);
  background: rgba(1, 10, 21, 0.7);
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.4;
}

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

.explorer-stage {
  position: relative;
  min-height: calc(100vh - 286px);
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 42%, rgba(54, 215, 255, 0.13), transparent 34rem),
    linear-gradient(180deg, rgba(1, 12, 25, 0.94), rgba(1, 7, 16, 0.96));
}

#mesh-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 286px);
}

.stage-hint {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(54, 215, 255, 0.2);
  color: var(--soft);
  background: rgba(1, 9, 19, 0.78);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  pointer-events: none;
}

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 1fr; gap: 12px; }
  .topnav { justify-content: flex-start; overflow-x: auto; width: 100%; }
  .hero-copy { width: min(660px, 75%); }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .model-section,
  .panel-grid,
  .build-section { grid-template-columns: 1fr; }
  .living-grid { grid-template-columns: repeat(2, 1fr); }
  .tower-diagram { padding-right: 210px; }
  .simulation-hero,
  .explorer-layout {
    grid-template-columns: 1fr;
  }
  .sim-readouts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .explorer-stage,
  #mesh-canvas {
    min-height: 680px;
  }
}

@media (max-width: 760px) {
  .site-shell { padding: 10px; }
  .topbar { padding: 14px; }
  .hero { min-height: 620px; }
  .hero-bg { width: 100%; opacity: 0.72; object-position: 64% top; }
  .hero-copy { width: 100%; padding: 44px 22px; }
  .hero h1 { font-size: clamp(2.45rem, 11.4vw, 3.35rem); }
  .hero::before { background: linear-gradient(90deg, rgba(1, 7, 16, 0.96), rgba(1, 7, 16, 0.54)); }
  .feature-strip,
  .living-grid { grid-template-columns: 1fr; }
  .feature-item { border-right: 0; border-bottom: 1px solid rgba(54, 215, 255, 0.16); }
  .model-section { padding: 26px 18px; }
  .tower-diagram { min-height: 640px; padding: 128px 12px 220px; }
  #tower-canvas { height: 360px; }
  .tower-label { left: 18px; }
  .tower-label-business { top: 24px; }
  .tower-label-foundation { top: 72px; }
  .tower-callouts { top: auto; right: 18px; bottom: 22px; left: 18px; grid-template-columns: 1fr; gap: 7px; }
  .tower-callouts li::before { width: 34px; }
  .info-panel,
  .build-section > div { padding: 22px; }
  .build-brand { align-items: flex-start; }
  .footer { flex-wrap: wrap; gap: 14px; }
  .footer span:not(:last-child)::after { margin-left: 14px; }
  .simulation-hero {
    padding: 28px 22px;
  }
  .simulation-hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }
  .sim-readouts {
    grid-template-columns: 1fr 1fr;
  }
  .explorer-stage,
  #mesh-canvas {
    min-height: 520px;
  }
  .explorer-stage {
    order: -1;
  }
}

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