:root {
  --bg: #060708;
  --bg-2: #0b0d0f;
  --panel: #101418;
  --panel-2: #0c1013;
  --line: #20282f;
  --line-soft: rgba(255, 255, 255, 0.075);
  --text: #f4f7f8;
  --muted: #9aa7af;
  --dim: #6f7c84;
  --accent: #d7ff42;
  --accent-soft: rgba(215, 255, 66, 0.1);
  --canvas-primary: #d7ff42;
  --canvas-secondary: rgba(244, 247, 248, 0.62);
  --canvas-link-rgb: 215, 255, 66;
  --max: 1180px;
}

html[data-theme="light"] {
  --bg: #f7f8f5;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f4f0;
  --line: #d8ded4;
  --line-soft: rgba(18, 28, 22, 0.12);
  --text: #111814;
  --muted: #51605a;
  --dim: #7a8780;
  --accent: #4c6f00;
  --accent-soft: rgba(76, 111, 0, 0.1);
  --canvas-primary: #2f4f00;
  --canvas-secondary: rgba(17, 24, 20, 0.58);
  --canvas-link-rgb: 47, 79, 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 76% 8%, rgba(215, 255, 66, 0.08), transparent 26%),
    radial-gradient(circle at 12% 42%, rgba(50, 169, 255, 0.055), transparent 24%),
    linear-gradient(180deg, #060708 0%, #090b0d 54%, #060708 100%);
  line-height: 1.55;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 76% 8%, rgba(76, 111, 0, 0.08), transparent 26%),
    radial-gradient(circle at 12% 42%, rgba(50, 119, 180, 0.065), transparent 24%),
    linear-gradient(180deg, #f7f8f5 0%, #eef2ed 54%, #ffffff 100%);
}

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

.wrap {
  width: min(calc(100% - 44px), var(--max));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(22px, 5vw, 64px);
  color: var(--text);
  background: rgba(6, 7, 8, 0.78);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(16px);
}

html[data-theme="light"] .site-header {
  background: rgba(247, 248, 245, 0.9);
  box-shadow: 0 12px 34px rgba(18, 28, 22, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
  box-shadow: 0 0 26px rgba(215, 255, 66, 0.18);
}

.brand-mark::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav a,
.header-cta,
.button,
.machine-grid a,
.language-toggle button,
.theme-toggle button {
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.machine-grid a:hover {
  color: var(--accent);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-cta:hover,
.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: var(--bg);
  background: var(--accent);
}

.button.secondary {
  color: var(--text);
  border-color: #33404a;
  background: rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] .button.secondary {
  border-color: #b5c0b1;
  background: rgba(255, 255, 255, 0.74);
}

.button.secondary:hover {
  border-color: var(--accent);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 12px;
}

.language-toggle,
.theme-toggle {
  display: inline-grid;
  min-height: 36px;
  border: 1px solid #33404a;
  background: rgba(255, 255, 255, 0.025);
}

.language-toggle {
  grid-template-columns: repeat(2, 34px);
}

.theme-toggle {
  grid-template-columns: repeat(2, 52px);
}

html[data-theme="light"] .language-toggle,
html[data-theme="light"] .theme-toggle {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.language-toggle button,
.theme-toggle button {
  appearance: none;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.language-toggle button.active,
.theme-toggle button.active {
  color: var(--bg);
  background: var(--accent);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 130px 0 74px;
}

.beacon-canvas,
.hero-grid {
  position: absolute;
  inset: 0;
}

html[data-theme="light"] .hero-grid {
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(17, 24, 20, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 20, 0.1) 1px, transparent 1px);
}

.beacon-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.hero-grid {
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 7, 8, 0.96) 0%, rgba(6, 7, 8, 0.74) 46%, rgba(6, 7, 8, 0.12) 100%),
    linear-gradient(180deg, transparent 0%, rgba(6, 7, 8, 0.86) 100%);
}

html[data-theme="light"] .hero::after {
  background:
    linear-gradient(90deg, rgba(247, 248, 245, 0.98) 0%, rgba(247, 248, 245, 0.8) 42%, rgba(247, 248, 245, 0.08) 100%),
    linear-gradient(180deg, transparent 0%, rgba(247, 248, 245, 0.72) 100%);
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(300px, 0.78fr);
  gap: clamp(42px, 8vw, 96px);
  align-items: center;
}

.eyebrow,
.section-index,
.micro-label {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 30px;
  max-width: 940px;
  font-size: clamp(2.95rem, 6.9vw, 6.4rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
}

h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 247, 248, 0.42);
}

h1 .title-solid {
  color: var(--text);
  -webkit-text-stroke: 0;
}

.lead {
  max-width: 720px;
  color: #c1cbd1;
  font-size: clamp(1.08rem, 1.7vw, 1.42rem);
}

