:root {
  --cream: #fff3d6;
  --ink: #161414;
  --yellow: #ffd23f;
  --red: #ff4d3d;
  --blue: #4cc9f0;
  --green: #3ddc84;
  --pink: #ff8fb1;
  --white: #ffffff;
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: "Fredoka", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(rgba(22, 20, 20, 0.09) 1.4px, transparent 1.6px);
  background-size: 18px 18px;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
b { font-weight: 700; }

#embers { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
main, .footer, .nav { position: relative; z-index: 1; }

h1, h2, h3, .btn, .brand, .links, .tag, .marquee, .num, .panel-num, .ca-label, .copy, .bubble { font-family: "Bangers", "Impact", sans-serif; letter-spacing: 0.04em; font-weight: 400; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 12px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 12px auto 0; width: calc(100% - 32px);
  padding: 8px 10px 8px 8px;
  background: var(--white); border: var(--border); border-radius: 999px; box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.brand img { width: 42px; height: 42px; border-radius: 50%; border: var(--border); }
.links { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 26px); font-size: 20px; }
.links a:hover { color: var(--red); }
.pill { background: var(--yellow); border: var(--border); border-radius: 999px; padding: 4px 16px; box-shadow: 3px 3px 0 var(--ink); }
.pill:hover { color: var(--ink) !important; transform: translate(-1px, -1px); }

/* ---------- HERO ---------- */
.hero { max-width: 1100px; margin: 0 auto; padding: 50px 16px 60px; text-align: center; }
.tag {
  display: inline-block; background: var(--red); color: var(--white); border: var(--border); border-radius: 999px;
  padding: 6px 18px; font-size: 18px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-2deg);
  animation: wiggle 2.4s ease-in-out infinite;
}
h1 {
  margin: 18px 0 10px; font-size: clamp(64px, 13vw, 160px); line-height: 0.9; text-transform: uppercase;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0 0.2em;
}
h1 span { display: inline-block; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--ink); }
.w1 { color: var(--yellow); transform: rotate(-4deg); }
.w2 { color: var(--red); transform: rotate(2deg) translateY(6px); }
.w3 { color: var(--blue); transform: rotate(-2deg); }

.hero-stage { position: relative; width: min(380px, 78vw); margin: 34px auto 20px; }
.portrait {
  display: block; width: 100%; aspect-ratio: 1; padding: 0; cursor: pointer; overflow: hidden;
  background: var(--yellow); border: 4px solid var(--ink); border-radius: 28px; box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(-3deg); transition: transform 0.2s;
}
.portrait:hover { transform: rotate(0deg) scale(1.03); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait.bonk { animation: bonk 0.35s ease; }
@keyframes bonk { 0% { scale: 1; } 30% { scale: 0.9 1.08; } 60% { scale: 1.06 0.95; } 100% { scale: 1; } }

.bubble {
  position: absolute; z-index: 2; background: var(--white); border: var(--border); border-radius: 20px;
  padding: 8px 16px; font-size: clamp(18px, 2.4vw, 26px); line-height: 1.1; box-shadow: 4px 4px 0 var(--ink); white-space: nowrap;
}
.bubble::after { content: ""; position: absolute; bottom: -14px; width: 20px; height: 20px; background: var(--white); border-right: var(--border); border-bottom: var(--border); }
.bubble.left { left: -34%; top: 14%; transform: rotate(-6deg); }
.bubble.left::after { right: 26px; transform: rotate(45deg); }
.bubble.right { right: -38%; bottom: 22%; transform: rotate(5deg); }
.bubble.right::after { left: 22px; transform: rotate(45deg); }
.bubble b { color: var(--red); }
.pet-hint { display: inline-block; margin-top: 18px; font-weight: 600; font-size: 15px; opacity: 0.7; }

.lede { max-width: 620px; margin: 10px auto 0; font-size: clamp(18px, 2vw, 22px); font-weight: 500; }

.ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }
.btn {
  font-size: 24px; padding: 10px 26px; border: var(--border); border-radius: 14px; box-shadow: var(--shadow);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1.5deg); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn.yellow { background: var(--yellow); }
