:root {
  --bg: #05060a;
  --bg-2: #10131a;
  --ink: #f4f1ea;
  --muted: #9c978e;
  --line: rgba(244, 241, 234, 0.12);
  --cyan: #3ee0ff;
  --violet: #b07bff;
  --gold: #d4b06a;
  --split: #7dffa8;
  --steal: #ff7a90;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --display: "Syne", "Avenir Next", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(820px 420px at 100% 0%, rgba(176, 123, 255, 0.16), transparent 58%),
    radial-gradient(720px 420px at -10% 12%, rgba(62, 224, 255, 0.1), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 340;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
code { font-family: var(--mono); font-size: 0.92em; color: var(--cyan); }
.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.4rem 0.7rem;
}
.skip:focus { top: 0.6rem; z-index: 6; }

.nav {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 6vw;
  background: rgba(5, 6, 10, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand img, .foot img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  border: 1px solid rgba(212, 176, 106, 0.35);
  background: #000;
}
.nav-links {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--ink); }
.ticker {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--bg);
  background: linear-gradient(120deg, var(--cyan), var(--violet));
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3.5rem 6vw 1.5rem;
}
.front-contracts {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}
.front-contracts h2 { margin-bottom: 0.9rem; }
.eyebrow, .kicker {
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0 0 0.8rem;
}
.dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(62, 224, 255, 0.16);
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.04em; }
h1 { font-size: clamp(2.6rem, 5vw, 4.5rem); line-height: 0.96; margin: 0 0 1rem; }
h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.05; margin: 0; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 40rem; }
.lede.narrow { max-width: 42rem; margin-top: 0.8rem; }
.mantra {
  margin: 0.4rem 0 0;
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.03em;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.4rem 0; }
.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--bg); font-weight: 580; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(62, 224, 255, 0.5); }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
}
.hero-stats div { border-top: 1px solid var(--line); padding-top: 0.7rem; }
.hero-stats dt { color: var(--muted); font-size: 0.78rem; }
.hero-stats dd { margin: 0.2rem 0 0; font-family: var(--display); font-size: 1.15rem; }

.hero-mark {
  position: relative;
  margin: 0;
  justify-self: end;
  width: min(100%, 520px);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(212, 176, 106, 0.28);
  box-shadow: var(--shadow), 0 0 80px rgba(62, 224, 255, 0.06);
  background: #000;
}
.hero-mark img { width: 100%; height: auto; }
.ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px dashed rgba(212, 176, 106, 0.45);
  pointer-events: none;
  animation: spin 30s linear infinite;
}
.hero-mark figcaption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(5, 6, 10, 0.72);
  border: 1px solid rgba(212, 176, 106, 0.4);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero-mark figcaption span { color: var(--cyan); }

.section { padding: 4rem 6vw; }
.section-head { margin-bottom: 1.8rem; max-width: 46rem; }
.steps, .split, .link-grid, .grid-2, .loop { display: grid; gap: 1rem; }
.steps { grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; margin: 0 0 1.5rem; }
.steps li, .matrix, .calc, .link-card, .abi, .loop {
  background: rgba(16, 19, 26, 0.86);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.steps li, .matrix, .calc, .link-card { padding: 1.15rem 1.2rem 1.3rem; }
.steps span, .split b { font-family: var(--display); color: var(--cyan); }
.steps h3, .matrix h3, .calc h3, .link-card h3 { margin: 0.35rem 0 0.4rem; }
.steps p, .link-card p, .matrix p, .abi-notes { color: var(--muted); margin: 0; }

.matrix-wrap { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr 1fr; margin-top: 1rem; }
.grid-2 article { border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem; }
.tag { margin: 0; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.tag-split { color: var(--split); }
.tag-steal { color: var(--steal); }
.tag-forfeit { color: var(--violet); }
.tag-gold { color: var(--gold); }
.fine { color: var(--muted); font-size: 0.88rem; }
.fine.center { text-align: center; margin: 1.3rem 0 0; }
.ph {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212, 176, 106, 0.45);
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
}
.calc label { display: block; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.85rem; }
.calc input {
  width: 100%;
  background: #07080c;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
}
.calc input:focus { outline: 2px solid rgba(62, 224, 255, 0.45); outline-offset: 2px; }
.calc dl { margin: 1rem 0 0; }
.calc dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}
.calc dt { color: var(--muted); font-size: 0.82rem; }
.calc dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 0.82rem;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.abi { padding: 0; overflow: hidden; }
.abi-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.abi-bar span { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--line); }
.abi-bar span:first-child { background: var(--steal); }
.abi-bar span:nth-child(2) { background: var(--gold); }
.abi-bar span:nth-child(3) { background: var(--split); }
.abi-bar em { margin-left: auto; font-style: normal; letter-spacing: 0.08em; font-size: 0.8rem; }
.abi pre { margin: 0; padding: 1.1rem 1.2rem 1.3rem; overflow-x: auto; line-height: 1.7; }
.abi-notes {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.abi-notes li { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.abi-notes strong { color: var(--ink); display: block; margin-bottom: 0.25rem; }

.split { grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: 0; }
.split li {
  min-height: 11rem;
  padding: 1.2rem;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(62, 224, 255, 0.08), transparent 42%),
    var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.split li:hover { transform: translateY(-6px); border-color: rgba(62, 224, 255, 0.45); }
.split b { font-size: 2.2rem; letter-spacing: -0.05em; }
.split span { color: var(--muted); }
.loop { grid-template-columns: repeat(4, 1fr); margin-top: 1rem; padding: 0.4rem; }
.loop p { margin: 0; padding: 1rem 1.05rem; color: var(--muted); }
.loop strong { display: block; color: var(--gold); font-family: var(--display); letter-spacing: -0.03em; margin-bottom: 0.25rem; }

.addr-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(16, 19, 26, 0.86);
}
.addr-list li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}
.addr-list li:last-child { border-bottom: 0; }
.addr-list span { color: var(--gold); font-family: var(--display); letter-spacing: -0.03em; }
.addr-list a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--cyan);
  overflow-wrap: anywhere;
  text-decoration: none;
}
.addr-list a:hover { text-decoration: underline; }
.fine a { color: var(--cyan); }
.link-grid { grid-template-columns: repeat(3, 1fr); margin-top: 1rem; }
.link-card { text-decoration: none; display: block; transition: border-color 0.4s var(--ease), transform 0.45s var(--ease); }
.link-card:hover { border-color: rgba(62, 224, 255, 0.45); transform: translateY(-3px); }
.link-card .ph { margin: 0 0 0.6rem; }

.foot {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.4rem 6vw 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.foot p { margin: 0; }
.foot a { color: var(--ink); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@supports (animation-timeline: view()) {
  [data-reveal] {
    animation: rise 0.8s var(--ease) both;
    animation-timeline: view();
    animation-range: entry 0% entry 32%;
  }
}

@media (max-width: 900px) {
  .brand span { font-size: 0.92rem; }
  .brand img, .foot img { width: 42px; height: 42px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #0c0e14;
    border-bottom: 1px solid var(--line);
    padding: 0.4rem 6vw 0.8rem;
  }
  .nav-links a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
  .ticker { display: none; }
  .hero, .steps, .matrix-wrap, .abi-notes, .split, .link-grid, .hero-stats, .loop, .addr-list li {
    grid-template-columns: 1fr;
  }
  .front-contracts { grid-column: auto; }
  .hero { padding-top: 2.2rem; }
  .split li { min-height: 0; gap: 0.4rem; }
  .ring { inset: 12%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring, [data-reveal] { animation: none; }
  .btn, .split li, .link-card { transition: none; }
}
