/* Unnatural Games — landing page. Builds on /css/base.css (palette, fonts, buttons, chips). */

:root {
  --pink-dim: rgba(250, 74, 158, 0.16);
  --cyan-dim: rgba(126, 200, 255, 0.14);
  --err: #ff6f91;
  --board: #1c1633;
  --maxw: 1180px;
  --pad: clamp(1rem, 4.6vw, 2rem);
}

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { overflow-x: hidden; }
main { display: block; }
img { -webkit-user-drag: none; user-select: none; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--uni-lime); color: var(--uni-ink); font-weight: 700;
  padding: 0.7rem 1rem; border-radius: 999px; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 0.75rem; }

/* ───────── Backdrop ───────── */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.backdrop__wash {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 0% 22%, rgba(250, 74, 158, 0.22), transparent 70%),
    radial-gradient(45% 40% at 100% 65%, rgba(186, 248, 55, 0.09), transparent 70%),
    radial-gradient(40% 36% at 72% 6%, rgba(126, 200, 255, 0.11), transparent 70%);
}
.backdrop__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(250, 74, 158, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(250, 74, 158, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(120% 90% at 30% 20%, #000 20%, transparent 85%);
  mask-image: radial-gradient(120% 90% at 30% 20%, #000 20%, transparent 85%);
}
.bubble {
  position: absolute; bottom: -40px; width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid rgba(186, 248, 55, 0.35); background: rgba(186, 248, 55, 0.04);
  animation: rise 16s linear infinite;
}
.b1 { left: 8%;  animation-duration: 17s; }
.b2 { left: 24%; width: 8px; height: 8px; animation-duration: 21s; animation-delay: -6s; border-color: rgba(250, 74, 158, 0.4); }
.b3 { left: 47%; width: 16px; height: 16px; animation-duration: 25s; animation-delay: -12s; border-color: rgba(126, 200, 255, 0.35); }
.b4 { left: 66%; width: 9px; height: 9px; animation-duration: 19s; animation-delay: -3s; border-color: rgba(250, 74, 158, 0.4); }
.b5 { left: 82%; animation-duration: 23s; animation-delay: -15s; }
.b6 { left: 94%; width: 7px; height: 7px; animation-duration: 18s; animation-delay: -9s; border-color: rgba(126, 200, 255, 0.35); }
@keyframes rise {
  from { transform: translate3d(0, 0, 0); opacity: 0; }
  10%  { opacity: 1; }
  to   { transform: translate3d(30px, -112vh, 0); opacity: 0; }
}

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem var(--pad);
  background: linear-gradient(180deg, rgba(3, 2, 5, 0.92), rgba(3, 2, 5, 0.6));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(249, 249, 250, 0.06);
}
.nav__brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font: 600 1.02rem var(--font-display); letter-spacing: -0.01em; }
.nav__brand b { color: var(--uni-lime); font-weight: 700; }
.nav__brand img { width: 28px; height: auto; transition: transform 0.4s var(--ease-spring); }
.nav__brand:hover img { transform: rotate(-12deg) scale(1.12); }
.nav__links { display: flex; align-items: center; gap: 0.3rem; }
.nav__links a:not(.btn) {
  color: var(--text-dim); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding: 0.55rem 0.8rem; border-radius: 999px; transition: color 0.2s, background 0.2s;
  display: none;
}
.nav__links a:not(.btn):hover { color: var(--text); background: rgba(249, 249, 250, 0.07); }
.nav__host { min-height: 40px; padding: 0.55em 1.1em; font-size: 0.92rem; }
@media (min-width: 820px) { .nav__links a:not(.btn) { display: inline-block; } }

/* ───────── Hero ───────── */
.hero {
  position: relative;
  display: grid; gap: 1.6rem;
  max-width: var(--maxw); margin: 0 auto;
  padding: 1.1rem var(--pad) 3rem;
  --px: 0; --py: 0;
}
.hero__glow {
  position: absolute; inset: -10% -20% 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 30%) var(--my, 20%), rgba(250, 74, 158, 0.17), rgba(186, 248, 55, 0.05) 45%, transparent 70%);
  transition: opacity 0.4s;
}
.hero__copy, .hero__stage { position: relative; z-index: 1; min-width: 0; }

