@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("assets/fonts/sora-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("assets/fonts/sora-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("assets/fonts/sora-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff2e9f;
}
@property --accent2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #3b7bff;
}

:root {
  --ink: #120022;
  --paper: #fffdf7;
  --panel: #17021f;
  --panel-2: #21032c;
  --accent: #ff2e9f;
  --accent2: #3b7bff;
  --wheel-tilt: 0deg;
  --radius-lg: 28px;
  --radius-md: 18px;
  --ease-doh: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
  color-scheme: dark;
}

html[data-persona="thug"]      { --accent: #ff3b3b; --accent2: #ffc400; }
html[data-persona="wizard"]    { --accent: #a855f7; --accent2: #ffd166; }
html[data-persona="business"]  { --accent: #3b7bff; --accent2: #ff3b4e; }
html[data-persona="gamer"]     { --accent: #20d46b; --accent2: #00e5ff; }
html[data-persona="astronaut"] { --accent: #8fb3ff; --accent2: #ff5c5c; }
html[data-persona="angel"]     { --accent: #ffd866; --accent2: #ffffff; }
html[data-persona="base"]      { --accent: #ff2e9f; --accent2: #3b7bff; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #0a0014;
  color: var(--paper);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- global rotating wheel background ---------- */
#wheelBg {
  position: fixed;
  top: 50%; left: 50%;
  width: 260vmax; height: 260vmax;
  margin-left: -130vmax; margin-top: -130vmax;
  background: conic-gradient(
    from 0deg,
    #ff2e9f 0deg 30deg,
    #ff3b3b 30deg 60deg,
    #ff9a2e 60deg 90deg,
    #ffd400 90deg 120deg,
    #6be36b 120deg 150deg,
    #22c6c6 150deg 180deg,
    #3b7bff 180deg 210deg,
    #8b2fd1 210deg 240deg,
    #ff2e9f 240deg 270deg,
    #ff3b3b 270deg 300deg,
    #ff9a2e 300deg 330deg,
    #ffd400 330deg 360deg
  );
  will-change: transform;
  z-index: -2;
  transform: rotate(0deg);
}
#wheelVignette {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 38%, transparent 0%, rgba(6,0,14,0.4) 48%, rgba(6,0,14,0.86) 100%),
    rgba(6, 0, 14, 0.46);
  pointer-events: none;
}

/* ---------- custom cursor ---------- */
@media (pointer: fine) {
  body.cursor-ready { cursor: none; }
  body.cursor-ready a, body.cursor-ready button { cursor: none; }
}
#customCursor {
  position: fixed; top: 0; left: 0; width: 46px; height: 46px;
  transform: translate(-999px, -999px);
  background: url("assets/doh-cursor.png") center/contain no-repeat;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.5));
  pointer-events: none; z-index: 9998;
  will-change: transform;
}

/* ---------- buddy widget ---------- */
#buddy {
  position: fixed; right: 18px; bottom: 18px; z-index: 500;
  width: 84px; height: 84px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.85);
  background: radial-gradient(circle at 40% 30%, rgba(255,255,255,0.25), rgba(0,0,0,0.35));
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  cursor: pointer; padding: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 0 0 var(--accent);
  transition: box-shadow 0.25s var(--ease-doh), transform 0.15s var(--ease-doh);
  perspective: 260px;
}
#buddy:hover { transform: scale(1.06); }
#buddy:active { transform: scale(0.94); }
#buddyImg {
  width: 76%; height: 76%; object-fit: contain; border-radius: 50%;
  transform: rotateY(0deg) rotateX(0deg);
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.08s linear;
}
.buddy-count {
  position: absolute; top: -6px; left: -6px;
  background: var(--accent); color: #120022;
  font: 700 12px/1 var(--font-display);
  padding: 5px 7px; border-radius: 999px;
  border: 2px solid #0a0014;
  min-width: 22px; text-align: center;
}
@keyframes buddyPop {
  0% { transform: scale(1); }
  35% { transform: scale(0.82) rotate(-6deg); }
  70% { transform: scale(1.12) rotate(4deg); }
  100% { transform: scale(1); }
}
#buddy.barking #buddyImg { animation: buddyPop 0.42s var(--ease-doh); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 400;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(10, 0, 20, 0.42);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: conic-gradient(from 0deg, #ff2e9f, #ffd400, #6be36b, #3b7bff, #8b2fd1, #ff2e9f);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.8) inset;
}
.brand-word {
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--paper);
}
.topnav { display: flex; gap: 22px; font-size: 14px; font-weight: 600; }
.topnav a { text-decoration: none; opacity: 0.82; transition: opacity 0.2s, color 0.2s; }
.topnav a:hover { opacity: 1; color: var(--accent); }
@media (max-width: 720px) { .topnav { display: none; } }

