/* ==========================================================================
   $TRIPLET — palette sampled from the official token art:
   the night pier (deep blue), the lanterns and the wood (amber),
   the Artificial Inu visor (lime). Amber always means TRIPLET,
   lime always means AI. Nothing else uses those two colours.
   ========================================================================== */

:root {
  --night:      #070b18;
  --night-lift: #0c1226;
  --night-deep: #04060f;
  --line:       #1b2442;
  --line-soft:  #141b33;

  --moon:  #f4ead6;
  --haze:  #93a0c4;
  --dim:   #66739a;

  --lantern:      #f3a83c;
  --lantern-glow: #ffd089;
  --wood:         #a8641f;

  --visor:      #9fe640;
  --visor-deep: #4d7a16;

  --up:   #62dd9b;
  --down: #ff7272;

  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 62ch;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--moon);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.c-triplet { color: var(--lantern); }
.c-ai { color: var(--visor); }

:focus-visible {
  outline: 2px solid var(--lantern);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--lantern); color: var(--night-deep);
  padding: .6rem 1rem; font-weight: 600;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ─────────────────────────── buttons ─────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: .98rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn-sm { padding: .55rem 1rem; font-size: .88rem; }

.btn-primary {
  background: var(--lantern);
  color: #2a1704;
  box-shadow: 0 0 0 0 rgba(243,168,60,.4);
}
.btn-primary:hover { background: var(--lantern-glow); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--moon);
}
.btn-ghost:hover { border-color: var(--lantern); color: var(--lantern); }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover { transition: none; transform: none; }
}

/* ─────────────────────────── top bar ─────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem var(--gutter);
  background: rgba(7, 11, 24, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { border-radius: 50%; border: 1px solid var(--wood); }
.brand-name { font-weight: 800; letter-spacing: -0.03em; }
.brand-ticker {
  font-family: var(--mono); font-size: .8rem; color: var(--lantern);
  padding-top: .1rem;
}

.topnav { display: flex; gap: 1.6rem; margin-inline: auto; }
.topnav a {
  text-decoration: none; color: var(--haze); font-size: .95rem;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.topnav a:hover { color: var(--moon); border-bottom-color: var(--lantern); }

.topbar-right { display: flex; align-items: center; gap: .9rem; }

.ticker-pill {
  display: inline-flex; align-items: baseline; gap: .55rem;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: .85rem;
}
.ticker-pill-label { font-size: .72rem; color: var(--dim); letter-spacing: .04em; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }

/* ─────────────────────────── hero ─────────────────────────── */

/* no pier banner up here: the orb already puts both characters in one frame,
   and two stacked images were crowding the ticker */
.hero {
  position: relative;
  background:
    radial-gradient(65% 85% at 74% 44%, rgba(243, 168, 60, .15), transparent 62%),
    radial-gradient(55% 75% at 8% 8%, rgba(159, 230, 64, .05), transparent 60%);
}

.hero-body {
  position: relative;
  padding: clamp(2.75rem, 5.5vw, 4.5rem) var(--gutter) 2.75rem;
  max-width: 1180px;
  margin-inline: auto;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.hero-long {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  padding: .42rem .9rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(7, 11, 24, .6);
  backdrop-filter: blur(8px);
  font-size: .88rem;
  color: var(--haze);
  text-decoration: none;
}
.hero-long { margin-bottom: 1.25rem; border-color: rgba(243, 168, 60, .45); }
.hero-long strong {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--lantern);
}
.hero-long:hover { border-color: var(--lantern); background: rgba(243, 168, 60, .12); }

/* live pair converter — type an amount, see what it is in AI */

.conv { margin-top: 1.75rem; }

.conv-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
  font-size: clamp(1rem, 1.9vw, 1.25rem);
  font-weight: 600;
}

