:root {
  --soil: #0f0907;
  --soil-2: #1a100c;
  --chamber: #24140f;
  --wall: #3a2219;
  --red: #ff5a3c;
  --red-dim: #b8381f;
  --leaf: #7bd36b;
  --text: #f3e6dc;
  --muted: #b39c8e;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(255, 90, 60, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(184, 56, 31, 0.14), transparent 60%),
    var(--soil);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 220, 200, 0.05) 1px, transparent 1px);
  background-size: 7px 7px;
  z-index: 0;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

.trail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
  opacity: 0.85;
}
.trail-row {
  position: absolute;
  bottom: 3px;
  white-space: nowrap;
  animation: march 60s linear infinite;
}
.trail-row img {
  width: 16px;
  height: 16px;
  margin-right: 26px;
  transform: rotate(90deg);
  animation: bob 0.5s ease-in-out infinite alternate;
}
.trail-row img.leaf { filter: drop-shadow(0 0 4px rgba(123, 211, 107, 0.6)); }
@keyframes march { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -2px; } }

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(15, 9, 7, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--wall);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 20px; }
.brand:hover { text-decoration: none; }
nav { display: flex; gap: 22px; flex-wrap: wrap; }
nav a { color: var(--muted); font-size: 14px; }
nav a:hover { color: var(--text); text-decoration: none; }

main {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(36px, 7vw, 84px) 0 48px;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--leaf);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.lede { margin: 22px 0 26px; max-width: 30em; color: var(--muted); font-size: 18px; line-height: 1.55; }
.lede b { color: var(--text); }

.ca {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--wall);
  border-radius: 12px;
  background: var(--soil-2);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.ca.listening { border-color: rgba(123, 211, 107, 0.45); }
.ca.listening code { color: var(--leaf); }
.ca.hatched { border-color: var(--leaf); animation: hatch 1.1s ease; }
@keyframes hatch {
  0% { box-shadow: 0 0 0 0 rgba(123, 211, 107, 0.55); }
  100% { box-shadow: 0 0 0 18px rgba(123, 211, 107, 0); }
}
.ca-label { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.ca code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.ca-note { margin: 8px 2px 0; min-height: 1.2em; color: var(--leaf); font: 12px var(--mono); letter-spacing: 0.04em; }
button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  padding: 8px 14px;
  color: #1a0905;
  background: var(--red);
  font: 600 14px var(--sans);
}
button:hover { background: #ff7559; }

.shift-clock { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.ring { width: 104px; height: 104px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--wall); }
.ring-fg {
  stroke: var(--leaf);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 6px rgba(123, 211, 107, 0.5));
}
.clock-text { display: flex; flex-direction: column; }
.clock-label, .clock-sub { color: var(--muted); font-size: 13px; }
.clock-time { font: 600 38px var(--mono); line-height: 1.1; }

.stream {
  border: 1px solid var(--wall);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 6px rgba(255, 90, 60, 0.06), 0 30px 80px rgba(255, 60, 30, 0.18);
}
.stream-frame { position: relative; aspect-ratio: 16 / 9; }
.stream-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.stream-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 16px;
  background: var(--soil-2);
  color: var(--muted);
  font-size: 13px;
}
.stream-meta a { margin-left: auto; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font: 600 12px var(--mono); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 72px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--wall);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--chamber), var(--soil-2));
}
.stat-value { font: 600 30px var(--mono); overflow-wrap: anywhere; }
.stat-label { font-weight: 500; }
.stat-unit { color: var(--muted); font-size: 12px; font-family: var(--mono); }

h2 { margin: 0 0 22px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; }

.proof { margin-bottom: 72px; }
.proof-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.proof-head h2 { margin: 0; }
.proof-head .eyebrow { margin-bottom: 8px; }
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(123, 211, 107, 0.35);
  border-radius: 999px;
  color: var(--leaf);
  background: rgba(123, 211, 107, 0.08);
  font: 600 12px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.demo-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); animation: pulse 1.4s infinite; }

.proof-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 14px; }
.proof-side, .feed-wrap {
  position: relative;
  border: 1px solid var(--wall);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--chamber), var(--soil-2));
  overflow: hidden;
}
.proof-side { display: flex; flex-direction: column; gap: 22px; padding: 22px; }

