:root {
  --bg: #0f0f11;
  --bg2: #16161a;
  --ink: #f4f2ee;
  --muted: #9b9aa0;
  --line: rgba(255,255,255,0.09);
  --yellow: #f5b301;
  --red: #e23a3a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* scroll progress */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--yellow), #2fa36b, #7b4fd8);
  z-index: 999;
  transition: width 0.08s linear;
}

.page { position: relative; }

/* ambient glows */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
}
.glow-1 { width: 520px; height: 520px; background: #7b4fd8; top: -140px; right: -120px; }
.glow-2 { width: 480px; height: 480px; background: var(--red); bottom: 8%; left: -160px; opacity: 0.18; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* grain overlay */
.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: radial-gradient(rgba(255,255,255,0.9) 1px, transparent 1px);
  background-size: 3px 3px;
}

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal-in { opacity: 1; transform: none; }

/* kicker */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.diamond {
  width: 10px; height: 10px;
  background: var(--red);
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(226,58,58,0.7);
}

/* hero */
.hero { padding: 120px 0 80px; }
.headline {
  font-family: 'Bricolage Grotesque', serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 15ch;
}
.headline mark {
  background: transparent;
  color: var(--ink);
  position: relative;
  padding: 0 2px;
  white-space: nowrap;
}
.headline mark::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px;
  bottom: 0.06em;
  height: 0.42em;
  background: var(--yellow);
  z-index: -1;
  transform: skewX(-8deg);
  opacity: 0.92;
}
.sub {
  margin-top: 30px;
  max-width: 58ch;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  line-height: 1.55;
  font-weight: 300;
}

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255,255,255,0.02);
  letter-spacing: 0.02em;
  transition: all .25s;
}
.chip:hover {
  border-color: rgba(245,179,1,0.6);
  box-shadow: 0 0 18px rgba(245,179,1,0.15);
  transform: translateY(-2px);
}

/* split */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  padding: 60px 0;
  align-items: start;
}
.sticky-col { position: sticky; top: 40px; }
.sticky-note {
  margin-top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
}

/* terminal */
.terminal {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b0d;
  box-shadow: 0 30px 70px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(#1a1a1f, #141418);
  border-bottom: 1px solid var(--line);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.term-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.term-copy {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
}
.term-copy:hover { color: var(--yellow); border-color: rgba(245,179,1,0.5); }
.term-body {
  padding: 20px 20px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  line-height: 1.85;
}
.tline { white-space: pre-wrap; word-break: break-word; }
.tline.cmt { color: #6b7280; }
.tline.cmd { color: #e6e6e6; }
.tline.cmd::before { content: ""; }
.prompt { margin-top: 6px; color: #2fa36b; }
.psymbol { color: #2fa36b; }
.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--yellow);
  margin-left: 2px;
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* section titles */
.sec-title {
  font-family: 'Bricolage Grotesque', serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  line-height: 1.02;
}
.sec-lead { color: var(--muted); max-width: 60ch; font-size: 1.1rem; line-height: 1.55; margin-bottom: 8px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* protocol */
.protocol-col {}
.rule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 34px;
}
.rule-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 24px 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  transition: all .3s;
  position: relative;
}
.rule-card:hover {
  transform: translateY(-4px);
  border-color: var(--rc);
  box-shadow: 0 20px 44px rgba(0,0,0,0.4), 0 0 0 1px var(--rc);
}
.rule-title {
  font-family: 'Bricolage Grotesque', serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 16px 0 8px;
}
.rule-body { color: var(--muted); font-size: 0.98rem; line-height: 1.55; }

/* hexagon badge */
.hex-wrap { display: inline-block; }
.hex {
  width: 46px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.hex-n {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 20px;
  color: #0f0f11;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}

/* rhythm */
.rhythm { padding: 90px 0 40px; }
.rhythm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
}
.rhythm-tile {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 22px;
  background: rgba(255,255,255,0.02);
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.rhythm-tile:hover { transform: translateY(-5px); border-color: var(--rt); }
.rt-bar {
  width: 40px; height: 4px;
  background: var(--rt);
  border-radius: 2px;
  margin-bottom: 18px;
  box-shadow: 0 0 14px var(--rt);
}
.rt-day {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 8px;
}
.rt-title {
  font-family: 'Bricolage Grotesque', serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.rt-body { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* belt trail */
.belt-section { padding: 90px 0 60px; }
.belt-outer {
  position: relative;
  margin-top: 60px;
  padding: 20px 0 40px;
  overflow-x: auto;
  overflow-y: visible;
}
.belt-track {
  position: absolute;
  top: 44px;
  left: 4%;
  right: 4%;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
}
.belt-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, #e23a3a, #f0662d, #f5b301, #2fa36b, #2d6cdf, #7b4fd8);
  transition: width 2.4s cubic-bezier(.2,.7,.2,1);
}
.belt-fill-in { width: 100%; }
.belt-nodes {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 900px;
  position: relative;
}
.belt-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s, transform .5s;
  position: relative;
}
.bn-in { opacity: 1; transform: none; }
.belt-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  color: #0f0f11;
  background: #e23a3a;
  transition: transform .25s, box-shadow .25s;
  position: relative;
  z-index: 2;
}
.belt-black { color: var(--yellow) !important; box-shadow: 0 0 0 3px rgba(245,179,1,0.3); }
.belt-node:hover .belt-dot { transform: scale(1.25); box-shadow: 0 0 22px currentColor; }
.bn-active .belt-dot { transform: scale(1.3); }
.belt-label {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  max-width: 90px;
  line-height: 1.3;
}
.belt-tip {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  background: #16161a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  z-index: 20;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } }
.belt-tip-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.belt-tip-title {
  font-family: 'Bricolage Grotesque', serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.belt-tip-body { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

/* cta */
.cta { padding: 60px 0 100px; }
.cta-box {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 60px 40px;
  text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(226,58,58,0.12), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(123,79,216,0.14), transparent 60%),
    rgba(255,255,255,0.02);
}
.cta-title {
  font-family: 'Bricolage Grotesque', serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.cta-sub { color: var(--muted); font-size: 1.15rem; margin-bottom: 32px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--yellow);
  color: #0f0f11;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  padding: 15px 30px;
  border-radius: 10px;
  text-decoration: none;
  transition: all .25s;
  box-shadow: 0 8px 30px rgba(245,179,1,0.25);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(245,179,1,0.4); }
.btn-ghost {
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 14px;
  padding: 15px 30px;
  border-radius: 10px;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: all .25s;
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

/* footer */
.foot {
  border-top: 1px solid var(--line);
  padding: 40px 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}
.foot-quip { opacity: 0.6; }
.remix { color: var(--yellow); text-decoration: none; border-bottom: 1px solid rgba(245,179,1,0.4); }
.remix:hover { border-color: var(--yellow); }

/* responsive */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .sticky-col { position: static; }
  .rhythm-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 80px 0 50px; }
  .headline mark { white-space: normal; }
  .rhythm-grid { grid-template-columns: 1fr; }
  .foot { flex-direction: column; text-align: center; }
  .belt-tip { width: 180px; }
}