.hero__eyebrow { display: inline-flex; align-items: center; gap: 0.55em; margin: 0 0 0.5rem; font-size: 0.72rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--uni-lime); box-shadow: 0 0 0 0 rgba(186, 248, 55, 0.6); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { box-shadow: 0 0 0 10px rgba(186, 248, 55, 0); } }

/* The versus lockup */
.versus {
  display: flex; align-items: center; flex-wrap: nowrap; gap: 0.14em;
  margin: 0 0 0.15em;
  font-size: clamp(2.7rem, 13.4vw, 6.4rem);
  line-height: 0.92; letter-spacing: -0.035em; text-transform: uppercase;
  white-space: nowrap;
}
.versus__team { display: inline-block; }
.versus__team--human { color: var(--team-human); text-shadow: 0 0 34px rgba(250, 74, 158, 0.5); animation: slide-in-l 0.9s var(--ease-out) both; }
.versus__team--ai { color: var(--team-ai); text-shadow: 0 0 34px rgba(126, 200, 255, 0.5); animation: slide-in-r 0.9s var(--ease-out) 0.1s both, glitch 5s steps(1) 1.5s infinite; }
.versus__vs {
  display: inline-grid; place-items: center;
  font-size: 0.34em; line-height: 1; letter-spacing: 0.02em;
  padding: 0.38em 0.55em 0.34em; margin: 0 0.1em;
  background: var(--uni-lime); color: var(--uni-ink); border-radius: 0.5em;
  transform: rotate(-7deg);
  box-shadow: 0 0 0 0.12em var(--bg), 0 0 0 0.2em rgba(186, 248, 55, 0.45), 0 0 30px rgba(186, 248, 55, 0.35);
  animation: pop-in 0.7s var(--ease-spring) 0.35s both, vs-wobble 3.2s ease-in-out 1.2s infinite;
}
@keyframes slide-in-l { from { opacity: 0; transform: translateX(-40px); } }
@keyframes slide-in-r { from { opacity: 0; transform: translateX(40px); } }
@keyframes pop-in { from { opacity: 0; transform: rotate(-7deg) scale(0.2); } }
@keyframes vs-wobble { 0%, 100% { transform: rotate(-7deg) scale(1); } 50% { transform: rotate(5deg) scale(1.08); } }
@keyframes glitch {
  0%, 92%, 100% { text-shadow: 0 0 34px rgba(126, 200, 255, 0.5); transform: none; }
  93% { text-shadow: 4px 0 0 rgba(250, 74, 158, 0.8), -4px 0 0 rgba(186, 248, 55, 0.7); transform: translateX(2px) skewX(-6deg); }
  95% { text-shadow: -5px 0 0 rgba(250, 74, 158, 0.8), 5px 0 0 rgba(186, 248, 55, 0.7); transform: translateX(-3px); }
  97% { text-shadow: 2px 0 0 rgba(250, 74, 158, 0.8), -2px 0 0 rgba(186, 248, 55, 0.7); transform: none; }
}

.hero__tag { font: 700 clamp(1.35rem, 5.9vw, 2.2rem)/1.08 var(--font-display); letter-spacing: -0.02em; margin: 0.3rem 0 0.7rem; }
.hero__lead { color: var(--text-dim); font-size: clamp(1rem, 3.9vw, 1.15rem); margin: 0 0 1.1rem; max-width: 34rem; }
.hero__lead strong { color: var(--text); }