.conv-input {
  width: 7.5ch;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1px dashed rgba(243, 168, 60, .6);
  background: none;
  color: var(--lantern);
  font: inherit;
  font-family: var(--mono);
  font-size: 1em;
  letter-spacing: -0.02em;
  text-align: right;
  cursor: text;
  transition: border-color .15s ease;
}
.conv-input:hover { border-bottom-color: var(--lantern); }
.conv-input:focus {
  outline: none;
  border-bottom-style: solid;
  border-bottom-color: var(--lantern);
}
.conv-input::-webkit-outer-spin-button,
.conv-input::-webkit-inner-spin-button { appearance: none; margin: 0; }

.conv-unit { font-size: .82em; font-weight: 600; }
.conv-verb { font-size: .82em; font-weight: 400; color: var(--haze); }
.conv-out { font-family: var(--mono); letter-spacing: -0.02em; }
.conv-usd { margin-top: .35rem; font-size: .82rem; color: var(--dim); }

/* the bubble: golden first light held inside the night scene */

.orb {
  position: relative;
  margin: 0;
  width: clamp(260px, 29vw, 390px);
  aspect-ratio: 1;
  flex: none;
}

.orb-shell {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 30px 90px -18px rgba(243, 168, 60, .5),
    0 0 0 1px rgba(255, 214, 150, .28);
  animation: orb-float 9s ease-in-out infinite;
}
.orb.is-popping .orb-shell { animation: pop-body 380ms ease-out forwards; }
.orb.is-reforming .orb-shell {
  animation: orb-reform 520ms cubic-bezier(.2, 1.3, .4, 1),
             orb-float 9s ease-in-out 520ms infinite;
}
.orb-ring {
  position: absolute;
  inset: -3%;
  border-radius: 50%;
  border: 2px solid rgba(255, 238, 205, .75);
  opacity: 0;
  pointer-events: none;
}
.orb.is-popping .orb-ring { animation: pop-ring 420ms ease-out forwards; }

@keyframes orb-reform {
  0%   { transform: scale(.55); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.popcount {
  position: absolute;
  right: var(--gutter);
  bottom: 10rem;
  z-index: 3;
  margin: 0;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--dim);
  pointer-events: none;
}
.orb-shell img { width: 100%; height: 100%; object-fit: cover; }

.orb-glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(8% 6% at 25% 17%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 100%),
    radial-gradient(42% 38% at 27% 19%, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0) 70%),
    radial-gradient(26% 22% at 78% 84%, rgba(255, 255, 255, .16), transparent 72%),
    radial-gradient(100% 100% at 50% 50%, transparent 58%, rgba(159, 230, 64, .14) 78%, rgba(255, 196, 120, .3) 90%, rgba(255, 245, 224, .55) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 210, .5),
    inset 0 -22px 46px rgba(12, 6, 0, .34);
}

.mote {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 241, 205, .95), rgba(255, 219, 150, 0) 70%);
  opacity: .4;
}
.m1 { width: 11px; height: 11px; left: -3%;  top: 28%;    animation: mote-drift 11s ease-in-out infinite; }
.m2 { width: 7px;  height: 7px;  right: 4%;  top: 9%;     animation: mote-drift 14s ease-in-out -3s infinite; }
.m3 { width: 15px; height: 15px; right: -5%; bottom: 16%; animation: mote-drift 17s ease-in-out -7s infinite; }

@keyframes orb-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -14px, 0); }
}
@keyframes mote-drift {
  0%, 100% { transform: translate(0, 0); opacity: .3; }
  50%      { transform: translate(-14px, -28px); opacity: .85; }
}

/* rising bubbles — they drift up through the night scene and pop at the top,
   or when someone clicks one */

.bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.bubble {
  position: absolute;
  bottom: calc(var(--size) * -1.2);
  left: var(--x);
  width: var(--size);
  height: var(--size);
  animation: bubble-rise var(--dur) linear forwards;
  will-change: transform;
}

