:root {
  --ink: #070512;
  --ink-soft: #120b25;
  --panel: rgba(17, 12, 35, 0.76);
  --panel-strong: rgba(24, 16, 48, 0.92);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f7f4ff;
  --muted: #bbb4ce;
  --lime: #c8ff35;
  --cyan: #57e0df;
  --violet: #9d6cff;
  --rose: #ff6b9d;
  --paper: #fff9ef;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body.is-menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--lime);
  color: #0b0a12;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 20px 5.5%;
  color: var(--text);
  transition: background 220ms ease, border-color 220ms ease, min-height 220ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  min-height: 72px;
  background: rgba(7, 5, 18, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 174px;
  height: 54px;
}

.brand img {
  width: 100%;
  height: auto;
}

.site-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 28px;
  color: rgba(247, 244, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-cta,
.button--primary {
  background: var(--lime);
  color: #10120a;
  box-shadow: 0 10px 36px rgba(200, 255, 53, 0.24);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
  backdrop-filter: blur(16px);
}

.button--inline {
  margin-top: 18px;
}

.button__mark {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 88svh;
  display: grid;
  align-items: center;
  padding: 136px 5.5% 42px;
  overflow: hidden;
  isolation: isolate;
}

.hero__background,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__background {
  z-index: -3;
  object-fit: cover;
  object-position: 50% 48%;
  filter: saturate(1.08) contrast(1.04);
}

.hero__shade {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(7, 5, 18, 0.36) 0%, rgba(7, 5, 18, 0.28) 44%, rgba(7, 5, 18, 0.78) 100%),
    linear-gradient(90deg, rgba(7, 5, 18, 0.82) 0%, rgba(7, 5, 18, 0.34) 44%, rgba(7, 5, 18, 0.74) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--lime);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: #fbf6ff;
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 7rem;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.hero__lead {
  max-width: 710px;
  margin: 24px auto 0;
  color: rgba(247, 244, 255, 0.78);
  font-size: 1.08rem;
}

.hero__actions,
.closing__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-proof {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(980px, 100%);
  margin: 54px auto 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}

.hero-proof div {
  min-height: 86px;
  padding: 18px;
  background: rgba(10, 7, 22, 0.44);
}

.hero-proof dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-proof dd {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
}

.hero-token {
  position: absolute;
  z-index: 1;
  width: 156px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: translate3d(var(--hero-x, 0), var(--hero-y, 0), 0) rotate(var(--rotate));
}

.hero-token span {
  color: rgba(247, 244, 255, 0.76);
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.08rem;
  text-transform: uppercase;
}

.hero-token--blocks {
  left: 5%;
  top: 25%;
  --rotate: -12deg;
  border-color: rgba(87, 224, 223, 0.32);
}

.hero-token--seo {
  right: 7%;
  top: 31%;
  --rotate: 10deg;
  border-color: rgba(200, 255, 53, 0.3);
}

.hero-token--api {
  left: 13%;
  bottom: 14%;
  --rotate: 14deg;
  border-color: rgba(157, 108, 255, 0.34);
}

.hero-token--update {
  right: 12%;
  bottom: 14%;
  --rotate: -11deg;
  border-color: rgba(255, 107, 157, 0.34);
}

.section {
  position: relative;
  padding: 96px 5.5%;
}

.section--intro {
  background:
    linear-gradient(180deg, #10091f 0%, #17102b 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section--layers {
  background: var(--paper);
  color: #151119;
}

.section--product {
  background: #080713;
}

.section--ops {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
  gap: 54px;
  align-items: center;
  background:
    linear-gradient(140deg, #0b0717 0%, #24143a 52%, #0b0717 100%);
}

.section--api {
  background: #f7f6f1;
  color: #141018;
}

.section__head {
  width: min(880px, 100%);
  margin: 0 auto 42px;
  text-align: center;
}

.section__head--compact {
  margin-bottom: 36px;
}

.section__head h2,
.ops-copy h2,
.closing h2 {
  margin: 0;
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 3rem;
  line-height: 1.02;
  letter-spacing: 0;
  text-transform: uppercase;
  text-wrap: balance;
}

.section__head p:not(.eyebrow),
.ops-copy p,
.closing p {
  max-width: 700px;
  margin: 18px auto 0;
  color: rgba(247, 244, 255, 0.68);
  font-size: 1.02rem;
}

.section--layers .section__head p,
.section--api .section__head p {
  color: rgba(20, 16, 24, 0.68);
}

.feature-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.ops-card,
.api-points article {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
}

.feature-card {
  min-height: 260px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.feature-card__accent {
  display: block;
  width: 42px;
  height: 6px;
  margin-bottom: 34px;
  border-radius: 99px;
  background: var(--lime);
}

.feature-card:nth-child(2) .feature-card__accent {
  background: var(--cyan);
}

.feature-card:nth-child(3) .feature-card__accent {
  background: var(--violet);
}

.feature-card:nth-child(4) .feature-card__accent {
  background: var(--rose);
}

.feature-card h3,
.layer-item h3,
.ops-card h3,
.api-points h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.15;
}

.feature-card p,
.layer-item p,
.ops-card p,
.api-points p {
  margin: 14px 0 0;
  color: rgba(247, 244, 255, 0.66);
  font-size: 0.94rem;
}

.layer-rail {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(20, 16, 24, 0.14);
  border-radius: 8px;
  overflow: hidden;
}

.layer-item {
  min-height: 244px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.6);
  border-right: 1px solid rgba(20, 16, 24, 0.1);
}

.layer-item:last-child {
  border-right: 0;
}

.layer-item span {
  display: inline-flex;
  margin-bottom: 50px;
  color: #7d2fff;
  font-weight: 900;
}

.layer-item p,
.section--api .api-points p {
  color: rgba(20, 16, 24, 0.66);
}

.workspace {
  width: min(1120px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.workspace__topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.workspace__topbar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--rose);
}

.workspace__topbar span:nth-child(2) {
  background: var(--lime);
}

.workspace__topbar span:nth-child(3) {
  background: var(--cyan);
}

.workspace__topbar strong {
  margin-left: 12px;
  color: rgba(247, 244, 255, 0.72);
  font-size: 0.8rem;
}

.workspace__body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 220px;
  min-height: 470px;
}

.workspace__sidebar,
.workspace__panel {
  padding: 22px;
  background: rgba(9, 6, 18, 0.58);
}

.workspace__sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace__sidebar span {
  display: block;
  min-height: 42px;
  padding: 11px 12px;
  border-radius: 8px;
  color: rgba(247, 244, 255, 0.64);
  font-size: 0.88rem;
  font-weight: 800;
}

.workspace__sidebar .is-active {
  background: rgba(200, 255, 53, 0.16);
  color: var(--lime);
}

.workspace__canvas {
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(157, 108, 255, 0.16), transparent 42%),
    linear-gradient(315deg, rgba(87, 224, 223, 0.12), transparent 46%),
    rgba(255, 255, 255, 0.04);
}

.canvas-hero {
  min-height: 210px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.canvas-hero p {
  margin: 0 0 18px;
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 900;
}

.canvas-hero strong {
  display: block;
  max-width: 420px;
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 2.3rem;
  line-height: 1.02;
  text-transform: uppercase;
}

.canvas-hero span {
  display: block;
  width: min(300px, 100%);
  height: 10px;
  margin-top: 28px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.canvas-grid div {
  min-height: 136px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.workspace__panel {
  display: grid;
  align-content: start;
  gap: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace__panel label {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.workspace__panel span {
  color: rgba(247, 244, 255, 0.58);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.workspace__panel strong {
  color: var(--text);
  font-size: 0.94rem;
}

.ops-copy {
  max-width: 620px;
}

.ops-copy p {
  margin-left: 0;
}

.ops-stack {
  display: grid;
  gap: 14px;
}

.ops-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.2);
}

.ops-card:nth-child(2) {
  transform: translateX(32px);
  border-color: rgba(87, 224, 223, 0.24);
}

.ops-card:nth-child(3) {
  transform: translateX(64px);
  border-color: rgba(200, 255, 53, 0.24);
}

.api-layout {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  gap: 22px;
  align-items: stretch;
}

.code-panel {
  min-width: 0;
  border: 1px solid rgba(20, 16, 24, 0.14);
  border-radius: 8px;
  background: #111018;
  color: #f3f1ff;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(20, 16, 24, 0.18);
}

.code-panel pre {
  margin: 0;
  padding: 28px;
  overflow-x: auto;
}

.code-panel code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
}

.api-points {
  display: grid;
  gap: 14px;
}

.api-points article {
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(20, 16, 24, 0.12);
}

.closing {
  padding: 104px 5.5%;
  background:
    linear-gradient(180deg, rgba(7, 5, 18, 0.84), rgba(7, 5, 18, 0.96)),
    url("../img/velafold-hero.jpg") center 62% / cover;
  text-align: center;
}

.closing__inner {
  width: min(840px, 100%);
  margin: 0 auto;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 5.5%;
  color: rgba(247, 244, 255, 0.56);
  background: #05040c;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

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

@media (max-width: 1180px) {
  .feature-grid,
  .layer-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layer-item {
    border-right: 0;
    border-bottom: 1px solid rgba(20, 16, 24, 0.1);
  }

  .layer-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .workspace__body {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .workspace__panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .section--ops,
  .api-layout {
    grid-template-columns: 1fr;
  }

  .ops-card:nth-child(2),
  .ops-card:nth-child(3) {
    transform: none;
  }
}

@media (max-width: 880px) {
  .site-header {
    grid-template-columns: auto auto;
    min-height: 74px;
    padding: 14px 20px;
  }

  .brand {
    width: 148px;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .header-cta {
    display: none;
  }

  .site-nav {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 12px 20px 24px;
    background: rgba(7, 5, 18, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateY(-130%);
    transition: transform 220ms ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
  }

  .site-nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
  }

  .hero {
    min-height: 86svh;
    padding: 118px 20px 34px;
  }

  .hero h1 {
    font-size: 4.2rem;
  }

  .hero__lead {
    font-size: 1rem;
  }

  .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 38px;
  }

  .hero-token {
    width: 118px;
    height: 74px;
  }

  .hero-token span {
    font-size: 0.82rem;
  }

  .hero-token--blocks,
  .hero-token--seo {
    top: auto;
    bottom: 3%;
  }

  .hero-token--api,
  .hero-token--update {
    display: none;
  }

  .section {
    padding: 72px 20px;
  }

  .section__head h2,
  .ops-copy h2,
  .closing h2 {
    font-size: 2.2rem;
  }

  .feature-grid,
  .layer-rail {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: auto;
  }

  .layer-item,
  .layer-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid rgba(20, 16, 24, 0.1);
  }

  .layer-item:last-child {
    border-bottom: 0;
  }

  .layer-item span {
    margin-bottom: 28px;
  }

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

  .workspace__sidebar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    overflow-x: auto;
  }

  .workspace__sidebar span {
    text-align: center;
    white-space: nowrap;
  }

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

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

  .canvas-grid div {
    min-height: 86px;
  }

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

@media (max-width: 560px) {
  .hero h1 {
    font-size: 3.05rem;
  }

  .hero__actions,
  .closing__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero {
    padding-bottom: 22px;
  }

  .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 28px;
  }

  .hero-proof div {
    min-height: 72px;
    padding: 14px;
  }

  .hero-proof dt {
    font-size: 0.66rem;
  }

  .hero-proof dd {
    font-size: 0.86rem;
  }

  .hero-token {
    display: none;
  }

  .section__head h2,
  .ops-copy h2,
  .closing h2 {
    font-size: 1.82rem;
  }

  .canvas-hero strong {
    font-size: 1.72rem;
  }

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

  .code-panel pre {
    padding: 20px;
  }

  .code-panel code {
    font-size: 0.78rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