/* Join box */
.join {
  position: relative; margin-top: 3.3rem;
  padding: 1.1rem 1.1rem 0.9rem;
  background: linear-gradient(160deg, rgba(250, 74, 158, 0.14), rgba(22, 17, 28, 0.92) 55%);
  border-color: rgba(250, 74, 158, 0.5);
  box-shadow: 0 0 0 1px rgba(250, 74, 158, 0.15), 0 20px 60px rgba(250, 74, 158, 0.18);
  max-width: 34rem;
}
.join__label { display: block; font-weight: 600; margin-bottom: 0.55rem; font-size: 1rem; }
.join__label span { color: var(--text-dim); font-weight: 400; }
.join__row { display: grid; gap: 0.65rem; }
.join__input {
  font: 700 1.6rem/1 var(--font-mono); letter-spacing: 0.4em; text-indent: 0.4em; text-align: center; text-transform: uppercase;
  min-height: 58px; border-radius: 12px; border-color: rgba(249, 249, 250, 0.22); caret-color: var(--uni-pink);
}
.join__input::placeholder { color: rgba(249, 249, 250, 0.18); letter-spacing: 0.4em; }
.join__input:focus { border-color: var(--uni-pink); box-shadow: var(--glow-pink); }
.join__btn { min-height: 54px; font-size: 1.05rem; }
.join__btn svg { transition: transform 0.25s var(--ease-spring); }
.join__btn:hover svg { transform: translateX(4px); }
.join__msg { min-height: 1.5em; margin: 0.6rem 0 0; font-size: 0.88rem; color: var(--text-dim); }
.join__host { margin: 0.3rem 0 0; padding-top: 0.6rem; border-top: 1px dashed var(--line); font-size: 0.92rem; color: var(--text-dim); }
.join__host a { font-weight: 600; text-decoration: none; }
.join__host a:hover { text-decoration: underline; }
.join.is-error .join__input { border-color: var(--err); animation: shake 0.5s cubic-bezier(.36, .07, .19, .97); box-shadow: 0 0 0 1px var(--err), 0 0 28px rgba(255, 111, 145, 0.3); }
.join.is-error .join__msg { color: var(--err); font-weight: 600; }
.join.is-busy .join__btn { opacity: 0.75; pointer-events: none; }
.join.is-ready .join__btn { animation: nudge 1.8s ease-in-out infinite; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(5px); } 30%, 50%, 70% { transform: translateX(-9px); } 40%, 60% { transform: translateX(9px); } }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateY(-3px); box-shadow: var(--glow-pink); } }

/* Jelly mascot */
.jelly { position: relative; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.jelly img { width: 100%; height: auto; animation: bob 4.8s ease-in-out infinite; transform-origin: 50% 25%; filter: drop-shadow(0 0 22px rgba(250, 74, 158, 0.35)); transition: filter 0.3s; }
.jelly:hover img { filter: drop-shadow(0 0 30px rgba(186, 248, 55, 0.55)); }
.jelly.is-wiggle img { animation: wiggle 0.85s var(--ease-spring); }
.jelly:focus-visible { outline-offset: 6px; border-radius: 24px; }
.jelly--perch { position: absolute; top: -4.1rem; right: 0.9rem; width: 74px; z-index: 3; }
.jelly--stage { display: none; }
.jelly__say {
  position: absolute; right: 78%; top: 0; width: max-content; max-width: 190px;
  padding: 0.5rem 0.8rem; border-radius: 14px 14px 4px 14px;
  background: var(--uni-paper); color: var(--uni-ink); font: 600 0.85rem/1.25 var(--font-sans); text-align: left;
  opacity: 0; transform: translateY(8px) scale(0.85); transform-origin: 100% 100%; pointer-events: none;
  transition: opacity 0.25s, transform 0.35s var(--ease-spring); z-index: 5;
}
.jelly__say.is-on { opacity: 1; transform: none; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(2deg); } }
@keyframes wiggle {
  0% { transform: rotate(0) scale(1); } 15% { transform: rotate(-16deg) scale(1.12, 0.9); } 35% { transform: rotate(13deg) scale(0.92, 1.12); }
  55% { transform: rotate(-9deg) scale(1.06, 0.96); } 75% { transform: rotate(5deg) scale(0.98, 1.03); } 100% { transform: rotate(0) scale(1); }
}

