/* Token Kid shared look: header, phone menu, join forms, stickers, hub + club pages.
   Loaded by every page in site/ (one source; edit here, never copy into pages).
   Colour jobs: --accent (lime EN / yellow ES) = actions only (buttons, one highlight).
                --lilac (Token Kid's hoodie) = labels, small highlights, links. */

:root { --lilac: #c9b8ff; --lilac-deep: #a48cf5; --cream: #fff7e8; --tk-muted: #9aa0a8; }
html[lang^="es"] { --accent: #ffd23a; }
html { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body { padding-top: 0 !important; overflow-x: hidden; }
body.tk-lock { overflow: hidden; }

/* Less lime on freebie pages: labels and side notes go lilac, buttons keep the accent */
body .tag { background: var(--lilac); }
body .num b, body .who b { color: var(--lilac); }
body .note { border-left-color: var(--lilac); }
body .wrap > p a, body .wrap li a, body footer a, body .note a { color: var(--lilac); }

/* ---------- Header ---------- */
.tk-head { position: sticky; top: 0; z-index: 50; margin: 0 -16px 28px; padding: env(safe-area-inset-top, 0px) 16px 0;
  background: rgba(11, 12, 14, .97); border-bottom: 1px solid #2a2e35; }
/* No backdrop-filter on .tk-head: it would trap the fixed phone menu sheet inside the bar. */
.tk-bar { max-width: 1120px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 14px; }
.tk-brand { display: inline-flex; gap: 6px; text-decoration: none; flex: none; min-height: 44px; align-items: center; }
.tk-brand img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cream); margin-right: 4px; }
.tk-key { font: 800 14px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .06em; color: #f3f3ee; background: #15171b;
  border: 2px solid #2a2e35; border-bottom-width: 4px; border-radius: 7px; padding: 6px 7px 4px; }
.tk-key.tk-hot { background: var(--lilac); color: #0b0c0e; border-color: var(--lilac-deep); }
.tk-nav { display: flex; gap: 4px; margin-left: auto; }
.tk-nav a { color: #c9ccd1; text-decoration: none; font: 600 15px/1 "Inter Tight", system-ui, sans-serif; padding: 14px 12px; border-radius: 8px; }
.tk-nav a:hover { color: #f3f3ee; background: #15171b; }
.tk-nav a[aria-current="page"] { color: #f3f3ee; box-shadow: inset 0 -2px 0 var(--lilac); border-radius: 0; }
.tk-cta { flex: none; background: var(--accent); color: #0b0c0e !important; text-decoration: none; font: 800 14px/1 "Inter Tight", system-ui, sans-serif;
  padding: 0 16px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; }
.tk-nav .tk-cta { display: none; }
.tk-menu { display: none; flex: none; width: 44px; height: 44px; border: 2px solid #2a2e35; border-radius: 12px; background: #15171b; color: #f3f3ee;
  cursor: pointer; padding: 0; align-items: center; justify-content: center; }
.tk-menu svg { width: 22px; height: 22px; }
.tk-menu .tk-x { display: none; }
.tk-menu[aria-expanded="true"] .tk-x { display: block; }
.tk-menu[aria-expanded="true"] .tk-burger { display: none; }

@media (max-width: 719px) {
  .tk-bar { gap: 8px; height: 60px; }
  .tk-brand img { width: 34px; height: 34px; }
  .tk-bar > .tk-cta { margin-left: auto; padding: 0 14px; font-size: 13px; }
  .tk-menu { display: inline-flex; }
  .tk-nav { display: none; position: fixed; inset: calc(60px + env(safe-area-inset-top, 0px)) 0 0 0; margin: 0; flex-direction: column; gap: 0;
    background: #0b0c0e; padding: 12px 16px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
  .tk-nav.tk-open { display: flex; }
  .tk-nav a { font-size: 22px; padding: 18px 8px; border-bottom: 1px solid #2a2e35; border-radius: 0; min-height: 56px; box-shadow: none !important; }
  .tk-nav a[aria-current="page"] { color: var(--lilac); }
  .tk-nav .tk-cta { display: flex; justify-content: center; margin-top: 24px; min-height: 56px; font-size: 18px; border: 0; border-radius: 999px; }
}
@media (max-width: 359px) { .tk-brand .tk-key { font-size: 12px; padding: 5px 5px 3px; } .tk-brand img { display: none; } }

/* ---------- Join form (used everywhere) ---------- */
.tk-form { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-form input[type="email"] { flex: 1 1 220px; min-width: 0; min-height: 54px; font: 16px "Inter Tight", system-ui, sans-serif; color: #f3f3ee;
  background: #0b0c0e; border: 2px solid #2a2e35; border-radius: 999px; padding: 0 20px; }
.tk-form input[type="email"]:focus { outline: none; border-color: var(--lilac); }
.tk-form button { flex: 0 0 auto; min-height: 54px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--accent); color: #0b0c0e;
  font: 800 16px "Inter Tight", system-ui, sans-serif; cursor: pointer; transition: transform .15s ease; }
.tk-form button:active { transform: scale(.97); }
.tk-form button[disabled] { opacity: .6; cursor: wait; }
.tk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tk-msg { margin: 12px 0 0 !important; font-weight: 700; }
.tk-msg.tk-ok { color: var(--lilac); }
.tk-msg.tk-err { color: #ff7a6b; }
.tk-fine { font-size: 13px !important; color: var(--tk-muted) !important; margin: 10px 0 0 !important; }
.tk-done { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--lilac); margin: 0; }
.tk-done::before { content: "✓"; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lilac); color: #0b0c0e; font-size: 15px; }
@media (max-width: 479px) { .tk-form button { flex: 1 1 100%; } }
.tk-shake { animation: tk-shake .4s ease; }
@keyframes tk-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Sticker basics */
.tk-st { position: absolute; pointer-events: none; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }

/* ---------- Freebie pages: strip near the top + block at the end ---------- */
.tk-strip { position: relative; display: flex; align-items: center; gap: 14px; margin: 18px 0 30px; padding: 16px;
  background: #15171b; border: 2px solid #2a2e35; border-radius: 18px; scroll-margin-top: 90px; }
.tk-strip .tk-st { right: -4px; top: -46px; height: 100px; transform: rotate(6deg); }
.tk-strip-body b { padding-right: 64px; }
.tk-strip-body { flex: 1; min-width: 0; }
.tk-strip-body b { display: block; font-size: 17px; line-height: 1.25; margin-bottom: 10px; }
.tk-strip .tk-form input[type="email"], .tk-strip .tk-form button { min-height: 48px; }
.tk-strip .tk-fine { display: none; }

.tk-end { position: relative; margin-top: 56px; padding: 26px 20px 22px; border-radius: 22px; background: linear-gradient(160deg, #1c1830, #15171b 60%);
  border: 2px solid #3a3157; scroll-margin-top: 90px; }
.tk-end .tk-st { right: -10px; top: -64px; height: 150px; transform: rotate(5deg); }
.tk-end h2 { margin: 0 0 8px !important; padding-right: 96px; font-size: clamp(26px, 6vw, 34px) !important; line-height: 1.05; letter-spacing: -.03em; }
.tk-end p { color: #c9ccd1; margin: 0 0 16px; }

/* Gutter stickers on wide screens (never over the content column) */
.tk-deco { display: none; }
@media (min-width: 1200px) {
  .tk-deco { display: block; position: fixed; z-index: 0; bottom: 0; pointer-events: none; width: min(220px, calc((100vw - 760px) / 2 - 48px)); }
  .tk-deco img { width: 100%; height: auto; filter: drop-shadow(0 12px 20px rgba(0,0,0,.5)); }
  .tk-deco.tk-l { left: 24px; bottom: 40px; transform: rotate(-8deg); width: min(150px, calc((100vw - 760px) / 2 - 60px)); }
  .tk-deco.tk-r { right: 24px; transform: rotate(4deg); }
  body > .wrap { position: relative; z-index: 1; }
}

/* ---------- Hub + club pages ---------- */
body.tk-page .wrap { max-width: 1120px; }
.tk-hero { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: center; }
.tk-scene { position: relative; height: 220px; order: -1; margin: -6px 0 4px; }
.tk-scene .tk-kid { left: 50%; bottom: 0; height: 220px; transform: translateX(-50%) rotate(-3deg); }
.tk-scene .tk-p1 { left: 4%; top: 12px; height: 70px; transform: rotate(-14deg); }
.tk-scene .tk-p2 { right: 4%; bottom: 10px; height: 74px; transform: rotate(10deg); }
.tk-eyebrow { display: inline-block; font: 700 12px/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase;
  color: #0b0c0e; background: var(--lilac); padding: 7px 10px; border-radius: 6px; }
.tk-hero h1 { font-size: clamp(42px, 10vw, 76px); line-height: .95; letter-spacing: -.045em; font-weight: 900; margin: 16px 0 14px; text-wrap: balance; }
.tk-hero h1 em { font-style: normal; color: var(--lilac); background: none; padding: 0; }
.tk-hero .lead { font-size: 18px; color: #c9ccd1; margin: 0 0 22px; max-width: 34ch; }
.tk-joincard { background: #15171b; border: 2px solid #2a2e35; border-radius: 22px; padding: 16px; max-width: 520px; }

.tk-sec { margin-top: 64px; }
.tk-sec-head { position: relative; display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.tk-sec-head img { height: 66px; width: auto; transform: rotate(-8deg); filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)); flex: none; }
.tk-sec-head h2 { margin: 0 !important; font-size: clamp(26px, 5vw, 38px) !important; letter-spacing: -.03em; line-height: 1.05; }
.tk-sec-head p { margin: 6px 0 0; color: var(--tk-muted); font-size: 16px; }

.tk-vault { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tk-tool { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 120px; text-decoration: none; color: #f3f3ee;
  background: #15171b; border: 2px solid #2a2e35; border-radius: 18px; padding: 18px 18px 16px; overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.tk-tool:hover { border-color: var(--lilac-deep); transform: translateY(-2px); }
.tk-tool small { font: 700 11px/1.2 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--lilac); padding-right: 70px; }
.tk-tool b { font-size: 19px; line-height: 1.22; padding-right: 72px; }
.tk-tool .tk-ico { position: absolute; right: 12px; top: 12px; height: 56px; max-width: 64px; object-fit: contain; width: auto; transform: rotate(8deg); filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.tk-tool .tk-state { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font: 700 14px "Inter Tight", system-ui, sans-serif; color: var(--tk-muted); }
.tk-tool .tk-state::before { content: ""; width: 14px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath d='M3 7V5a4 4 0 0 1 8 0v2h1a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 16'%3E%3Cpath d='M3 7V5a4 4 0 0 1 8 0v2h1a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.tk-member .tk-tool .tk-state { color: var(--accent); }
.tk-member .tk-tool .tk-state::before { display: none; }

.tk-band { position: relative; margin-top: 72px; padding: 24px 20px 24px; border-radius: 22px; background: linear-gradient(150deg, #241d3d, #15171b 70%); border: 2px solid #3a3157; }
.tk-band .tk-st { right: 6px; bottom: 0; height: 150px; }
.tk-band span { font: 700 12px/1 "JetBrains Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--lilac); }
.tk-band h2 { margin: 10px 0 6px !important; font-size: clamp(24px, 5vw, 32px) !important; letter-spacing: -.03em; line-height: 1.08; padding-right: 96px; }
.tk-band p { margin: 0 0 14px; color: #c9ccd1; max-width: 46ch; padding-right: 80px; }
.tk-band a { color: var(--lilac); font-weight: 700; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }

.tk-perks { display: grid; grid-template-columns: 1fr; gap: 12px; }
.tk-perk { position: relative; background: #15171b; border: 2px solid #2a2e35; border-radius: 18px; padding: 18px 86px 18px 18px; }
.tk-perk img { position: absolute; right: 12px; top: 50%; height: 64px; transform: translateY(-50%) rotate(8deg); filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.tk-perk b { display: block; font-size: 19px; margin-bottom: 4px; }
.tk-perk span { color: #c9ccd1; font-size: 16px; }

@media (min-width: 720px) {
  .tk-tool { min-height: 150px; }
  .tk-vault { grid-template-columns: repeat(2, 1fr); }
  .tk-perks { grid-template-columns: repeat(3, 1fr); }
  .tk-perk { padding: 86px 18px 20px; }
  .tk-perk img { top: 14px; right: auto; left: 16px; transform: rotate(-6deg); }
}
@media (min-width: 960px) {
  .tk-hero { grid-template-columns: 1.15fr .85fr; gap: 32px; min-height: 520px; }
  .tk-scene { order: 0; height: 520px; margin: 0; }
  .tk-scene .tk-kid { height: 470px; bottom: 10px; }
  .tk-scene .tk-p1 { left: 0; top: 40px; height: 120px; }
  .tk-scene .tk-p2 { right: 0; bottom: 30px; height: 120px; }
  .tk-vault { grid-template-columns: repeat(3, 1fr); }
  .tk-band { padding: 34px 36px; }
  .tk-band .tk-st { height: 210px; right: 40px; }
  .tk-band h2, .tk-band p { padding-right: 240px; }
}
@media (prefers-reduced-motion: reduce) { .tk-tool, .tk-form button { transition: none; } .tk-shake { animation: none; } }

/* Email gate in front of a freebie */
body.tk-gated { overflow: hidden; }
.tk-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(8, 8, 14, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: tk-gate-in .24s ease-out; }
.tk-gate-out { opacity: 0; transition: opacity .24s ease; }
.tk-gate-card { position: relative; width: 100%; max-width: 440px; margin-top: 70px; padding: 30px 22px 22px; border-radius: 24px;
  background: linear-gradient(160deg, #221c3a, #15171b 65%); border: 2px solid rgba(201, 184, 255, .35); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.tk-gate-card .tk-st { right: -8px; top: -92px; height: 150px; transform: rotate(5deg); }
.tk-gate-tag { display: inline-block; max-width: calc(100% - 90px); font: 700 12px/1.3 "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--lilac); }
.tk-gate h2 { margin: 10px 0 8px; font: 900 clamp(32px, 9vw, 42px)/1 "Inter Tight", system-ui, sans-serif; letter-spacing: -.04em; color: var(--fg, #f3f3ee); }
.tk-gate p { margin: 0 0 16px; color: #c9ccd1; font-size: 17px; line-height: 1.45; }
.tk-gate .tk-form { flex-direction: column; }
.tk-gate .tk-form input[type="email"], .tk-gate .tk-form button { flex: none; }
.tk-gate .tk-form input[type="email"], .tk-gate .tk-form button { width: 100%; min-height: 54px; font-size: 17px; }
.tk-skip { display: block; width: 100%; min-height: 44px; margin-top: 8px; background: none; border: 0; cursor: pointer;
  color: var(--tk-muted); font: 500 14px "Inter Tight", system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.tk-skip:hover, .tk-skip:focus-visible { color: var(--fg, #f3f3ee); }
.tk-gate .tk-fine { text-align: center; margin-top: 4px !important; font-size: 12px !important; }
@keyframes tk-gate-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tk-gate { animation: none; } .tk-gate-out { transition: none; } }
.tk-gate .tk-fine a { color: var(--lilac); }