.conveyor { display: flex; align-items: center; gap: 10px; }
.node {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.node img, .node .stack {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 10px;
  border: 1px solid var(--wall);
  border-radius: 14px;
  background: var(--soil);
  transition: box-shadow 0.3s, border-color 0.3s;
}
.node .stack { position: relative; padding: 0; }
.node .stack i {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--soil);
  background: conic-gradient(from 90deg, var(--leaf), #2f7d4a, var(--leaf));
}
.node .stack i:nth-child(1) { transform: translate(-9px, -6px); }
.node .stack i:nth-child(2) { transform: translate(9px, -6px); background: conic-gradient(var(--red), #ffb199, var(--red)); }
.node .stack i:nth-child(3) { transform: translate(0, 8px); background: conic-gradient(#ffd36b, #b8862f, #ffd36b); }
.node.flash img, .node.flash .stack { border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(123, 211, 107, 0.12), 0 0 24px rgba(123, 211, 107, 0.45); }
.lane {
  position: relative;
  flex: 1;
  height: 2px;
  margin-bottom: 18px;
  background: repeating-linear-gradient(90deg, var(--wall) 0 8px, transparent 8px 14px);
  animation: lane 0.9s linear infinite;
}
.lane-glow { position: absolute; inset: -6px 0; }
.lane .leaf-dot {
  position: absolute;
  top: -7px;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 0 60% 0 60%;
  background: linear-gradient(135deg, #a5f08f, var(--leaf) 60%, #2f7d4a);
  box-shadow: 0 0 14px rgba(123, 211, 107, 0.8);
  animation: carry 1.1s cubic-bezier(0.5, 0, 0.3, 1) forwards;
}
@keyframes lane { to { background-position: 14px 0; } }
@keyframes carry {
  0% { left: 0; opacity: 0; transform: scale(0.4) rotate(0deg); }
  15% { opacity: 1; transform: scale(1) rotate(40deg); }
  85% { opacity: 1; }
  100% { left: calc(100% - 16px); opacity: 0; transform: scale(0.6) rotate(200deg); }
}

.proof-total { display: flex; flex-direction: column; gap: 4px; }
.proof-label { color: var(--muted); font-size: 13px; }
.proof-value b {
  font: 600 clamp(34px, 4vw, 46px) var(--mono);
  background: linear-gradient(90deg, var(--text), var(--leaf));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.proof-value small { color: var(--muted); font: 12px var(--mono); }
.proof-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.proof-mini div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.proof-mini b { font: 600 18px var(--mono); }
.proof-mini span { color: var(--muted); font-size: 12px; }

.feed-head, .feed-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.7fr);
  align-items: center;
  gap: 10px;
  padding: 0 18px;
}
.feed-head { height: 42px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--wall); }
.feed { position: relative; height: 448px; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.feed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  pointer-events: none;
  background: linear-gradient(transparent, var(--soil-2));
}
.feed-row {
  position: relative;
  height: 56px;
  border-bottom: 1px solid rgba(58, 34, 25, 0.6);
  font: 13px var(--mono);
  overflow: hidden;
}
.feed-row.enter { animation: rowIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.feed-row.enter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(123, 211, 107, 0.22), rgba(123, 211, 107, 0.04) 70%, transparent);
  animation: glow 2.4s ease-out forwards;
  pointer-events: none;
}
@keyframes rowIn {
  from { height: 0; opacity: 0; transform: translateY(-14px) scale(0.98); }
  to { height: 56px; opacity: 1; transform: none; }
}
@keyframes glow { to { opacity: 0; } }

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background:
    radial-gradient(circle at 30% 30%, hsl(calc(var(--h) + 40) 90% 70%), transparent 60%),
    linear-gradient(135deg, hsl(var(--h) 75% 55%), hsl(calc(var(--h) + 120) 70% 35%));
}
.addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amt { color: var(--leaf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt b { font-weight: 600; }
.amt small { color: var(--muted); }
.when { color: var(--muted); }
.feed-row a, .feed-row .tag { font-size: 12px; }

.runner {
  position: absolute;
  top: 50%;
  left: -24px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  pointer-events: none;
  transform: rotate(90deg);
  filter: drop-shadow(0 0 6px rgba(255, 90, 60, 0.7));
  animation: run 1.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes run {
  0% { left: -24px; opacity: 1; }
  80% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.how { margin-bottom: 72px; }
.how ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.how li { padding: 24px; border: 1px solid var(--wall); border-radius: 14px; background: var(--soil-2); }
.step { color: var(--leaf); font: 600 13px var(--mono); }
.how h3 { margin: 10px 0 8px; font-size: 20px; }
.how p { margin: 0; color: var(--muted); line-height: 1.55; }
.how .fine { margin-top: 16px; font-size: 14px; }

.rations { margin-bottom: 72px; }
#wallet-form { display: flex; gap: 10px; max-width: 640px; }
#wallet-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--wall);
  border-radius: 10px;
  color: var(--text);
  background: var(--soil-2);
  font: 14px var(--mono);
}
#wallet-form input:focus { outline: 2px solid var(--red-dim); }
.wallet-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
  margin-top: 16px;
}
.wallet-result .stat-value { font-size: 22px; }
.wallet-result .note { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }

.log-table { border: 1px solid var(--wall); border-radius: 14px; overflow: hidden; }
.log-row {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.3fr 0.7fr 1.3fr 1fr;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--wall);
  font: 13px var(--mono);
}
.log-head { border-top: 0; background: var(--chamber); color: var(--muted); font-family: var(--sans); }
.log-row:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
.log-empty { padding: 22px 16px; color: var(--muted); }
.tag { color: var(--muted); }

footer {
  position: relative;
  z-index: 1;
  padding: 28px clamp(16px, 4vw, 48px) 54px;
  border-top: 1px solid var(--wall);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
footer p { margin: 6px auto; max-width: 760px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .stats, .wallet-result { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how ol, .proof-grid { grid-template-columns: 1fr; }
  nav a:not([id]) { display: none; }
}
@media (max-width: 560px) {
  .log-row { grid-template-columns: 0.6fr 1fr 1.2fr 0.6fr; }
  .log-row > :nth-child(5), .log-row > :nth-child(6) { display: none; }
  .feed-head, .feed-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 0.7fr); padding: 0 12px; }
  .feed-head > :nth-child(4), .feed-row > :nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .trail-row, .trail-row img, .live i, .demo-badge i, .lane, .feed-row.enter, .feed-row.enter::before, .ca.hatched { animation: none; }
  .runner, .leaf-dot { display: none; }
}