/* Demo arena */
.hero__stage { padding-top: 0.5rem; }
.arena {
  position: relative; padding: 0.9rem 0.9rem 1rem; max-width: 34rem; margin: 0 auto;
  background: linear-gradient(160deg, rgba(250, 74, 158, 0.1), rgba(22, 17, 28, 0.95) 40%, rgba(126, 200, 255, 0.1));
  border-radius: 22px; box-shadow: var(--shadow), 0 0 60px rgba(126, 200, 255, 0.08);
}
.arena__bar { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.7rem; }
.arena__bar .chip { transition: opacity 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-spring); opacity: 0.5; white-space: nowrap; font-size: 0.74rem; }
.arena__bar .chip.is-active { opacity: 1; transform: scale(1.06); }
#demo-human.is-active { box-shadow: var(--glow-pink); }
#demo-ai.is-active { box-shadow: var(--glow-cyan); }
.arena__round { font-size: 0.74rem; color: var(--text-dim); }
.arena__timer { height: 6px; margin: 0.8rem 0 0.9rem; border-radius: 99px; background: rgba(249, 249, 250, 0.08); overflow: hidden; }
.arena__timer i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--uni-pink), #ff8cc3); transform-origin: 0 50%; }
.arena[data-phase="human"] .arena__timer i { animation: drain var(--t, 2.2s) linear forwards; }
.arena[data-phase="ai"] .arena__timer i { width: 35%; background: linear-gradient(90deg, transparent, var(--uni-cyan), transparent); animation: scan 0.9s ease-in-out infinite alternate; }
.arena[data-phase="end"] .arena__timer i { width: 100%; background: var(--uni-lime); }
@keyframes drain { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes scan { from { transform: translateX(-5%); } to { transform: translateX(185%); } }

.taunt {
  position: relative; display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.75rem 0.9rem; border-radius: 14px;
  background: var(--cyan-dim); border: 1px solid rgba(126, 200, 255, 0.35);
  min-height: 4.6rem;
}
.taunt::before { content: ""; position: absolute; left: 1.4rem; top: -7px; width: 12px; height: 12px; background: #17283a; border-left: 1px solid rgba(126, 200, 255, 0.35); border-top: 1px solid rgba(126, 200, 255, 0.35); transform: rotate(45deg); }
.taunt__who { flex: none; margin-top: 0.15rem; padding: 0.2em 0.5em; border-radius: 6px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; background: var(--uni-cyan); color: var(--uni-ink); }
.taunt__text { margin: 0; font-size: 0.98rem; line-height: 1.4; color: var(--text); }
.taunt__text.is-typing::after { content: "▍"; color: var(--uni-cyan); animation: blink 0.7s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.hero__caption { margin: 0.8rem 0 0; text-align: center; font-size: 0.72rem; color: rgba(249, 249, 250, 0.4); }

/* ───────── Connect 4 board (hero demo + games card) ───────── */
.c4 {
  position: relative; width: 100%; aspect-ratio: 7 / 6; overflow: hidden;
  border-radius: 16px; background: #07040b;
  --cw: 14.2857%; --ch: 16.6667%;
}
.c4__front {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  background-image: radial-gradient(circle closest-side at 50% 50%, transparent 83%, var(--board) 85.5%);
  background-size: var(--cw) var(--ch);
  box-shadow: inset 0 0 0 2px rgba(249, 249, 250, 0.1), inset 0 0 40px rgba(0, 0, 0, 0.35);
}
.c4__votes { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: repeat(7, 1fr); pointer-events: none; }
.c4__votes i { background: linear-gradient(180deg, rgba(250, 74, 158, calc(var(--p, 0) * 0.55)), rgba(250, 74, 158, calc(var(--p, 0) * 0.06))); transition: background 0.25s; }
.c4__discs { position: absolute; inset: 0; z-index: 2; }
.disc {
  position: absolute; width: var(--cw); height: var(--ch);
  left: calc(var(--c) * var(--cw)); top: calc(var(--r) * var(--ch));
  animation: drop 0.62s cubic-bezier(0.55, 0, 0.9, 0.4) both;
}
.disc::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffc2de 0, var(--uni-pink) 46%, #b8246f 100%);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.25);
}
.disc--ai::before { background: radial-gradient(circle at 34% 28%, #d8efff 0, var(--uni-cyan) 46%, #3d8fcf 100%); }
.disc--still { animation: none; }
.disc--ghost { animation: none; }
.disc--ghost::before { background: transparent; border: 2px dashed var(--uni-pink); box-shadow: 0 0 18px rgba(250, 74, 158, 0.6); animation: ghost 1.6s ease-in-out infinite; }
.disc.is-win::before { box-shadow: 0 0 0 3px var(--uni-lime), 0 0 22px var(--uni-lime); animation: winpulse 0.7s ease-in-out infinite alternate; }
.c4.is-clearing .disc { animation: clear 0.5s ease-in forwards; }
@keyframes drop {
  0%   { transform: translateY(calc((var(--r) + 1) * -100%)); }
  58%  { transform: translateY(0); animation-timing-function: ease-out; }
  74%  { transform: translateY(-13%); animation-timing-function: ease-in; }
  88%  { transform: translateY(0); animation-timing-function: ease-out; }
  94%  { transform: translateY(-3%); animation-timing-function: ease-in; }
  100% { transform: translateY(0); }
}
@keyframes clear { to { transform: translateY(calc((6 - var(--r)) * 100% + 100%)); opacity: 0; } }
@keyframes winpulse { to { transform: scale(1.1); } }
@keyframes ghost { 0%, 100% { opacity: 0.35; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.04); } }

/* ───────── Ticker ───────── */
.ticker { overflow: hidden; border-block: 1px solid rgba(186, 248, 55, 0.2); background: rgba(186, 248, 55, 0.05); padding: 0.7rem 0; transform: rotate(-1deg) scale(1.02); margin: 0.5rem 0 1rem; }
.ticker__track { display: flex; width: max-content; gap: 1.6rem; font: 700 0.84rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.2em; color: var(--uni-lime); animation: ticker 40s linear infinite; padding-left: 1.6rem; }
.ticker__track i { font-style: normal; color: var(--uni-pink); font-size: 0.7em; align-self: center; }
.ticker__track span { white-space: nowrap; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ───────── Sections ───────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: 3.6rem var(--pad) 1rem; }
.section__head { max-width: 40rem; margin-bottom: 1.8rem; }
.section__head h2, .board h2, .weekly h2 { font-size: clamp(1.9rem, 7vw, 3.2rem); margin: 0.3rem 0 0.5rem; }
.section__sub { color: var(--text-dim); margin: 0; font-size: 1.05rem; }

.js .reveal { opacity: 0; transform: translateY(26px) scale(0.98); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: step; }
.step { position: relative; display: flex; flex-direction: column; padding: 1.35rem; background: linear-gradient(170deg, rgba(31, 24, 40, 0.95), var(--bg-card)); transition: transform 0.35s var(--ease-spring), border-color 0.25s, box-shadow 0.25s; }
.step:hover { transform: translateY(-6px); border-color: rgba(186, 248, 55, 0.5); box-shadow: 0 18px 40px rgba(186, 248, 55, 0.08); }
.js .step.reveal.is-in:hover { transform: translateY(-6px); }
.step__num { position: absolute; top: 1rem; right: 1.1rem; font-size: 0.8rem; color: var(--uni-pink); letter-spacing: 0.1em; }
.step__icon { margin-bottom: 0.8rem; transition: transform 0.4s var(--ease-spring); }
.step:hover .step__icon { transform: rotate(-10deg) scale(1.15); }
.step h3 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.step p { margin: 0 0 1.1rem; color: var(--text-dim); font-size: 0.97rem; }
.viz { position: relative; margin-top: auto; height: 92px; display: flex; align-items: flex-end; gap: 10px; padding-top: 4px; }
.vbar { position: relative; flex: 1; height: 100%; border-radius: 9px; background: rgba(249, 249, 250, 0.06); overflow: hidden; }
.vbar b { position: absolute; inset: auto 0 0 0; height: var(--v); border-radius: 9px 9px 4px 4px; background: linear-gradient(180deg, #ff8cc3, var(--uni-pink)); transform: scaleY(0); transform-origin: 50% 100%; }
.is-in .viz--vote .vbar b { animation: fill 4s ease-in-out infinite; animation-delay: calc(var(--i) * 140ms); }
@keyframes fill { 0% { transform: scaleY(0); } 18% { transform: scaleY(1); } 48% { transform: scaleY(0.72); } 76% { transform: scaleY(1); } 92% { transform: scaleY(1); } 100% { transform: scaleY(0); } }
.viz--win .vbar b { opacity: 0.45; }
.is-in .viz--win .vbar b { animation: grow 1.1s var(--ease-out) forwards; animation-delay: calc(0.3s + var(--i) * 120ms); }
@keyframes grow { to { transform: scaleY(1); } }
.vbar--win b { opacity: 1 !important; background: linear-gradient(180deg, #e3ff94, var(--uni-lime)); box-shadow: 0 0 22px rgba(186, 248, 55, 0.55); }
.vbar--win em { position: absolute; top: 5px; left: 0; right: 0; text-align: center; font: 700 0.85rem var(--font-mono); font-style: normal; color: var(--uni-ink); z-index: 2; }
.vbar--win { outline: 1.5px solid rgba(186, 248, 55, 0.5); }

.viz--clock { align-items: center; justify-content: center; }
.ring { position: absolute; height: 92px; width: 92px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring__bg { stroke: rgba(249, 249, 250, 0.08); }
.ring__fg { stroke: var(--uni-lime); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--off, 0); transition: stroke 0.3s; }
.viz--clock.is-low .ring__fg { stroke: var(--uni-pink); }
.viz--clock.is-low .clock__n { color: var(--uni-pink); }
.clock__n { position: relative; font-size: 1.35rem; font-weight: 700; color: var(--uni-lime); transition: color 0.3s; }

.viz--taunt { display: block; }
.mini-bubble, .typing { position: absolute; left: 0; bottom: 4px; border-radius: 14px 14px 14px 4px; }
.typing { display: flex; gap: 6px; align-items: center; padding: 0.85rem 1rem; background: var(--cyan-dim); border: 1px solid rgba(126, 200, 255, 0.35); }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--uni-cyan); animation: dot 0.9s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-5px); opacity: 1; } }
.mini-bubble { max-width: 100%; padding: 0.65rem 0.85rem; font-size: 0.9rem; line-height: 1.3; background: var(--uni-cyan); color: var(--uni-ink); font-weight: 600; opacity: 0; }
.is-in .typing { animation: typing-cycle 5s infinite; }
.is-in .mini-bubble { animation: bubble-cycle 5s infinite; }
@keyframes typing-cycle { 0%, 34% { opacity: 1; transform: none; } 38%, 100% { opacity: 0; transform: scale(0.8); } }
@keyframes bubble-cycle { 0%, 36% { opacity: 0; transform: translateY(8px) scale(0.85); } 42%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }

/* Games */
.games { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.game { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.35s var(--ease-spring), box-shadow 0.3s, border-color 0.3s; }
.game:hover { transform: translateY(-6px); }
.game:nth-child(1):hover { border-color: rgba(126, 200, 255, 0.5); box-shadow: 0 20px 50px rgba(126, 200, 255, 0.12); }
.game:nth-child(2):hover { border-color: rgba(250, 74, 158, 0.5); box-shadow: 0 20px 50px rgba(250, 74, 158, 0.14); }
.game__art { display: flex; flex-direction: column; justify-content: center; min-height: 400px; padding: 1.2rem 1.2rem 1rem; background: radial-gradient(90% 90% at 50% 0%, rgba(126, 200, 255, 0.12), transparent 70%), #0c0812; border-bottom: 1px solid var(--line); }
.game__art > * { flex: none; }
.game__art--c4 { background: radial-gradient(90% 90% at 50% 0%, rgba(250, 74, 158, 0.16), transparent 70%), #0c0812; }
.game__body { padding: 1.3rem 1.4rem 1.5rem; }
.game__body h3 { font-size: 1.9rem; margin-bottom: 0.15rem; }
.game__tag { color: var(--uni-lime); font: 600 0.95rem var(--font-mono); margin: 0 0 0.7rem; }
.game__body p { color: var(--text-dim); margin: 0 0 1rem; }
.game__body p.game__tag { color: var(--uni-lime); margin: 0 0 0.7rem; }
.game__facts { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; margin: 0; padding: 0; }

.chess { width: 100%; max-width: 340px; margin: 0 auto; border-radius: 10px; box-shadow: 0 0 0 2px rgba(249, 249, 250, 0.1), 0 14px 40px rgba(0, 0, 0, 0.5); }
.pc use { stroke: var(--uni-ink); stroke-width: 0.18; }
.pc--ai { fill: var(--uni-cyan); }
.pc--human { fill: var(--uni-pink); }
.arr { fill: none; stroke: var(--uni-lime); stroke-linecap: round; opacity: 0.92; }
.dot { fill: var(--uni-lime); opacity: 0.9; }
.arr--1 { stroke-width: 3.4; animation: arrow-a 6s ease-in-out infinite; }
.arr--2 { stroke-width: 2; animation: arrow-b 6s ease-in-out infinite; }
.arr--3 { stroke-width: 1.2; animation: arrow-c 6s ease-in-out infinite; }
.dot--1 { animation: dot-a 6s ease-in-out infinite; } .dot--2 { animation: dot-b 6s ease-in-out infinite; } .dot--3 { animation: dot-c 6s ease-in-out infinite; }
@keyframes arrow-a { 0%, 100% { stroke-width: 3.4; } 50% { stroke-width: 1.4; } }
@keyframes arrow-b { 0%, 100% { stroke-width: 2; } 50% { stroke-width: 3.4; } }
@keyframes arrow-c { 0%, 100% { stroke-width: 1.2; } 50% { stroke-width: 2.2; } }
@keyframes dot-a { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes dot-b { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes dot-c { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.7; } }

.c4-votes, .c4--card { width: 100%; max-width: 340px; margin-inline: auto; }
.c4-votes { display: grid; grid-template-columns: repeat(7, 1fr); height: 62px; margin-bottom: 4px; }
.c4-votes i { display: flex; align-items: flex-end; justify-content: center; }
.c4-votes i::after { content: ""; width: 54%; height: var(--v); border-radius: 7px 7px 2px 2px; background: var(--uni-pink); opacity: 0.4; transform-origin: 50% 100%; animation: breathe 3.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.5s); }
.c4-votes i.top::after { opacity: 1; background: linear-gradient(180deg, #ff9fcd, var(--uni-pink)); box-shadow: 0 0 20px rgba(250, 74, 158, 0.65); }
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.62); } }
.c4--card { box-shadow: 0 0 0 2px rgba(249, 249, 250, 0.1), 0 14px 40px rgba(0, 0, 0, 0.5); }

/* Scoreboard + weekly */
.duo { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
.board, .weekly { padding: 1.5rem; }
.board { background: radial-gradient(80% 80% at 0% 0%, rgba(250, 74, 158, 0.14), transparent 60%), radial-gradient(80% 80% at 100% 100%, rgba(126, 200, 255, 0.12), transparent 60%), var(--bg-card); }
.board__grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.5rem; margin: 1rem 0 1.1rem; text-align: center; }
.score { display: flex; flex-direction: column; align-items: center; }
.score__label { font-size: 0.82rem; letter-spacing: 0.18em; font-weight: 700; }
.score__num { font: 700 clamp(3.6rem, 16vw, 6.2rem)/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.score--human { color: var(--team-human); text-shadow: 0 0 36px rgba(250, 74, 158, 0.45); }
.score--ai { color: var(--team-ai); text-shadow: 0 0 36px rgba(126, 200, 255, 0.45); }
.board__dash { font: 700 2rem var(--font-display); color: var(--text-dim); }
.tug { position: relative; display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: rgba(249, 249, 250, 0.08); }
.tug__h { width: var(--h, 50%); background: linear-gradient(90deg, #ff8cc3, var(--uni-pink)); transition: width 1.2s var(--ease-out); }
.tug__a { flex: 1; background: linear-gradient(90deg, var(--uni-cyan), #b2deff); }
.tug__mid { position: absolute; left: var(--h, 50%); top: -3px; bottom: -3px; width: 4px; margin-left: -2px; background: var(--uni-paper); border-radius: 2px; transition: left 1.2s var(--ease-out); }
.board__note { color: var(--text-dim); font-size: 0.92rem; margin: 0.9rem 0 0; }

.weekly h2 { margin-bottom: 0.2rem; }
.weekly__where { margin: 0 0 1.2rem; color: var(--text-dim); font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }
.weekly__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.weekly__list li { display: flex; gap: 0.85rem; align-items: center; padding: 0.7rem 0.9rem; border-radius: 12px; background: rgba(249, 249, 250, 0.04); border: 1px solid transparent; color: var(--text-dim); transition: border-color 0.2s, transform 0.25s var(--ease-spring), background 0.2s; }
.weekly__list li:hover { transform: translateX(6px); border-color: rgba(186, 248, 55, 0.35); background: rgba(186, 248, 55, 0.05); }
.weekly__list b { color: var(--text); }
.weekly__list img { flex: none; }

/* FAQ */
.faq__layout { display: grid; gap: 2rem; }
.faq__list { max-width: 52rem; display: grid; gap: 0.7rem; align-content: start; }
.faq__aside { display: none; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); transition: border-color 0.2s, background 0.2s; }
.faq details:hover { border-color: rgba(186, 248, 55, 0.3); }
.faq details[open] { border-color: rgba(186, 248, 55, 0.5); background: linear-gradient(170deg, rgba(186, 248, 55, 0.06), var(--bg-card)); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 58px; padding: 0.8rem 1.2rem; cursor: pointer; font: 600 1.08rem var(--font-sans); list-style: none; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(186, 248, 55, 0.14); color: var(--uni-lime); font: 700 1.2rem/1 var(--font-mono); transition: transform 0.3s var(--ease-spring), background 0.2s; }
.faq details[open] summary::after { transform: rotate(135deg); background: var(--uni-lime); color: var(--uni-ink); }
.faq details p { margin: 0; padding: 0 1.2rem 1.2rem; color: var(--text-dim); animation: fade-down 0.35s var(--ease-out); }
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } }

/* Footer */
.footer { margin-top: 4rem; padding: 3rem var(--pad) calc(3.2rem + env(safe-area-inset-bottom)); text-align: center; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(250, 74, 158, 0.07)); }
.footer p { margin: 0.3rem 0; }
.footer__jelly { margin: 0 auto 0.8rem; width: 54px; height: auto; animation: bob 5s ease-in-out infinite; }
.footer__name { color: var(--text); }
.footer__slogan { margin-top: 1rem !important; opacity: 0.85; font-size: 0.7rem; }

/* Secret jellyfish rain */
.toast-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.rain { position: absolute; top: -90px; width: 40px; height: auto; animation: fall var(--dur, 3s) cubic-bezier(0.3, 0.1, 0.6, 1) forwards; }
@keyframes fall { to { transform: translate3d(var(--dx, 0), 115vh, 0) rotate(var(--rot, 20deg)); } }
.secret-note { position: absolute; left: 50%; top: 22%; transform: translate(-50%, 0); padding: 0.8rem 1.2rem; border-radius: 999px; background: var(--uni-lime); color: var(--uni-ink); font: 700 0.95rem var(--font-mono); box-shadow: var(--glow-lime); animation: secret 3.6s var(--ease-spring) forwards; white-space: nowrap; max-width: 92vw; }
@keyframes secret { 0% { opacity: 0; transform: translate(-50%, 20px) scale(0.7); } 12%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -10px); } }

/* ───────── Larger screens ───────── */
@media (min-width: 480px) {
  .join__row { grid-template-columns: minmax(0, 1fr) auto; }
  .join__input { letter-spacing: 0.45em; }
}
@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .jelly--perch { width: 92px; top: -5.2rem; }
  .join { margin-top: 4.4rem; }
}
@media (min-width: 820px) {
  .games { grid-template-columns: 1fr 1fr; }
  .duo { grid-template-columns: 1.05fr 1fr; }
  .board, .weekly { padding: 2rem; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 3rem; padding-top: 2.4rem; padding-bottom: 4.5rem; min-height: calc(100dvh - 120px); }
  .hero__stage { padding-top: 9.2rem; }
  .arena { max-width: none; }
  .jelly--perch { display: none; }
  .join { margin-top: 1.6rem; }
  .jelly--stage {
    display: block; position: absolute; top: 0; right: 3%; width: 158px; z-index: 4;
    transform: translate3d(calc(var(--px) * -16px), calc(var(--py) * -12px), 0); transition: transform 0.25s ease-out;
  }
}
@media (min-width: 960px) {
  .faq__layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 3rem; align-items: center; }
  .faq__aside { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
  .faq__aside img { width: 170px; height: auto; animation: bob 5.5s ease-in-out infinite; filter: drop-shadow(0 0 26px rgba(250, 74, 158, 0.35)); }
  .faq__say { position: relative; margin: 0; padding: 0.9rem 1rem; border-radius: 16px; background: var(--uni-paper); color: var(--uni-ink); font-weight: 600; font-size: 0.92rem; line-height: 1.35; }
  .faq__say::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; margin-left: -8px; background: var(--uni-paper); transform: rotate(45deg); border-radius: 3px; }
}
@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .versus { font-size: clamp(3.6rem, 5.5vw, 5.6rem); }
}
@media (max-height: 760px) and (max-width: 959px) {
  .hero__lead { margin-bottom: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bubble, .ticker__track { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .jelly img, .footer__jelly { animation: none !important; }
  .versus__vs { transform: rotate(-7deg); }
  .arena__timer i, .vbar b { animation: none !important; transform: none !important; }
  .typing { display: none; }
  .mini-bubble { opacity: 1 !important; }
}