.bubble-body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 233, 196, .05);
  box-shadow:
    0 0 0 1px rgba(255, 238, 205, .38),
    0 14px 40px -14px rgba(243, 168, 60, .55);
  pointer-events: auto;
  cursor: pointer;
  transform: translate(var(--push-x, 0px), var(--push-y, 0px));
  transition: transform .45s cubic-bezier(.2, .8, .3, 1);
}
.bubble-body img { width: 100%; height: 100%; object-fit: cover; }

.bubble-glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(9% 7% at 26% 18%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 100%),
    radial-gradient(40% 36% at 28% 20%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 72%),
    radial-gradient(100% 100% at 50% 50%, transparent 56%, rgba(159, 230, 64, .16) 78%, rgba(255, 200, 128, .34) 92%, rgba(255, 246, 226, .6) 100%);
}

.bubble-ring {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  border: 2px solid rgba(255, 238, 205, .75);
  opacity: 0;
}

.bubble.is-popping .bubble-body { animation: pop-body 420ms ease-out forwards; cursor: default; }
.bubble.is-popping .bubble-ring { animation: pop-ring 420ms ease-out forwards; }

.drop {
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: rgba(255, 246, 225, .98);
  box-shadow: 0 0 10px rgba(255, 214, 150, .9);
  opacity: 0;
  animation: drop-fly 520ms cubic-bezier(.15, .7, .3, 1) forwards;
}

@keyframes bubble-rise {
  0%   { transform: translate(0, 0) scale(.85); opacity: 0; }
  12%  { opacity: var(--peak); }
  50%  { transform: translate(var(--sway), calc(var(--rise) * -.5)) scale(1); }
  100% { transform: translate(0, calc(var(--rise) * -1)) scale(1); opacity: var(--peak); }
}
@keyframes pop-body {
  0%   { transform: scale(1); opacity: 1; }
  40%  { transform: scale(1.16); opacity: .85; }
  100% { transform: scale(1.32); opacity: 0; }
}
@keyframes pop-ring {
  0%   { transform: scale(.92); opacity: .85; }
  100% { transform: scale(1.85); opacity: 0; }
}
@keyframes drop-fly {
  0%   { transform: translate(calc(var(--dx) * .2), calc(var(--dy) * .2)) scale(.5); opacity: 0; }
  25%  { transform: translate(calc(var(--dx) * .55), calc(var(--dy) * .55)) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.25); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .orb-shell, .mote { animation: none; }
  .bubbles { display: none; }
}

.hero-title {
  font-size: clamp(1.85rem, 3.4vw, 2.95rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}

.hero-lede {
  max-width: var(--measure);
  margin-top: 1.4rem;
  color: var(--haze);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
}
.hero-lede strong { font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ─────────────────────────── sections ─────────────────────────── */

.section {
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter) 0;
}

.section-head { max-width: 46rem; }
.section-title {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  text-wrap: balance;
}
.section-intro {
  margin-top: 1rem;
  max-width: var(--measure);
  color: var(--haze);
  font-size: 1.05rem;
}
.section-intro em { color: var(--moon); font-style: italic; }

/* ─────────────────────────── route diagram ─────────────────────────── */

.route {
  margin: 3.5rem 0 0;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background:
    radial-gradient(120% 140% at 18% 0%, rgba(243,168,60,.07), transparent 55%),
    radial-gradient(120% 140% at 62% 0%, rgba(159,230,64,.06), transparent 55%),
    var(--night-lift);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.75rem);
}

.route-node { display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; }
.route-node img {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 2px solid var(--line);
}
.node-triplet img { border-color: var(--lantern); box-shadow: 0 0 28px rgba(243,168,60,.22); }
.node-ai img { border-color: var(--visor); box-shadow: 0 0 28px rgba(159,230,64,.18); }

.route-usd {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 2px dashed var(--line);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 1rem; color: var(--dim);
}

.route-sym { font-weight: 600; font-size: 1rem; }
.node-triplet .route-sym { color: var(--lantern); }
.node-ai .route-sym { color: var(--visor); }
.route-meta { font-size: .8rem; color: var(--dim); }