.btn.blue { background: var(--blue); }
.btn.white { background: var(--white); }

.ca {
  display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 30px auto 0;
  background: var(--white); border: var(--border); border-radius: 14px; padding: 8px; box-shadow: var(--shadow);
}
.ca-label { background: var(--ink); color: var(--yellow); border-radius: 8px; padding: 4px 10px; font-size: 18px; }
.ca code { flex: 1; min-width: 0; overflow-wrap: anywhere; text-align: left; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.copy { cursor: pointer; font-size: 18px; background: var(--green); border: var(--border); border-radius: 10px; padding: 4px 14px; }
.copy:active { transform: translate(2px, 2px); }

/* ---------- MARQUEE ---------- */
.marquee {
  position: relative; z-index: 1; overflow: hidden; background: var(--ink); color: var(--yellow);
  border-block: 4px solid var(--ink); padding: 14px 0; transform: rotate(-1.5deg); margin: 20px -20px;
}
.track { display: flex; align-items: center; gap: 26px; width: max-content; animation: scroll 24s linear infinite; font-size: 30px; white-space: nowrap; }
.track i { font-style: normal; font-size: 24px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- SECTIONS ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 90px 16px 20px; }
h2 { font-size: clamp(40px, 6vw, 68px); line-height: 1; margin-bottom: 12px; }
.hl { display: inline-block; background: var(--yellow); border: var(--border); padding: 2px 14px; border-radius: 10px; box-shadow: 4px 4px 0 var(--ink); transform: rotate(-2deg); margin-right: 6px; }
.hl.red { background: var(--red); color: var(--white); }
.hl.blue { background: var(--blue); }
.sub { font-size: 19px; font-weight: 500; margin-bottom: 36px; opacity: 0.85; }

.panel { background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.lore-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; margin-top: 34px; align-items: center; }
.story { padding: 34px 28px 26px; font-size: 18px; transform: rotate(-1deg); }
.story p + p { margin-top: 12px; }
.panel-num { position: absolute; top: -16px; left: 20px; background: var(--red); color: var(--white); border: var(--border); border-radius: 8px; padding: 2px 12px; font-size: 18px; }
.banner { padding: 10px; transform: rotate(1.5deg); background: var(--yellow); }
.banner img { border: var(--border); border-radius: 10px; aspect-ratio: 1440 / 430; object-fit: cover; }
.caption { display: block; text-align: center; font-weight: 600; font-size: 14px; margin-top: 8px; }

.stickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 50px; }
.sticker { border: var(--border); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); transition: transform 0.2s; }
.sticker:hover { transform: rotate(0deg) scale(1.04) !important; }
.s1 { background: var(--pink); transform: rotate(-2deg); }
.s2 { background: var(--blue); transform: rotate(1.5deg); }
.s3 { background: var(--green); transform: rotate(-1deg); }
.emoji { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.sticker h3 { font-size: 30px; line-height: 1; margin-bottom: 6px; }
.sticker p { font-weight: 500; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 40px; background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.facts div { padding: 16px; text-align: center; }
.facts div + div { border-left: var(--border); }
.facts small { display: block; font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.12em; opacity: 0.6; }
.facts b { font-family: "Bangers", sans-serif; font-weight: 400; font-size: 28px; letter-spacing: 0.04em; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 46px 20px 22px; }
.step:nth-child(odd) { transform: rotate(-1deg); }
.step:nth-child(even) { transform: rotate(1deg); }
.num {
  position: absolute; top: -22px; left: 18px; width: 50px; height: 50px; display: grid; place-items: center;
  background: var(--yellow); border: var(--border); border-radius: 50%; font-size: 30px; box-shadow: 3px 3px 0 var(--ink);
}
.step h3 { font-size: 26px; line-height: 1.05; margin-bottom: 8px; }
.step p { font-weight: 500; }
.mini { display: inline-block; margin-top: 12px; font-weight: 700; border-bottom: 3px solid var(--red); }
.mini:hover { color: var(--red); }

.chart-frame { background: var(--white); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 10px 10px 0 var(--ink); overflow: hidden; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--yellow); border-bottom: var(--border); font-weight: 700; }
.dots { display: flex; gap: 6px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--red); }
.dots i:nth-child(2) { background: var(--white); }
.dots i:nth-child(3) { background: var(--green); }
.chart-body { height: 540px; }
.chart-body iframe { width: 100%; height: 100%; border: 0; }
.chart-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; }
.chart-empty img { width: 120px; border-radius: 50%; border: var(--border); box-shadow: var(--shadow); animation: bob 2.2s ease-in-out infinite; }
.chart-empty p { font-family: "Bangers", sans-serif; font-size: 32px; letter-spacing: 0.04em; }
.chart-empty small { font-weight: 500; opacity: 0.7; }

