:root {
  --bg: #050505;
  --fg: #f4f4f4;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.14);
  --acc: #ff2d3d;
  --acc-2: #19e0ff;
  --font-display: "Anton", Impact, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.55;
  overflow-x: hidden;
}

body.booting {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--acc);
  color: #fff;
}

/* ============ BOOT ============ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #000;
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.boot.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-inner {
  text-align: center;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.boot-tag,
.boot-status {
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: #9a9a9a;
  text-transform: uppercase;
}

.boot-tag {
  margin-bottom: 1rem;
  color: var(--acc);
  animation: blink 0.7s steps(2) infinite;
}

.boot-status {
  margin-top: 1rem;
  color: #666;
  letter-spacing: 0.16em;
}

.boot-title {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 11vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  animation: slam 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.boot-ver {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: #777;
}

.boot-bar {
  width: min(320px, 72vw);
  height: 2px;
  margin: 1.8rem auto 0;
  background: #1c1c1c;
  overflow: hidden;
}

.boot-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--acc);
  animation: loadbar 1.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.boot-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  animation: scan 1.1s linear infinite;
  pointer-events: none;
}

.boot-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.boot.flash .boot-flash {
  animation: flash 0.35s ease-out;
}

/* ============ FX LAYERS ============ */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 92;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 91;
  opacity: 0.35;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.28) 3px
  );
  mix-blend-mode: multiply;
}

.hud {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
}

.hud-c {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.hud-c.tl {
  top: 14px;
  left: 14px;
  border-right: none;
  border-bottom: none;
}
.hud-c.tr {
  top: 14px;
  right: 14px;
  border-left: none;
  border-bottom: none;
}
.hud-c.bl {
  bottom: 14px;
  left: 14px;
  border-right: none;
  border-top: none;
}
.hud-c.br {
  bottom: 14px;
  right: 14px;
  border-left: none;
  border-top: none;
}

.hud-label {
  position: absolute;
  bottom: 16px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}
.hud-lx {
  left: 50%;
  transform: translateX(-140%);
}
.hud-rx {
  left: 50%;
  transform: translateX(40%);
}

.cursor-glow {
  pointer-events: none;
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: radial-gradient(circle, rgba(255, 45, 61, 0.12), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}
body.ready .cursor-glow {
  opacity: 1;
}

.wipe {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  pointer-events: none;
  opacity: 0;
}
.wipe span {
  background: var(--acc);
  transform: scaleY(0);
  transform-origin: top;
}
.wipe.play {
  opacity: 1;
}
.wipe.play span {
  animation: wipeDown 0.55s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.wipe.play span:nth-child(2) {
  animation-delay: 0.05s;
}
.wipe.play span:nth-child(3) {
  animation-delay: 0.1s;
}
.wipe.play span:nth-child(4) {
  animation-delay: 0.15s;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--acc), var(--acc-2));
  box-shadow: 0 0 12px rgba(255, 45, 61, 0.6);
}

/* ============ HEADER ============ */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.94), transparent);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.mark-pulse {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 10px var(--acc);
  animation: pulse 1.6s ease-in-out infinite;
}

nav {
  margin-left: auto;
  display: flex;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
nav a {
  color: #b3b3b3;
  transition: color 0.2s ease;
  position: relative;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--acc);
  transition: width 0.25s ease;
}
nav a:hover {
  color: #fff;
}
nav a:hover::after {
  width: 100%;
}
.nav-home {
  color: #fff;
}

.term-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc);
  background: transparent;
  border: 1px solid rgba(255, 45, 61, 0.5);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.term-btn:hover {
  background: var(--acc);
  color: #fff;
}

/* ============ SHARED ============ */
.sec-label {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--acc);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.4rem;
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn.primary {
  background: var(--acc);
  color: #fff;
  box-shadow: 0 8px 30px rgba(255, 45, 61, 0.35);
}
.btn.primary:hover {
  box-shadow: 0 12px 40px rgba(255, 45, 61, 0.5);
}
.btn.ghost {
  border-color: var(--line);
  background: transparent;
  color: #fff;
}
.btn.ghost:hover {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}
.cta-row.big {
  margin-top: 2rem;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding: calc(5.5rem + env(safe-area-inset-top)) var(--pad) 4.5rem;
  overflow: hidden;
}