.ca-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px; padding: 8px 14px; font-family: monospace; font-size: 12px;
  color: var(--paper); cursor: pointer; position: relative;
  transition: border-color 0.2s;
}
.ca-pill:hover { border-color: var(--accent); }
.ca-pill-label { opacity: 0.6; }
.ca-pill-value { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-pill-copied {
  position: absolute; top: 110%; right: 0; background: var(--accent); color: #120022;
  font: 700 11px/1 var(--font-display); padding: 5px 9px; border-radius: 8px;
  opacity: 0; transform: translateY(-4px); transition: 0.2s var(--ease-doh);
  pointer-events: none; white-space: nowrap;
}
.ca-pill.is-copied .ca-pill-copied { opacity: 1; transform: translateY(0); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  border: none; cursor: pointer; transition: transform 0.18s var(--ease-doh), box-shadow 0.18s var(--ease-doh), background 0.3s, color 0.3s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #120022;
  box-shadow: 0 10px 26px -8px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost {
  background: rgba(255,255,255,0.08); color: var(--paper);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-text {
  background: none; color: var(--paper); opacity: 0.7; padding: 14px 10px;
  text-decoration: underline; text-underline-offset: 4px;
}
.btn-text:hover { opacity: 1; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 90px 20px 60px;
  gap: 6px;
}
.hero-stage {
  position: relative;
  width: min(62vw, 460px); height: min(62vw, 460px);
  margin-bottom: 8px;
}
.persona-glow {
  position: absolute; inset: -18%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent) 0%, transparent 68%);
  filter: blur(18px);
  z-index: 0;
  transition: background 0.5s var(--ease-doh);
}
.persona-stack { position: relative; width: 100%; height: 100%; z-index: 1; }
.persona-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,0.45));
  transition: opacity 0.55s var(--ease-doh);
  transform-origin: 50% 85%;
}
.persona-img.is-active { opacity: 1; }
.persona-img.is-breathing { animation: breathe 4.2s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

.ticker {
  font-size: clamp(58px, 15vw, 148px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-shadow: 0 0 40px color-mix(in srgb, var(--accent) 60%, transparent);
}
.hero-sub {
  font-size: clamp(14px, 2vw, 18px);
  opacity: 0.85; max-width: 46ch; margin: 0 0 8px;
}
.wheel-status {
  font-family: monospace; font-size: 11px; letter-spacing: 0.04em;
  opacity: 0.55; margin: -4px 0 4px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.scroll-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 40px; border: 2px solid rgba(255,255,255,0.5); border-radius: 14px;
}
.scroll-hint span {
  display: block; width: 4px; height: 8px; border-radius: 2px; background: var(--paper);
  margin: 6px auto 0; animation: scrollHint 1.6s ease-in-out infinite;
}
@keyframes scrollHint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- shared section chrome ---------- */
section { position: relative; padding: 120px 20px; max-width: 1180px; margin: 0 auto; scroll-margin-top: 96px; }
.section-kicker {
  font-family: var(--font-body); font-weight: 700; font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); text-align: center; margin-bottom: 10px;
}
.section-title {
  font-size: clamp(30px, 5.4vw, 54px); text-align: center; margin-bottom: 10px;
}
.section-sub { text-align: center; opacity: 0.75; max-width: 52ch; margin: 0 auto 56px; }

/* ---------- spin section ---------- */
.spin-rig { display: flex; flex-wrap: wrap; gap: 60px; align-items: center; justify-content: center; }
.spin-wheel-wrap { position: relative; width: min(70vw, 340px); height: min(70vw, 340px); flex: none; }
.spin-wheel {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ff3b3b 0deg 60deg, #a855f7 60deg 120deg, #3b7bff 120deg 180deg,
    #20d46b 180deg 240deg, #8fb3ff 240deg 300deg, #ffd866 300deg 360deg
  );
  box-shadow: 0 0 0 8px rgba(255,255,255,0.08), 0 20px 60px -12px rgba(0,0,0,0.6);
  transform: rotate(0deg);
}
.spin-wheel::after {
  content: ""; position: absolute; inset: 10%; border-radius: 50%;
  background: radial-gradient(circle, rgba(10,0,20,0.55), rgba(10,0,20,0.15) 70%);
}
.spin-pointer {
  position: absolute; top: -14px; left: 50%; translate: -50% 0; z-index: 5;
  width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-top: 22px solid var(--paper);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}
.spin-hub {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; z-index: 4;
  width: 34%; height: 34%; border-radius: 50%;
  background: var(--paper); color: var(--ink);
  border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(14px, 2vw, 18px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.4);
  transition: transform 0.15s var(--ease-doh);
}
.spin-hub:hover { transform: translate(-50%, -50%) scale(1.05); }
.spin-hub:active { transform: translate(-50%, -50%) scale(0.94); }
.spin-hub:disabled { opacity: 0.7; cursor: wait; }
.spin-wheel.is-spinning { filter: blur(var(--spin-blur, 0px)); }