.join { padding-bottom: 80px; }
.join-card { text-align: center; background: var(--red); color: var(--white); border: 4px solid var(--ink); border-radius: 30px; box-shadow: 10px 10px 0 var(--ink); padding: 50px 20px; }
.join-card h2 { color: var(--yellow); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink); }
.join-card .sub { color: var(--white); opacity: 1; margin-bottom: 0; }
.join-card .btn { color: var(--ink); }
.join-bull { width: 130px; height: 130px; border-radius: 50%; margin: 0 auto 18px; border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); animation: bob 2.5s ease-in-out infinite; }

/* ---------- FOOTER ---------- */
.footer { text-align: center; padding: 30px 16px 50px; font-size: 15px; }
.disclaimer { max-width: 640px; margin: 8px auto 0; font-size: 13px; opacity: 0.7; }

/* ---------- FX ---------- */
@keyframes wiggle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg) scale(1.04); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

#mooLayer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.moo {
  position: fixed; transform: translate(-50%, -50%) rotate(var(--r)); font-family: "Bangers", sans-serif; letter-spacing: 0.04em;
  font-size: 46px; color: var(--yellow); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--ink);
  animation: mooUp 1.2s ease-out forwards; white-space: nowrap;
}
@keyframes mooUp { 0% { opacity: 0; scale: 0.3; } 20% { opacity: 1; scale: 1.25; } 100% { opacity: 0; scale: 1; translate: 0 -120px; } }
.spark { position: fixed; font-size: 22px; transform: translate(-50%, -50%); animation: spark 0.9s ease-out forwards; }
@keyframes spark { to { translate: var(--dx) var(--dy); opacity: 0; scale: 0.4; rotate: 180deg; } }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--yellow); border: var(--border); box-shadow: var(--shadow); font-weight: 700;
  padding: 10px 20px; border-radius: 14px; transition: opacity 0.25s, transform 0.25s; max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; translate: 0 30px; transition: opacity 0.6s ease, translate 0.6s ease; }
.reveal.in { opacity: 1; translate: 0 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .lore-grid { grid-template-columns: 1fr; }
  .stickers { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: var(--border); }
  .bubble.left { left: -12%; top: -6%; }
  .bubble.right { right: -10%; bottom: -4%; }
}
@media (max-width: 600px) {
  .links a:not(.pill) { display: none; }
  .brand span { font-size: 20px; }
  .tag { font-size: 15px; padding: 5px 12px; }
  .pet-hint { margin-top: 34px; }
  .steps { grid-template-columns: 1fr; }
  h1 span { -webkit-text-stroke: 2px var(--ink); text-shadow: 4px 4px 0 var(--ink); }
  .chart-body { height: 440px; }
  .track { font-size: 24px; }
  .ca { flex-wrap: wrap; }
  .ca code { flex-basis: 100%; order: 3; padding: 4px; }
  .ca .copy { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; translate: 0 0; }
}
