/* ==========================================================================
   TokenMart — Seedance 2.0 landing pages
   Design system ported from thetokenmart/tokenmart-website (app/globals.css
   + app/tm.css). Same tokens, same "warehouse / wholesale" merchandising
   language: paper background, hot-pink accent, price stickers, starburst
   badges, coupon cards, marquee ticker.
   Shared by v1–v4. Edit here once, all variants follow.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Space+Mono:wght@400;700&family=Outfit:wght@400;500;600;700&display=swap');

/* ---------- tokens: light (default) ---------- */
:root, [data-theme="light"] {
  color-scheme: light;
  --accent: #e61673;
  --lime:   #c6ff3a;
  --cyan:   #3ad8ff;

  --bg:      #f1efe8;
  --panel:   #ffffff;
  --panel2:  #fbfaf6;
  --panel3:  #f3f1ea;
  --ink:     #16151a;
  --dim:     #5b5a60;
  --mute:    #8d8b8f;
  --line:    rgba(20, 18, 12, 0.12);
  --line2:   rgba(20, 18, 12, 0.2);
  --grid-line: rgba(20, 18, 12, 0.032);
  --header-bg: rgba(247, 246, 241, 0.86);
  --chip-bg:   rgba(20, 18, 12, 0.05);
  --ghost-bg:  rgba(20, 18, 12, 0.035);
  --card-shadow: 0 18px 40px -26px rgba(20, 18, 12, 0.4);
  --media1:  #efece3;
  --media2:  #e6e2d7;
  --good:    #16a34a;
  --bad:     #dc2626;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --font-body: 'Outfit', system-ui, sans-serif;
}

/* ---------- tokens: dark ---------- */
[data-theme="dark"] {
  color-scheme: dark;
  --bg:      #0a0a0c;
  --panel:   #111114;
  --panel2:  #17171b;
  --panel3:  #1d1d22;
  --ink:     #f5f5f7;
  --dim:     #a6a6ad;
  --mute:    #6c6c75;
  --line:    rgba(255, 255, 255, 0.09);
  --line2:   rgba(255, 255, 255, 0.15);
  --grid-line: rgba(255, 255, 255, 0.016);
  --header-bg: rgba(10, 10, 12, 0.82);
  --chip-bg:   rgba(255, 255, 255, 0.05);
  --ghost-bg:  rgba(255, 255, 255, 0.03);
  --card-shadow: 0 22px 46px -24px rgba(0, 0, 0, 0.9);
  --media1:  #16161a;
  --media2:  #0e0e12;
  --good:    #4ade80;
  --bad:     #f87171;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:#0a0a0c; --panel:#111114; --panel2:#17171b; --panel3:#1d1d22;
    --ink:#f5f5f7; --dim:#a6a6ad; --mute:#6c6c75;
    --line:rgba(255,255,255,.09); --line2:rgba(255,255,255,.15);
    --grid-line:rgba(255,255,255,.016); --header-bg:rgba(10,10,12,.82);
    --chip-bg:rgba(255,255,255,.05); --ghost-bg:rgba(255,255,255,.03);
    --card-shadow:0 22px 46px -24px rgba(0,0,0,.9);
    --media1:#16161a; --media2:#0e0e12; --good:#4ade80; --bad:#f87171;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; }

.tm-root {
  background: var(--bg); color: var(--ink); min-height: 100vh;
  font-family: var(--font-body); overflow-x: hidden;
}
.tm-root a { color: inherit; text-decoration: none; }
.tm-root h1, .tm-root h2, .tm-root h3 { margin: 0; }
.tm-root.bg-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
}
.tm-root section { padding-left: clamp(16px, 4vw, 56px); padding-right: clamp(16px, 4vw, 56px); }
img, video { max-width: 100%; }

/* ---------- review banner (DELETE BEFORE PUBLISHING) ---------- */
.tm-reviewbar {
  background: repeating-linear-gradient(45deg, #ffd400, #ffd400 14px, #16151a 14px, #16151a 28px);
  padding: 3px;
}
.tm-reviewbar > span {
  display: block; background: #16151a; color: #ffd400; text-align: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; padding: 8px 14px; text-transform: uppercase;
}
/* placeholder numbers get a dotted underline so they're easy to spot on screen */
.ph { border-bottom: 2px dotted currentColor; }

/* ---------- header ---------- */
.tm-header {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 24px;
  height: 64px; padding: 0 clamp(16px, 4vw, 56px);
  background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.tm-logo { display: flex; align-items: center; gap: 9px; }
.tm-logo-img { height: 30px; width: auto; display: block; }
.tm-logo-tag {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--dim);
  border: 1px solid var(--line2); border-radius: 4px; padding: 2px 6px; white-space: nowrap;
}
.tm-head-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.tm-themebtn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line2);
  background: var(--ghost-bg); color: var(--dim); cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.tm-themebtn:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- ticker ---------- */
