:root {
  --bg: #09100f;
  --bg-soft: #0e1715;
  --bg-panel: rgba(12, 21, 19, 0.82);
  --bg-panel-strong: rgba(13, 19, 18, 0.94);
  --line: rgba(191, 255, 179, 0.14);
  --line-strong: rgba(191, 255, 179, 0.28);
  --text: #eef8ee;
  --muted: #9caea0;
  --paper: #f3e8d0;
  --green: #bfff8d;
  --green-soft: #78d38e;
  --amber: #ffbe63;
  --orange: #ff9658;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Mono", monospace;
  background:
    radial-gradient(circle at 10% 10%, rgba(126, 205, 111, 0.18), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(255, 150, 88, 0.14), transparent 22%),
    linear-gradient(180deg, #0c1211 0%, #07100f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 52%, transparent 100%);
  opacity: 0.4;
}

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

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.page-shell {
  position: relative;
  overflow: clip;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(0deg, transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03), transparent 20%, rgba(255, 255, 255, 0.03));
  background-size: 100% 3px, 8px 100%;
}

.page-glow {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.12;
}

.page-glow-left {
  top: -8rem;
  left: -8rem;
  background: #7ed46d;
}

.page-glow-right {
  top: 18rem;
  right: -12rem;
  background: #ff8d58;
}

.site-header,
.section,
.site-footer,
.hero {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

[id] {
  scroll-margin-top: 3.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: none;
  padding: 1rem max(1rem, calc((100% - var(--max-width)) / 2 + 1rem));
  background: transparent;
  backdrop-filter: none;
  transition: background 300ms ease, backdrop-filter 300ms ease;
}

.site-header.is-scrolled {
  background: rgba(9, 16, 15, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, rgba(191, 255, 141, 0.18), rgba(191, 255, 141, 0.04));
  color: var(--green);
  text-transform: lowercase;
}

.brand-copy {
  display: grid;
  gap: 0.18rem;
}

.brand-name {
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.86rem;
  color: rgba(243, 232, 208, 0.82);
}

.top-nav a:hover,
.footer-links a:hover {
  color: var(--green);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 1.35rem;
}

.hero {
  padding: 2.6rem 0 1rem;
  align-items: start;
}

.hero-copy {
  padding: 0.2rem 0.2rem 0;
}

.eyebrow,
.signal-label,
.fact-label,
.panel-code,
.artifact-type,
.artifact-state,
.note-kind,
.manifesto-code,
.legend-code {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.73rem;
}

.hero h1,
.section h2,
.manifesto h2 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 8ch;
  font-size: clamp(3.1rem, 5.9vw, 5.9rem);
  line-height: 0.92;
}

.hero h1 span {
  color: var(--paper);
}

.hero-lede,
.focus-panel p,
.artifact p,
.manifesto-card p,
.note-feature p,
.note-tile p,
.footer-copy,
.signal-item p,
.fact-card p,
.legend-card p {
  color: var(--muted);
  line-height: 1.78;
  font-size: 0.97rem;
}

.hero-lede {
  max-width: 34rem;
  margin: 1rem 0 0;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.82rem 1.28rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.84rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, rgba(191, 255, 141, 0.18), rgba(191, 255, 141, 0.05));
  color: var(--paper);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
}

.fact-card,
.focus-panel,
.artifact,
.manifesto-card,
.note-feature,
.note-tile,
.legend-card,
.atlas-frame,
.signal-band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--shadow);
}

.fact-card,
.focus-panel,
.artifact,
.manifesto-card,
.note-feature,
.note-tile,
.legend-card {
  border-radius: var(--radius-md);
}

.fact-card::before,
.focus-panel::before,
.artifact::before,
.manifesto-card::before,
.note-feature::before,
.note-tile::before,
.legend-card::before,
.atlas-frame::before,
.signal-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(191, 255, 141, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(255, 150, 88, 0.08), transparent 25%);
}

.fact-card {
  padding: 1rem 1rem 1.1rem;
}

.fact-card p {
  margin: 0.45rem 0 0;
}

.hero-atlas {
  position: relative;
  padding-top: 0.15rem;
}

.atlas-frame {
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(8, 16, 14, 0.92), rgba(13, 18, 17, 0.95)),
    var(--bg-panel-strong);
}

.atlas-topbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.atlas-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
}

.dot-red {
  background: #ff6c67;
}

.dot-amber {
  background: #ffc048;
}

