/* NIBBLEWAGE landing v2 "night workshop". Owner: LANDING. Builds on /shared/base.css + tokens.css (v2, dark).
   Hero = full-viewport WebGL machine (its own canvas inside .hero); everything below is normal scroll (no sticky). */

.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.flow { color: var(--flow); }
.landing-main { padding-bottom: 24px; }
.landing-main:focus { outline: none; }
.eyebrow { display: inline-block; font: 600 12px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .18em; color: var(--brass); }
.landing h2 { font-family: var(--font-display); font-weight: 400; color: var(--ink); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.04; letter-spacing: .005em; }
.btn-line { --bg: transparent; --fg: var(--ink); border: 1px solid color-mix(in srgb, var(--brass) 70%, transparent); box-shadow: none; }
.btn-line:hover { --bg: color-mix(in srgb, var(--brass) 14%, transparent); border-color: var(--brass); }

/* ── hero ─────────────────────────────────────────────── */
.hero { position: relative; height: calc(100svh - var(--hero-top, 68px)); min-height: 620px; max-height: 1080px; overflow: hidden; background: var(--cream); isolation: isolate; }
.hero-scene { position: absolute; inset: 0; }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; z-index: 1; pointer-events: none; background: linear-gradient(transparent, var(--cream)); }
.hero-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.hero-scene canvas.grabbing { cursor: grabbing; }
.hero-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: none; }
.no-gl .hero-still { display: block; }
.no-gl .hero-scene canvas, .no-gl .hero-tags, .no-gl .hint-drag { display: none; }
.gl:not(.hero-ready) .hero-scene { background: radial-gradient(60% 70% at 70% 45%, #1a2236 0%, var(--cream) 70%); }

.hero-copy { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; pointer-events: none; }
.hero-text { max-width: 560px; display: grid; gap: 20px; pointer-events: auto; padding-bottom: 6vh; }
.hero-h { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(44px, 5.4vw, 80px); line-height: .97; color: var(--ink); text-shadow: 0 2px 30px rgba(5, 8, 15, .65); }
.hero-sub { margin: 0; font-size: 18px; line-height: 1.55; color: color-mix(in srgb, var(--ink) 78%, var(--muted)); max-width: 50ch; text-shadow: 0 1px 18px rgba(5, 8, 15, .8); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-token { display: grid; gap: 10px; justify-items: start; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--brass) 28%, transparent); }
.hero-token .nw-ca { background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(6px); }

/* tags at the tube ends */
.hero-tags { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tag3d { position: absolute; left: 0; top: 0; display: grid; gap: 3px; padding: 6px 9px 7px; pointer-events: auto; text-decoration: none; color: var(--ink);
  background: rgba(10, 16, 30, .78); border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent); border-radius: 10px; backdrop-filter: blur(4px);
  font: 500 12px/1.25 var(--font-mono); white-space: nowrap; transition: opacity .4s, border-color .2s, background .2s; will-change: transform; }
.tag3d::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: var(--stem, 8px); background: linear-gradient(color-mix(in srgb, var(--brass) 70%, transparent), transparent); }
.tag3d:hover, .tag3d:focus-visible { border-color: var(--lamp); background: rgba(22, 30, 50, .92); }
.tag3d .t-row { display: flex; align-items: center; gap: 6px; }
.tag3d .t-asset { font-weight: 600; color: var(--lamp); letter-spacing: .04em; }
.tag3d .t-amt { color: var(--flow); font-size: 12.5px; }
.tag3d .t-who { color: var(--muted); font-size: 11px; }
.tag3d .t-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.tag3d .t-sub { gap: 8px; }
.tag3d .t-dot.streaming { background: var(--flow); box-shadow: 0 0 8px var(--flow); }
.tag3d .t-dot.paused, .tag3d .t-dot.paused_insolvent { background: var(--fur); }
.tag3d .t-ex { font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--blush); border: 1px solid color-mix(in srgb, var(--blush) 50%, transparent); border-radius: 99px; padding: 1px 5px; }
.tag3d.ex { border-style: dashed; background: rgba(10, 16, 30, .6); }
.tag3d.ex .t-amt { color: color-mix(in srgb, var(--flow) 70%, var(--muted)); }
.tag3d.more .t-asset { color: var(--ink); }
.tag3d.pulse { animation: tagpulse 1.2s ease-out; }
@keyframes tagpulse { 0% { border-color: var(--flow); box-shadow: 0 0 0 0 var(--flow-glow); } 100% { box-shadow: 0 0 0 14px transparent; } }