.route-link { display: flex; flex-direction: column; align-items: center; gap: .2rem; color: #46527a; }
.route-rate { font-size: clamp(.85rem, 1.6vw, 1.05rem); color: var(--moon); }
.route-rate-unit { font-size: .72rem; color: var(--dim); }
.route-arrow { width: 100%; max-width: 160px; margin-top: .35rem; }

.route-caption {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding-top: 1.25rem;
  padding-right: clamp(0rem, 22%, 22rem);
  border-top: 1px solid var(--line-soft);
  color: var(--haze);
  font-size: .95rem;
}

/* ─────────────────────────── notes ─────────────────────────── */

.cols-3 {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}
.note { background: var(--night); padding: 1.75rem 1.6rem 2rem; }
.note h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: .7rem;
  color: var(--moon);
}
.note p { color: var(--haze); font-size: .95rem; }

/* ─────────────────────────── token diptych ─────────────────────────── */

.diptych {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.token {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--night-lift);
  display: flex; flex-direction: column;
}
.token-triplet { border-top: 3px solid var(--lantern); }
.token-ai { border-top: 3px solid var(--visor); }

.token-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.token-head img { border-radius: 50%; border: 2px solid var(--line); }
.token-triplet .token-head img { border-color: var(--lantern); }
.token-ai .token-head img { border-color: var(--visor); }
.token-name { font-size: 1.5rem; }
.token-sym { font-family: var(--mono); font-size: .95rem; margin-top: .15rem; }
.token-triplet .token-sym { color: var(--lantern); }
.token-ai .token-sym { color: var(--visor); }

.token-desc { color: var(--haze); font-size: .95rem; margin-bottom: 1.4rem; }

.token-stats {
  margin: 1.4rem 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.token-stats > div { background: var(--night-lift); padding: .8rem .9rem; }
.token-stats dt { font-size: .78rem; color: var(--dim); margin-bottom: .15rem; }
.token-stats dd { margin: 0; font-size: 1rem; font-weight: 500; }

.token-links {
  list-style: none;
  margin: auto 0 0;
  padding-top: 1.4rem;
  padding: 0;
  display: flex; flex-wrap: wrap; gap: .5rem .4rem;
}
.token-links a {
  display: inline-block;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: .85rem;
  text-decoration: none;
  color: var(--haze);
}
.token-triplet .token-links a:hover { border-color: var(--lantern); color: var(--lantern); }
.token-ai .token-links a:hover { border-color: var(--visor); color: var(--visor); }

/* address chip */

.addr {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .15rem .75rem;
  width: 100%;
  padding: .8rem .9rem;
  background: var(--night-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--moon);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease;
}
.addr:hover { border-color: var(--lantern); }
.addr-label { grid-area: 1 / 1; font-size: .78rem; color: var(--dim); }
.addr-value { grid-area: 2 / 1; font-size: .82rem; overflow-wrap: anywhere; }
.addr-action {
  grid-area: 1 / 2 / span 2 / auto;
  align-self: center;
  font-size: .78rem; font-weight: 600;
  color: var(--lantern);
}
.addr-footer .addr-value { grid-area: 1 / 1; }
.addr-footer .addr-action { grid-area: 1 / 2; }
.token-ai .addr:hover { border-color: var(--visor); }
.token-ai .addr-action { color: var(--visor); }
.addr.is-copied .addr-action { color: var(--up); }

/* ─────────────────────────── warning panel ─────────────────────────── */

.warn {
  margin-top: 2rem;
  padding: 1.6rem 1.75rem;
  border: 1px solid rgba(243,168,60,.35);
  border-left: 3px solid var(--lantern);
  border-radius: 6px;
  background: linear-gradient(to right, rgba(243,168,60,.07), transparent 60%);
}
.warn-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.warn-body { margin-top: .6rem; color: var(--haze); font-size: .95rem; max-width: var(--measure); }
.warn-details { margin-top: 1rem; }
.warn-details summary {
  cursor: pointer; font-size: .88rem; color: var(--lantern);
  width: fit-content;
}
.warn-details ul {
  margin: .9rem 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .8rem; color: var(--dim);
  word-break: break-all;
}
.warn-foot { margin-top: .9rem; font-size: .78rem; color: var(--dim); }

/* ─────────────────────────── venue cards ─────────────────────────── */

/* ─────────────────────────── /AI league ─────────────────────────── */

/* the league itself, scrolling past */

/* the league rides at the very top of the page, above the hero, edge to edge */
.league-bar { background: linear-gradient(180deg, #060f09, var(--night)); }

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-top { padding-block: .7rem .55rem; }

/* the standing, said once and quietly, under the cards it describes */
.league-line {
  max-width: 1180px;
  margin-inline: auto;
  padding: 0 var(--gutter) .6rem;
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .3rem 1.6rem;
  font-size: .78rem;
  color: var(--dim);
}
.ll-item strong { font-weight: 600; }
.ll-stamp { margin-left: auto; font-family: var(--mono); font-size: .7rem; color: var(--lantern); }

/* the band closes on a hairline: how far $TRIPLET is from the top of the league */
.league-rail {
  position: relative;
  height: 2px;
  background: rgba(159, 230, 64, .14);
}
.league-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--wood), var(--lantern));
  box-shadow: 0 0 12px rgba(243, 168, 60, .7);
  transition: width 1.7s cubic-bezier(.2, .85, .25, 1);
}
.marquee-track {
  display: flex;
  gap: .9rem;
  width: max-content;
  animation: marquee-run var(--run, 70s) linear infinite;
  animation-play-state: paused;
}
/* held until the section is on screen, so the loop opens on the TRIPLET card */
.marquee.is-live .marquee-track { animation-play-state: running; }
.marquee.is-live:hover .marquee-track,
.marquee.is-live:focus-within .marquee-track { animation-play-state: paused; }