html[data-theme="light"] .lead {
  color: #52635b;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.node-panel {
  border: 1px solid var(--line);
  background: rgba(13, 17, 20, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] .node-panel {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 28px 80px rgba(18, 28, 22, 0.13);
}

.node-panel::before {
  content: "";
  display: block;
  width: 42%;
  height: 2px;
  background: var(--accent);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.panel-head strong {
  display: block;
  font-size: 1.18rem;
}

.micro-label {
  display: block;
  margin-bottom: 4px;
  color: var(--dim);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c4ced4;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

html[data-theme="light"] .status {
  color: #5d6d65;
}

.status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}

.telemetry {
  margin: 0;
  padding: 6px 24px 24px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.telemetry div {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.telemetry div:last-child {
  border-bottom: 0;
}

.telemetry dt {
  color: var(--dim);
}

.telemetry dd {
  margin: 0;
  color: var(--text);
}

.section {
  padding: clamp(74px, 10vw, 130px) 0;
  border-top: 1px solid var(--line-soft);
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(320px, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  margin-bottom: 52px;
}

.split-heading h2 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 3.6vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.split-heading p:not(.section-index) {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.04rem;
}

.card-grid,
.machine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card-grid article,
.machine-grid article {
  min-height: 250px;
  padding: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.006));
}

html[data-theme="light"] .card-grid article,
html[data-theme="light"] .machine-grid article {
  background: #ffffff;
}

.card-grid span,
.level-stack span {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
}

.card-grid h3,
.machine-grid h3 {
  margin: 58px 0 12px;
  font-size: 1.32rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.card-grid p,
.machine-grid p {
  margin: 0;
  color: var(--muted);
}

.loop {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
}

.loop div {
  min-height: 154px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: var(--panel-2);
}

.loop div:last-child {
  border-right: 0;
}

.loop span {
  color: var(--dim);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loop strong {
  font-size: 1.12rem;
  text-transform: uppercase;
}

.level-stack {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.level-stack article {
  display: grid;
  grid-template-columns: 72px minmax(180px, 0.4fr) minmax(260px, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px 28px;
  background: var(--bg-2);
}

.level-stack strong {
  font-size: 1.08rem;
  text-transform: uppercase;
}

.level-stack p {
  margin: 0;
  color: var(--muted);
}

.machine-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 22px;
}

.machine-grid h3 {
  margin-top: 0;
}

.machine-grid a {
  display: inline-flex;
  margin-top: 24px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.forge-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.forge-flow div {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.forge-flow div:last-child {
  border-right: 0;
}

.forge-flow strong {
  font-size: 1.18rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.forge-flow span {
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.product-grid article {
  min-height: 286px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.006)),
    var(--panel-2);
}

html[data-theme="light"] .product-grid article,
html[data-theme="light"] .loop div,
html[data-theme="light"] .level-stack article {
  background: #ffffff;
}

.product-grid span {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.product-grid h3 {
  margin: 46px 0 14px;
  font-size: 1.22rem;
  line-height: 1.18;
}

.product-grid p {
  margin: 0;
  color: var(--muted);
}

.business-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 18px;
}

.business-grid article {
  min-height: 210px;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(12, 16, 19, 0.82);
}

html[data-theme="light"] .business-grid article {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 50px rgba(18, 28, 22, 0.06);
}

.business-grid h3 {
  margin-bottom: 54px;
  font-size: 1.16rem;
  text-transform: uppercase;
}

.business-grid p {
  margin: 0;
  color: var(--muted);
}

.code-block {
  overflow: auto;
  margin: 0;
  padding: 28px;
  color: #aeb8be;
  background: #07090a;
  border: 1px solid var(--line);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.7;
}

html[data-theme="light"] .code-block {
  color: #34423a;
  background: #ffffff;
}

.proposal {
  padding: 80px 0 108px;
}

.proposal-box {
  padding: clamp(44px, 8vw, 78px) clamp(24px, 6vw, 74px);
  text-align: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(215, 255, 66, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.006));
}

html[data-theme="light"] .proposal-box {
  background:
    radial-gradient(circle at 50% 0%, rgba(76, 111, 0, 0.1), transparent 34%),
    #ffffff;
  box-shadow: 0 24px 80px rgba(18, 28, 22, 0.08);
}

.proposal-box h2 {
  max-width: 860px;
  margin: 0 auto 18px;
  font-size: clamp(1.85rem, 3.4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.proposal-box p:not(.eyebrow) {
  max-width: 740px;
  margin: 0 auto 30px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--dim);
  font-size: 0.76rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .main-nav {
    display: none;
  }

  .header-actions {
    justify-self: end;
  }

  .hero-layout,
  .split-heading {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .machine-grid,
  .forge-flow,
  .product-grid,
  .business-grid {
    grid-template-columns: 1fr;
  }

  .forge-flow div {
    min-height: 154px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .forge-flow div:last-child {
    border-bottom: 0;
  }

  .loop {
    grid-template-columns: 1fr;
  }

  .loop div {
    min-height: 120px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .loop div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: 68px;
    padding: 0 18px;
  }

  .brand {
    font-size: 0.76rem;
  }

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

  .button {
    min-height: 40px;
    padding: 0 13px;
    font-size: 0.66rem;
  }

  .header-cta {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .language-toggle {
    grid-template-columns: repeat(2, 30px);
    min-height: 34px;
  }

  .theme-toggle {
    grid-template-columns: repeat(2, 36px);
    min-height: 34px;
  }

  .language-toggle button,
  .theme-toggle button {
    font-size: 0.64rem;
  }

  .hero {
    padding-top: 112px;
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .node-panel {
    margin-top: 12px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .telemetry div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .level-stack article {
    grid-template-columns: 52px 1fr;
  }

  .level-stack p {
    grid-column: 2;
  }
}
