/* PlayOn Party: cream paper, thick ink outlines, hard sticker shadows. */
:root {
  --paper: #FFF4E0;
  --paper-2: #FFE9C2;
  --ink: #1A1033;
  --ink-soft: #4A3F66;
  --tomato: #FF4D2E;
  --sun: #FFD23F;
  --teal: #1FB5A0;
  --sky: #7FD6F5;
  --surface: #FFFFFF;
  --line: var(--ink);
  --shadow-c: var(--ink);
  --display: 'Bricolage Grotesque', 'Arial Black', sans-serif;
  --body: 'Instrument Sans', 'Helvetica Neue', sans-serif;
  --r: 22px;
  --bw: 3px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #140C28;
    --paper-2: #21163F;
    --ink: #FFF4E0;
    --ink-soft: #CBBFE6;
    --surface: #23184A;
    --line: #FFF4E0;
    --shadow-c: #000;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #140C28;
  --paper-2: #21163F;
  --ink: #FFF4E0;
  --ink-soft: #CBBFE6;
  --surface: #23184A;
  --line: #FFF4E0;
  --shadow-c: #000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  /* dotted paper */
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 500 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1; margin: 0; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--sun); color: #1A1033; border-radius: 12px; font-weight: 700; }
.skip:focus { left: 16px; }

/* ───────── header ───────── */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px max(24px, calc((100% - 1152px) / 2));
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 44px; height: 44px; transition: transform .35s cubic-bezier(.2, 1.6, .4, 1); }
.logo:hover img { transform: rotate(-8deg) scale(1.06); }
.wordmark { font: 800 24px/1 var(--display); letter-spacing: -0.03em; }
.wordmark b { color: var(--tomato); font-weight: 800; }
.logo-sm img { width: 32px; height: 32px; }
.logo-sm .wordmark { font-size: 19px; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 15px; text-decoration: none; transition: background .2s; }
.nav a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.nav .nav-coffee { display: inline-flex; align-items: center; gap: 8px; background: #FFDD00; color: #1A1033; border: 2px solid #1A1033; box-shadow: 3px 3px 0 #1A1033; transition: transform .15s, box-shadow .15s; }
.nav .nav-coffee:hover { background: #FFDD00; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #1A1033; }
.nav .nav-coffee img { width: 12px; height: auto; }

/* ───────── buttons ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px; border-radius: 16px;
  font: 700 18px/1 var(--display); letter-spacing: -0.01em; text-decoration: none;
  border: var(--bw) solid var(--line);
  box-shadow: 5px 5px 0 var(--shadow-c);
  transition: transform .15s, box-shadow .15s;
}
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow-c); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--shadow-c); }
.btn-primary { background: var(--tomato); color: #FFF4E0; border-color: #1A1033; box-shadow: 5px 5px 0 #1A1033; }
.btn-primary:hover { box-shadow: 7px 7px 0 #1A1033; }
.btn-primary:active { box-shadow: 2px 2px 0 #1A1033; }
.btn-ghost { background: var(--surface); color: var(--ink); }

/* ───────── hero ───────── */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 56px 24px 72px;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 8px 16px; border-radius: 99px; border: 2px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 700;
  animation: rise .7s .05s both cubic-bezier(.2, 1.2, .4, 1);
}
.kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 var(--teal); animation: ping 2s infinite; }
h1 {
  font-size: clamp(48px, 8.4vw, 112px);
  animation: rise .8s .12s both cubic-bezier(.2, 1.2, .4, 1);
}
.hl { position: relative; display: inline-block; color: var(--tomato); white-space: nowrap; }
.hl::after {
  content: ''; position: absolute; left: -2%; right: 2%; bottom: -0.04em; height: 0.2em; z-index: -1;
  background: var(--sun); border-radius: 99px; transform: rotate(-1.5deg) scaleX(0); transform-origin: left;
  animation: swipe .6s .8s forwards cubic-bezier(.6, 0, .2, 1);
}
.lede { max-width: 33ch; margin: 26px 0 34px; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); animation: rise .8s .22s both cubic-bezier(.2, 1.2, .4, 1); }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; animation: rise .8s .32s both cubic-bezier(.2, 1.2, .4, 1); }