.marquee-set { display: flex; align-items: center; gap: .9rem; }

@keyframes marquee-run {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(var(--shift, -50%), 0, 0); }
}

/* cards borrow Long's shape: the numeraire tints the card and sits in it as a
   watermark. Everything that is not $TRIPLET stays deliberately quiet. */

.lcard {
  position: relative;
  flex: none;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-width: 10.5rem;
  padding: .75rem .9rem .8rem;
  border: 1px solid rgba(159, 230, 64, .14);
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(159, 230, 64, .05), rgba(6, 16, 9, 0) 70%), #08140c;
  color: var(--haze);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s ease, transform .2s ease, background-color .2s ease;
}
.lcard:hover { border-color: rgba(159, 230, 64, .4); transform: translateY(-2px); }

.lcard-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.lcard-rank { font-family: var(--mono); font-size: .68rem; color: var(--visor-deep); }
.lcard-chg { font-family: var(--mono); font-size: .68rem; margin-left: auto; opacity: .75; }
.lcard-sym { font-size: .72rem; color: var(--dim); letter-spacing: .01em; }
.lcard-mc {
  font-family: var(--mono);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--moon);
  margin-top: .1rem;
}
.lcard-anchored {
  display: flex; align-items: center; gap: .3rem;
  margin-top: .5rem;
  font-size: .66rem;
  color: var(--visor-deep);
}
.lcard-ai { width: 13px; height: 13px; border-radius: 50%; }

.lcard.is-first { border-color: rgba(159, 230, 64, .3); }
.lcard.is-first .lcard-rank { color: var(--visor); }

/* the one card that is allowed to shout */

