/* One fixed brand palette: the design is intentionally the same in light and dark mode. */
:root {
  --purple: #6a00ff;
  --purple-deep: #4300a8;
  --ink: #1c0047;
  --yellow: #eefc3c;
  --pink: #ff2bd6;
  --white: #ffffff;
  --cream: #fffbea;
  --muted: #6b5a8e;
  --line: #e4dcf5;
  --danger: #e0144c;
  --display: "Titan One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--purple);
  color: var(--white);
  font: 500 17px/1.5 var(--body);
  overflow-x: hidden;
}
button { font-family: inherit; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 16px 56px;
  overflow: hidden;
  isolation: isolate;
}
.logo { position: absolute; top: 28px; left: 28px; width: 56px; height: 56px; }
.doodle { position: absolute; z-index: -1; pointer-events: none; }
.loop-left { left: -40px; bottom: -30px; width: min(340px, 50vw); }
.loop-right { right: -60px; top: 48%; width: min(260px, 36vw); }

.title-wrap { position: relative; display: inline-block; }
h1 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--yellow);
  margin: 0;
  line-height: .86;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-shadow: 0 6px 0 rgba(28,0,71,.18);
}
h1 .l1 { display: block; font-size: clamp(64px, 15vw, 190px); transform: rotate(-3deg); }
h1 .l2 { display: block; font-size: clamp(76px, 18vw, 230px); transform: rotate(-2deg); margin-top: .02em; }
h1 .c { display: inline-block; }
h1 .c:nth-child(3n+1) { transform: rotate(-4deg) translateY(2px); }
h1 .c:nth-child(3n+2) { transform: rotate(3deg); }
h1 .c:nth-child(3n)   { transform: rotate(-1deg) translateY(-3px); }
h1 .sp { display: inline-block; width: .3em; }
h1:hover .c { animation: wiggle .5s ease-in-out; }
h1:hover .c:nth-child(2n) { animation-delay: .06s; }
@keyframes wiggle { 50% { transform: translateY(-8px) rotate(4deg); } }

.burst-l { left: -14%; top: 22%; width: clamp(40px, 7vw, 76px); }
.sparkle { right: -12%; top: 50%; width: clamp(48px, 8vw, 110px); animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: rotate(18deg) scale(.88); } }

.tagline {
  font-weight: 800;
  font-size: clamp(22px, 4.2vw, 46px);
  letter-spacing: -.01em;
  margin: 20px 0 32px;
  line-height: 1.15;
}

.cta-wrap { position: relative; display: inline-block; }
.burst-r { right: -70px; top: -12px; width: 60px; }
.btn {
  position: relative;
  appearance: none; border: 0; cursor: pointer;
  background: var(--pink); color: var(--white);
  font-weight: 900; text-transform: uppercase; letter-spacing: .01em;
  border-radius: 18px;
  box-shadow: 16px 18px 0 var(--purple-deep);
  transition: transform .12s ease, box-shadow .12s ease;
  text-decoration: none; display: inline-block; text-align: center;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 18px 20px 0 var(--purple-deep); }
.btn:active { transform: translate(10px, 12px); box-shadow: 6px 6px 0 var(--purple-deep); }
.btn:focus-visible { outline: 4px solid var(--yellow); outline-offset: 4px; }
.btn.big { font-size: clamp(26px, 4.4vw, 50px); padding: .32em 1.7em; }

.sub {
  max-width: 640px; margin: 48px auto 0;
  font-size: clamp(16px, 2vw, 21px); font-weight: 600; line-height: 1.4;
}
.rule { width: min(760px, 100%); height: 1.5px; background: rgba(255,255,255,.5); border: 0; margin: 36px auto 22px; }
.fine { font-size: 14px; font-weight: 600; opacity: .9; margin: 0; }
.stats { margin: 14px 0 0; font-size: 15px; font-weight: 800; color: var(--yellow); min-height: 1.5em; }

.scroll-hint {
  margin-top: 22px; color: var(--white); opacity: .75; font-size: 14px; font-weight: 700;
  text-decoration: none;
}
.scroll-hint:hover { opacity: 1; }

