/* =========================================================================
   REBEL CARS // pages/token.css
   $RC Token page only. Everything here is prefixed .tk-
   01  Hero (copy, token composition, facts strip)
   02  01 // Utility (five cards: three + two wide, wide car image below)
   03  02 // Exchanges (name plates)
   04  03 // On-chain (Ethereum blue: copy, Ethereum diamond, stack schematic)
   05  Links band (exhaust detail image + links)
   06  Notice
   Colour pairing (round 2): red = Rebel Cars ($RC disc, $RC readouts),
   blue = Ethereum (.rc-eth scope: kicker chain label, STANDARD and NETWORK
   readouts, the whole 03 // On-chain section).
   ========================================================================= */

/* Brand red captured outside every .rc-eth scope, so a Rebel Cars accent can
   stay red inside the blue Ethereum section (the $RC layer of the stack). */
.page-token {
  --tk-red: var(--red);
  --tk-red-glow: var(--red-glow);
  --tk-red-wash: var(--red-wash);
}


/* =========================================================================
   01  HERO
   ========================================================================= */
.tk-hero { padding-bottom: 0; }
/* Centred as usual, but never higher than 20px below the fixed header
   (half the outline's height = .2752 x its width of max(900px, 78vw)). */
.tk-hero > .rc-outline { top: max(50%, calc(var(--header-h) + 20px + max(248px, 21.47vw))); }
.tk-hero .rc-pagehero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.tk-hero__title { font-size: clamp(2.9rem, 5.6vw, 5.4rem); line-height: .9; }
.page-token .tk-nowrap { white-space: nowrap; }
.tk-hero__lead { max-width: 34rem; }

/* Kicker: "ERC-20 // ETHEREUM" in Ethereum blue with the small mono mark;
   "$RC TOKEN" and its red pixel squares stay Rebel Cars red. */
.tk-kicker-eth {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  color: var(--eth-bright);
}
.tk-hero .rc-kicker .tk-kicker-eth .rc-eth-mark { width: auto; height: 1.4em; margin-right: -5px; }

/* The visual stays inside the column (no bleed): the token is centred. */
.tk-hero .rc-pagehero__visual {
  display: grid;
  place-items: center;
  margin: 0;
}

/* Token composition, rebuilt from the launcher: glow, dotted halo, static arc,
   rotating dashed orbit with one red pixel satellite, then the disc. */
.tk-token {
  position: relative;
  width: min(76%, 420px);
  aspect-ratio: 1;
  margin-block: clamp(40px, 5vw, 72px);
}
.tk-token > span,
.tk-token__disc { position: absolute; }

/* Red radial glow behind the whole token, so the black outer ring of the
   logo reads against it. */
.tk-token__glow {
  inset: -32%;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(232,34,47,.46) 0%,
    rgba(232,34,47,.34) 52%,
    rgba(232,34,47,.16) 70%,
    rgba(232,34,47,0) 100%);
  animation: tk-breathe 6s ease-in-out infinite;
}
.tk-token__dots {
  inset: -22%;
  border: 1px dotted rgba(255,69,83,.24);
  border-radius: 50%;
}
.tk-token__arc {
  inset: -15%;
  border: 2px solid transparent;
  border-top-color: rgba(232,34,47,.85);
  border-radius: 50%;
  transform: rotate(-26deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 12%, #000 50%, transparent 88%);
  mask-image: linear-gradient(90deg, transparent 12%, #000 50%, transparent 88%);
}
.tk-token__orbit {
  inset: -8%;
  border: 1px dashed rgba(255,69,83,.42);
  border-radius: 50%;
  animation: rc-orbit 60s linear infinite;
}
.tk-token__sat {
  inset: -8%;
  animation: rc-orbit 18s linear infinite;
}
.tk-token__sat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 1px;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow), 0 0 3px var(--red-bright);
  transform: translate(-50%, -50%);
}
.tk-token__disc {
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 34px rgba(232,34,47,.5));
}
.tk-token__cross--a { top: -24%; left: -14%; }
.tk-token__cross--b { right: -12%; bottom: -14%; }
.tk-token__coord { right: -12%; top: -24%; }

/* Facts strip: the hero's bottom status bar (as on the home page). */
.tk-hero__status {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: linear-gradient(0deg, rgba(5,6,8,.92), rgba(5,6,8,.55));
}
.tk-facts { border-block: 0; }
/* TOKEN readout: a short red tick (Rebel Cars). STANDARD / NETWORK sit in the
   .rc-eth scope: blue tick, blue label, faint blue wash. EXCHANGES stays neutral. */