.hero-plane {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-schematic {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.85;
}

.traces .trace {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
}
body.ready .traces .t1 {
  animation: draw 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}
body.ready .traces .t2 {
  animation: draw 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s forwards;
}
body.ready .traces .t3 {
  animation: draw 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.7s forwards;
}
.nodes circle {
  opacity: 0;
}
body.ready .nodes circle {
  animation: nodeIn 0.5s ease forwards;
}
body.ready .nodes circle:nth-child(1) { animation-delay: 0.9s; }
body.ready .nodes circle:nth-child(2) { animation-delay: 1.0s; }
body.ready .nodes circle:nth-child(3) { animation-delay: 1.1s; }
body.ready .nodes circle:nth-child(4) { animation-delay: 1.2s; }
body.ready .nodes circle:nth-child(5) { animation-delay: 1.3s; }
body.ready .nodes circle:nth-child(6) { animation-delay: 1.4s; }

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.96) 0%, rgba(5, 5, 5, 0.7) 42%, rgba(5, 5, 5, 0.2) 100%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.92) 0%, transparent 40%),
    radial-gradient(700px 380px at 82% 26%, rgba(255, 45, 61, 0.08), transparent 60%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 46rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #cfcfcf;
}
.blip {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 12px var(--acc);
  animation: pulse 1.4s ease-in-out infinite;
}

.hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 8rem);
  line-height: 0.86;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.hero-name span {
  display: block;
}

/* glitch */
.glitch {
  position: relative;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 0);
  opacity: 0;
  pointer-events: none;
}
body.ready .glitch:hover::before,
body.glitching .glitch::before {
  opacity: 0.9;
  color: var(--acc);
  transform: translate(-3px, 1px);
  animation: glitchTop 0.4s steps(2) infinite;
}
body.ready .glitch:hover::after,
body.glitching .glitch::after {
  opacity: 0.9;
  color: var(--acc-2);
  transform: translate(3px, -1px);
  animation: glitchBot 0.4s steps(2) infinite;
}

.hero-tag {
  margin: 1.1rem 0 0;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  color: #fff;
  min-height: 1.6em;
  letter-spacing: 0.01em;
}
.hero-tag .tag-slot {
  color: var(--acc);
}
.caret {
  display: inline-block;
  width: 0.6ch;
  height: 1.05em;
  margin-left: 2px;
  background: var(--acc);
  vertical-align: -0.15em;
  animation: blink 1s steps(2) infinite;
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 34rem;
  font-size: clamp(1rem, 1.9vw, 1.18rem);
  color: rgba(244, 244, 244, 0.84);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.6rem;
  margin: 2rem 0 0;
  max-width: 32rem;
}
@media (min-width: 720px) {
  .hero-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.hero-stats div {
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}
.hero-stats dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-stats dd {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* MARQUEE */
.marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  padding: 0.55rem 0;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: marquee 22s linear infinite;
}
.marquee-track .dot {
  color: var(--acc);
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* ============ MANIFESTO / QUOTES ============ */
.manifesto {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 10vh, 8rem) var(--pad);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.manifesto::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 40%, rgba(255, 45, 61, 0.08), transparent 70%);
  pointer-events: none;
}
.manifesto-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 2;
}
.manifesto-count {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.manifesto-count span {
  color: var(--fg);
}

.quote-stage {
  position: relative;
  z-index: 2;
  margin: clamp(1.25rem, 4vh, 2.5rem) 0;
  max-width: 16ch;
}
.quote-mark {
  position: absolute;
  top: -0.5em;
  left: -0.1em;
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 13rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: -1;
}
.quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5.4vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  max-width: 16ch;
}
.quote.swap {
  animation: quoteSwap 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.quote-by {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--acc);
}

.quote-ticks {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}
.quote-ticks span {
  width: 34px;
  height: 3px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: background 0.3s ease;
}
.quote-ticks span.on {
  background: var(--acc);
}