/* ---------- Fine print section ---------- */
.how { background: var(--yellow); color: var(--ink); padding: 72px 16px 80px; }
.how-inner { max-width: 1040px; margin: 0 auto; }
.how h2 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(36px, 6vw, 64px); line-height: 1; margin: 0 0 8px; transform: rotate(-1.5deg);
}
.how .lede { font-weight: 600; font-size: 18px; margin: 0 0 36px; max-width: 620px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border: 3px solid var(--ink); border-radius: 20px;
  padding: 22px; box-shadow: 8px 8px 0 var(--ink);
}
.card .n {
  font-family: var(--display); font-size: 22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--purple); color: var(--yellow); margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.card p { margin: 0; font-size: 15px; color: #3b2d57; }
.card a { color: var(--purple); font-weight: 800; }

footer { background: var(--ink); color: rgba(255,255,255,.8); text-align: center; font-size: 14px; font-weight: 600; padding: 28px 16px; }
footer a { color: var(--yellow); }

/* ---------- Checkout sheet ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(28,0,71,.72);
  backdrop-filter: blur(4px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 28px 16px; overflow-y: auto;
}
.overlay.open { display: flex; }
.sheet {
  width: 100%; max-width: 480px; margin: auto 0;
  background: var(--cream); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 26px;
  box-shadow: 12px 12px 0 var(--pink);
  animation: pop .28s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pop { from { transform: scale(.9) rotate(-2deg); opacity: 0; } }
.sheet-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 22px; border-bottom: 3px solid var(--ink);
  background: var(--purple); color: var(--white); border-radius: 23px 23px 0 0;
}
.sheet-head h2 { font-family: var(--display); font-weight: 400; margin: 0; font-size: 26px; color: var(--yellow); text-transform: uppercase; line-height: 1; }
.sheet-head .right { display: flex; align-items: center; gap: 14px; }
.sheet-head .tot { font-size: 13px; font-weight: 700; opacity: .85; text-align: right; }
.sheet-head .tot strong { display: block; font-size: 22px; font-weight: 900; opacity: 1; font-variant-numeric: tabular-nums; }
.x {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid var(--white); background: transparent; color: var(--white);
  font-size: 22px; line-height: 1; cursor: pointer; font-weight: 800;
}
.x:hover { background: var(--white); color: var(--purple); }
.steps { display: flex; gap: 8px; padding: 16px 22px 0; }
.steps span { flex: 1; height: 8px; border-radius: 99px; background: var(--line); border: 2px solid var(--ink); }
.steps span.on { background: var(--pink); }
.body { padding: 18px 22px 24px; }
.view { display: none; }
.view.active { display: block; }
.view h3 { font-size: 20px; font-weight: 900; margin: 0 0 14px; }

.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tier {
  text-align: left; cursor: pointer; color: var(--ink);
  background: var(--white); border: 2.5px solid var(--ink); border-radius: 16px;
  padding: 12px 14px; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .1s, box-shadow .1s, background .1s;
  display: flex; flex-direction: column; gap: 2px;
}
.tier:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.tier[aria-pressed="true"] { background: var(--yellow); }
.tier .e { font-size: 24px; line-height: 1.2; }
.tier .p { font-family: var(--display); font-size: 26px; line-height: 1.1; }
.tier .nm { font-weight: 800; font-size: 14px; }
.tier .d { font-size: 12.5px; color: #4b3c66; font-weight: 600; line-height: 1.3; }
.custom { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
.custom span { font-weight: 800; white-space: nowrap; font-size: 15px; }

label { display: block; font-weight: 800; font-size: 14px; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
input, select {
  width: 100%; font: 600 16px var(--body); color: var(--ink);
  background: var(--white); border: 2.5px solid var(--ink); border-radius: 12px; padding: 11px 13px;
}
input::placeholder { color: #9e92b5; }
input:focus, select:focus { outline: none; box-shadow: 0 0 0 4px var(--pink); }
.err { color: var(--danger); font-size: 13px; font-weight: 700; margin-top: 8px; min-height: 1em; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 14px; margin-top: 16px; }
.check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--pink); }
.secure {
  display: flex; gap: 10px; align-items: flex-start;
  background: #efe7ff; border: 2px dashed var(--purple); border-radius: 12px;
  padding: 10px 12px; font-size: 13.5px; font-weight: 600; margin-top: 16px; line-height: 1.45;
}
.secure b { color: #635bff; }
.sheet .btn {
  width: 100%; margin-top: 20px; font-size: 20px; padding: 14px 16px;
  border-radius: 14px; box-shadow: 6px 6px 0 var(--ink);
}
.sheet .btn:hover { box-shadow: 8px 8px 0 var(--ink); }
.sheet .btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.sheet .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 6px 6px 0 var(--ink); }
.link-btn { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--purple); font-weight: 800; cursor: pointer; text-decoration: underline; font-size: 15px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40;
  transform: translate(-50%, 140%);
  max-width: calc(100% - 32px);
  background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 6px 6px 0 var(--ink); padding: 12px 18px; font-weight: 800;
  transition: transform .3s cubic-bezier(.2,1.4,.4,1);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Success page ---------- */
.result-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 40px 16px; position: relative; overflow: hidden; isolation: isolate; }
.result-card {
  width: 100%; max-width: 480px; text-align: center;
  background: var(--cream); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 26px; box-shadow: 12px 12px 0 var(--pink);
  padding: 28px 24px;
}
.result-card .big { font-size: 60px; line-height: 1.1; }
.result-card h1 { font-size: clamp(34px, 8vw, 46px); color: var(--purple); text-shadow: none; line-height: 1; margin: 8px 0 10px; transform: rotate(-2deg); }
.result-card p { margin: 0; font-weight: 600; }
.receipt {
  text-align: left; background: var(--white); border: 2.5px solid var(--ink); border-radius: 14px;
  padding: 12px 16px; margin-top: 18px; font-size: 14px;
}
.receipt div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 2px dotted var(--line); }
.receipt div:last-child { border-bottom: 0; }
.receipt span:first-child { color: var(--muted); font-weight: 700; }
.receipt span:last-child { font-weight: 800; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.result-card .btn { margin-top: 22px; font-size: 20px; padding: 14px 28px; border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); }
.result-card .btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }

/* Money rain */
.rain { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.rain span { position: absolute; top: -60px; font-size: 32px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(115vh) rotate(540deg); } }

@media (max-width: 640px) {
  .logo { top: 18px; left: 16px; width: 44px; height: 44px; }
  .burst-l { left: -6%; top: 6%; }
  .sparkle { right: -4%; top: 58%; }
  .burst-r { display: none; }
  .btn { box-shadow: 10px 12px 0 var(--purple-deep); }
  .btn.big { padding: .4em 1.3em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
