/* Home: a live 3D hero, then one candy colour per section, each joined to the next by a row of dots. */
.wrap { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.sec { --bg: var(--paper); position: relative; background: var(--bg); padding: 120px 0 110px; }
.sec::before { /* scalloped edge: a row of dots in the section's colour */
  content: ""; position: absolute; left: 0; right: 0; top: -19px; height: 38px; pointer-events: none;
  background: radial-gradient(circle at 19px 19px, var(--bg) 18.5px, transparent 19.5px) repeat-x; background-size: 38px 38px;
}
.sec-head { max-width: 1060px; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(40px, 5.8vw, 86px); margin: 12px 0 18px; }
.sec-head p { font-size: 19px; font-weight: 600; margin: 0; max-width: 620px; }
.sec-head.light h2 { color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--ink); }
.sec-head.light p { color: #fff; text-shadow: 0 2px 0 rgba(23, 20, 46, 0.35); }
.sec-head.light .kicker { color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; background: linear-gradient(180deg, #4d98ff, #8ed0ff 55%, #ffd3ea); }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(23, 20, 46, 0.32) 0%, rgba(23, 20, 46, 0.08) 45%, transparent 70%), linear-gradient(0deg, rgba(23, 20, 46, 0.35) 0%, transparent 38%); }
.hero-in { position: relative; z-index: 2; min-height: 100vh; min-height: 100svh; max-width: 1320px; margin: 0 auto; padding: 116px 24px 72px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: end; gap: 32px; }
.hero-title { margin: 16px 0 16px; font-size: clamp(52px, min(8.6vw, 12.5vh), 138px); color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 6px 7px 0 var(--ink); }
.hero-title span { display: block; }
.hero-title em { font-style: normal; }
.hero-title .pink { color: var(--pink); } .hero-title .lime { color: var(--lime); }
.hero-sub { max-width: 600px; margin: 0 0 26px; font-size: clamp(17px, 1.5vw, 21px); font-weight: 600; color: #fff; text-shadow: 0 2px 12px rgba(23, 20, 46, 0.45); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.btn .arrow { transition: transform 0.15s; } .btn:hover .arrow { transform: translateX(4px); }
.now { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.now > * { position: relative; }
.now-head { display: flex; justify-content: space-between; align-items: center; }
.now-head .kicker { color: #b9b3e8; }
.now-head .led { font-size: 30px; }
.now-stock { display: flex; align-items: center; gap: 12px; }
.now-stock .stock-tile { border-color: #fff; }
.now-sym { display: block; font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1; }
.now-win { font-size: 12px; font-weight: 700; color: #b9b3e8; }
.now-stock .pct { margin-left: auto; }
#nowChart { width: 100%; height: auto; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.15); }
.now-top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.now-top li { display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.now-top li img { width: 28px; height: 28px; }
.now-top .rk { font-family: var(--display); color: var(--sun); }
.now-top .tm { font-family: var(--dotfont); font-weight: 900; color: #fff; font-size: 16px; }
.now-top .nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.now-foot { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; color: #b9b3e8; }
@media (max-width: 980px) {
  .hero-in { grid-template-columns: 1fr; padding-top: 110px; }
  .hero-title { font-size: clamp(52px, 11vw, 120px); }
  .now { max-width: 460px; }
}

/* ---------- tape ---------- */
.tape { position: relative; z-index: 3; background: var(--led); border-top: var(--border); border-bottom: var(--border); overflow: hidden; white-space: nowrap; padding: 14px 0; }
.tape-in { display: inline-block; font-size: 24px; color: #fff; animation: tape 60s linear infinite; padding-left: 100%; }
.tape-in .s { color: #fff; margin-right: 10px; } .tape-in .p { color: var(--sun); margin-right: 10px; }
.tape-in .u { color: #6dff9e; margin-right: 46px; } .tape-in .d { color: #ff7db4; margin-right: 46px; }
@keyframes tape { to { transform: translateX(-100%); } }

/* ---------- how ---------- */
.how { --bg: #ffe15a; background-image: radial-gradient(rgba(23, 20, 46, 0.09) 1.6px, transparent 1.9px); background-size: 22px 22px; background-color: var(--bg); }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.rule { padding: 0 22px 22px; overflow: hidden; transition: transform 0.15s; }
.rule:hover { transform: rotate(-0.8deg) translateY(-3px); }
.rule-ico { margin: 0 -22px 16px; padding: 16px; border-bottom: var(--border); background: var(--led); display: grid; place-items: center; }
.rule-ico canvas { width: 100%; max-width: 280px; height: auto; }
.rule h3 { font-family: var(--display); font-weight: 900; font-size: 21px; margin: 0 0 8px; }
.rule p { margin: 0; font-weight: 600; }
.c-sky { background: #e3f5ff; } .c-pink { background: #ffe3f1; } .c-grape { background: #eee6ff; } .c-lime { background: #ecfccf; } .c-sun { background: #fff6cc; } .c-orange { background: #ffe9d4; }
@media (max-width: 980px) { .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .rules { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { --bg: var(--paper); padding-top: 150px; }
.steps .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.step { position: relative; padding: 96px 26px 26px; text-align: center; }
.step img { position: absolute; top: -84px; left: 50%; transform: translateX(-50%); width: 170px; height: 170px; filter: drop-shadow(0 12px 14px rgba(23, 20, 46, 0.18)); animation: bob 3.2s ease-in-out infinite; }
.step:nth-child(2) img { animation-delay: -1s; } .step:nth-child(3) img { animation-delay: -2s; }
@keyframes bob { 50% { transform: translate(-50%, -10px); } }
.step > b { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--sun); border: var(--border); font-size: 22px; }
.step h3 { font-family: var(--display); font-weight: 900; font-size: 24px; margin: 12px 0 8px; }
.step p { margin: 0; font-weight: 600; }
.skill-note { max-width: 760px; margin: 46px auto 0; padding: 0 20px; text-align: center; font-size: 18px; font-weight: 600; }
@media (max-width: 860px) { .steps .wrap { grid-template-columns: 1fr; gap: 110px; } .steps { padding-top: 170px; } }

/* ---------- next ---------- */
.next { --bg: var(--sky); }
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cand { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cand-head { display: flex; align-items: center; gap: 10px; }
.cand-head b { font-family: var(--display); font-weight: 900; font-size: 22px; }
.cand-head .pct { margin-left: auto; }
.cand canvas { width: 100%; height: auto; border-radius: 12px; border: 2px solid var(--ink); }
.cand-foot { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.cand.lead { background: #fffbe0; }
.lead-badge { font-family: var(--display); font-weight: 900; font-size: 11px; letter-spacing: 0.08em; padding: 4px 9px; border-radius: 999px; background: var(--pink); color: #fff; border: 2px solid var(--ink); }
.next-foot { display: inline-flex; align-items: center; gap: 16px; margin-top: 28px; padding: 14px 22px; }
.next-foot > * { position: relative; }
.next-foot .kicker { color: #b9b3e8; } .next-foot .led { font-size: 34px; }
@media (max-width: 900px) { .next-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .next-grid { grid-template-columns: 1fr; } }

/* ---------- board ---------- */
.boardsec { --bg: var(--grape); }
.board-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.board-wrap .sec-head { margin: 0; }
.last { margin: 22px 0; padding: 16px; display: flex; align-items: center; gap: 14px; }
.last img { width: 54px; height: 54px; }
.last b { font-family: var(--display); font-weight: 900; }
.last .kicker { color: var(--ink-2); font-size: 11px; }
.bigboard { padding: 20px; }
.bigboard > * { position: relative; }
.bb-head { display: flex; justify-content: space-between; font-size: 26px; padding: 0 6px 12px; border-bottom: 2px dashed rgba(255, 255, 255, 0.18); margin-bottom: 8px; }
#bigBoard { list-style: none; margin: 0; padding: 0; }
#bigBoard li { display: grid; grid-template-columns: 40px 44px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-weight: 800; }
#bigBoard li img { width: 44px; height: 44px; }
#bigBoard .rk { font-family: var(--dotfont); font-weight: 900; font-size: 26px; color: var(--sun); text-align: center; }
#bigBoard .tm { font-family: var(--dotfont); font-weight: 900; font-size: 24px; color: #6dff9e; }
#bigBoard .nm { font-size: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#bigBoard .tag { color: var(--ink); }
@media (max-width: 900px) { .board-wrap { grid-template-columns: 1fr; } }

/* ---------- your dot ---------- */
.dotsec { --bg: #ff8fc9; }
.dot-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 44px; align-items: center; }
.dot-stage { padding: 20px; background: radial-gradient(circle at 50% 40%, #fff 0%, #ffe3f1 70%); display: flex; flex-direction: column; align-items: center; }
#homeDot { width: min(100%, 440px); height: auto; aspect-ratio: 1; }
.dot-name { font-family: var(--display); font-weight: 900; font-size: 26px; margin-top: -10px; }
.dot-panel h2 { font-size: clamp(40px, 5.4vw, 80px); margin: 10px 0 14px; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--ink); }
.dot-panel p { font-size: 18px; font-weight: 600; margin: 0 0 18px; }
.kicker.sm { font-size: 11px; margin-top: 14px; }
.swatches, .opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.swatches button { width: 42px; height: 42px; border-radius: 50%; border: var(--border); cursor: pointer; box-shadow: inset -4px -5px 0 rgba(0, 0, 0, 0.15), inset 4px 4px 0 rgba(255, 255, 255, 0.35); transition: transform 0.1s; }
.swatches button:hover { transform: scale(1.1); }
.swatches button.on, .opts button.on { outline: 4px solid var(--sun); outline-offset: 2px; }
.opts button { border: var(--border); border-radius: 999px; padding: 8px 14px; background: #fff; font-weight: 800; cursor: pointer; text-transform: capitalize; }
.dot-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
@media (max-width: 900px) { .dot-wrap { grid-template-columns: 1fr; } }

/* ---------- agents ---------- */
.agents { --bg: var(--ink); color: #fff; }
.agents .kicker { color: var(--sun); }
.agents h2 { font-size: clamp(40px, 5.6vw, 84px); margin: 10px 0 16px; }
.agents p { font-size: 18px; font-weight: 600; color: #d9d5ff; max-width: 620px; }
.agents-wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 40px; align-items: center; }
.copy { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 20px; margin: 24px 0 10px; border-color: #fff; }
.copy > * { position: relative; }
.copy code { font-size: 18px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.agents .small { font-size: 14px; color: #b9b3e8; }
.agents-dots { position: relative; height: 340px; }
.agents-dots img { position: absolute; width: 190px; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.35)); animation: bob 3.4s ease-in-out infinite; }
.agents-dots img:nth-child(1) { left: 6%; top: 10%; } .agents-dots img:nth-child(2) { left: 42%; top: 38%; animation-delay: -1.2s; } .agents-dots img:nth-child(3) { right: 0; top: 0; animation-delay: -2.2s; }
@media (max-width: 900px) { .agents-wrap { grid-template-columns: 1fr; } .agents-dots { height: 220px; } .agents-dots img { width: 130px; } }

/* ---------- token ---------- */
.token { --bg: var(--lime); }
.token-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 44px; align-items: center; }
.token h2 { font-size: clamp(44px, 5.6vw, 88px); margin: 10px 0 16px; }
.token p { font-size: 19px; font-weight: 600; margin: 0 0 22px; }
.ca { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 20px; }
.ca code { font-family: var(--dotfont); font-weight: 900; font-size: 20px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.token-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
#homePrize { max-width: 620px; }
.prizes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prize { padding: 20px; }
.prize b { display: block; font-size: 52px; line-height: 1; margin-bottom: 8px; }
.prize span { font-weight: 700; }
@media (max-width: 900px) { .token-wrap { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq { --bg: var(--paper); }
.faq h2 { font-size: clamp(40px, 5vw, 72px); margin: 0 0 28px; }
.faq details { padding: 18px 22px; margin-bottom: 14px; }
.faq summary { font-family: var(--display); font-weight: 800; font-size: 19px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 12px 0 0; font-weight: 600; font-size: 17px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #d9d5ff; padding: 60px 0 70px; position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -19px; height: 38px; background: radial-gradient(circle at 19px 19px, var(--ink) 18.5px, transparent 19.5px) repeat-x; background-size: 38px 38px; }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot p { margin: 0; font-size: 14px; font-weight: 600; }
.foot-links { display: flex; gap: 18px; font-weight: 800; }
.foot-links a { text-decoration: none; color: #fff; }


/* ---------- medals strip (steps) ---------- */
.medal-strip { max-width: 760px; margin: 40px auto 0; padding: 14px 20px; display: flex; align-items: center; gap: 8px; border: var(--border); border-radius: 22px; background: #fff; box-shadow: var(--pop-sm); }
.medal-strip p { margin: 0 0 0 8px; font-weight: 600; }
.medal-coin { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 14px; border: 2px solid var(--ink); box-shadow: inset -3px -4px 0 rgba(0, 0, 0, 0.18), inset 3px 3px 0 rgba(255, 255, 255, 0.5); }
.medal-coin.bronze { background: #e0965a; } .medal-coin.silver { background: #d7dbe6; } .medal-coin.gold { background: #ffd43b; } .medal-coin.pip { background: conic-gradient(#ff5fb3, #ffd43b, #9be22d, #47c2ff, #8b5cf6, #ff5fb3); color: #fff; text-shadow: 0 1px 0 var(--ink); }
.medal-coin.sm { width: 24px; height: 24px; font-size: 10px; }
@media (max-width: 620px) { .medal-strip { flex-wrap: wrap; } }

/* ---------- the grand prix ---------- */
.gpsec { --bg: var(--orange); }
.gpsec::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0 / 26px 26px; opacity: 0.9; }
.gp-wrap { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.gp-copy h2 { font-size: clamp(46px, 6.4vw, 96px); margin: 10px 0 16px; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 5px 6px 0 var(--ink); }
.gp-copy p { font-size: 19px; font-weight: 600; margin: 0 0 20px; }
.gp-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.gp-facts .chip { box-shadow: var(--pop-sm); }
.gp-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.gp-card > * { position: relative; }
.gp-head { display: flex; justify-content: space-between; align-items: center; }
.gp-head .kicker { color: #b9b3e8; } .gp-head .led { font-size: 28px; }
#gpChart { width: 100%; height: auto; border-radius: 14px; border: 2px solid rgba(255, 255, 255, 0.15); }
.gp-medals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gp-medals div { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 6px 8px; }
.gp-medals span.t { font-family: var(--dotfont); font-weight: 900; font-size: 15px; color: #fff; }
@media (max-width: 900px) { .gp-wrap { grid-template-columns: 1fr; } .gp-medals { grid-template-columns: repeat(2, 1fr); } }

/* ---------- board tabs & podium ---------- */
.bb-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.bb-tabs button { flex: 1; border: 2px solid rgba(255, 255, 255, 0.25); background: transparent; color: #d9d5ff; border-radius: 999px; padding: 8px 10px; font-family: var(--display); font-weight: 800; font-size: 13px; cursor: pointer; }
.bb-tabs button.on { background: var(--sun); border-color: var(--ink); color: var(--ink); }
#bigBoard .pts { font-family: var(--dotfont); font-weight: 900; font-size: 22px; color: var(--sun); }
#bigBoard .medal-coin { margin-right: 2px; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 10px; margin: 22px 0; max-width: 520px; }
.podium .step { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.podium .step img { width: 92px; height: 92px; filter: drop-shadow(0 8px 10px rgba(23, 20, 46, 0.3)); animation: bob 3.2s ease-in-out infinite; }
.podium .step:nth-child(2) img { animation-delay: -1.1s; } .podium .step:nth-child(3) img { animation-delay: -2.2s; }
.podium .block { width: 100%; border: var(--border); border-radius: 16px 16px 6px 6px; background: #fff; box-shadow: var(--pop-sm); text-align: center; padding: 8px 6px; }
.podium .block b { display: block; font-family: var(--display); font-weight: 900; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .block span { font-family: var(--dotfont); font-weight: 900; font-size: 16px; }
.podium .p1 .block { min-height: 112px; background: #fff6cc; } .podium .p2 .block { min-height: 84px; } .podium .p3 .block { min-height: 64px; }
.podium .rkb { font-family: var(--display); font-weight: 900; font-size: 22px; }

/* ---------- prize garage ---------- */
.garage-card { padding: 16px 18px; margin-bottom: 16px; }
.garage-card .gc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.garage-card .gc-head b { font-family: var(--display); font-weight: 900; font-size: 18px; }
.garage-card .gc-total { font-family: var(--dotfont); font-weight: 900; font-size: 22px; }
.garage-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.garage-card li { display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 800; font-size: 14px; background: var(--paper); }
.garage-card li .stock-tile { width: 28px; height: 28px; border-radius: 50%; border-width: 2px; }
.garage-card p { margin: 0; font-weight: 600; font-size: 15px; }
.garage-card a { font-weight: 800; }

/* ---------- finishing touches ---------- */
.hero-gp { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; color: #fff; font-weight: 700; text-decoration: none; text-shadow: 0 2px 10px rgba(23, 20, 46, 0.45); }
.hero-gp b { font-family: var(--display); font-weight: 900; }
.hero-gp .flag { width: 22px; height: 16px; border: 2px solid var(--ink); border-radius: 4px; background: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
.hero-gp:hover .arrow { transform: translateX(4px); }
.hero-gp .arrow { transition: transform 0.15s; }
.now-target { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; color: #d9d5ff; }
.now-target .medal-coin { width: 22px; height: 22px; font-size: 10px; }
.now-target b { font-family: var(--dotfont); font-weight: 900; font-size: 16px; color: #fff; }
.cand, .rule, .step, .prize, .faq details { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.cand:hover, .prize:hover { transform: translate(-1px, -3px); box-shadow: 6px 9px 0 var(--ink); }
/* cards rise in as they scroll into view (only when scripts run, so nothing hides without them) */
.reveal .rule, .reveal .step, .reveal .prize, .reveal .faq details, .reveal .gp-card, .reveal .bigboard, .reveal .dot-stage { opacity: 0; transform: translateY(22px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(.2, .9, .3, 1.2); }
.reveal .in { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .tape-in, .step img, .agents-dots img, .podium .step img { animation: none !important; }
  .reveal .rule, .reveal .step, .reveal .prize, .reveal .faq details, .reveal .gp-card, .reveal .bigboard, .reveal .dot-stage { opacity: 1; transform: none; transition: none; }
}
