:root {
  --ink: #1c0b10;
  --ink-2: #2b1219;
  --pink: #ff2e88;
  --magenta: #d1127a;
  --candy: #ff3b4f;
  --bubble: #ffd0e4;
  --yellow: #ffe066;
  --cream: #fff4f8;
  --line: 4px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 500;
  color: var(--cream);
  background:
    radial-gradient(circle at 15% 10%, #4a0f2a 0, transparent 45%),
    radial-gradient(circle at 90% 60%, #3d0a1f 0, transparent 40%),
    var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.4;
}

a { color: inherit; }

.blob {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
}
.blob-a { width: 420px; height: 420px; background: var(--pink); top: -120px; right: -80px; animation: drift 14s ease-in-out infinite; }
.blob-b { width: 360px; height: 360px; background: var(--candy); bottom: -140px; left: -100px; animation: drift 18s ease-in-out infinite reverse; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.12); }
}

/* nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  font-weight: 700;
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--pink);
  -webkit-text-stroke: 1px var(--ink);
  text-shadow: 3px 3px 0 var(--cream);
}
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 600; opacity: 0.85; }
.nav-links a:not(.btn):hover { opacity: 1; color: var(--yellow); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--yellow);
  border: var(--line);
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px dashed var(--yellow); outline-offset: 4px; }
.btn-big { font-size: 1.25rem; padding: 16px 28px; background: var(--pink); color: var(--cream); }
.btn-big:hover { background: var(--candy); }
.btn-ghost { background: var(--cream); }
.btn-dark { background: var(--ink); color: var(--cream); border-color: var(--ink); box-shadow: 4px 4px 0 var(--pink); }
.btn-small { font-size: 0.95rem; padding: 7px 16px; box-shadow: 3px 3px 0 var(--ink); }
.btn.soon { opacity: 0.6; cursor: not-allowed; }
.btn.soon::after { content: "soon"; font-size: 0.7em; background: var(--ink); color: var(--yellow); border-radius: 999px; padding: 2px 8px; }
.btn.busy { opacity: 0.7; pointer-events: none; }

/* stickers + notes */
.sticker {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 4px 12px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-4deg);
}
.sticker-yellow { background: var(--yellow); }
.sticker-pink { background: var(--bubble); }
.sticker-red { background: var(--candy); color: var(--cream); }

.note {
  color: var(--ink);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.note-pink { background: var(--bubble); }
.note-yellow { background: var(--yellow); }
.note-red { background: var(--candy); color: var(--cream); }

/* hero */
main { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

.hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: calc(100vh - 90px);
  padding: 12px 0 40px;
}

.brand {
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.9;
  margin: 18px 0 8px;
  font-weight: 700;
  color: var(--pink);
  -webkit-text-stroke: 3px var(--ink);
  text-shadow: 6px 6px 0 var(--cream), 10px 10px 0 var(--ink);
  letter-spacing: -0.02em;
  animation: wobble 3.5s ease-in-out infinite;
  transform-origin: left center;
}
@keyframes wobble {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1deg); }
}