.lcard.is-triplet {
  min-width: 17rem;
  padding: .85rem 1.2rem .9rem;
  border-color: var(--lantern);
  background:
    linear-gradient(135deg, rgba(243, 168, 60, .2), rgba(8, 20, 12, 0) 62%),
    #0a1a0e;
  animation: triplet-glow 3.4s ease-in-out infinite;
}
.lcard.is-triplet:hover { border-color: var(--lantern-glow); }
.lcard.is-triplet .lcard-rank { font-size: .8rem; color: var(--lantern); }
/* kept next to the rank so it never lands on top of the watermark */
.lcard.is-triplet .lcard-chg { font-size: .8rem; opacity: 1; margin-left: .3rem; }
.lcard.is-triplet .lcard-sym { font-size: .85rem; color: var(--lantern); font-weight: 600; }
.lcard.is-triplet .lcard-mc { font-size: 1.6rem; }
.lcard.is-triplet .lcard-anchored { font-size: .72rem; color: var(--visor); margin-top: .5rem; }
.lcard.is-triplet .lcard-ai { width: 16px; height: 16px; }

.lcard-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--lantern);
}

/* the $AI face, huge and half off the card, the way Long draws the anchor */
.lcard-watermark {
  position: absolute;
  right: -14%;
  top: 50%;
  width: 9.5rem; height: 9.5rem;
  transform: translateY(-50%);
  border-radius: 50%;
  opacity: .34;
  filter: saturate(.75) brightness(.8);
  pointer-events: none;
}

.lcard.is-triplet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 243, 219, .2) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: triplet-shine 4.5s ease-in-out 1s infinite;
  pointer-events: none;
}

@keyframes triplet-glow {
  0%, 100% { box-shadow: 0 0 26px -10px rgba(243, 168, 60, .5); }
  50%      { box-shadow: 0 0 52px -6px rgba(243, 168, 60, .9); }
}
@keyframes triplet-shine {
  0%        { transform: translateX(-130%); }
  38%, 100% { transform: translateX(130%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
  .league-fill { transition: none; }
  .lcard.is-triplet { animation: none; box-shadow: 0 0 40px -10px rgba(243, 168, 60, .7); }
  .lcard.is-triplet::after { animation: none; opacity: 0; }
}

/* ─────────────────────────── long.xyz band ─────────────────────────── */

.long-band {
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--gutter);
  border-block: 1px solid var(--line);
  background:
    radial-gradient(75% 130% at 8% 10%, rgba(243, 168, 60, .3), transparent 62%),
    radial-gradient(60% 110% at 95% 100%, rgba(159, 230, 64, .1), transparent 62%),
    var(--night-lift);
}
.long-inner { max-width: 1180px; margin-inline: auto; }

.long-top {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.long-say { display: flex; flex-direction: column; align-items: flex-start; gap: 1.6rem; }

.long-lead { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--haze); }
.long-wordmark {
  display: inline-block;
  margin: .1rem 0 0;
  font-family: var(--mono);
  font-size: clamp(2.6rem, 8.5vw, 6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
  color: var(--lantern);
  text-decoration: none;
}
.long-wordmark:hover { color: var(--lantern-glow); }

.long-claim {
  max-width: var(--measure);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  color: var(--moon);
}

.long-facts {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.long-facts > div { background: rgba(4, 6, 15, .6); padding: 1rem 1.15rem; }
.long-facts dt { font-size: .78rem; color: var(--dim); margin-bottom: .2rem; }
.long-facts dd { margin: 0; font-size: .86rem; overflow-wrap: anywhere; }
.long-facts dd a { color: var(--moon); text-decoration-color: var(--line); text-underline-offset: 3px; }
.long-facts dd a:hover { color: var(--lantern); }

/* ─────────────────────────── chain ─────────────────────────── */

.venue {
  margin-top: 2.75rem;
  max-width: 44rem;
}
.venue-action {
  display: flex; flex-direction: column; align-items: flex-start; gap: .4rem;
  margin-top: 1.6rem;
}

.kv { margin: 1.5rem 0 1.6rem; width: 100%; display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); border-block: 1px solid var(--line-soft); }
.kv > div {
  background: var(--night);
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  padding: .7rem 0;
  align-items: baseline;
}
.kv dt { font-size: .85rem; color: var(--dim); }
.kv dd { margin: 0; font-size: .86rem; }
.kv dd a { color: var(--moon); text-decoration-color: var(--line); text-underline-offset: 3px; }
.kv dd a:hover { color: var(--lantern); }
.kv-alt { color: var(--dim); margin-left: .4rem; }
.kv-wrap { font-size: .8rem; word-break: break-all; }

.venue-status { margin-top: .8rem; font-size: .82rem; color: var(--haze); min-height: 1.2em; }

/* ─────────────────────────── steps ─────────────────────────── */

.steps {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.step {
  counter-increment: step;
  background: var(--night);
  padding: 1.75rem 1.5rem 1.9rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: .6rem;
}
.step::before {
  content: counter(step);
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--lantern);
  border: 1px solid rgba(243,168,60,.4);
  border-radius: 50%;
  width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center;
  margin-bottom: .3rem;
}
.step-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; }
.step p { color: var(--haze); font-size: .92rem; flex: 1; }
.step .btn { margin-top: .4rem; }

/* ─────────────────────────── closing band ─────────────────────────── */

.outro {
  margin-top: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
  line-height: 0;
  mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 80%, transparent);
}
.outro img {
  width: 100%;
  height: clamp(190px, 23vw, 310px);
  object-fit: cover;
  object-position: 58% 18%;
  opacity: .9;
}