.tk-facts > .tk-facts__rc,
.tk-facts > .tk-facts__eth { position: relative; }
.tk-facts__rc::before,
.tk-facts__eth::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
}
.tk-facts > .tk-facts__eth { background: linear-gradient(180deg, var(--eth-wash), transparent 75%); }
.tk-facts__eth .rc-stat__label { color: var(--eth-bright); }
@media (min-width: 961px) {
  .tk-facts { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); }
}
@media (max-width: 960px) {
  .tk-hero .rc-pagehero__inner { grid-template-columns: minmax(0, 1fr); }
  .tk-token { width: min(64vw, 380px); margin-block: 56px 72px; }
  .tk-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tk-facts > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  /* Keep the kicker on one line at 375px and the facts strip near the fold. */
  .tk-hero .rc-kicker { gap: 6px 8px; letter-spacing: .14em; }
  .tk-kicker-eth { gap: 6px 8px; }
  .tk-hero .rc-kicker .tk-kicker-eth .rc-eth-mark { margin-right: -2px; }
  .tk-token { margin-block: 40px 48px; }
  .tk-token__coord { right: -4%; }
  .tk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-facts > :last-child { grid-column: auto; }
}


/* =========================================================================
   02  01 // UTILITY
   Three cards on the first row, two wider ones on the second.
   ========================================================================= */
.tk-util__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tk-util__card {
  grid-column: span 2;
  justify-content: space-between;
  gap: 32px;
  min-height: clamp(220px, 19vw, 260px);
}
.tk-util__card--wide { grid-column: span 3; }
.tk-util .tk-util__title {
  padding-top: .08em;
  font: 500 clamp(1.9rem, 2.5vw, 2.5rem)/.92 var(--font-display);
  letter-spacing: .01em;
}
.tk-util__card p { max-width: 36ch; color: var(--text-2); }

/* Wide cards: title left, sentence right, both on the bottom line. */
@media (min-width: 1025px) {
  .tk-util__card--wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 32px;
  }
  .tk-util__card--wide .tk-util__title { font-size: clamp(2.4rem, 3.4vw, 3.3rem); }
  .tk-util__card--wide p { font-size: 1.12rem; color: var(--text); }
}
@media (max-width: 1024px) {
  .tk-util__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-util__card,
  .tk-util__card--wide { grid-column: span 1; }
  .tk-util__card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .tk-util__grid { grid-template-columns: minmax(0, 1fr); }
  .tk-util__card { min-height: 0; gap: 22px; }
}

/* Image moment under the cards: wide bracketed frame, the whole car visible. */
.tk-util__media { margin: 24px 0 0; }
/* Side-profile render (16:10): the car spans y 32-78% with its centre near 55%,
   so each wide crop is centred there; the full width (whole car) always shows. */
.tk-util__media img { aspect-ratio: 21 / 9; object-position: 50% 66%; }
.tk-util__cross { top: 16px; right: 16px; z-index: 2; }
@media (max-width: 1024px) {
  .tk-util__media img { aspect-ratio: 2 / 1; object-position: 50% 70%; }
}
@media (max-width: 720px) {
  .tk-util__media img { aspect-ratio: 16 / 10; object-position: 50% 50%; }
}


/* =========================================================================
   03  02 // EXCHANGES
   ========================================================================= */
.tk-ex { --glow-x: 10%; --glow-y: 520px; }
.tk-ex__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 64px;
  margin-bottom: clamp(44px, 5vw, 72px);
}
.tk-ex__headcopy { margin-bottom: 0; }
.tk-ex__line { max-width: 24rem; color: var(--text-2); }

.tk-plates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tk-plate {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: clamp(260px, 27vw, 360px);
  padding: clamp(22px, 2.6vw, 36px);
  background:
    radial-gradient(70% 80% at 0% 100%, rgba(232,34,47,.07), transparent 70%),
    var(--panel);
}
.tk-plate__top,
.tk-plate__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tk-plate__meta {
  font: 500 .72rem/1 var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tk-plate__name {
  padding-top: .1em;
  font: 500 clamp(3.6rem, 7.4vw, 7.2rem)/.8 var(--font-display);
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--text);
}
.tk-plate__ruler { flex: 1; }
@media (max-width: 720px) {
  .tk-plates { grid-template-columns: minmax(0, 1fr); }
  .tk-plate { min-height: 220px; }
}


/* =========================================================================
   04  03 // ON-CHAIN
   ========================================================================= */
