/* Landing: the scene fills the first screen; every word keeps to the left edge. Sections below follow the dice order:
   list, index, list, (drag row), table, stack, band, stack. */

.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; background: var(--bg); }
.hero .poster, .hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .poster { object-fit: cover; transition: opacity 600ms var(--ease); }
.hero.live .poster { opacity: 0; }
#scene { z-index: 0; }
#labels { z-index: 1; pointer-events: none; }
/* scanline texture, faint, over the picture only */
.hero::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px); }
/* the corner stays readable over the water without a box */
.hero::before { content: ""; position: absolute; z-index: 2; left: 0; bottom: 0; width: min(760px, 70vw); height: 72%; pointer-events: none; background: radial-gradient(120% 92% at 0% 100%, rgba(8,9,10,0.94) 0%, rgba(8,9,10,0.78) 40%, rgba(8,9,10,0) 74%); }

.hero .shade-top { position: absolute; z-index: 2; left: 0; top: 0; width: 520px; height: 300px; pointer-events: none; background: radial-gradient(100% 100% at 0% 0%, rgba(8,9,10,0.82) 0%, rgba(8,9,10,0.5) 45%, rgba(8,9,10,0) 75%); }
.rail { position: absolute; z-index: 5; top: 24px; left: var(--gutter); display: grid; gap: 6px; justify-items: start; }
.rail .brand { margin-bottom: 6px; }
.vmenu { display: grid; justify-items: start; }
.vmenu a, .vmenu button {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; background: none; cursor: pointer; text-decoration: none;
  color: var(--muted); font-size: 15px; font-weight: 510; letter-spacing: -0.005em; transition: color 150ms var(--ease-ui), transform 150ms var(--ease-ui);
}
.vmenu a:hover, .vmenu button:hover { color: var(--fg); }
.vmenu a:active, .vmenu button:active { transform: scale(0.97); }
.vmenu .connect { margin-top: 6px; min-height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); color: var(--fg); background: rgba(8,9,10,0.5); }
.vmenu .connect:hover { background: rgba(40,41,45,0.8); }
.vmenu .connect.is-connected { font-family: var(--mono); font-size: 13px; }
.menu-toggle { display: none; }

