/* whoknowsmore.app — "Sticker Party" look from the design system (tokens.css). Mobile first. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/24px var(--body); }
[dir=rtl] { --display: var(--display-ar); }
a { color: var(--brand-text); }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--space-4); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-4); top: var(--space-2); background: var(--surface); padding: var(--space-2); z-index: 10; }

/* header */
.top { padding: var(--space-4) 0; }
.top .wrap { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; font: 800 17px/22px var(--display); margin-inline-end: auto; }
.logo { display: inline-grid; place-items: center; width: 40px; height: 40px; background: var(--brand); color: var(--on-color); border: var(--stroke-sticker) solid var(--ink); border-radius: 12px; transform: rotate(-6deg); font: 800 22px/1 var(--display); }
.top nav { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav a[aria-current=page] { color: var(--brand-text); }
.langs { display: inline-flex; gap: var(--space-1); }
.langs a { padding: 2px var(--space-2); border: 1.5px solid var(--ink); border-radius: var(--radius-pill); font: 700 12px/16px var(--body); letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.langs a[aria-current=true] { background: var(--sun); color: var(--on-color); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 56px; padding: 0 var(--space-5); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); font: 700 17px/22px var(--display); text-decoration: none; box-shadow: var(--shadow-sticker); transition: transform var(--duration-tap), box-shadow var(--duration-tap); }
.btn:active { transform: translate(3px, 3px); box-shadow: var(--shadow-sticker-pressed); }
.btn.primary { background: var(--brand); color: var(--on-color); }
.btn .small { display: block; font: 500 12px/16px var(--body); }
.stores { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.soon { display: inline-block; padding: var(--space-2) var(--space-4); background: var(--sun); color: var(--on-color); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-pill); font: 700 15px/20px var(--display); }

/* hero */
.hero { padding: var(--space-6) 0 var(--space-7); }
.hero .wrap { display: grid; gap: var(--space-6); align-items: center; }
.hero h1 { font: 800 34px/40px var(--display); margin: 0 0 var(--space-4); }
.hero p.lead { font-size: 19px; line-height: 28px; color: var(--ink-muted); margin: 0 0 var(--space-5); }
.hero .cta { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
@media (min-width: 880px) {
  .hero .wrap { grid-template-columns: 1.1fr .9fr; }
  .hero h1 { font-size: 44px; line-height: 50px; }
}

/* phone mock-ups drawn with the tokens (placeholders until real screenshots) */
.phones { display: flex; gap: var(--space-4); justify-content: center; }
.phone { width: 250px; flex: none; background: var(--ground); border: var(--stroke-sticker) solid var(--ink); border-radius: 36px; padding: var(--space-5) var(--space-4); box-shadow: var(--shadow-sheet); display: flex; flex-direction: column; gap: var(--space-3); min-height: 470px; }
.phone.second { display: none; transform: rotate(3deg) translateY(24px); }
@media (min-width: 600px) { .phone.second { display: flex; } }
.subject { display: flex; align-items: center; gap: var(--space-2); font: 700 15px/20px var(--display); }
.avatar { width: 44px; height: 44px; border-radius: var(--radius-pill); border: var(--stroke-sticker) solid var(--ink); display: inline-grid; place-items: center; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; }
.timer { margin-inline-start: auto; width: 44px; height: 44px; border-radius: var(--radius-pill); border: 4px solid var(--brand); display: grid; place-items: center; font: 800 15px/1 var(--display); font-variant-numeric: tabular-nums; }
.bubble { background: var(--surface); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-lg); padding: var(--space-4); font: 600 18px/24px var(--body); position: relative; }
.bubble::before { content: ""; position: absolute; top: -10px; inset-inline-start: 20px; width: 16px; height: 16px; background: var(--surface); border-left: var(--stroke-sticker) solid var(--ink); border-top: var(--stroke-sticker) solid var(--ink); transform: rotate(45deg); }
.tile { background: var(--surface); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font: 600 16px/22px var(--body); box-shadow: var(--shadow-sticker); display: flex; justify-content: space-between; align-items: center; }
.tile.ok { background: var(--correct); color: var(--on-color); }
.tile.no { background: var(--wrong); color: var(--on-color); }
.status { color: var(--ink-muted); font: 500 13px/18px var(--body); text-align: center; }
.chip { display: inline-block; padding: 2px var(--space-2); background: var(--sun); color: var(--on-color); border: 1.5px solid var(--ink); border-radius: var(--radius-sm); font: 700 12px/16px var(--body); letter-spacing: .08em; }
.sticker { align-self: center; background: var(--sun); color: var(--on-color); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-md); padding: var(--space-2) var(--space-4); font: 800 15px/20px var(--display); transform: rotate(-4deg); box-shadow: var(--shadow-sticker); }
.code { display: inline-block; padding: var(--space-3) var(--space-5); background: var(--sun); color: var(--on-color); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-md); font: 800 34px/36px var(--display); letter-spacing: .08em; font-variant-numeric: tabular-nums; direction: ltr; }