/* ============ BUILDS ============ */
.builds {
  padding: clamp(4rem, 9vw, 7rem) var(--pad) 2rem;
  border-top: 1px solid var(--line);
  max-width: var(--max);
  margin: 0 auto;
}
.builds-head {
  margin-bottom: clamp(2rem, 6vw, 4rem);
}
.builds-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.builds-sub {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.build {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.build.in {
  opacity: 1;
  transform: none;
}
@media (min-width: 900px) {
  .build {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
  }
  .build:nth-child(even) .build-visual {
    order: 2;
  }
}

.build-ghost {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: 0;
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 16rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.035);
  z-index: 0;
  pointer-events: none;
  letter-spacing: -0.02em;
}
.build.in .build-ghost {
  animation: ghostIn 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.build-copy {
  position: relative;
  z-index: 2;
  max-width: 34rem;
}
.build-tag {
  margin: 0 0 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acc);
}
.build-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.build-copy p {
  margin: 1rem 0 0;
  color: rgba(244, 244, 244, 0.8);
  font-size: 1.02rem;
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.3rem 0 0;
  padding: 0;
}
.chips li {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfcfcf;
  border: 1px solid var(--line);
  padding: 0.3rem 0.6rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.build:hover .chips li {
  border-color: rgba(255, 45, 61, 0.4);
}
.build-copy .btn {
  margin-top: 1.5rem;
}

/* build visuals (CSS art) */
.build-visual {
  position: relative;
  z-index: 1;
  min-height: min(46vh, 400px);
  display: grid;
  place-items: center;
}
.viz {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1.2;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(255, 255, 255, 0.05), transparent 55%),
    #090909;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}
.build:hover .viz {
  border-color: rgba(255, 45, 61, 0.35);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 45, 61, 0.15);
}
.viz::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
}
.build.in .viz::after {
  animation: vizScan 4.5s ease-in-out infinite;
}

/* site window */
.viz-site .win-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 13%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #141414;
  border-bottom: 1px solid var(--line);
}
.viz-site .win-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #333;
}
.viz-site .win-bar i:first-child {
  background: var(--acc);
}
.viz-site .win-row {
  position: absolute;
  left: 10%;
  height: 7%;
  background: rgba(255, 255, 255, 0.1);
}
.viz-site .r1 { top: 30%; width: 60%; }
.viz-site .r2 { top: 46%; width: 40%; }
.viz-site .r3 { top: 62%; width: 52%; }
.viz-site .win-cursor {
  position: absolute;
  top: 30%;
  left: 72%;
  width: 2px;
  height: 8%;
  background: var(--acc);
}
.build.in .viz-site .win-cursor {
  animation: blink 1s steps(2) infinite;
}
.build.in .viz-site .win-row {
  animation: typeRow 3.2s ease-in-out infinite;
}
.build.in .viz-site .r2 { animation-delay: 0.3s; }
.build.in .viz-site .r3 { animation-delay: 0.6s; }

/* pcb board */
.viz-board {
  background:
    repeating-linear-gradient(90deg, transparent, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 21px),
    repeating-linear-gradient(0deg, transparent, transparent 20px, rgba(255,255,255,0.03) 20px, rgba(255,255,255,0.03) 21px),
    #071008;
}
.viz-board .chip {
  position: absolute;
  border: 1px solid rgba(120, 255, 180, 0.5);
  background: rgba(120, 255, 180, 0.08);
}
.viz-board .c1 { top: 18%; left: 14%; width: 20%; height: 14%; }
.viz-board .c2 { top: 20%; right: 16%; width: 22%; height: 10%; }
.viz-board .c3 { bottom: 22%; left: 20%; width: 14%; height: 18%; }
.viz-board .c4 { bottom: 20%; right: 22%; width: 16%; height: 12%; }
.viz-board .mcu {
  position: absolute;
  top: 42%;
  left: 38%;
  width: 24%;
  height: 20%;
  border: 2px solid #8effc0;
  background: rgba(120, 255, 180, 0.14);
  box-shadow: 0 0 24px rgba(120, 255, 180, 0.3);
}
.build.in .viz-board .mcu {
  animation: pulse 2s ease-in-out infinite;
}
.viz-board .pcb-trace {
  position: absolute;
  background: rgba(120, 255, 180, 0.35);
}
.viz-board .pt1 { top: 49%; left: 20%; width: 18%; height: 2px; }
.viz-board .pt2 { top: 30%; right: 27%; width: 2px; height: 20%; }