.tm-ticker {
  overflow: hidden; background: var(--accent);
  border-top: 2px solid rgba(0,0,0,.3); border-bottom: 2px solid rgba(0,0,0,.3);
}
.tm-ticker-track { display: inline-flex; white-space: nowrap; animation: tm-marq 38s linear infinite; }
.tm-ticker-item {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 26px;
  font-weight: 700; font-size: 12.5px; letter-spacing: .1em; color: #0a0a0c; text-transform: uppercase;
}
.tm-ticker-star { opacity: .55; }
@keyframes tm-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- buttons ---------- */
.tm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-weight: 700; font-size: 14px; letter-spacing: .01em;
  padding: 11px 19px; border-radius: 11px; border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, border-color .15s, background .15s, color .15s;
}
.tm-btn.v-primary { background: var(--accent); color: #0a0a0c; box-shadow: 0 6px 22px -8px var(--accent); }
.tm-btn.v-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px var(--accent); }
.tm-btn.v-ghost { background: var(--ghost-bg); color: var(--ink); border-color: var(--line2); }
.tm-btn.v-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.tm-cta-fullbtn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  font-family: inherit; font-weight: 700; font-size: clamp(18px, 1.8vw, 25px); letter-spacing: -.01em;
  color: #0a0a0c; background: var(--accent); border: 1.5px solid transparent; border-radius: 18px;
  padding: clamp(16px, 1.7vw, 22px); cursor: pointer; text-align: center;
  box-shadow: 0 10px 30px -10px var(--accent); transition: transform .12s, box-shadow .15s;
}
.tm-cta-fullbtn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--accent); }

/* ---------- headings ---------- */
.tm-kicker {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .16em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 10px;
}
.tm-h2 {
  font-family: var(--font-display); font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.02;
}
.tm-sub { color: var(--dim); max-width: 620px; margin: 14px auto 0; font-size: 16px; line-height: 1.55; }
.tm-seclabel { text-align: center; max-width: 780px; margin: 0 auto clamp(28px, 4vw, 46px); }
.tm-bb-eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; letter-spacing: .18em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 18px;
}