/* sections */
section { padding: var(--space-7) 0; }
section h2 { font: 700 28px/34px var(--display); margin: 0 0 var(--space-5); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.card { background: var(--surface); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-lg); padding: var(--space-5); }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--space-3); background: var(--sun); color: var(--on-color); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-pill); font: 800 17px/1 var(--display); }
.card h3 { font: 700 20px/26px var(--display); margin: 0 0 var(--space-2); }
.card p { margin: 0; color: var(--ink-muted); }
.features { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.features .card:nth-child(1) { border-top: 8px solid var(--player-1); }
.features .card:nth-child(2) { border-top: 8px solid var(--player-3); }
.features .card:nth-child(3) { border-top: 8px solid var(--player-5); }
.features .card:nth-child(4) { border-top: 8px solid var(--player-6); }
.band { background: var(--surface); border-top: var(--stroke-sticker) solid var(--ink); border-bottom: var(--stroke-sticker) solid var(--ink); }

/* text pages */
.page { padding: var(--space-5) 0 var(--space-7); }
.page h1 { font: 700 28px/34px var(--display); margin: 0 0 var(--space-3); }
.page .lead { font-size: 19px; line-height: 28px; color: var(--ink-muted); margin: 0 0 var(--space-5); }
.prose { max-width: 720px; }
.prose h2 { font: 700 20px/26px var(--display); margin: var(--space-6) 0 var(--space-3); }
.prose li { margin: var(--space-1) 0; }
.notice { padding: var(--space-3) var(--space-4); background: var(--sun); color: var(--on-color); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-md); font-weight: 600; margin-bottom: var(--space-5); }
.rules { display: grid; gap: var(--space-4); }
.rule { position: relative; }
.rule .num { position: absolute; top: calc(-1 * var(--space-3)); inset-inline-start: var(--space-4); display: inline-grid; place-items: center; width: 40px; height: 40px; background: var(--brand); color: var(--on-color); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-pill); font: 800 17px/1 var(--display); transform: rotate(-6deg); }
.rule h2 { font: 700 20px/26px var(--display); margin: var(--space-3) 0 var(--space-3); }
.rule p, .rule li { color: var(--ink); }
.rule ul, .rule ol { padding-inline-start: var(--space-5); margin: var(--space-2) 0; }
.rule strong { font-weight: 700; }
.toc { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); padding: 0; list-style: none; }
.toc a { display: inline-block; padding: var(--space-1) var(--space-3); border: 1.5px solid var(--ink); border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; font: 600 15px/20px var(--body); background: var(--surface); }
@media (min-width: 880px) { .rules { grid-template-columns: 1fr 1fr; } }
.faq details { border-bottom: 1px solid var(--hairline); padding: var(--space-3) 0; }
.faq summary { cursor: pointer; font-weight: 600; }

/* invite */
.invite { min-height: 70vh; display: grid; place-items: center; padding: var(--space-5) 0; }
.invite .card { width: 100%; max-width: 520px; text-align: center; box-shadow: var(--shadow-sticker); }
.invite h1 { font: 800 28px/34px var(--display); margin: 0 0 var(--space-2); }
.invite .code { font-size: 44px; line-height: 48px; margin: var(--space-5) 0 var(--space-2); }
.invite .stores { flex-direction: column; margin-top: var(--space-5); }
.invite .stores .btn { width: 100%; }

/* footer */
footer { padding: var(--space-6) 0; color: var(--ink-muted); font: 500 15px/20px var(--body); }
footer .wrap { display: flex; gap: var(--space-4); flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-inline-start: auto; }
footer a { color: var(--ink-muted); }

.muted { color: var(--ink-muted); }
.invite .soon { background: none; border: 0; padding: 0; color: var(--ink-muted); font: 500 15px/20px var(--body); }