.dot-green {
  background: #6edc88;
}

.atlas-path {
  margin-left: 0.45rem;
  color: var(--muted);
  font-size: 0.73rem;
}

.atlas-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 0;
}

.atlas-graphic {
  width: 100%;
  height: 100%;
  min-height: 31rem;
}

.atlas-grid path {
  fill: none;
  stroke: rgba(191, 255, 141, 0.08);
  stroke-width: 1;
}

.atlas-zones rect {
  fill: rgba(191, 255, 141, 0.04);
  stroke: rgba(191, 255, 141, 0.1);
}

.atlas-lines path {
  fill: none;
  stroke: url(#lineGlow);
  stroke-width: 3;
  stroke-linecap: round;
}

.atlas-pixels rect {
  fill: rgba(191, 255, 141, 0.42);
}

.atlas-nodes circle {
  fill: url(#nodeGlow);
}

.atlas-core circle:first-child {
  fill: rgba(191, 255, 141, 0.06);
  stroke: rgba(191, 255, 141, 0.16);
}

.atlas-core circle:last-child {
  fill: none;
  stroke: rgba(255, 190, 99, 0.18);
  stroke-dasharray: 8 10;
}

.atlas-labels text {
  fill: rgba(243, 232, 208, 0.84);
  font-family: "Space Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.atlas-legend {
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem 1.05rem 1.2rem 0.2rem;
  border-left: 1px solid var(--line);
}

.legend-card {
  padding: 1rem 0.95rem;
  min-height: 0;
}

.legend-card p {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
}

.support-band {
  margin-top: 1.35rem;
}

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

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.15rem;
  border-radius: 1.5rem;
  margin-top: 1.1rem;
}

.signal-item {
  padding: 0.3rem 0.35rem 0.2rem;
}

.signal-item p {
  margin: 0.55rem 0 0;
}

.section {
  padding-top: 4.25rem;
}

.section-head {
  margin-bottom: 1.55rem;
}

.section h2,
.manifesto h2 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 5.1vw, 4.2rem);
}

.focus-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.9fr;
  gap: 1rem;
}

.focus-panel {
  padding: 1.4rem;
  min-height: 15.5rem;
}

.focus-panel h3,
.artifact h3,
.note-feature h3 {
  margin: 0.65rem 0 0.8rem;
  color: var(--paper);
  font-size: 1.45rem;
}

.artifact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 1rem;
}

.artifact {
  padding: 1.4rem;
  min-height: 16.5rem;
}

.artifact-wide {
  min-height: 18.5rem;
}

.artifact p {
  position: relative;
  z-index: 1;
}

.artifact-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.artifact-state {
  color: var(--amber);
}