/* ─────────────────────────── footer ─────────────────────────── */

.footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
}
.footer-main {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  align-items: center; justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: .9rem; }
.footer-brand img { border-radius: 50%; border: 1px solid var(--wood); }
.footer-name { font-weight: 600; letter-spacing: -0.02em; }
.footer-line { font-size: .88rem; color: var(--dim); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-links a { color: var(--haze); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--lantern); }

.addr-footer { margin-top: 1.75rem; }
.addr-footer .addr-value { font-size: .8rem; }

.disclaimer {
  margin-top: 1.5rem;
  max-width: var(--measure);
  font-size: .8rem;
  line-height: 1.65;
  color: var(--dim);
}

/* ─────────────────────────── toast ─────────────────────────── */

.toast {
  position: fixed;
  left: 50%; bottom: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, 130%);
  background: var(--lantern);
  color: #2a1704;
  font-weight: 600; font-size: .9rem;
  padding: .7rem 1.2rem;
  border-radius: 100px;
  z-index: 60;
  transition: transform .28s cubic-bezier(.2,.8,.3,1), opacity .2s ease, visibility .28s;
  pointer-events: none;
}
.toast.is-visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ─────────────────────────── responsive ─────────────────────────── */

@media (max-width: 1080px) {
  .topnav { display: none; }
  .topbar-right { margin-left: auto; }
}

@media (max-width: 960px) {
  .hero-body {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .orb { width: clamp(220px, 52vw, 320px); margin-top: .5rem; }

  .cols-3 { grid-template-columns: 1fr; }
  .diptych, .venue { grid-template-columns: 1fr; }
  .venue { gap: 2rem; }
  .long-top { grid-template-columns: 1fr; gap: 2rem; }
  .long-facts { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .topbar { gap: .75rem; }
  .brand-ticker { display: none; }
  .ticker-pill { display: none; }

  .hero-body { padding-top: 2rem; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 auto; }
  .orb { align-self: center; justify-self: center; }

  .route {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .route-link { flex-direction: column; }
  .route-arrow { transform: rotate(90deg); width: 60px; margin: .2rem 0; }

  .steps { grid-template-columns: 1fr; }
  .long-facts { grid-template-columns: 1fr; }

  .league-line { gap: .15rem 1.2rem; font-size: .75rem; }

  /* swipe the league instead of watching it run away on a 390px screen */
  .marquee { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .marquee::-webkit-scrollbar { display: none; }
  .marquee-track { animation: none; }
  .marquee-set + .marquee-set { display: none; }
  .kv > div { grid-template-columns: 1fr; gap: .1rem; }
}