.hero-art { position: relative; aspect-ratio: 1; max-width: 480px; width: 100%; justify-self: center; }
.disc {
  position: absolute; inset: 12%;
  border-radius: 50%; background: var(--sun); border: var(--bw) solid #1A1033; box-shadow: 10px 12px 0 var(--shadow-c);
  display: grid; place-items: center;
  animation: pop .9s .25s both cubic-bezier(.2, 1.5, .4, 1);
}
.disc svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 26s linear infinite; }
.disc text { font: 800 15.5px var(--display); letter-spacing: .2em; fill: #1A1033; }
.disc img { width: 48%; height: auto; animation: bob 3.6s ease-in-out infinite; }

.sticker {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 14px; border: var(--bw) solid #1A1033; background: #fff; color: #1A1033;
  font: 800 16px/1 var(--display); box-shadow: 4px 4px 0 #1A1033; white-space: nowrap;
}
.sticker span { font-size: 20px; }
.s-tv { top: 6%; left: -2%; background: var(--sky); --r0: -8deg; animation: stick .7s .7s both cubic-bezier(.2, 1.6, .4, 1), sway 6s 1.4s ease-in-out infinite; }
.s-phone { top: 46%; right: -4%; background: #fff; --r0: 6deg; animation: stick .7s .85s both cubic-bezier(.2, 1.6, .4, 1), sway 7s 1.6s ease-in-out infinite; }
.s-free { bottom: 4%; left: 8%; background: #FF8A7A; --r0: -4deg; animation: stick .7s 1s both cubic-bezier(.2, 1.6, .4, 1), sway 5.5s 1.8s ease-in-out infinite; }

.confetti { position: absolute; width: 14px; height: 14px; border: 2.5px solid #1A1033; animation: float 5s ease-in-out infinite; }
.c1 { top: 2%; right: 18%; background: var(--tomato); border-radius: 50%; }
.c2 { top: 28%; left: 2%; background: var(--teal); transform: rotate(20deg); animation-delay: -1s; }
.c3 { bottom: 18%; right: 6%; background: var(--sun); border-radius: 3px; animation-delay: -2s; }
.c4 { bottom: 0; right: 36%; background: var(--sky); border-radius: 50%; width: 10px; height: 10px; animation-delay: -3s; }
.c5 { top: 14%; right: 2%; width: 26px; height: 8px; background: #FF8A7A; border-radius: 99px; animation-delay: -1.5s; }
.c6 { top: 60%; left: -4%; width: 8px; height: 22px; background: var(--sun); border-radius: 99px; animation-delay: -2.5s; }

/* ───────── marquee ───────── */
.marquee {
  overflow: hidden; background: var(--ink); color: var(--paper);
  border-block: var(--bw) solid var(--ink);
  transform: rotate(-1.6deg); margin: 0 -20px; padding: 14px 0;
}
.marquee-track { display: flex; align-items: center; gap: 28px; width: max-content; animation: slide 22s linear infinite; }
.marquee span { font: 800 clamp(26px, 3.6vw, 40px)/1 var(--display); text-transform: uppercase; letter-spacing: -0.01em; }
.marquee b { color: var(--sun); font-size: 26px; }
.marquee span:nth-of-type(4n+2) { color: var(--tomato); }
.marquee span:nth-of-type(4n+3) { color: var(--sky); }

/* ───────── sections ───────── */
section.games, section.how, section.coffee { max-width: 1200px; margin: 0 auto; padding: 96px 24px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(40px, 5.6vw, 68px); }
.section-head p { margin: 0; max-width: 42ch; color: var(--ink-soft); }

/* ───────── games ───────── */
.game-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.game-card {
  position: relative; display: flex; flex-direction: column;
  border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--surface);
  box-shadow: 8px 8px 0 var(--shadow-c); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.game-card.featured { display: grid; grid-template-columns: 1fr 1fr; }
.game-card.featured:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 12px 12px 0 var(--shadow-c); }

.game-art {
  position: relative; display: grid; place-items: center; min-height: 340px; padding: 28px;
  background: var(--card);
  background-image: radial-gradient(color-mix(in srgb, var(--card-ink) 18%, transparent) 1.4px, transparent 1.6px);
  background-size: 18px 18px;
  border-right: var(--bw) solid #1A1033;
}
.globe { width: min(100%, 300px); height: auto; overflow: visible; }
.globe-spin { animation: globeSpin 16s linear infinite; }
.game-card:hover .globe-spin { animation-duration: 6s; }
.pin { transform-origin: 174px 90px; animation: pinDrop 2.6s ease-in-out infinite; }
.pin text { font: 800 30px var(--display); fill: #1A1033; }

.chips { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.chip {
  position: absolute; padding: 6px 12px; border-radius: 99px; border: 2.5px solid #1A1033;
  font: 800 14px/1 var(--display); color: #1A1033; box-shadow: 3px 3px 0 #1A1033; white-space: nowrap;
}
.chip.hot { top: 14%; left: 7%; background: var(--sun); transform: rotate(-6deg); }
.chip.warm { bottom: 22%; left: 5%; background: #FF8A3D; transform: rotate(4deg); }
.chip.win { bottom: 9%; right: 7%; background: var(--teal); color: #fff; transform: rotate(-3deg); }

.game-body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 32px; }
.game-num { margin: 0; font: 700 13px/1 var(--body); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }
.game-body h3 { font-size: clamp(32px, 3.4vw, 46px); }
.game-body h3 a { text-decoration: none; }
.game-body h3 a::after { content: ''; position: absolute; inset: 0; z-index: 1; } /* whole card is clickable */
.game-desc { margin: 0; color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; padding: 0; list-style: none; }
.tags li { padding: 5px 12px; border-radius: 99px; border: 2px solid var(--line); font-size: 14px; font-weight: 700; }
.btn-play { position: relative; z-index: 2; margin-top: auto; }

/* A card in the narrow column: art on top, text below. */
.game-card:not(.featured):not(.soon):hover { transform: translate(-3px, -3px) rotate(.4deg); box-shadow: 12px 12px 0 var(--shadow-c); }
.game-card:not(.featured) .game-art { min-height: 230px; border-right: 0; border-bottom: var(--bw) solid #1A1033; }
.cn-board { width: min(100%, 250px); height: auto; overflow: visible; }
.cn-flip { transform-box: fill-box; transform-origin: center; animation: cnFlip 3.2s ease-in-out infinite; }
.chip.clue { top: 9%; left: 6%; background: var(--sun); transform: rotate(-5deg); }
.chip.agent { bottom: 9%; right: 6%; background: var(--tomato); color: #fff; transform: rotate(4deg); }
@keyframes cnFlip { 0%, 55% { transform: scaleX(1); } 70% { transform: scaleX(0); } 85%, 100% { transform: scaleX(1); } }

.game-card.soon { background: var(--paper-2); border-style: dashed; box-shadow: none; }
.soon-art { display: flex; justify-content: center; gap: 14px; padding: 44px 24px 8px; }
.soon-art span {
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 16px;
  border: var(--bw) solid #1A1033; background: var(--sun); color: #1A1033; box-shadow: 4px 4px 0 #1A1033;
  font: 800 34px/1 var(--display); animation: shuffle 3s ease-in-out infinite;
}
.soon-art span:nth-child(2) { background: var(--sky); animation-delay: .2s; }
.soon-art span:nth-child(3) { background: #FF8A7A; animation-delay: .4s; }
.game-card.soon h3 { font-size: 28px; line-height: 1.05; }
.text-link { font-weight: 700; color: var(--tomato); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.text-link:hover { text-decoration-thickness: 3px; }

/* ───────── how ───────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.steps li {
  position: relative; padding: 30px 26px 28px; border-radius: var(--r);
  background: var(--step); color: #1A1033; border: var(--bw) solid #1A1033; box-shadow: 6px 6px 0 var(--shadow-c);
}
.steps li:nth-child(1) { transform: rotate(-1.2deg); }
.steps li:nth-child(2) { transform: rotate(.8deg) translateY(14px); }
.steps li:nth-child(3) { transform: rotate(-.6deg); }
.step-n {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 18px; border-radius: 50%;
  background: #1A1033; color: var(--step); font: 800 24px/1 var(--display);
}
.steps h3 { font-size: 26px; margin-bottom: 8px; }
.steps p { margin: 0; font-size: 16px; color: #2E2450; }

/* ───────── coffee ───────── */
.coffee { padding-bottom: 24px !important; }
.coffee-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px 36px;
  padding: 40px 44px; border-radius: 28px; background: #FFDD00; color: #1A1033;
  border: var(--bw) solid #1A1033; box-shadow: 10px 10px 0 var(--shadow-c);
  background-image: radial-gradient(rgba(26, 16, 51, .12) 1.4px, transparent 1.6px); background-size: 20px 20px;
}
.coffee-logo { width: 64px; height: auto; animation: steam 3s ease-in-out infinite; transform-origin: 50% 90%; }
.coffee h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 10px; }
.coffee p { margin: 0; max-width: 52ch; color: #3A2E10; }
.coffee-btn { display: block; border-radius: 14px; border: 2.5px solid #1A1033; box-shadow: 5px 5px 0 #1A1033; transition: transform .15s, box-shadow .15s; overflow: hidden; }
.coffee-btn img { width: 218px; height: auto; }
.coffee-btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 7px 7px 0 #1A1033; }

/* ───────── footer ───────── */
.foot {
  max-width: 1200px; margin: 72px auto 0; padding: 32px 24px 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  border-top: var(--bw) solid var(--line); font-size: 15px; color: var(--ink-soft);
}
.foot p { margin: 0; }
.foot > a:last-child { font-weight: 700; color: var(--ink); }

/* floating coffee, same as in the games */
.bmc-float {
  position: fixed; left: 20px; bottom: 20px; z-index: 40; width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 50%; background: #FFDD00; border: 2.5px solid #1A1033; box-shadow: 3px 3px 0 #1A1033;
  text-decoration: none; transition: transform .2s, opacity .3s; animation: pop .6s 1.4s both cubic-bezier(.2, 1.4, .4, 1);
}
.bmc-float img { width: 21px; height: auto; transition: transform .25s; }
.bmc-float span {
  position: absolute; left: calc(100% + 10px); padding: 7px 13px; border-radius: 99px; background: #1A1033; color: #FFF4E0;
  font-size: 14px; font-weight: 700; white-space: nowrap; opacity: 0; transform: translateX(-6px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.bmc-float:hover { transform: translateY(-3px); }
.bmc-float:hover img { transform: rotate(-12deg); }
.bmc-float:hover span, .bmc-float:focus-visible span { opacity: 1; transform: none; }
/* hidden while the big coffee card is on screen (index.html script) */
.bmc-float.away { opacity: 0; pointer-events: none; }

/* ───────── motion ───────── */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
@keyframes stick { from { opacity: 0; transform: scale(.4) rotate(-20deg); } }
@keyframes sway { 0%, 100% { transform: rotate(var(--r0)); } 50% { transform: rotate(calc(var(--r0) * -1)) translateY(-6px); } }
@keyframes swipe { to { transform: rotate(-1.5deg) scaleX(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }
@keyframes float { 50% { translate: 0 -12px; rotate: 30deg; } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes globeSpin { to { transform: translateX(-240px); } }
@keyframes pinDrop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes shuffle { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-10px) rotate(-8deg); } 90% { transform: translateY(0) rotate(4deg); } }
@keyframes steam { 50% { transform: rotate(-6deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .hl::after { transform: rotate(-1.5deg) scaleX(1); }
}

/* ───────── responsive ───────── */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-art { max-width: 400px; }
  .game-grid { grid-template-columns: 1fr; }
  .coffee-card { grid-template-columns: auto 1fr; }
  .coffee-btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .top { padding: 12px 16px; }
  .nav a:not(.nav-coffee) { display: none; }
  .wordmark { font-size: 21px; }
  .logo img { width: 38px; height: 38px; }
  .hero { padding: 24px 16px 56px; }
  .hero-art { max-width: 330px; }
  .sticker { font-size: 14px; padding: 8px 12px; }
  .s-phone { right: 0; }
  .s-tv { left: 0; }
  .btn { padding: 14px 20px; font-size: 17px; }
  section.games, section.how, section.coffee { padding: 72px 16px 0; }
  .game-card.featured { grid-template-columns: 1fr; }
  .game-art { min-height: 280px; border-right: 0; border-bottom: var(--bw) solid #1A1033; }
  .game-body { padding: 24px 22px 26px; }
  .steps { grid-template-columns: 1fr; }
  .steps li:nth-child(n) { transform: none; }
  .coffee-card { grid-template-columns: 1fr; padding: 30px 24px; gap: 18px; }
  .coffee-logo { width: 48px; }
  .foot { padding: 28px 16px 96px; flex-direction: column; align-items: flex-start; }
  .bmc-float { left: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
}
