:root {
  --cream: #FFF4DE;
  --pink: #FF3D8B;
  --yellow: #FFD23F;
  --blue: #2D5BFF;
  --mint: #3DDC97;
  --ink: #1C1033;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: clip;
}
a { color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Nav */
nav { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; }
.logo { display: block; transition: transform .15s ease; }
.logo img { display: block; height: 96px; width: auto; }
.logo:hover { transform: rotate(-4deg) scale(1.04); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 20px/1 var(--display);
  text-decoration: none;
  background: var(--pink); color: #fff;
  padding: 18px 28px;
  border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.btn.small { font-size: 16px; padding: 12px 20px; box-shadow: 3px 3px 0 var(--ink); }
.btn.small:hover { box-shadow: 5px 5px 0 var(--ink); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
  padding: 48px 0 88px;
}
.tag {
  display: inline-block;
  font: 700 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: var(--yellow);
  padding: 8px 12px; border-radius: 6px;
  transform: rotate(-2deg);
  margin-bottom: 24px;
}
h1 {
  font-weight: 800; font-size: clamp(48px, 7.4vw, 96px);
  line-height: .92; letter-spacing: -0.045em;
  margin-bottom: 24px;
}
h1 .hl { background: var(--yellow); padding: 0 .12em; border-radius: .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lede { font-size: 21px; max-width: 30ch; margin-bottom: 36px; }
.fine { font: 400 13px/1.4 var(--mono); margin-top: 18px; opacity: .7; }

/* Mystery box */
.stage { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.burst {
  position: absolute; inset: 0;
  background: var(--blue);
  clip-path: polygon(50% 0%,61% 14%,79% 8%,80% 26%,98% 30%,88% 46%,100% 62%,82% 69%,82% 88%,63% 84%,50% 100%,37% 84%,18% 88%,18% 69%,0% 62%,12% 46%,2% 30%,20% 26%,21% 8%,39% 14%);
  animation: spin 40s linear infinite;
  transition: background .4s ease;
}
.box {
  padding: 0; font: inherit; color: inherit;
  transition: transform .35s cubic-bezier(.5,-0.4,.7,.2), opacity .25s ease .1s;
  position: absolute; inset: 22%;
  background: var(--yellow);
  border: 4px solid var(--ink); border-radius: 18px;
  box-shadow: 10px 10px 0 var(--ink);
  display: grid; place-items: center;
  animation: bob 3.2s ease-in-out infinite;
  cursor: pointer;
}
.box::before, .box::after {
  content: ""; position: absolute; background: var(--pink);
  border-block: 3px solid var(--ink);
}
.box::before { left: -4px; right: -4px; top: 50%; height: 30px; transform: translateY(-50%); }
.box::after { top: -4px; bottom: -4px; left: 50%; width: 30px; transform: translateX(-50%); border-block: 0; border-inline: 3px solid var(--ink); }
.box .q {
  position: relative; z-index: 1;
  font-weight: 800; font-size: clamp(80px, 12vw, 140px); line-height: 1;
  color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill;
}
.box.shake { animation: shake .45s ease; }
.box:focus-visible, .product:focus-visible { outline: 3px solid var(--blue); outline-offset: 6px; }
.product {
  position: absolute; z-index: 3; left: -6%; width: 112%; top: 50%;
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: translateY(-50%) rotate(-14deg) scale(.2);
  opacity: 0; visibility: hidden;
  transition: transform .6s cubic-bezier(.34,1.56,.64,1), opacity .2s ease, visibility .6s;
}
.product img { display: block; width: 100%; height: auto; filter: drop-shadow(8px 10px 0 rgba(28,16,51,.3)); }
.stage.open .product { opacity: 1; visibility: visible; transform: translateY(-50%) rotate(-14deg) scale(1); }
.stage.open .box { animation: none; transform: scale(0) rotate(25deg); opacity: 0; pointer-events: none; }
.stage.open .burst { background: var(--yellow); }
.stage.open .stamp { color: var(--blue); border-color: var(--blue); }
.hint {
  position: absolute; right: 4%; bottom: 12%; z-index: 4;
  font: 700 13px/1 var(--mono); letter-spacing: .06em;
  background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 6px;
  transform: rotate(-6deg);
  transform-origin: right top;
  animation: hint-in .5s cubic-bezier(.34,1.56,.64,1) 1.6s backwards;
}
.stamp {
  position: absolute; z-index: 4; left: 2%; top: 8%;
  font: 700 clamp(16px, 2.2vw, 22px)/1 var(--mono); letter-spacing: .08em;
  color: var(--pink); background: var(--cream);
  border: 3px solid var(--pink); border-radius: 6px;
  padding: 10px 14px; transform: rotate(-12deg);
}
.spark { position: absolute; width: 34px; height: 34px; background: var(--mint); clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); animation: twinkle 2.4s ease-in-out infinite; }
.spark.a { top: 4%; left: 6%; }
.spark.b { top: 12%; right: 0; width: 22px; height: 22px; background: var(--pink); animation-delay: .8s; }
.spark.c { bottom: 6%; left: 14%; width: 26px; height: 26px; background: var(--yellow); animation-delay: 1.4s; }

/* Ticker */
.ticker { background: var(--ink); color: var(--yellow); overflow: hidden; border-block: 4px solid var(--ink); transform: rotate(-1.5deg); margin-inline: -20px; }
.ticker div { display: flex; width: max-content; animation: scroll 28s linear infinite; }
.ticker span { font: 700 18px/1 var(--mono); letter-spacing: .12em; padding: 16px 24px; white-space: nowrap; }
.ticker span:nth-child(even) { color: var(--pink); }

/* Case file */
.file { padding: 104px 0 96px; }
.folder {
  background: #fff; border: 4px solid var(--ink); border-radius: 0 20px 20px 20px;
  box-shadow: 10px 10px 0 var(--pink);
  padding: clamp(24px, 5vw, 56px);
  position: relative; max-width: 820px; margin-inline: auto;
}
.folder::before {
  content: "CASE FILE #WS-01"; position: absolute; left: -4px; top: -42px;
  font: 700 14px/1 var(--mono); letter-spacing: .1em;
  background: var(--yellow); border: 4px solid var(--ink); border-bottom: 0;
  border-radius: 12px 12px 0 0; padding: 12px 18px;
}
h2 { font-weight: 800; font-size: clamp(34px, 4.6vw, 54px); line-height: 1; letter-spacing: -0.035em; margin-bottom: 32px; }
dl { display: grid; gap: 0; }
.row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 18px 0; border-top: 2px dashed rgba(28,16,51,.25); align-items: center; }
dt { font: 700 13px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
dd { font-size: 22px; font-weight: 500; }
.redact {
  display: inline-block; background: var(--ink); color: transparent; border-radius: 4px;
  user-select: none; cursor: help; transition: background .15s;
  padding: 0 4px; position: relative;
}
.redact::after { content: attr(data-quip); position: absolute; inset: 0; display: grid; place-items: center; color: var(--yellow); font: 700 14px/1 var(--mono); letter-spacing: .1em; opacity: 0; transition: opacity .15s; }
.redact.peek::after { opacity: 1; }
.redact:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.reveal { color: var(--pink); font-weight: 800; }

/* Final CTA */
.cta {
  background: var(--pink); color: #fff; text-align: center;
  border-block: 4px solid var(--ink);
  padding: 96px 0;
}
.cta h2 { color: #fff; margin-bottom: 16px; }
.cta-badge { position: relative; width: 300px; aspect-ratio: 1; margin: -24px auto 8px; display: grid; place-items: center; }
.cta-badge::before {
  content: ""; position: absolute; inset: 0;
  background: var(--yellow);
  clip-path: polygon(50% 0%,61% 14%,79% 8%,80% 26%,98% 30%,88% 46%,100% 62%,82% 69%,82% 88%,63% 84%,50% 100%,37% 84%,18% 88%,18% 69%,0% 62%,12% 46%,2% 30%,20% 26%,21% 8%,39% 14%);
  animation: spin 40s linear infinite reverse;
}
.cta-logo { position: relative; width: 200px; height: auto; transform: rotate(-6deg); filter: drop-shadow(6px 6px 0 var(--ink)); }
.cta p { font-size: 21px; max-width: 34ch; margin: 0 auto 36px; }
.cta .btn { background: var(--yellow); color: var(--ink); }

/* Order card */
.order {
  max-width: 440px; margin: 0 auto; text-align: left;
  background: #fff; color: var(--ink);
  border: 4px solid var(--ink); border-radius: 20px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: 28px;
}
.line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 2px dashed rgba(28,16,51,.2); }
.line b { font-weight: 800; font-size: 20px; }
.line small { display: block; font: 400 13px/1.4 var(--mono); opacity: .65; }
.line.muted { opacity: .4; }
.line.muted .amt { text-decoration: line-through; }
.amt { font-weight: 800; font-size: 20px; white-space: nowrap; }
.regs { border: 0; padding: 12px 0 14px; margin: 0; border-bottom: 2px dashed rgba(28,16,51,.2); display: grid; gap: 8px; }
.regs legend { padding: 12px 0 6px; float: left; width: 100%; }
.regs legend b { font-weight: 800; font-size: 20px; }
.regs legend small, .opt small { display: block; font: 400 13px/1.4 var(--mono); opacity: .65; }
.opt {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 12px 14px; border: 3px solid rgba(28,16,51,.18); border-radius: 12px;
  transition: border-color .12s, background .12s;
}
.opt > span:nth-of-type(1) { flex: 1; }
.opt b { font-weight: 800; font-size: 17px; }
.opt .amt { font-size: 17px; }
.opt:has(input:checked) { border-color: var(--ink); background: var(--cream); }
.opt input { appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 3px solid var(--ink); border-radius: 50%; background: #fff; display: grid; place-items: center; cursor: pointer; }
.opt input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pink); }
.opt input:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 22px; }
.total span { font: 700 14px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.total strong { font-weight: 800; font-size: 40px; letter-spacing: -0.03em; }
.order .btn { width: 100%; justify-content: center; background: var(--pink); color: #fff; }
.order .note { font: 400 13px/1.5 var(--mono); opacity: .7; text-align: center; margin: 16px 0 0; max-width: none; font-size: 13px; }

footer { padding: 32px 0; font: 400 14px/1.5 var(--mono); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Toast (shown if no checkout link is set yet) */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, calc(100% + 40px)); visibility: hidden;
  background: var(--ink); color: var(--yellow);
  font: 700 15px/1.3 var(--mono); padding: 14px 20px; border-radius: 12px;
  transition: transform .3s ease, visibility .3s; z-index: 10; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes shake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); } 50% { transform: scale(.6) rotate(45deg); } }