/* minecraft blocks */
.viz-blocks {
  display: grid;
  place-items: center;
}
.viz-blocks .blk {
  position: absolute;
  width: 22%;
  aspect-ratio: 1;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset -8px -8px 0 rgba(0, 0, 0, 0.4), inset 6px 6px 0 rgba(255, 255, 255, 0.07);
}
.viz-blocks .b1 { transform: translate(-28%, 20%); }
.viz-blocks .b2 { transform: translate(0, 20%); }
.viz-blocks .b3 { transform: translate(28%, 20%); }
.viz-blocks .b4 { transform: translate(-14%, -8%); }
.viz-blocks .b5 { transform: translate(14%, -8%); border-color: rgba(255,45,61,0.5); }
.build.in .viz-blocks .blk {
  animation: blockBob 3.2s ease-in-out infinite;
}
.build.in .viz-blocks .b2 { animation-delay: 0.15s; }
.build.in .viz-blocks .b3 { animation-delay: 0.3s; }
.build.in .viz-blocks .b4 { animation-delay: 0.2s; }
.build.in .viz-blocks .b5 { animation-delay: 0.35s; }

/* discord signals */
.viz-signals {
  display: grid;
  place-items: center;
}
.viz-signals .ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  aspect-ratio: 1;
}
.viz-signals .s1 { width: 30%; }
.viz-signals .s2 { width: 55%; }
.viz-signals .s3 { width: 80%; }
.viz-signals .core {
  position: absolute;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 24px var(--acc);
}
.build.in .viz-signals .ring {
  animation: ringOut 2.8s ease-out infinite;
}
.build.in .viz-signals .s2 { animation-delay: 0.4s; }
.build.in .viz-signals .s3 { animation-delay: 0.8s; }

/* arcade */
.viz-arcade {
  display: grid;
  place-items: center;
}
.viz-arcade .screen {
  position: relative;
  width: 68%;
  height: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(#101010, #050505);
  overflow: hidden;
}
.viz-arcade .paddle {
  position: absolute;
  left: 12%;
  top: 40%;
  width: 5%;
  height: 26%;
  background: #fff;
}
.build.in .viz-arcade .paddle {
  animation: paddle 1.6s ease-in-out infinite;
}
.viz-arcade .ball {
  position: absolute;
  right: 26%;
  top: 30%;
  width: 7%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 12px var(--acc);
}
.build.in .viz-arcade .ball {
  animation: ball 1.6s ease-in-out infinite;
}
.viz-arcade .coin {
  position: absolute;
  bottom: 14%;
  width: 30%;
  height: 7%;
  background: rgba(255, 255, 255, 0.18);
}

/* ============ CLOSER ============ */
.closer {
  position: relative;
  padding: clamp(5rem, 12vw, 9rem) var(--pad);
  border-top: 1px solid var(--line);
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
  overflow: hidden;
}
.closer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 50%, rgba(255, 45, 61, 0.1), transparent 70%);
  pointer-events: none;
}
.closer .sec-label {
  position: relative;
  z-index: 2;
}
.closer-title {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 10vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.closer-lede {
  position: relative;
  z-index: 2;
  margin: 1.3rem auto 0;
  max-width: 40ch;
  color: rgba(244, 244, 244, 0.82);
}
.closer .cta-row {
  position: relative;
  z-index: 2;
  justify-content: center;
}
.closer-hint {
  position: relative;
  z-index: 2;
  margin: 2.5rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: #6f6f6f;
}
.closer-hint code {
  color: #fff;
  background: rgba(255, 45, 61, 0.14);
  border: 1px solid rgba(255, 45, 61, 0.4);
  padding: 0.05rem 0.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

/* ============ FOOTER ============ */
.foot {
  border-top: 1px solid var(--line);
}
.foot-ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}
.foot-track {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.14);
  animation: marquee 28s linear infinite reverse;
}
.foot-track em {
  color: var(--acc);
  font-style: normal;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.4rem var(--pad) 2rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #777;
  letter-spacing: 0.06em;
}
.foot-row a:hover {
  color: #fff;
}