.corner { position: absolute; z-index: 5; left: var(--gutter); bottom: 32px; width: min(520px, calc(100vw - 2 * var(--gutter))); display: grid; gap: 14px; }
.corner .status { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.corner h1 { margin: 0; color: var(--fg); font-size: 36px; line-height: 1.04; font-weight: 590; letter-spacing: -0.022em; max-width: 13em; }
.corner .lede { margin: 0; font-size: 16px; line-height: 1.55; color: var(--fg-2); max-width: 31em; min-height: 3.1em; transition: opacity 250ms var(--ease); }
.corner .ways { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 2px; }
.corner .ways .seg { margin-left: 6px; }
.counter { margin: 0; font-size: 13px; color: var(--muted); }
.counter .num { color: var(--fg-2); }

/* ---------- sections ---------- */
main.below { position: relative; z-index: 1; background: var(--bg); }
.sec { padding: 112px var(--gutter); border-top: 1px solid var(--line-soft); }
.wrap { max-width: 1240px; margin: 0 auto; }
.sec h2 { margin: 0 0 12px; color: var(--fg); font-size: 48px; line-height: 1.02; font-weight: 590; letter-spacing: -0.022em; max-width: 16em; }
.sec .sub { margin: 0 0 48px; color: var(--muted); font-size: 17px; max-width: 40em; }
html.js .rv { opacity: 0; transform: translateY(14px); }
html.js .rv.in { opacity: 1; transform: none; transition: opacity 800ms var(--ease-long), transform 800ms var(--ease-long); }

/* how it works: run-in column beside the rule instrument */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; align-items: start; }
.runin { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px; max-width: 38em; }
.runin li { margin: 0; color: var(--fg-2); font-size: 17px; line-height: 1.6; }
.runin b { color: var(--fg); font-weight: 590; margin-right: 6px; }
.runin .next { color: var(--muted); }
.rule { position: sticky; top: 32px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); padding: 20px; }
.rule h3 { margin: 0 0 4px; font-size: 20px; font-weight: 590; color: var(--fg); letter-spacing: -0.01em; }
.rule .src { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.rule svg { width: 100%; height: auto; }
.rule .sliders { display: grid; gap: 10px; margin-top: 8px; }
.rule label { display: grid; grid-template-columns: 74px 1fr 64px; align-items: center; gap: 12px; font-size: 14px; color: var(--fg-2); }
.rule label .num { text-align: right; color: var(--fg); font-size: 14px; }
.rule input[type="range"] { width: 100%; accent-color: var(--fg-2); height: 28px; }
.rule .row2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.rule .math { margin: 14px 0 0; font-family: var(--mono); font-size: 15px; color: var(--fg); min-height: 1.6em; }
.rule .math u { text-decoration-color: var(--fg); text-underline-offset: 4px; }
.rule .verdict { margin: 4px 0 0; font-size: 14px; color: var(--muted); min-height: 1.5em; }

/* features: one-size name columns */
.index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.index a { display: grid; align-content: start; gap: 8px; min-height: 176px; padding: 20px 20px 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color 150ms var(--ease-ui); }
.index a + a { padding-left: 20px; }
.index a:nth-child(4n + 1) { padding-left: 0; }
.index a:not(:nth-child(4n)) { border-right: 1px solid var(--line-soft); }
.index a:hover { background: rgba(255,255,255,0.02); }
.index a:active { background: rgba(255,255,255,0.04); }
.index .nm { color: var(--fg); font-size: 24px; font-weight: 510; letter-spacing: -0.012em; }
.index .ds { color: var(--muted); font-size: 15px; line-height: 1.5; }
.index .nx { color: var(--fg-2); font-size: 13px; font-weight: 590; letter-spacing: 0.06em; text-transform: uppercase; }

/* stats: quiet figure lines, each figure on the waterline */
.figs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.figs li { display: grid; grid-template-columns: 220px 1fr; align-items: baseline; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.figs .n { font-family: var(--mono); color: var(--fg); font-size: 32px; letter-spacing: -0.01em; position: relative; justify-self: start; }
.figs .n::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: -6px; height: 1px; background: var(--water); }
.figs .t { color: var(--fg-2); font-size: 17px; }
.figs .t span { color: var(--muted); }
.figs-src { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* the drag row (signature motion): wider than the screen, pulled sideways, snaps */
.dragrow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 340px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 4px var(--gutter) 24px; margin: 0 calc(-1 * var(--gutter)); scroll-padding-left: var(--gutter); cursor: grab; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.dragrow.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.dragrow .card { scroll-snap-align: start; display: grid; gap: 12px; align-content: start; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); text-decoration: none; transition: border-color 150ms var(--ease-ui), background-color 150ms var(--ease-ui); }
.dragrow .card:hover { border-color: var(--line-strong); background: #131416; }
.dragrow .card:active { background: #16171a; }
.card .who { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card .who b { color: var(--fg); font-weight: 590; font-size: 16px; }
.card .who span { color: var(--muted); font-size: 13px; }
.card svg { width: 100%; height: 120px; }
.card .tot { font-size: 28px; justify-self: start; }
.card .meta { color: var(--muted); font-size: 14px; }
.dragctl { display: flex; gap: 8px; margin: 0 0 16px; }

/* proof: recognition as a table */
.rec { width: 100%; border-collapse: collapse; font-size: 16px; }
.rec th { text-align: left; font-size: 14px; font-weight: 590; color: var(--muted); padding: 0 16px 12px 0; border-bottom: 1px solid var(--line); }
.rec td { padding: 0 16px 0 0; height: 52px; border-bottom: 1px solid var(--line-soft); color: var(--fg-2); }
.rec td:first-child { color: var(--fg); }
.rec .v { display: inline-flex; align-items: center; gap: 8px; font-weight: 510; }
.rec .v::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--fg); }
.rec .v.no { color: var(--muted); }
.rec .v.no::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.rec-note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* faq: tabbed index cards */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; position: relative; z-index: 1; }
.tabs button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-bottom-color: transparent; border-radius: 10px 10px 0 0; background: var(--bg); color: var(--muted); font-size: 15px; font-weight: 510; cursor: pointer; transition: color 150ms var(--ease-ui), background-color 150ms var(--ease-ui), transform 150ms var(--ease-ui); }
.tabs button:hover { color: var(--fg); }
.tabs button:active { transform: scale(0.97); }
.tabs button[aria-selected="true"] { color: var(--fg); background: var(--panel); border-color: var(--line-strong); border-bottom-color: var(--panel); }
.cards { position: relative; margin-top: -1px; border: 1px solid var(--line-strong); border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg); background: var(--panel); padding: 28px; min-height: 220px; }
.cards [role="tabpanel"] { max-width: 46em; }
.cards h3 { margin: 0 0 10px; font-size: 24px; color: var(--fg); font-weight: 590; letter-spacing: -0.012em; }
.cards p { margin: 0 0 10px; font-size: 17px; line-height: 1.6; }

