/* Wobble demo page. Tokens first; everything else reads them. */
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
:root {
  --bg: #f3efe6; --ink: #1c211d; --muted: #5d625b; --line: #d9d3c5; --card: #fbf8f2;
  --red: #e0322b; --green: #1f6b2a; --gold: #c9921b;
  --r: 22px; --gap: 16px;
  --display: "Space Grotesk", system-ui, sans-serif; --body: "DM Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--body); }
a { color: inherit; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 14px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.brand { font: 700 22px/1 var(--display); text-decoration: none; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 14px; height: 14px; border-radius: 50% 50% 50% 8%; background: radial-gradient(circle at 35% 30%, #ff8a80, var(--red) 55%, #9b1712); box-shadow: 0 2px 6px rgba(224, 50, 43, .35); }
.top nav { display: flex; gap: 20px; margin-left: auto; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); padding: 10px 0; }
.top nav a:hover { color: var(--ink); }
.cta { background: var(--ink); color: var(--bg); text-decoration: none; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }

.intro { padding: clamp(24px, 6vw, 72px) clamp(16px, 4vw, 48px) 24px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; }
.kicker { grid-column: 1 / -1; margin: 0; font: 600 13px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
h1 { margin: 0; font: 700 clamp(72px, 15vw, 196px)/.86 var(--display); letter-spacing: -0.055em; }
h1 .dot { color: var(--red); }
.wob span { display: inline-block; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .wob span { animation: wob 3.2s cubic-bezier(.3, 1.6, .5, 1) infinite; }
  .wob span:nth-child(2) { animation-delay: .08s; } .wob span:nth-child(3) { animation-delay: .16s; }
  .wob span:nth-child(4) { animation-delay: .24s; } .wob span:nth-child(5) { animation-delay: .32s; } .wob span:nth-child(6) { animation-delay: .4s; }
}
@keyframes wob { 0%, 70%, 100% { transform: scale(1, 1); } 76% { transform: scale(1.08, .88); } 84% { transform: scale(.95, 1.07); } 91% { transform: scale(1.02, .98); } }
.lede { margin: 0 0 12px; font-size: clamp(18px, 1.6vw, 22px); color: var(--muted); max-width: 34ch; }

.play { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); padding: 0 clamp(16px, 4vw, 48px) 48px; }
.stage { position: relative; height: min(76vh, 780px); min-height: 440px; border-radius: var(--r); overflow: hidden; background: #f4f1ea; box-shadow: inset 0 0 0 1px var(--line); outline: none; }
.stage:focus-visible { box-shadow: inset 0 0 0 3px var(--red); }
.poster, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { object-fit: cover; transition: opacity .5s; }
.stage canvas { touch-action: none; cursor: grab; opacity: 0; transition: opacity .4s; }
[data-wobble].w-live .stage canvas { opacity: 1; }
[data-wobble].w-live .poster { opacity: 0; }
.stage.w-grabbing canvas { cursor: grabbing; }
.stage.w-knife canvas { cursor: crosshair; }
.cutline { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cutline path { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 6; fill: none; }
.stage-reset { position: absolute; top: 14px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font: 700 15px var(--body); cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.stage-reset svg { width: 20px; height: 20px; }
.stage-reset:hover { transform: translateY(-1px); }
.hint { position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(28, 33, 29, .78); color: #fff; font-size: 14px; white-space: nowrap; pointer-events: none; transition: opacity .4s; }
.hint.w-hide, .hint:empty { opacity: 0; }
.fallback { position: absolute; left: 16px; right: 16px; bottom: 16px; margin: 0; padding: 12px 16px; background: var(--card); border-radius: 12px; }
.read { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.read div { background: rgba(251, 248, 242, .82); backdrop-filter: blur(8px); border-radius: 12px; padding: 8px 12px; min-width: 96px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); }
.read span { display: block; font-size: 12px; color: var(--muted); }
.read b { font: 600 20px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.read i { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 2px; }

.panel { background: var(--card); border-radius: var(--r); padding: 20px; box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 20px; align-self: start; }
.panel h2 { margin: 0 0 10px; font: 600 13px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.swatches button { appearance: none; border: 0; cursor: pointer; min-height: 64px; border-radius: 14px; padding: 36px 0 6px; font: 600 12px var(--body); color: var(--ink); background: linear-gradient(to bottom, var(--b) 0 9px, #f2f5e8 9px 15px, var(--a) 15px 34px, #fff 34px); box-shadow: inset 0 0 0 1px var(--line); }
.swatches button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
.range { display: block; margin-bottom: 12px; font-size: 15px; }
.range span { display: flex; justify-content: space-between; }
.range output { font-variant-numeric: tabular-nums; color: var(--muted); }
input[type=range] { width: 100%; height: 44px; accent-color: var(--red); }
.acts, .toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggles { margin-top: 8px; }
.acts button, .toggles button { appearance: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 14px; border-radius: 999px; background: #efeadf; font: 600 14px var(--body); color: var(--ink); }
.acts button:hover, .toggles button:hover { background: #e6e0d2; }
.acts button[aria-pressed="true"], .toggles button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.acts .knife::before { content: ""; display: inline-block; width: 14px; height: 4px; margin-right: 6px; vertical-align: middle; background: linear-gradient(90deg, #333 0 35%, #bbb 35%); border-radius: 0 3px 3px 0; }
.counts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.counts div { background: #f3efe6; border-radius: 12px; padding: 8px 12px; }
.counts dt { font-size: 12px; color: var(--muted); }
.counts dd { margin: 0; font: 600 18px var(--display); font-variant-numeric: tabular-nums; }

.how, .faq { padding: 56px clamp(16px, 4vw, 48px); max-width: 1240px; }
.how h2, .faq h2 { font: 700 clamp(32px, 4vw, 48px)/1.05 var(--display); letter-spacing: -0.03em; margin: 0 0 24px; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cols h3 { font: 600 20px var(--display); margin: 0 0 8px; }
.cols p { margin: 0; color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 8px 0; max-width: 760px; }
.faq summary { cursor: pointer; font: 600 18px var(--display); min-height: 44px; display: flex; align-items: center; }
.faq p { margin: 0 0 12px; color: var(--muted); }
.foot { padding: 32px clamp(16px, 4vw, 48px) 48px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); }

@media (max-width: 960px) {
  .play { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top nav { display: none; }
  .cta { margin-left: auto; padding: 10px 14px; font-size: 14px; }
  .stage { height: 62svh; min-height: 380px; border-radius: 18px; }
  .read div { min-width: 0; padding: 6px 10px; }
  .read div:nth-child(n+3) { display: none; }
  .hint { font-size: 13px; white-space: normal; width: max-content; max-width: calc(100% - 32px); text-align: center; }
  .swatches button { min-height: 58px; }
}