.artifact-console {
  margin-top: 1.3rem;
  padding: 1rem;
  border: 1px solid rgba(191, 255, 141, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  z-index: 1;
}

.artifact-console p {
  margin: 0 0 0.5rem;
  font-size: 0.84rem;
}

.artifact-console p:last-child {
  margin-bottom: 0;
}

.artifact-console span {
  color: var(--green);
}

.artifact-visual {
  position: relative;
  z-index: 1;
  margin: 1rem 0 1.2rem;
  border: 1px solid rgba(191, 255, 141, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.artifact-visual-garden {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: end;
  min-height: 9.5rem;
  padding: 1.2rem;
}

.garden-column {
  display: grid;
  gap: 0.45rem;
  align-content: end;
}

.garden-column span {
  display: block;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(191, 255, 141, 0.85), rgba(126, 205, 111, 0.18));
  box-shadow: 0 0 18px rgba(191, 255, 141, 0.12);
}

.garden-column span:nth-child(1) {
  width: 44%;
  height: 0.45rem;
}

.garden-column span:nth-child(2) {
  width: 70%;
  height: 0.5rem;
}

.garden-column span:nth-child(3) {
  width: 52%;
  height: 0.45rem;
}

.garden-column span:nth-child(4) {
  width: 88%;
  height: 0.6rem;
}

.garden-column span:nth-child(5) {
  width: 66%;
  height: 0.5rem;
}

.garden-column-mid span {
  background: linear-gradient(180deg, rgba(255, 190, 99, 0.78), rgba(255, 150, 88, 0.16));
}

.garden-column-right span {
  background: linear-gradient(180deg, rgba(238, 248, 238, 0.76), rgba(191, 255, 141, 0.12));
}

.artifact-visual-cli {
  padding: 1rem 1rem 1.1rem;
  font-size: 0.78rem;
  line-height: 1.6;
}

.artifact-visual-cli p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.artifact-visual-cli p:first-child {
  color: var(--paper);
}

.artifact-visual-cli span {
  color: var(--green);
}

.manifesto {
  display: grid;
  gap: 1rem;
}

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

.manifesto-card {
  padding: 1.2rem;
  min-height: 10.5rem;
}

.manifesto-card p {
  margin: 1rem 0 0;
}

.notes-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 1rem;
}

.notes-grid-compact {
  align-items: start;
}

.note-feature,
.note-tile {
  padding: 1.2rem;
}

.note-feature {
  min-height: 13rem;
}

.note-tile {
  min-height: 7.25rem;
}

.note-feature::after {
  content: "signal pending";
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: rgba(191, 255, 141, 0.5);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 2rem;
  margin-top: 1.4rem;
  padding: 4.9rem 0 2.7rem;
  align-items: start;
  border-top: 1px solid var(--line);
}

.footer-title {
  margin: 0 0 0.4rem;
  color: var(--paper);
  font-size: 1.08rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
  justify-self: end;
}

.footer-copy {
  max-width: 52rem;
  color: rgba(243, 232, 208, 0.72);
}

.footer-links a {
  white-space: nowrap;
}

.js .reveal-target {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@media (max-width: 1100px) {
  .hero {
    padding-top: 2.2rem;
  }

  .section-grid,
  .support-grid,
  .focus-layout,
  .artifact-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .atlas-panel {
    grid-template-columns: 1fr;
  }

  .atlas-graphic {
    min-height: 28rem;
  }

  .atlas-legend {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

}

@media (min-width: 1101px) and (max-width: 1450px) {
  .section-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 1.1rem;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero h1 {
    max-width: 8.9ch;
    font-size: clamp(2.6rem, 4.45vw, 4.65rem);
    line-height: 0.94;
  }

  .hero-lede {
    max-width: 31rem;
    font-size: 0.92rem;
    line-height: 1.68;
  }

  .hero-actions {
    margin-top: 1.15rem;
  }

  .fact-card {
    padding: 0.82rem 0.82rem 0.92rem;
  }

  .fact-card p {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .support-grid {
    gap: 0.9rem;
  }

  .atlas-graphic {
    min-height: 26rem;
  }

  .atlas-legend {
    padding-top: 0.9rem;
  }

  .legend-card {
    padding: 0.9rem 0.85rem;
  }

  .legend-card p {
    font-size: 0.8rem;
  }
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    display: grid;
  }

  .top-nav,
  .footer-links {
    text-align: left;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-self: start;
  }

  .hero {
    padding-top: 1.9rem;
  }

  .hero h1 {
    max-width: 7.2ch;
    font-size: clamp(2.7rem, 14.5vw, 4.35rem);
    line-height: 0.95;
  }

  .hero-lede {
    font-size: 0.92rem;
    line-height: 1.66;
  }

  .hero-actions {
    margin-top: 1.1rem;
    gap: 0.7rem;
  }

  .button {
    min-height: 2.8rem;
    padding: 0.72rem 1rem;
    font-size: 0.8rem;
  }

  .signal-band,
  .manifesto-grid,
  .atlas-legend {
    grid-template-columns: 1fr;
  }

  .support-band {
    margin-top: 1.15rem;
  }

  .fact-card,
  .focus-panel,
  .artifact,
  .manifesto-card,
  .note-feature,
  .note-tile,
  .legend-card {
    padding: 1rem;
  }

  .atlas-graphic {
    min-height: 20rem;
  }

  .top-nav {
    font-size: 0.82rem;
    gap: 0.75rem;
  }

  .section {
    padding-top: 3.6rem;
  }

  .site-footer {
    margin-top: 1rem;
    padding-top: 3.8rem;
  }
}

@media (max-width: 460px) {
  .site-header {
    gap: 0.7rem;
  }

  .brand {
    gap: 0.7rem;
  }

  .brand-sub {
    font-size: 0.62rem;
  }

  .top-nav {
    gap: 0.6rem 0.8rem;
    font-size: 0.78rem;
  }

  .eyebrow {
    font-size: 0.67rem;
    line-height: 1.5;
  }

  .hero h1 {
    max-width: 6.6ch;
    font-size: clamp(2.45rem, 13.2vw, 3.7rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal-target {
    opacity: 1;
    transform: none;
  }
}