/* ---------- motion (durations from tokens.json; all of it stops for prefers-reduced-motion) ---------- */
.small-print { display: block; font: 500 13px/18px var(--body); }
.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; }
.floaties span { position: absolute; font: 800 34px/1 var(--display); color: var(--c); -webkit-text-stroke: 1.5px var(--ink); opacity: .55; animation: drift 9s ease-in-out calc(var(--d) * -1.1s) infinite alternate; pointer-events: none; }
@keyframes drift { from { transform: translate(0, 0) rotate(-12deg); } to { transform: translate(18px, -26px) rotate(14deg); } }
.hero-text > * { animation: rise var(--duration-reveal) cubic-bezier(.2, .9, .3, 1.3) both; }
.hero-text > :nth-child(2) { animation-delay: 80ms; }
.hero-text > :nth-child(3) { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.wiggle { display: inline-block; color: var(--brand-text); animation: wiggle 2.8s ease-in-out 1s infinite; transform-origin: 50% 80%; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-8deg) scale(1.06); } 90% { transform: rotate(6deg) scale(1.06); } 95% { transform: rotate(-3deg); } }
.logo { transition: transform var(--duration-move) cubic-bezier(.2, .9, .3, 1.6); }
.brand:hover .logo { transform: rotate(10deg) scale(1.1); }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }

/* hero phones: float, pop the answers in, count down, then play the reveal */
.phones .phone:first-child { animation: bob 5s ease-in-out infinite; }
.phone.second { animation: bob2 6s ease-in-out 1s infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes bob2 { 0%, 100% { transform: rotate(3deg) translateY(24px); } 50% { transform: rotate(1.5deg) translateY(12px); } }
.tile.pop { animation: pop var(--duration-move) cubic-bezier(.2, .9, .3, 1.5) calc(400ms + var(--i) * 80ms) both; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.timer { transition: border-color var(--duration-quick), color var(--duration-quick); }
.timer.hurry { border-color: var(--wrong); color: var(--wrong-text); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.play .tile.flip { animation: flip var(--duration-reveal) ease calc(var(--i) * 80ms) both; }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.play .tile.flip:not(.ok):not(.no) { animation-name: flip, dim; animation-duration: var(--duration-reveal), var(--duration-reveal); }
@keyframes dim { to { opacity: .55; } }
.play .stamp { animation: stamp var(--duration-reveal) cubic-bezier(.2, .9, .3, 1.6) 500ms both; }
@keyframes stamp { from { opacity: 0; transform: rotate(-20deg) scale(2.4); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }
.crowd { display: flex; gap: 6px; justify-content: center; }
.play .hop { animation: hop var(--duration-move) ease-out calc(900ms + var(--i) * 80ms) 2 alternate; }
@keyframes hop { to { transform: translateY(-10px); } }

/* scroll-in for cards (only when JS runs, so nothing stays hidden without it) */
html:has(script[src*="site.js"]) [data-reveal]:not(.in) { opacity: 0; transform: translateY(28px) rotate(-1deg); }
[data-reveal] { transition: opacity var(--duration-reveal) ease, transform var(--duration-reveal) cubic-bezier(.2, .9, .3, 1.3); transition-delay: calc(var(--i, 0) * 80ms); }
.steps li.in::before { animation: pop var(--duration-move) cubic-bezier(.2, .9, .3, 1.8) calc(var(--i, 0) * 80ms + 200ms) both; }
.features .card { transition-property: opacity, transform, box-shadow; }
.features .card:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: var(--shadow-sticker); }
.code[data-roll] { min-width: 7ch; text-align: center; }

/* consent banner */
.consent { position: fixed; z-index: 20; inset-inline: var(--space-4); bottom: var(--space-4); max-width: 560px; margin-inline: auto; background: var(--surface); border: var(--stroke-sticker) solid var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-sheet); padding: var(--space-4) var(--space-5); transform: translateY(140%); transition: transform var(--duration-move) cubic-bezier(.2, .9, .3, 1.2); }
.consent.up { transform: none; }
.consent p { margin: 0 0 var(--space-3); font: 400 15px/20px var(--body); }
.consent-buttons { display: flex; gap: var(--space-3); }
.consent-buttons .btn { flex: 1; min-height: 48px; font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .floaties { display: none; }
}