.hero-hint { position: absolute; right: 22px; top: 18px; z-index: 2; margin: 0; font: 500 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.plate { position: absolute; right: 22px; bottom: 18px; z-index: 2; display: grid; padding: 9px 16px 10px; text-decoration: none; border-radius: 6px; color: #2a1d0c;
  background: linear-gradient(160deg, #e9cd8e 0%, #c49a52 38%, #8c6a2f 70%, #c9a25b 100%); box-shadow: inset 0 1px 0 rgba(255, 240, 200, .6), inset 0 -1px 0 rgba(60, 40, 10, .6), 0 6px 18px rgba(0, 0, 0, .55); }
.plate::before, .plate::after { content: ''; position: absolute; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2c8, #6d4f1e); }
.plate::before { left: 5px; } .plate::after { right: 5px; }
.plate-k { font: 600 9px/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; opacity: .75; }
.plate-v { font: 400 15px/1.1 var(--font-display); letter-spacing: .02em; }
.plate:hover { filter: brightness(1.08); }

/* ── gate ─────────────────────────────────────────────── */
.gate { display: none; position: absolute; inset: 0; z-index: 5; flex-direction: column; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 16px 7vh;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; text-align: center; }
html.gate-on .gate { display: flex; }
html.gate-on body { overflow: hidden; }
html.gate-on #nav, html.gate-on .nw-example-bar, html.gate-on .nw-skiplink { visibility: hidden; }
html.gate-on .hero-copy, html.gate-on .hero-tags, html.gate-on .hero-hint, html.gate-on .plate { opacity: 0; pointer-events: none; }
.hero-copy, .hero-tags, .hero-hint, .plate { transition: opacity 1s ease .15s; }
html.gate-off .gate { display: flex; opacity: 0; pointer-events: none; transition: opacity .7s; }
.gate-word { position: absolute; top: 9vh; left: 0; right: 0; margin: 0; font: 600 13px/1 var(--font-mono); letter-spacing: .5em; color: color-mix(in srgb, var(--brass) 80%, transparent); }
.gate-amount { margin: 0; font: 500 clamp(22px, 3vw, 30px)/1 var(--font-mono); color: color-mix(in srgb, var(--muted) 60%, transparent); font-variant-numeric: tabular-nums; transition: color .3s, text-shadow .3s; }
.gate-amount small { font-size: .5em; letter-spacing: .12em; }
.gate.holding .gate-amount, .gate.done .gate-amount { color: var(--flow); text-shadow: 0 0 18px var(--flow-glow); }
.gate-hold { position: relative; width: 112px; height: 112px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; color: var(--lamp);
  background: radial-gradient(circle at 50% 40%, rgba(40, 50, 75, .9), rgba(10, 16, 30, .92)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brass) 45%, transparent), 0 14px 40px rgba(0, 0, 0, .6); transition: transform .12s, box-shadow .3s; }
.gate-ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.gate-ring circle { fill: none; stroke-width: 2.5; }
.gate-ring .r0 { stroke: color-mix(in srgb, var(--brass) 30%, transparent); }
.gate-ring .r1 { stroke: var(--lamp); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 6px rgba(255, 217, 160, .8)); }
.gate-bulb { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-top: -14px; }
.gate-label { position: absolute; bottom: 26px; left: 0; right: 0; font: 600 10.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.gate.holding .gate-hold { transform: scale(.96); box-shadow: 0 0 0 1px var(--lamp), 0 0 50px rgba(255, 217, 160, .35); }
.gate.tired .gate-hold { animation: pant .45s ease-in-out 2; }
@keyframes pant { 50% { transform: scale(.93); } }
.gate-d { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 40ch; }
.gate-skip { background: none; border: 0; color: var(--muted); font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; padding: 8px 12px; cursor: pointer; }
.gate-skip:hover { color: var(--ink); }

.token-strip { display: none; }

/* ── sections ─────────────────────────────────────────── */
.sec { margin-top: clamp(80px, 11vw, 140px); }
.sec-head { margin-bottom: 28px; display: grid; gap: 10px; }
.sec-head.spread { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-head.spread > div { display: grid; gap: 10px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.step { display: grid; align-content: start; gap: 10px; }
.frame { margin: 0 0 8px; padding: 6px; border-radius: 16px; background: linear-gradient(160deg, color-mix(in srgb, var(--brass) 55%, transparent), color-mix(in srgb, var(--brass-deep) 30%, transparent) 40%, color-mix(in srgb, var(--brass) 45%, transparent)); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .9); }
.frame img { display: block; width: 100%; height: auto; aspect-ratio: 10 / 7; object-fit: cover; border-radius: 11px; background: #0d1424; }
.step-n { font: 500 12px/1 var(--font-mono); color: var(--brass); letter-spacing: .14em; }
.step h3 { margin: 0; font: 400 26px/1.1 var(--font-display); color: var(--ink); }
.step p { margin: 0; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); }
.step .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.step .chips span { font: 500 11.5px/1 var(--font-mono); letter-spacing: .06em; padding: 6px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); }
.step .step-line { font-size: 15px; color: var(--ink); }

.totals { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 40px; padding: 22px 26px; margin-bottom: 14px; border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--shadow-card); }
.totals::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; border-radius: inherit; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brass) 70%, transparent), transparent); }
.totals.is-example { outline: 1px dashed color-mix(in srgb, var(--blush) 55%, transparent); outline-offset: -1px; }
.tot { display: grid; gap: 6px; }
.tot .k { font: 600 11px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.tot .v { font-size: 22px; font-weight: 500; color: var(--ink); }
.tot-main { margin-right: auto; }
.tot-main .v { font-size: clamp(30px, 3.6vw, 42px); }
.tot-main .v.flow, .tot-main .flow { color: var(--flow); text-shadow: 0 0 22px var(--flow-glow); }
.tot-main small { font-size: 15px; color: var(--muted); }
.totals .tag.example { position: absolute; top: -11px; right: 18px; }
.live-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.rows { display: grid; border-radius: var(--radius-card); overflow: hidden; background: var(--paper); box-shadow: var(--shadow-card); }
.srow { display: grid; grid-template-columns: 130px minmax(140px, 1.3fr) minmax(140px, 1.2fr) minmax(170px, 1.2fr) 120px; align-items: center; gap: 16px; padding: 14px 22px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); transition: background .15s; }
.srow:first-child { border-top: 0; }
.srow:hover { background: color-mix(in srgb, var(--brass) 7%, var(--paper)); }
.srow.ex { background: color-mix(in srgb, var(--blush) 3%, var(--paper)); }
.srow .s-asset { display: flex; align-items: center; gap: 8px; }
.srow .s-asset b { font: 600 14px/1 var(--font-mono); letter-spacing: .05em; color: var(--lamp); }
.srow .s-amt { font-size: 17px; }
.srow .s-amt.flow { text-shadow: 0 0 14px var(--flow-glow); }
.srow .s-rate, .srow .s-who { font-size: 12.5px; color: var(--muted); }
.srow .s-st { justify-self: end; }
.srow.pulse { animation: rowpulse 1.4s ease-out; }
@keyframes rowpulse { 0% { background: color-mix(in srgb, var(--flow) 18%, var(--paper)); } }
.landing .tag.example { background: transparent; color: var(--blush); border: 1px solid color-mix(in srgb, var(--blush) 55%, transparent); font: 600 9.5px/1 var(--font-mono); letter-spacing: .12em; height: 20px; padding: 0 7px; }