@keyframes hint-in { from { opacity: 0; transform: rotate(-20deg) scale(.3); } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
@keyframes scroll { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 16px 0 72px; }
  .stage { order: -1; max-width: 340px; }
  .lede { font-size: 19px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  dd { font-size: 20px; }
  .file { padding: 88px 0 72px; }
  .cta { padding: 72px 0; }
  .logo img { height: 72px; }
  .cta-badge { width: 240px; }
  .product { left: 2%; width: 96%; }
  .cta-logo { width: 160px; }
}

/* Personalize page */
.back { font: 700 15px/1 var(--mono); text-decoration: none; padding: 10px 0; }
.back:hover { color: var(--pink); }
.personal { align-items: start; }
.personal .order { justify-self: end; width: 100%; }
.field { display: block; margin-bottom: 20px; }
.field > span { display: block; font: 700 13px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.field select {
  appearance: none; width: 100%;
  font: 500 18px/1.2 var(--display); color: var(--ink);
  padding: 14px 44px 14px 16px;
  background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='M1.5 1.5 7 7.5l5.5-6' fill='none' stroke='%231C1033' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 3px solid var(--ink); border-radius: 12px; cursor: pointer;
}
.field select:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.react { display: block; min-height: 1.4em; margin-top: 8px; font: 700 14px/1.4 var(--mono); color: var(--pink); }
@media (max-width: 820px) {
  .personal { padding-bottom: 56px; }
}
.personal-art { display: block; width: min(440px, 100%); height: auto; margin-top: 48px; transform: rotate(-8deg); filter: drop-shadow(8px 10px 0 rgba(28,16,51,.3)); }
@media (max-width: 820px) {
  .personal-art { width: 78%; margin: 28px auto 8px; }
}
.qty { display: inline-flex; align-items: center; margin-top: 8px; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; }
.qty button { width: 36px; height: 32px; border: 0; background: var(--cream); font: 800 20px/1 var(--display); color: var(--ink); cursor: pointer; }
.qty button:hover:not(:disabled) { background: var(--yellow); }
.qty button:disabled { opacity: .3; cursor: default; }
.qty button:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.qty output { min-width: 34px; text-align: center; font: 800 17px/1 var(--display); }
.line[hidden] { display: none; }
.order .btn:disabled { opacity: .7; cursor: wait; transform: none; }
.field select.is-warn { border-color: #E5322D; box-shadow: 0 0 0 3px rgba(229,50,45,.18); }
.warn { display: flex; gap: 6px; align-items: baseline; margin-top: 8px; font: 700 14px/1.4 var(--mono); color: #D42A25; }
.warn:empty { display: none; }
.warn::before { content: "⚠"; }
.select-wrap { position: relative; }
.select-wrap.has-swatch select { padding-left: 50px; }
.swatch { display: none; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid var(--ink); pointer-events: none; }
.has-swatch .swatch { display: block; }
.swatch.rainbow { background: conic-gradient(#D7313B, #EE7A3C, #E9DC4B, #5FC660, #6FD6EE, #3A4FE0, #C42BE3, #D7313B); }