/* The Ethereum section: the whole band sits in the .rc-eth scope (blue glow,
   kicker squares, brackets). Three zones on wide screens: copy | Ethereum
   diamond | stack schematic. */
.tk-chain { --glow-x: 50%; --glow-y: 50%; }
.tk-chain__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr);
  grid-template-areas: "text mark stack";
  align-items: center;
  gap: 56px clamp(32px, 4vw, 64px);
}
.tk-chain__text { grid-area: text; }
.tk-chain__head { margin-bottom: 32px; }
.tk-chain__copy { margin-top: 20px; }

/* Ethereum diamond: same visual language as the hero's $RC disc (glow,
   dotted halo, dashed orbit with one pixel satellite), but in Ethereum blue. */
.tk-chain__mark {
  grid-area: mark;
  position: relative;
  --s: clamp(190px, 17vw, 250px);
  width: var(--s);
  height: var(--s);
}
.tk-chain__mark > span { position: absolute; }
.tk-chain__halo {
  inset: -34%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--eth-glow), var(--eth-wash) 58%, transparent 100%);
  animation: tk-breathe 6s ease-in-out infinite;
}
.tk-chain__dots {
  inset: -6%;
  border: 1px dotted var(--eth-glow);
  border-radius: 50%;
}
.tk-chain__orbit {
  inset: 6%;
  border: 1px dashed var(--eth-glow);
  border-radius: 50%;
  animation: rc-orbit 60s linear infinite;
}
.tk-chain__orbit::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--eth);
  box-shadow: 0 0 12px var(--eth-glow), 0 0 3px var(--eth-bright);
  transform: translate(-50%, -50%);
}
.tk-chain__mark .tk-chain__diamond {
  position: absolute;
  top: 15%;
  left: 50%;
  height: 70%;
  transform: translateX(-50%);
}
.tk-chain__cross--a { top: -8%; left: -12%; }
.tk-chain__cross--b { right: -12%; bottom: -8%; }
.tk-chain__coord { left: 50%; bottom: -22%; transform: translateX(-50%); }

/* Stack schematic: GAME / $RC // ERC-20 / ETHEREUM on one blue bus line.
   Ethereum is the base layer (blue, carries the mark); the $RC layer keeps a
   red bracket and a red node: the Rebel Cars / Ethereum pairing. */
.tk-stack { grid-area: stack; position: relative; }
.tk-stack__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font: 500 .68rem/1.2 var(--font-mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tk-stack__std { display: inline-flex; align-items: center; gap: 8px; color: var(--eth-bright); }
.tk-stack__std .rc-eth-mark { height: 1.5em; }
.tk-stack__rows {
  position: relative;
  display: grid;
  gap: 28px;
  padding-left: 52px;
}
.tk-stack__rows::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 46px;
  bottom: 46px;
  width: 1px;
  background: linear-gradient(180deg, var(--eth-glow), var(--eth));
}
.tk-stack__pulse {
  position: absolute;
  left: 14px;
  top: 46px;
  width: 3px;
  height: 36px;
  background: linear-gradient(180deg, transparent, var(--eth-bright));
  box-shadow: 0 0 10px var(--eth-glow);
  opacity: 0;
  animation: tk-bus 3.6s var(--ease) infinite;
}
.tk-stack__row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name idx" "sub sub";
  align-content: center;
  gap: 8px 16px;
  min-height: 92px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.tk-stack__row::before,