.spin-result {
  width: min(90vw, 320px); text-align: center;
  opacity: 0; transform: translateY(14px) scale(0.97);
  transition: opacity 0.5s var(--ease-doh), transform 0.5s var(--ease-doh);
}
.spin-result[hidden] { display: none; }
.spin-result.is-in { opacity: 1; transform: translateY(0) scale(1); }
#pfpCanvas {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.6);
  border: 3px solid rgba(255,255,255,0.15);
}
.spin-result-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin: 16px 0 2px; }
.spin-result-wisdom { font-family: monospace; opacity: 0.8; margin: 0 0 16px; }
.spin-result-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- forms carousel ---------- */
.forms-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  perspective: 1000px;
}
@media (max-width: 860px) { .forms-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .forms-grid { grid-template-columns: 1fr; } }
.form-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(10,0,20,0.62), rgba(10,0,20,0.42));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 22px 18px 26px;
  transform-style: preserve-3d;
  transition: transform 0.12s linear, box-shadow 0.3s var(--ease-doh), border-color 0.3s;
  will-change: transform;
}
.form-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, rgba(255,255,255,0.12)); box-shadow: 0 24px 50px -18px var(--accent); }
.form-card-inner { text-align: center; }
.form-card img { width: 78%; margin: 0 auto 14px; filter: drop-shadow(0 14px 22px rgba(0,0,0,0.4)); }
.form-card-name { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0 0 4px; text-transform: capitalize; }
.form-card-tag { opacity: 0.68; font-size: 13px; margin: 0; }

/* ---------- tokenomics ---------- */
.tokenomics-wheel {
  position: relative; width: min(100%, 640px); aspect-ratio: 1/1; margin: 0 auto;
}
.tokenomics-hub {
  position: absolute; inset: 32%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.14), rgba(0,0,0,0.25));
  border: 2px solid rgba(255,255,255,0.2);
  display: grid; place-items: center;
}
.tokenomics-hub-ticker { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 3vw, 30px); color: var(--accent); }
.tokenomics-stat {
  position: absolute; top: 50%; left: 50%; width: 180px;
  text-align: center;
  --r: 0px;
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) translate(0, var(--r)) rotate(calc(var(--angle, 0deg) * -1));
  opacity: 0; transition: opacity 0.6s var(--ease-doh), transform 0.7s var(--ease-doh);
}
.tokenomics-stat.is-out {
  opacity: 1;
  --r: -235px;
}
.tokenomics-value { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(18px, 2.6vw, 26px); }
.tokenomics-label { display: block; font-size: 12px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 720px) {
  .tokenomics-wheel { aspect-ratio: auto; height: auto; }
  .tokenomics-hub { position: static; width: 140px; height: 140px; margin: 0 auto 30px; inset: auto; }
  .tokenomics-stat { position: static; transform: none !important; opacity: 1; width: auto; margin: 0 auto 18px; max-width: 320px; }
}

/* ---------- how to buy ---------- */
.buy-steps {
  list-style: none; margin: 0 0 46px; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
@media (max-width: 860px) { .buy-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .buy-steps { grid-template-columns: 1fr; } }
.buy-step {
  background: rgba(10,0,20,0.5); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md); padding: 22px 18px;
}
.buy-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #120022;
  font-family: var(--font-display); font-weight: 700; margin-bottom: 12px;
}
.buy-step-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 0 0 6px; text-transform: capitalize; }
.buy-step-body { opacity: 0.75; font-size: 13.5px; margin: 0; }

.buy-ca-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  background: rgba(10,0,20,0.5); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px; padding: 12px 12px 12px 22px;
}
.buy-ca-label { opacity: 0.6; font-size: 13px; }
.buy-ca-value {
  font-family: monospace; background: rgba(0,0,0,0.3); border: none; color: var(--paper);
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 13px;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative; text-align: center; padding: 70px 20px 44px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-word { font-family: var(--font-display); font-weight: 700; font-size: 30px; }
.footer-line { opacity: 0.7; margin: 6px 0 22px; }
.footer-links { display: flex; gap: 18px; justify-content: center; margin-bottom: 18px; }
.footer-link {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease-doh);
}
.footer-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.footer-ca { font-family: monospace; font-size: 12px; opacity: 0.6; word-break: break-all; }
.footer-disclaimer { font-size: 11px; opacity: 0.4; margin-top: 16px; max-width: 44ch; margin-left: auto; margin-right: auto; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #wheelBg { transform: none !important; }
  .persona-img.is-breathing { animation: none; }
  .scroll-hint span { animation: none; }
  #buddyImg { transition: none; }
  .form-card { transition: none; }
  * { scroll-behavior: auto !important; }
}
body.reduced-motion .persona-img.is-breathing { animation: none; }
body.reduced-motion #buddyImg { transition: none; }