/* cta: one word is the button */
.band { padding: 0; border-top: 1px solid var(--line-soft); }
.band a { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding: 72px var(--gutter) 64px; text-decoration: none; transition: background-color 250ms var(--ease); }
.band a:hover { background: #0d0e10; }
.band .word { color: var(--fg); font-size: clamp(88px, 16vw, 236px); line-height: 0.82; font-weight: 590; letter-spacing: -0.045em; position: relative; }
.band .word::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 1px; background: var(--water); transform-origin: left; transition: transform 400ms var(--ease); transform: scaleX(0.3); }
.band a:hover .word::after { transform: scaleX(1); }
.band .why { max-width: 22em; color: var(--muted); font-size: 17px; padding-bottom: 12px; }

/* footer: columns above, wordmark below */
.foot { padding: 64px var(--gutter) 0; border-top: 1px solid var(--line-soft); overflow: hidden; }
.foot .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot h4 { margin: 0 0 12px; font-size: 14px; font-weight: 590; color: var(--fg); }
.foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.foot li, .foot p { font-size: 15px; color: var(--muted); margin: 0; }
.foot a { color: var(--fg-2); text-decoration: none; display: inline-flex; min-height: 44px; min-width: 44px; align-items: center; transition: color 150ms var(--ease-ui); }
.foot a:hover { color: var(--fg); }
.foot .wordmark { margin: 56px 0 0; display: block; color: var(--fg); font-size: clamp(96px, 24vw, 360px); line-height: 0.76; font-weight: 590; letter-spacing: -0.05em; position: relative; padding-bottom: 6px; }
.foot .wordmark::after { content: ""; position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 58%; height: 1px; background: var(--water); }


/* ---------- after launch: the token strip in the corner (real numbers from /api/token, none before launch) ---------- */
.corner { grid-template-columns: minmax(0, 1fr); }
.corner .token { display: flex; flex-wrap: wrap; gap: 6px 28px; min-width: 0; }
.corner .token div { display: grid; gap: 2px; }
.corner .token span { font-size: 13px; color: var(--muted); }
.corner .token b { font-weight: 400; color: var(--fg); font-size: 18px; }
.corner .token .mint { flex-basis: 100%; min-width: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13px; color: var(--muted); }
.corner .token .mint a { color: var(--fg-2); text-decoration: none; word-break: break-all; min-width: 0; }
.corner .token .mint .btn { --h: 32px; padding: 0 10px; font-size: 13px; }

@media (max-height: 720px) and (min-width: 641px) { .counter { display: none; } .corner { gap: 10px; } }
@media (max-width: 1100px) {
  .how { grid-template-columns: 1fr; }
  .rule { position: static; }
  .index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index a:nth-child(4n + 1) { padding-left: 20px; }
  .index a:nth-child(2n + 1) { padding-left: 0; }
  .index a:not(:nth-child(4n)) { border-right: 0; }
  .index a:nth-child(2n + 1) { border-right: 1px solid var(--line-soft); }
  .foot .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .hero { min-height: 640px; }
  .rail { top: 12px; }
  .vmenu { display: none; position: absolute; top: 52px; left: 0; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(15,16,17,0.96); min-width: 180px; }
  .vmenu.open { display: grid; }
  .vmenu a, .vmenu button { min-height: 44px; }
  .menu-toggle { display: inline-grid; position: absolute; top: 12px; right: -0px; }
  .rail { left: var(--gutter); right: var(--gutter); }
  .rail .counter { display: none; }
  .corner { bottom: 20px; gap: 12px; }
  .corner h1 { font-size: 30px; }
  .corner .lede { font-size: 15px; min-height: 0; }
  .corner .status { font-size: 14px; }
  .round { width: 72px; height: 72px; font-size: 14px; }
  .corner .ways .seg { margin-left: 0; }
  .hero::before { width: 100%; height: 78%; background: linear-gradient(to top, rgba(8,9,10,0.92) 0%, rgba(8,9,10,0.7) 45%, rgba(8,9,10,0) 100%); }
  .sec { padding: 72px var(--gutter); }
  .sec h2 { font-size: 34px; }
  .index { grid-template-columns: 1fr; }
  .index a, .index a:nth-child(2n + 1) { padding-left: 0; border-right: 0; min-height: 0; }
  .figs li { grid-template-columns: 1fr; gap: 10px; }
  .figs .n { font-size: 28px; }
  .rec { font-size: 15px; }
  .rec th:nth-child(3), .rec td:nth-child(3) { display: none; }
  .cards { padding: 20px; }
  .band a { grid-template-columns: 1fr; }
  .foot .cols { grid-template-columns: 1fr; }
}