/* ============ TOAST + AURA + MATRIX + HELP ============ */
.aura-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(160%);
  z-index: 210;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(180, 120, 255, 0.5);
  background: rgba(20, 10, 30, 0.92);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 30px rgba(180, 120, 255, 0.4);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: min(90vw, 32rem);
  text-align: center;
}
.aura-toast.show {
  transform: translateX(-50%) translateY(0);
}

body.aura-mode {
  --acc: #c084fc;
  --acc-2: #ec4899;
  --line: rgba(180, 120, 255, 0.32);
}
body.aura-mode .cursor-glow {
  background: radial-gradient(circle, rgba(180, 120, 255, 0.3), rgba(236, 72, 153, 0.1) 42%, transparent 70%);
}
body.aura-mode .hero-name,
body.aura-mode .quote,
body.aura-mode .builds-title,
body.aura-mode .closer-title,
body.aura-mode .build-copy h3 {
  background: linear-gradient(120deg, #a855f7, #ec4899, #06b6d4, #a855f7);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: auraText 6s linear infinite;
}
body.aura-mode .traces .trace { stroke: #c084fc; }
body.aura-mode .nodes circle { fill: #f0abfc; }

body.matrix-mode .grid-lines {
  stroke: rgba(120, 255, 180, 0.4) !important;
}
body.matrix-mode .hero-schematic {
  filter: drop-shadow(0 0 8px rgba(120, 255, 180, 0.4));
}
body.matrix-mode .scanlines {
  opacity: 0.5;
}

body.chaos-mode {
  animation: chaosHue 6s linear infinite;
}
body.chaos-mode .hero-schematic,
body.chaos-mode .viz {
  animation: chaosShake 0.3s steps(2) infinite;
}

/* help overlay */
.cmd-help {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: var(--pad);
  background: rgba(3, 3, 3, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cmd-help.show {
  opacity: 1;
  visibility: visible;
}
.cmd-help-panel {
  width: min(32rem, 100%);
  border: 1px solid var(--line);
  background: #0a0a0a;
  padding: clamp(1.3rem, 4vw, 2rem);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.cmd-help-title {
  margin: 0 0 1.2rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.cmd-help-title span {
  color: var(--acc);
}
.cmd-help ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.cmd-help li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.5rem;
}
.cmd-help code {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cmd-help li span {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}
.cmd-help-foot {
  margin: 1.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
}

/* ============ KEYFRAMES ============ */
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes slam {
  from { transform: scale(1.18); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@keyframes loadbar { to { width: 100%; } }
@keyframes scan {
  from { transform: translateY(-8%); }
  to { transform: translateY(8%); }
}
@keyframes flash {
  0% { opacity: 0; }
  30% { opacity: 0.85; }
  100% { opacity: 0; }
}
@keyframes wipeDown {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes nodeIn { to { opacity: 1; } }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes quoteSwap {
  0% { opacity: 0; transform: translateY(14px) skewX(-4deg); filter: blur(3px); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes ghostIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: none; }
}
@keyframes vizScan {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 0.7; }
  60% { opacity: 0.15; }
  100% { transform: translateY(320%); opacity: 0; }
}
@keyframes typeRow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@keyframes blockBob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}
@keyframes ringOut {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.1); opacity: 0; }
}
@keyframes paddle {
  0%, 100% { top: 22%; }
  50% { top: 52%; }
}
@keyframes ball {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-620%, 130%); }
}
@keyframes auraText { to { background-position: 300% 0; } }
@keyframes glitchTop {
  0% { clip-path: inset(0 0 70% 0); }
  100% { clip-path: inset(30% 0 40% 0); }
}
@keyframes glitchBot {
  0% { clip-path: inset(60% 0 0 0); }
  100% { clip-path: inset(40% 0 20% 0); }
}
@keyframes chaosHue {
  to { filter: hue-rotate(360deg); }
}
@keyframes chaosShake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -2px); }
  100% { transform: translate(1px, 2px); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  nav .nav-home { display: none; }
  .hud-label { display: none; }
}

@media (max-width: 520px) {
  nav a:not(.nav-home) { font-size: 0.62rem; }
  .term-btn { display: none; }
  .quote-stage { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .build,
  .traces .trace,
  .nodes circle {
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
  .marquee-track,
  .foot-track { animation: none !important; }
}