.tagline {
  display: inline-block;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin: 10px 0 6px;
  background: var(--cream);
  color: var(--ink);
  border: var(--line);
  border-radius: 14px;
  padding: 4px 16px;
  transform: rotate(1.5deg);
  box-shadow: var(--shadow-sm);
}
.sub { font-size: 1.15rem; max-width: 30ch; opacity: 0.9; margin: 14px 0 24px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.connected {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  background: var(--cream);
  color: var(--ink);
  border: var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 16px;
  box-shadow: var(--shadow-sm);
}
.connected[hidden] { display: none; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #2bd96b; border: 2px solid var(--ink); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.35); } }

.connect-msg {
  margin-top: 16px;
  max-width: 38ch;
  background: var(--ink-2);
  border: 3px dashed var(--pink);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 600;
}

/* stage */
.stage-wrap { display: flex; flex-direction: column; gap: 18px; }

.stage {
  --amp: 0;
  --wave-speed: 2.4s;
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 64vh;
  width: 100%;
  margin: 0 auto;
  border: var(--line);
  border-radius: 36px;
  box-shadow: 10px 10px 0 var(--pink);
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 46, 136, calc(0.15 + var(--amp) * 0.5)) 0, transparent 60%),
    repeating-linear-gradient(45deg, #2b1219 0 18px, #24101a 18px 36px);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.stage-tag { position: absolute; top: 16px; left: 16px; z-index: 2; }
.tease-tag { position: absolute; top: 16px; right: 16px; z-index: 2; transform: rotate(5deg); animation: pulse 0.6s ease-in-out infinite; }
.tease-tag[hidden] { display: none; }

.toy-svg { width: 82%; height: 82%; overflow: visible; }
.toy-svg [hidden] { display: none; }
#toy-body { transform-box: view-box; transform-origin: 160px 200px; }

.body, .cord, .heart { stroke: var(--ink); stroke-width: 8; stroke-linejoin: round; stroke-linecap: round; }
.cord { fill: none; stroke-width: 7; }
.heart { fill: var(--candy); stroke-width: 6; }
.shine { fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 9; stroke-linecap: round; }
.shine-dot { fill: rgba(255, 255, 255, 0.8); }
.blush { fill: #ff8fb8; opacity: calc(0.35 + var(--amp) * 0.65); }
.eye { fill: var(--ink); }
.eye-glint { fill: #fff; }
.lid, .mouth { fill: none; stroke: var(--ink); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.mouth.open { fill: var(--ink); }
.sweat { fill: #8fe3ff; stroke: var(--ink); stroke-width: 3; }
.zzz { fill: var(--cream); font: 700 28px "Fredoka", sans-serif; }

.wave {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 0;
}
.stage[data-level]:not([data-level="0"]) .wave { animation: wave var(--wave-speed) ease-out infinite; }
.waves .w2 { animation-delay: calc(var(--wave-speed) * 0.2) !important; stroke: var(--pink); }
.waves .w3 { animation-delay: calc(var(--wave-speed) * 0.4) !important; stroke: var(--candy); }
@keyframes wave {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

.bzz {
  position: absolute;
  font-weight: 700;
  color: var(--yellow);
  -webkit-text-stroke: 1.5px var(--ink);
  font-size: 1.6rem;
  opacity: 0;
  pointer-events: none;
}
.bzz-1 { top: 22%; left: 8%; }
.bzz-2 { bottom: 18%; right: 8%; font-size: 1.9rem; color: var(--bubble); }
.bzz-3 { top: 14%; right: 14%; font-size: 2.3rem; color: var(--candy); }
.stage[data-level]:not([data-level="0"]) .bzz-1 { animation: bzz calc(var(--wave-speed) * 1.6) ease-in-out infinite; }
.stage[data-band="2"] .bzz-2, .stage[data-band="3"] .bzz-2, .stage[data-band="4"] .bzz-2, .stage[data-band="5"] .bzz-2 { animation: bzz calc(var(--wave-speed) * 1.3) ease-in-out infinite 0.3s; }
.stage[data-band="4"] .bzz-3, .stage[data-band="5"] .bzz-3 { animation: bzz calc(var(--wave-speed) * 1.1) ease-in-out infinite 0.6s; }
@keyframes bzz {
  0% { opacity: 0; transform: scale(0.6) rotate(-10deg); }
  30% { opacity: 1; transform: scale(1.1) rotate(6deg); }
  100% { opacity: 0; transform: scale(1.3) rotate(-4deg) translateY(-20px); }
}
.stage[data-band="5"] { box-shadow: 10px 10px 0 var(--candy); }

/* HUD */
.hud {
  background: var(--cream);
  color: var(--ink);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px 16px;
}
.hud-top, .hud-bottom { display: flex; justify-content: space-between; align-items: baseline; }
.hud-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.hud-num { font-weight: 700; font-size: 1.3rem; }
.hud-num b { font-size: 2rem; color: var(--pink); }
.hud-mood { font-weight: 700; font-size: 1.1rem; margin-top: 6px; }

.meter { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; margin-top: 6px; }
.seg {
  height: 22px;
  border: 2.5px solid var(--ink);
  border-radius: 6px;
  background: #f3d9e3;
  transition: background 0.2s, transform 0.2s;
}
.seg.on { background: var(--pink); }
.seg.on.hot { background: var(--candy); }
.seg.on.max { background: var(--yellow); transform: translateY(-3px); }

.sim { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; padding-top: 12px; border-top: 3px dashed var(--ink); font-weight: 600; font-size: 0.95rem; }
.sim label { flex-basis: 100%; }
.sim input { flex: 1; accent-color: var(--pink); min-width: 140px; }
.sim-mc { font-weight: 700; min-width: 70px; text-align: right; }
body.has-ca .sim { display: none; }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 10px 0 70px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
  font: inherit;
  text-align: left;
}
.stat:nth-child(1) { transform: rotate(-1.2deg); }
.stat:nth-child(2) { transform: rotate(0.8deg); }
.stat:nth-child(3) { transform: rotate(-0.6deg); cursor: pointer; }
.stat:nth-child(3):hover { transform: rotate(0deg) translate(-2px, -2px); }
.stat-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; }
.stat-value { font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; }
.stat-mood { font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

/* how */
.how { margin-bottom: 80px; }
.how h2 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 26px;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 4px 4px 0 var(--pink);
}
.steps { list-style: none; padding: 0; margin: 0 0 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; padding: 26px 22px 20px; }
.step:nth-child(1) { transform: rotate(-1.5deg); }
.step:nth-child(2) { transform: rotate(1deg); }
.step:nth-child(3) { transform: rotate(-0.5deg); }
.step h3 { margin: 6px 0 6px; font-size: 1.6rem; }
.step p { margin: 0; font-size: 1.05rem; }
.step-num {
  position: absolute;
  top: -20px;
  right: 18px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-weight: 700;
  font-size: 1.4rem;
  border: 3px solid var(--cream);
}

.scale { background: var(--cream); padding: 20px 24px; }
.scale h3 { margin: 0 0 10px; font-size: 1.4rem; }
.scale ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.scale li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 3px dotted rgba(28, 11, 16, 0.25); padding-bottom: 6px; }
.scale li:last-child { border-bottom: 0; }
.scale li span { font-weight: 600; text-align: right; }

/* footer */
.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px clamp(16px, 4vw, 48px) 50px;
  border-top: 4px dashed var(--pink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.footer p { margin: 0; max-width: 60ch; }
.footer .small { opacity: 0.7; font-size: 0.95rem; }
.footer .btn { margin-top: 10px; }

/* modal */
.modal {
  border: var(--line);
  border-radius: 28px;
  box-shadow: 10px 10px 0 var(--pink);
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  max-width: min(400px, 92vw);
  font-family: inherit;
}
.modal::backdrop { background: rgba(28, 11, 16, 0.75); backdrop-filter: blur(3px); }
.modal-inner { padding: 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.modal h2 { margin: 0; font-size: 1.9rem; color: var(--pink); -webkit-text-stroke: 1.5px var(--ink); }
.modal p { margin: 0; }
.qr-box {
  width: 244px;
  height: 244px;
  display: grid;
  place-items: center;
  background: #fff;
  border: var(--line);
  border-radius: 18px;
  margin: 6px 0;
}
.qr-box img { width: 220px; height: 220px; image-rendering: pixelated; }
.qr-box img[hidden] { display: none; }
.qr-loading { font-weight: 700; animation: pulse 1s ease-in-out infinite; }
.qr-status { font-weight: 700; }

/* responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: center; padding-top: 4px; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .brand { transform-origin: center; }
  .sub { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .stage { max-height: none; max-width: 520px; }
  .stats, .steps { grid-template-columns: 1fr; }
  .steps { gap: 34px; }
}
@media (max-width: 520px) {
  .nav-links a:not(.btn) { display: none; }
  .nav-links a#nav-x:not([hidden]) { display: inline; }
  .brand { -webkit-text-stroke: 2px var(--ink); text-shadow: 4px 4px 0 var(--cream), 7px 7px 0 var(--ink); }
  .btn-big { width: 100%; }
  .cta-row { width: 100%; flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .seg { height: 18px; border-width: 2px; border-radius: 4px; }
  .meter { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .brand, .dot { animation: none; }
}