.tk-stack__row::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
}
.tk-stack__row::before { top: -1px; left: -1px; border-top: 2px solid var(--line-2); border-left: 2px solid var(--line-2); }
.tk-stack__row::after { right: -1px; bottom: -1px; border-right: 2px solid var(--bracket); border-bottom: 2px solid var(--bracket); }
.tk-stack__node {
  position: absolute;
  left: -41px;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 1px solid var(--eth);
  border-radius: 1px;
  background: var(--bg);
  transform: translateY(-50%);
}
.tk-stack__node::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 3px;
  width: 32px;
  height: 1px;
  background: var(--eth-glow);
}
.tk-stack__name {
  grid-area: name;
  padding-top: .1em;
  font: 500 clamp(1.9rem, 2.6vw, 2.5rem)/.9 var(--font-display);
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--text);
}
.tk-stack__idx {
  grid-area: idx;
  font: 500 .72rem/1 var(--font-mono);
  letter-spacing: .18em;
  color: var(--text-3);
}
.tk-stack__sub {
  grid-area: sub;
  font: 500 .7rem/1.4 var(--font-mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-3);
}
/* $RC layer: Rebel Cars red accent (bracket + node) on the blue bus. */
.tk-stack__row--token {
  background:
    linear-gradient(90deg, var(--tk-red-wash), transparent 55%),
    var(--panel);
}
.tk-stack__row--token::before { border-color: var(--tk-red); }
.tk-stack__row--token .tk-stack__node { border-color: var(--tk-red); background: var(--tk-red); box-shadow: 0 0 12px var(--tk-red-glow); }
/* Ethereum layer: the base, blue border, wash and filled node, carries the mark. */
.tk-stack__row--eth {
  border-color: var(--eth-glow);
  background:
    linear-gradient(90deg, var(--eth-wash), transparent 75%),
    var(--panel);
}
.tk-stack__row--eth::before { border-color: var(--eth); }
.tk-stack__row--eth .tk-stack__node { background: var(--eth); box-shadow: 0 0 12px var(--eth-glow); }
.tk-stack__row--eth .tk-stack__node::after { background: var(--eth); }
.tk-stack__row--eth .tk-stack__idx { color: var(--eth-bright); }
.tk-stack__name .rc-eth-mark { height: .78em; margin-right: .24em; vertical-align: .02em; }

@media (max-width: 1199px) {
  .tk-chain { --glow-x: 82%; --glow-y: 30%; }
  .tk-chain__grid {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "text mark" "stack stack";
    gap: 72px clamp(40px, 6vw, 96px);
  }
  .tk-chain__mark { margin-right: clamp(16px, 4vw, 56px); }
}
@media (max-width: 720px) {
  .tk-chain { --glow-x: 50%; --glow-y: 44%; }
  .tk-chain__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "mark" "stack"; gap: 64px; }
  .tk-chain__mark { --s: clamp(150px, 44vw, 190px); margin: 8px auto 24px; justify-self: center; }
}
@media (max-width: 400px) {
  .tk-stack__rows { padding-left: 40px; }
  .tk-stack__rows::before { left: 9px; }
  .tk-stack__pulse { left: 8px; }
  .tk-stack__node { left: -35px; }
  .tk-stack__node::after { width: 26px; }
  .tk-stack__row { padding: 16px 18px; }
}


/* =========================================================================
   05  LINKS BAND
   ========================================================================= */
.tk-links { padding-block: clamp(56px, 7vw, 96px); }
/* Companion image left (exhaust detail), the links on the right. */
.tk-links__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "media body";
  align-items: center;
  gap: 40px clamp(32px, 5vw, 80px);
}
.tk-links__body { grid-area: body; display: grid; justify-items: start; gap: 36px; }
.tk-links__lead { display: grid; justify-items: start; gap: 18px; }
.tk-links__media { grid-area: media; margin: 0; }
/* Whole-car render, shown uncropped at its native 16:10. */
.tk-links__media img { aspect-ratio: 16 / 10; }
/* Caption at the top edge (empty studio black), so the wheels and the floor
   reflection at the bottom stay clear. */
.tk-links__media .rc-media__cap {
  top: 0;
  bottom: auto;
  padding: 12px 16px 26px;
  background: linear-gradient(180deg, rgba(5,6,8,.92) 35%, rgba(5,6,8,0));
}
.tk-links__mark {
  padding-top: .1em;
  font: 500 clamp(4rem, 7vw, 6.4rem)/.8 var(--font-display);
  letter-spacing: .02em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
}
.tk-links__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 16px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 960px) {
  .tk-links__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "media"; }
  .tk-links__media { max-width: 640px; }
}
@media (max-width: 560px) {
  .tk-links__list { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .tk-links__list .rc-btn { width: 100%; }
}


/* =========================================================================
   06  NOTICE
   ========================================================================= */
.tk-notice {
  position: relative;
  padding-block: clamp(56px, 7vw, 96px);
}
.tk-notice__panel { max-width: 860px; }
.tk-notice__panel .rc-panel__body p { font-size: 1rem; color: var(--text-2); }


/* Keyframes (token page only) */
@keyframes tk-breathe { 50% { opacity: .78; } }
@media (prefers-reduced-motion: reduce) {
  .tk-token__glow,
  .tk-token__orbit,
  .tk-token__sat,
  .tk-chain__halo,
  .tk-chain__orbit,
  .tk-stack__pulse { animation: none; }
}
@keyframes tk-bus {
  0% { top: 46px; opacity: 0; }
  15%, 80% { opacity: 1; }
  100% { top: calc(100% - 82px); opacity: 0; }
}