.uses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.use { position: relative; display: grid; align-content: start; gap: 12px; padding: 24px 22px 22px; border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--shadow-card); }
.use::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; background: linear-gradient(90deg, var(--brass), transparent); }
.use-n { font-size: 12px; color: var(--brass); letter-spacing: .14em; }
.use h3 { margin: 0; font: 400 26px/1.1 var(--font-display); color: var(--ink); }
.use p { margin: 0; color: color-mix(in srgb, var(--ink) 72%, var(--muted)); font-size: 15px; }
.use .use-rate { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.use-go { margin-top: 4px; font-weight: 700; font-size: 14.5px; color: var(--fur); text-decoration: none; }
.use-go:hover { color: var(--lamp); }

.duo { display: grid; grid-template-columns: 7fr 5fr; gap: 16px; }
.panel { display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--shadow-card); }
.panel p { margin: 0; color: color-mix(in srgb, var(--ink) 78%, var(--muted)); }
.panel b { color: var(--ink); }
.perks { background: radial-gradient(120% 90% at 85% 0%, rgba(255, 217, 160, .10), transparent 60%), var(--paper); }
.ticks { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--flow); box-shadow: 0 0 10px var(--flow-glow); }
.flow-count { padding: 12px 16px; border-radius: 12px; background: var(--belly); }
.panel .row { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.panel .addr { font-size: 12px; color: var(--muted); margin-left: 4px; }
.perk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.perk-list li { display: grid; gap: 4px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--belly) 60%, transparent); }
.perk-list b { font-weight: 700; color: var(--lamp); }
.perk-list span { font-size: 13.5px; color: var(--muted); }

/* ── responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .srow { grid-template-columns: 110px 1.3fr 1.2fr 110px; }
  .srow .s-who { display: none; }
}
@media (max-width: 900px) {
  .hero-text { max-width: 480px; }
  .duo { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 40px; max-width: 560px; }
}
@media (max-width: 759px) {
  .hero { height: calc(100svh - var(--hero-top, 60px)); min-height: 660px; max-height: none; }
  .hero-copy { align-items: flex-start; }
  .hero-text { padding: 26px 0 0; gap: 14px; }
  .hero-h { font-size: clamp(38px, 11vw, 50px); }
  .hero-sub { font-size: 15.5px; }
  .hero-sub { display: none; }
  .hero-cta .btn { flex: 1 1 auto; min-height: 48px; padding: 0 18px; font-size: 15px; }
  .hero-token { display: none; }
  .token-strip { display: grid; gap: 10px; justify-items: start; margin-top: 18px; }
  .hero-hint { display: none; }
  .hint-drag { display: none; }
  .plate { display: none; }
  .tag3d { padding: 5px 7px 6px; font-size: 10.5px; }
  .tag3d .t-amt { font-size: 11px; }
  .tag3d .t-who { display: none; }
  .tag3d .t-sub { display: none; }
  .tag3d.ex .t-row:first-child::after { content: 'ex'; font-size: 9px; color: var(--blush); }
  .gate { padding-bottom: 9vh; }
  .uses { grid-template-columns: 1fr; }
  .srow { grid-template-columns: 1fr auto; grid-template-areas: "a st" "amt amt" "rate rate"; gap: 6px 12px; padding: 14px 16px; }
  .srow .s-asset { grid-area: a; } .srow .s-st { grid-area: st; } .srow .s-amt { grid-area: amt; } .srow .s-rate { grid-area: rate; }
  .totals { padding: 18px; gap: 12px 24px; }
  .tot-main { flex-basis: 100%; }
  .panel { padding: 24px 20px; }
  .perk-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy, .hero-tags, .hero-hint, .plate, .gate { transition: none !important; }
}
html.gate-on body { background: #04070e; }
body { transition: background .8s; }