/* ---------- stickers / bursts ---------- */
.tm-sticker {
  display: inline-flex; align-items: center; transform: rotate(var(--rot, -8deg));
  font-weight: 700; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 4px; color: #0a0a0c; white-space: nowrap; z-index: 8;
  border: 1.5px solid rgba(0,0,0,.22); box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.tm-sticker.big { font-size: 14px; padding: 8px 15px; letter-spacing: .05em; }
.tm-sticker.tone-pink { background: var(--accent); color: #fff; }
.tm-sticker.tone-lime { background: var(--lime); }
.tm-sticker.tone-cyan { background: var(--cyan); }

.tm-burst {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); line-height: 1;
}
.tm-burst svg { display: block; }
.tm-burst.tone-pink { color: var(--accent); }
.tm-burst.tone-lime { color: var(--lime); }
.tm-burst polygon { fill: currentColor; stroke: rgba(0,0,0,.25); stroke-width: 1.5; }
.tm-burst-txt {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: #0a0a0c; transform: rotate(-11deg);
}
.tm-burst.tone-pink .tm-burst-txt { color: #fff; }
.tm-burst-txt b { font-size: .3em; font-weight: 700; letter-spacing: -.02em; }
.tm-burst-txt em { font-size: .14em; font-weight: 700; font-style: normal; letter-spacing: .18em; margin-top: .02em; }

.tm-pill {
  display: inline-flex; align-items: center; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .02em; color: var(--dim);
  background: var(--chip-bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px;
}

/* ---------- price tag ---------- */
.tm-price-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.tm-retail {
  font-family: var(--font-mono); font-size: 13px; color: var(--dim);
  text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px;
}
.tm-disc {
  font-weight: 700; font-size: 11.5px; color: #fff; background: var(--accent);
  padding: 2px 7px; border-radius: 5px; letter-spacing: .02em;
}
.tm-whole {
  font-family: var(--font-mono); font-weight: 700; color: var(--ink);
  display: inline-flex; align-items: baseline; line-height: 1; font-size: 28px; letter-spacing: -.02em;
}
.tm-whole .tm-cur { font-size: .62em; color: var(--accent); margin-right: 1px; }
.tm-whole .tm-unit { font-family: var(--font-mono); font-size: 11px; color: var(--dim); margin-left: 7px; font-weight: 400; letter-spacing: 0; }
.tm-price.sz-lg .tm-whole { font-size: clamp(38px, 5vw, 58px); }

/* ---------- hero: SAVE N% lockup ---------- */
.tm-hero { position: relative; padding-top: clamp(30px, 4vw, 56px); padding-bottom: clamp(38px, 5vw, 70px); }
.tm-hero-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(20px, 3vw, 48px); align-items: center; }
.tm-save { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(2px, .4vw, 8px); line-height: 1; }
.tm-save-up, .tm-save-on {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3.6vw, 54px); letter-spacing: .01em; color: var(--ink); white-space: nowrap;
}
.tm-save-big {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(120px, 17vw, 260px); letter-spacing: -.05em; line-height: .8;
  color: var(--accent); text-shadow: 0 0 70px color-mix(in srgb, var(--accent) 40%, transparent);
  display: inline-flex; align-items: flex-start;
}
.tm-pctsign { font-size: .5em; margin-top: .1em; }
.tm-hero-sub { margin: 20px 0 0; color: var(--dim); font-size: clamp(15px, 1.25vw, 17.5px); line-height: 1.55; max-width: 540px; }
.tm-hero-sub b { color: var(--ink); }
.tm-hero-ctas { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.tm-hero-right { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 20px); }

/* ---------- coupon cards ---------- */
.tm-coupons { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.8vw, 24px); }
.tm-coupon {
  position: relative; border: 3px solid #0a0a0c; border-radius: 26px; padding: 20px 22px 22px;
  box-shadow: 0 16px 34px -16px rgba(10,10,12,.45);
}
.tm-coupon.lime { background: var(--lime); transform: rotate(-1.4deg); }
.tm-coupon.cyan { background: var(--cyan); transform: rotate(1.1deg); }
.tm-coupon-top { display: flex; align-items: center; gap: 13px; padding-bottom: 15px; border-bottom: 2.5px dashed rgba(10,10,12,.55); }
.tm-coupon-icon {
  width: 48px; height: 48px; border-radius: 50%; background: #0a0a0c; color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.tm-coupon-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(21px, 2vw, 29px); letter-spacing: -.02em; line-height: .94; color: #0a0a0c; }
.tm-coupon-desc { margin: 14px 0 0; color: #0a0a0c; font-weight: 500; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.35; }

/* ---------- media / demo video ---------- */
.tm-media {
  position: relative; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: linear-gradient(140deg, var(--media1), var(--media2)); box-shadow: var(--card-shadow);
}
.tm-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tm-media-cap {
  position: absolute; left: 12px; bottom: 12px; z-index: 4;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(10,10,12,.72); color: #fff; padding: 5px 9px; border-radius: 6px; backdrop-filter: blur(6px);
}

/* ---------- price ladder (variant 2 / 3) ---------- */
.tm-ladder { display: grid; gap: 8px; max-width: 900px; margin: 0 auto; }
.tm-ladder-row {
  display: grid; grid-template-columns: minmax(140px, 200px) 1fr minmax(96px, 118px);
  align-items: center; gap: 14px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
.tm-ladder-row.is-us { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); box-shadow: 0 8px 26px -14px var(--accent); }
.tm-ladder-row.is-bench { border-style: dashed; background: var(--panel2); }
.tm-ladder-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.tm-ladder-row.is-us .tm-ladder-name { font-weight: 700; }
.tm-ladder-bar { height: 12px; border-radius: 999px; background: var(--chip-bg); overflow: hidden; }
.tm-ladder-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--line2); }
.tm-ladder-row.is-us .tm-ladder-bar > i { background: var(--accent); }
.tm-ladder-row.is-bench .tm-ladder-bar > i { background: var(--mute); }
.tm-ladder-val { font-family: var(--font-mono); font-weight: 700; font-size: 14px; text-align: right; white-space: nowrap; }
.tm-ladder-delta { font-family: var(--font-mono); font-size: 11px; color: var(--mute); }
.tm-ladder-note { font-size: 12.5px; color: var(--dim); text-align: center; margin-top: 16px; line-height: 1.6; }
.tm-ladder-note a { color: var(--dim); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- model shelf (one key, many models) ---------- */
.tm-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; max-width: 1040px; margin: 0 auto; }
.tm-shelf-item {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: 13px; background: var(--panel);
  font-size: 13.5px; font-weight: 600; transition: border-color .15s, transform .12s;
}
.tm-shelf-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.tm-shelf-item img { width: 24px; height: 24px; object-fit: contain; flex: none; border-radius: 5px; }
.tm-shelf-item.is-star { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }

/* ---------- code block ---------- */
.tm-code {
  background: var(--panel3); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 12.5px;
  line-height: 1.75; color: var(--ink); margin: 0;
}
.tm-code .c-key { color: var(--accent); }
.tm-code .c-str { color: var(--good); }
.tm-code .c-com { color: var(--mute); }

/* ---------- generic cards ---------- */
.tm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
.tm-card {
  position: relative; border: 1px solid var(--line); border-radius: 18px; background: var(--panel);
  padding: 22px 22px 24px; box-shadow: var(--card-shadow);
}
.tm-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.tm-card p { margin: 0; color: var(--dim); font-size: 14.5px; line-height: 1.55; }
.tm-card-num { font-family: var(--font-mono); font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: .12em; margin-bottom: 12px; display: block; }

/* ---------- stat strip ---------- */
.tm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; max-width: 1000px; margin: 0 auto; }
.tm-stat { background: var(--panel); padding: 22px 20px; text-align: center; }
.tm-stat b { display: block; font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; letter-spacing: -.03em; color: var(--ink); line-height: 1; }
.tm-stat span { display: block; margin-top: 7px; font-size: 12.5px; color: var(--dim); }

/* ---------- final CTA ---------- */
.tm-final { text-align: center; padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(56px, 7vw, 100px); }
.tm-final-box {
  position: relative; max-width: 820px; margin: 0 auto; border: 3px solid #0a0a0c; border-radius: 28px;
  background: var(--lime); padding: clamp(30px, 4vw, 48px) clamp(22px, 4vw, 52px);
  box-shadow: 0 22px 44px -22px rgba(10,10,12,.5);
}
[data-theme="dark"] .tm-final-box { border-color: rgba(255,255,255,.15); }
.tm-final-box h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; color: #0a0a0c; }
.tm-final-box p { color: rgba(10,10,12,.72); font-size: 16px; margin: 14px auto 26px; max-width: 520px; line-height: 1.55; }
.tm-final-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: #0a0a0c; color: #fff; font-weight: 700; font-size: 17px;
  padding: 16px 32px; border-radius: 14px; transition: transform .12s;
}
.tm-final-btn:hover { transform: translateY(-2px); }
.tm-final-fine { margin-top: 16px; font-family: var(--font-mono); font-size: 11.5px; color: rgba(10,10,12,.6); }

/* ---------- footer ---------- */
.tm-footer { border-top: 1px solid var(--line); padding: 28px clamp(16px, 4vw, 56px); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tm-footer small { color: var(--dim); font-size: 12.5px; }
.tm-footer .sp { margin-left: auto; }

/* ---------- section rhythm ---------- */
.tm-sec { padding-top: clamp(46px, 5.5vw, 84px); padding-bottom: clamp(46px, 5.5vw, 84px); }
.tm-sec.alt { background: var(--panel2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tm-media-cap { font-size: 9px; padding: 4px 7px; left: 8px; bottom: 8px; }
  .tm-hero-grid { grid-template-columns: 1fr; }
  .tm-save { align-items: center; text-align: center; }
  .tm-hero-sub { margin-left: auto; margin-right: auto; text-align: center; }
  .tm-hero-ctas { justify-content: center; }
  .tm-ladder-row { grid-template-columns: minmax(110px, 1fr) minmax(70px, 96px); }
  .tm-ladder-bar { display: none; }
  .tm-nav-hide { display: none; }
}
@media (max-width: 560px) {
  .tm-coupons { grid-template-columns: 1fr; }
  .tm-save-big { font-size: clamp(96px, 30vw, 150px); }
}
@media (prefers-reduced-motion: reduce) {
  .tm-ticker-track { animation: none; }
  * { transition: none !important; }
}
