/* fuistetu.app: the app's own look (colours, Fredoka + Nunito, sticker outlines)
   on a static page. Motion everywhere, and none for whoever asks for less. */

:root {
  --ink: #24133f;
  --ink-soft: #45325f;
  --bg: #fff6ea;
  --cream: #fff0dc;
  --primary: #6c3bff;
  --primary-dark: #4b1fd1;
  --accent: #ff4f8b;
  --sun: #ffc83d;
  --mint: #17b897;
  --sky: #2f9bff;
  --orange: #ff8a3d;
  --stage: #1a0b33;
  --radius: 28px;
  --edge: 0 6px 0 var(--ink);
  --edge-small: 0 4px 0 var(--ink);
  --display: Fredoka, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: Nunito, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1160px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 4px solid var(--sun);
  outline-offset: 3px;
  border-radius: 8px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--sun);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.wrap.narrow {
  max-width: 860px;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 24px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--edge-small);
  font: 700 1.125rem/1 var(--display);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn-sun {
  background: var(--sun);
  color: var(--ink);
}

.btn-accent {
  background: linear-gradient(135deg, #ff5c9a, #ff7a59);
  color: #fff;
}

.btn-primary {
  background: linear-gradient(135deg, #8a5cff, #5b2bea);
  color: #fff;
}

.btn-ghost {
  background: var(--bg);
  color: var(--ink);
}

.btn.small {
  min-height: 40px;
  font-size: 1rem;
  padding: 6px 16px;
}

/* A band of light crossing the main buttons now and then. */
.btn-sun::after,
.btn-accent::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: sheen 4.5s ease-in-out infinite;
}

@keyframes sheen {
  0%,
  70% {
    left: -60%;
  }
  100% {
    left: 130%;
  }
}

/* ── Header ──────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(36, 19, 63, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--bg);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  width: auto;
  height: 64px;
  transition: transform 0.2s ease;
}

.logo:hover img {
  transform: rotate(-2deg) scale(1.04);
}

.menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.menu a {
  text-decoration: none;
  font: 700 1rem/1 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.92;
  transition:
    opacity 0.15s,
    color 0.15s;
}

.menu a:hover {
  opacity: 1;
  color: var(--sun);
}

.langs {
  display: inline-flex;
  gap: 4px;
  padding-left: 6px;
}

.langs a {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.langs a[aria-current] {
  background: var(--sun);
  color: var(--ink);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--bg);
  cursor: pointer;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 26px;
  height: 3px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 3px;
  transition: transform 0.2s;
  position: relative;
}

.burger::before,
.burger::after {
  content: '';
  position: absolute;
  left: 0;
}

.burger::before {
  top: -8px;
}

.burger::after {
  top: 8px;
}

.nav.open .burger {
  background: transparent;
}

.nav.open .burger::before {
  transform: translateY(8px) rotate(45deg);
}

.nav.open .burger::after {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 20px 20px;
    background: var(--ink);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.2s,
      opacity 0.2s,
      visibility 0.2s;
  }

  .nav.open .menu {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .menu a {
    padding: 12px 0;
    font-size: 1.1rem;
  }

  .langs {
    padding: 8px 0 0;
  }

  .menu .langs a {
    padding: 6px 12px;
  }
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 90% at 30% 10%, #8a5cff 0%, #6c3bff 40%, #3f18b8 100%);
  color: var(--bg);
  padding: 64px 0 96px;
  isolation: isolate;
}

.rays {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 260vmax;
  height: 260vmax;
  margin: -130vmax 0 0 -130vmax;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0.07) 0deg 9deg,
    transparent 9deg 18deg
  );
  animation: spin 90s linear infinite;
  z-index: -2;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hero::after {
  /* The app's dot pattern. */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(rgba(255, 246, 234, 0.16) 2px, transparent 2.5px) 0 0 / 28px 28px;
  z-index: -1;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.confetti i {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: 10px;
  height: 16px;
  border-radius: 3px;
  background: var(--c);
  border: 2px solid var(--ink);
  transform: rotate(var(--r));
  animation: fall var(--s) linear var(--d) infinite;
  opacity: 0;
}

@keyframes fall {
  0% {
    transform: translateY(-20px) rotate(var(--r));
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  100% {
    transform: translateY(105vh) rotate(calc(var(--r) + 540deg));
    opacity: 0.9;
  }
}

.floaters span {
  position: absolute;
  font: 700 2.2rem/1 var(--display);
  color: var(--sun);
  -webkit-text-stroke: 2px var(--ink);
  animation: bob 4s ease-in-out infinite;
  z-index: -1;
}

.f-star {
  left: 4%;
  top: 14%;
}

.f-star.f-2 {
  left: auto;
  right: 6%;
  top: 70%;
  color: var(--bg);
  animation-delay: -1.3s;
}

.f-plus {
  left: 46%;
  top: 8%;
  color: var(--mint) !important;
  animation-delay: -0.7s;
}

.f-wave {
  left: 8%;
  bottom: 10%;
  color: var(--accent) !important;
  animation-delay: -2.1s;
}

.f-ring {
  right: 40%;
  bottom: 18%;
  width: 34px;
  height: 34px;
  border: 6px dashed var(--accent);
  border-radius: 50%;
  animation: spin 9s linear infinite !important;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-10px) rotate(3deg);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-grid > * {
  min-width: 0;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.pill {
  background: var(--bg);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: var(--edge-small);
  padding: 8px 18px;
  border-radius: 999px;
  font: 700 0.95rem/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

/* The app icon's tag: pops in, then floats. */
.hero-title {
  margin: 4px 0 0;
  line-height: 0;
}

.hero-title img {
  width: clamp(220px, 24vw, 300px);
  height: auto;
  animation:
    pop-in 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both,
    float 4s ease-in-out 0.8s infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-8px) rotate(-1.5deg);
  }
}

/* The app's sticker letters: cream fill, thick ink outline, hard shadow. */
.bouncy {
  display: inline-block;
  white-space: nowrap;
}

.bouncy span {
  display: inline-block;
  color: var(--bg);
  -webkit-text-stroke: 0.14em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.09em 0 var(--ink);
  animation:
    pop-in 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both,
    wave 3.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.06s), calc(1s + var(--i) * 0.09s);
}

.bouncy span:nth-child(3n + 1) {
  color: var(--sun);
}

.bouncy span:nth-child(4n + 2) {
  color: #ff8fb6;
}

.bouncy .space {
  width: 0.28em;
  -webkit-text-stroke: 0;
}

@keyframes pop-in {
  from {
    transform: translateY(40px) scale(0.4) rotate(-12deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes wave {
  0%,
  60%,
  100% {
    transform: translateY(0) rotate(0);
  }
  30% {
    transform: translateY(-0.08em) rotate(-3deg);
  }
}

.lead {
  max-width: 560px;
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 246, 234, 0.96);
}

.code-form {
  width: 100%;
  max-width: 460px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.code-form label {
  font-weight: 800;
}

.code-row {
  display: flex;
  gap: 10px;
}

.code-row input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  border: 3px solid var(--ink);
  box-shadow: var(--edge-small);
  border-radius: 18px;
  background: var(--bg);
  color: var(--ink);
  font: 700 1.6rem/1 var(--display);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-align: center;
  padding: 8px 12px;
}

.code-row input::placeholder {
  color: rgba(36, 19, 63, 0.3);
}

.code-error {
  color: var(--sun);
  font-weight: 800;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  /* The badges' clear space: a quarter of their height. */
  gap: 16px;
}

/* The store's own badge, as it comes: no border or shadow of ours. */
.store-badge {
  display: block;
  border-radius: 9px;
}

.store-badge img {
  display: block;
  width: auto;
  height: 64px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border: 3px solid var(--bg);
  border-radius: 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.store svg {
  width: 26px;
  height: 26px;
  color: var(--sun);
}

.store small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.85;
}

.store strong {
  display: block;
  font: 700 1.15rem/1.1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.note {
  font-size: 0.95rem;
  opacity: 0.9;
  max-width: 520px;
}

.hero-art {
  position: relative;
  min-height: 560px;
}

.tv {
  border: 6px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  background: var(--stage);
  box-shadow: var(--edge);
}

.tv-hero {
  position: absolute;
  right: -40px;
  top: 40px;
  width: 92%;
  transform: rotate(3deg);
  animation: float-tv 7s ease-in-out infinite;
}

.phone {
  width: 260px;
  border: 8px solid var(--ink);
  border-radius: 40px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--edge);
  position: relative;
}

.phone::before {
  /* The notch. */
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34%;
  height: 18px;
  margin-left: -17%;
  border-radius: 12px;
  background: var(--ink);
  z-index: 1;
}

.phone-hero {
  position: absolute;
  left: 4%;
  top: 120px;
  width: 250px;
  transform: rotate(-6deg);
  animation: float-phone 6s ease-in-out infinite;
}

.octavio-hero {
  position: absolute;
  right: -10px;
  bottom: -30px;
  width: 200px;
  animation: octavio-hop 3.2s ease-in-out infinite;
  filter: drop-shadow(0 8px 0 rgba(36, 19, 63, 0.35));
}

@keyframes float-phone {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(-4deg) translateY(-14px);
  }
}

@keyframes float-tv {
  0%,
  100% {
    transform: rotate(3deg) translateY(0);
  }
  50% {
    transform: rotate(2deg) translateY(10px);
  }
}

@keyframes octavio-hop {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  20% {
    transform: translateY(-18px) rotate(4deg) scaleY(1.04);
  }
  32% {
    transform: translateY(0) scaleX(1.08) scaleY(0.92);
  }
  44% {
    transform: translateY(0) rotate(-2deg);
  }
}

@media (max-width: 960px) {
  .hero {
    padding: 40px 0 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-text {
    align-items: center;
    text-align: center;
  }

  .hero-title img {
    width: clamp(220px, 62vw, 320px);
  }

  .lead {
    font-size: 1.08rem;
  }

  .code-form label {
    text-align: center;
  }

  .hero-links,
  .stores {
    justify-content: center;
  }

  .hero-art {
    min-height: 0;
    height: min(118vw, 600px);
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
  }

  .tv-hero {
    right: 0;
    width: 88%;
  }

  .phone-hero {
    width: min(48vw, 240px);
    top: 22%;
  }

  .octavio-hero {
    width: min(34vw, 170px);
    bottom: 0;
  }
}

/* ── Sections ────────────────────────────────────────────────────────── */

.section {
  position: relative;
  padding: 96px 0;
  overflow: hidden;
}

.section-cream {
  background: var(--bg) radial-gradient(rgba(36, 19, 63, 0.07) 2px, transparent 2.5px) 0 0 / 28px
    28px;
}

.section-cream-2 {
  background: var(--cream);
}

.section-violet {
  color: var(--bg);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0 22px, transparent 22px 44px),
    linear-gradient(180deg, #7a4bff, #4b1fd1);
}

.section-pink {
  background:
    radial-gradient(rgba(36, 19, 63, 0.08) 2px, transparent 2.5px) 0 0 / 28px 28px,
    linear-gradient(180deg, #ffa3c2, #ff7aa8);
}

.section-sun {
  background:
    radial-gradient(rgba(36, 19, 63, 0.08) 2px, transparent 2.5px) 0 0 / 28px 28px,
    linear-gradient(180deg, #ffe48a, #ffc23d);
}

.section-stage {
  color: var(--bg);
  background: radial-gradient(90% 80% at 70% 20%, #3a1c6e, #1a0b33 70%);
}

.kicker {
  display: table;
  margin: 0 auto 14px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--sun);
  border: 3px solid var(--ink);
  box-shadow: var(--edge-small);
  font: 700 0.95rem/1.1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.kicker-light {
  background: var(--accent);
  color: #fff;
}

.title {
  text-align: center;
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  color: var(--primary);
  -webkit-text-stroke: 0.1em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 var(--ink);
  margin-bottom: 14px;
}

.title-light {
  color: var(--sun);
}

.small-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-top: 48px;
}

.section-lead {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.section-lead.align-left {
  text-align: left;
  margin-left: 0;
}

.lead-light {
  color: rgba(255, 246, 234, 0.92);
  font-size: 1.15rem;
}

.section-violet .section-lead {
  color: rgba(255, 246, 234, 0.92);
}

.card {
  background: var(--bg);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--edge);
}

/* Things appear as you scroll to them. */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition:
    opacity 0.6s ease,
    transform 0.7s cubic-bezier(0.2, 1.3, 0.4, 1);
  transition-delay: calc(var(--i, 0) * 0.09s);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ── How it works ───────────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 30px 26px 28px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.step h3 {
  font-size: 1.5rem;
}

.step-n {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 3px solid var(--ink);
  font: 700 1.6rem/1 var(--display);
  box-shadow: var(--edge-small);
}

.flap {
  position: absolute;
  top: 26px;
  right: 22px;
  display: flex;
  gap: 4px;
}

.flap b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--sun);
  font: 700 1.3rem/1 var(--display);
  animation: flip 5s ease-in-out infinite;
  animation-delay: calc(var(--n, 0) * 0.12s);
}

.flap b:nth-child(2) {
  --n: 1;
}

.flap b:nth-child(3) {
  --n: 2;
}

.flap b:nth-child(4) {
  --n: 3;
}

@keyframes flip {
  0%,
  80%,
  100% {
    transform: rotateX(0);
  }
  85% {
    transform: rotateX(90deg);
  }
  90% {
    transform: rotateX(0);
  }
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ── Demo ───────────────────────────────────────────────────────────── */

.demo-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.demo-intro .kicker,
.demo-intro .title,
.demo-intro .section-lead {
  text-align: left;
  margin-left: 0;
}

.demo-intro .title {
  color: var(--bg);
}

.demo-intro .section-lead {
  color: var(--ink);
  margin-bottom: 0;
}

.demo {
  padding: 26px;
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.demo-question {
  font: 700 clamp(1.25rem, 2.6vw, 1.6rem) / 1.25 var(--display);
  text-align: center;
  padding: 18px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--edge-small);
  min-height: 92px;
  display: grid;
  place-items: center;
}

.demo-faces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.face {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--edge-small);
  font: 700 1.05rem/1.1 var(--display);
  color: var(--ink);
  cursor: pointer;
  position: relative;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    opacity 0.3s;
}

.face img {
  width: min(96px, 100%);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--ink);
  object-fit: cover;
}

.face:hover:not(:disabled) {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 7px 0 var(--ink);
}

.face:disabled {
  cursor: default;
}

.face.dim {
  opacity: 0.45;
}

.face.mine {
  background: var(--sun);
}

.face .stamp {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--ink);
  font-size: 0.85rem;
  transform: rotate(10deg);
  animation: stamp 0.35s cubic-bezier(0.3, 1.8, 0.5, 1) both;
}

@keyframes stamp {
  from {
    transform: scale(2.4) rotate(-20deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(10deg);
    opacity: 1;
  }
}

.face .tally {
  font: 400 0.85rem/1 var(--body);
  color: var(--ink-soft);
}

.demo-result {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.demo-winner {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  isolation: isolate;
}

.demo-winner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 360px;
  height: 360px;
  margin: -210px 0 0 -180px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(255, 200, 61, 0.55) 0deg 10deg,
    transparent 10deg 20deg
  );
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%);
  mask: radial-gradient(circle, #000 30%, transparent 70%);
  animation: spin 14s linear infinite;
  z-index: -1;
}

.demo-winner img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid var(--sun);
  box-shadow: 0 0 0 3px var(--ink);
  object-fit: cover;
  animation: pop-in 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.demo-winner strong {
  font: 700 1.6rem/1 var(--display);
}

.demo-everyone {
  font: 700 1.1rem/1 var(--display);
}

.demo-stamp {
  font: 700 clamp(2.2rem, 6vw, 3rem) / 1 var(--display);
  color: var(--sun);
  -webkit-text-stroke: 0.12em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 0.08em 0 var(--ink);
  transform: rotate(-4deg);
  animation: pop-in 0.5s 0.25s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.demo-points {
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8a5cff, #ff4f8b);
  color: #fff;
  font: 700 1.2rem/1.1 var(--display);
  animation: pop-in 0.5s 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}

.demo-points.none {
  background: var(--ink-soft);
}

.demo .btn {
  justify-self: center;
}

.demo-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

.burst {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid var(--ink);
  pointer-events: none;
  animation: burst 1.1s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes burst {
  to {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .demo-wrap {
    grid-template-columns: 1fr;
  }

  .demo-intro .kicker,
  .demo-intro .title,
  .demo-intro .section-lead {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── Features ───────────────────────────────────────────────────────── */

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature {
  padding: 24px 22px;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: transform 0.2s;
}

.feature:hover {
  transform: translateY(-4px) rotate(-0.6deg);
}

.feature h3 {
  font-size: 1.3rem;
}

.icon {
  width: 56px;
  height: 56px;
}

.feature:hover .icon {
  animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
  25% {
    transform: rotate(-10deg);
  }
  75% {
    transform: rotate(10deg);
  }
}

@media (max-width: 1040px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* ── Games ──────────────────────────────────────────────────────────── */

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.game {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 20px;
  align-items: flex-start;
  background: linear-gradient(
    135deg,
    var(--bg) 55%,
    color-mix(in srgb, var(--game) 26%, var(--bg)) 100%
  );
  transition: transform 0.2s;
}

.game:nth-child(odd) {
  --tilt: -0.8deg;
}

.game:nth-child(even) {
  --tilt: 0.8deg;
}

.game.is-in {
  transform: rotate(var(--tilt));
}

.game:hover {
  transform: rotate(0) translateY(-4px);
}

.game-badge {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--game);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.game-badge img {
  width: 92%;
  transition: transform 0.3s;
}

.game:hover .game-badge img {
  transform: scale(1.12) rotate(-6deg);
}

.game h3 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

/* The name is the link, and it covers the whole card. */
.game h3 a {
  color: inherit;
  text-decoration: none;
}

.game h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.game:focus-within {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.game-meta span {
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid rgba(36, 19, 63, 0.18);
  background: rgba(255, 255, 255, 0.6);
}

.game-meta .spicy {
  border-color: #ff5a5f;
  color: #b3122a;
  font-weight: 800;
}

@media (max-width: 1040px) {
  .games {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .games {
    grid-template-columns: 1fr;
  }
}

/* ── Screenshots ─────────────────────────────────────────────────────── */

.carousel {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
}

.carousel-track {
  list-style: none;
  margin: 0;
  padding: 16px max(20px, calc((100vw - var(--wrap)) / 2)) 26px;
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.shot {
  flex: none;
  scroll-snap-align: center;
  display: grid;
  justify-items: center;
  gap: 12px;
}

.shot .phone {
  width: 240px;
  transform: rotate(calc((var(--i) - 2.5) * 1.2deg));
  transition: transform 0.25s;
}

.shot:hover .phone {
  transform: rotate(0) translateY(-6px) scale(1.02);
}

.shot p {
  font: 700 1.15rem/1.1 var(--display);
}

.carousel-btn {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--bg);
  box-shadow: var(--edge-small);
  font: 700 2rem/1 var(--display);
  cursor: pointer;
}

.carousel-btn.prev {
  left: 12px;
}

.carousel-btn.next {
  right: 12px;
}

@media (max-width: 640px) {
  .carousel-btn {
    display: none;
  }
}

/* ── La Mesa ────────────────────────────────────────────────────────── */

.spotlights {
  position: absolute;
  inset: 0;
  background:
    conic-gradient(
      from 200deg at 15% -10%,
      transparent 0deg,
      rgba(255, 200, 61, 0.14) 12deg,
      transparent 26deg
    ),
    conic-gradient(
      from 140deg at 85% -10%,
      transparent 0deg,
      rgba(255, 79, 139, 0.14) 12deg,
      transparent 26deg
    );
  animation: sweep 9s ease-in-out infinite alternate;
}

@keyframes sweep {
  to {
    transform: translateX(4%);
  }
}

.mesa-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.mesa-text .kicker,
.mesa-text .title {
  margin-left: 0;
  text-align: left;
}

.mesa-text {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.ticks li {
  position: relative;
  padding-left: 34px;
}

.ticks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mint);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  border: 2px solid var(--ink);
}

.mesa-art {
  position: relative;
  padding-bottom: 60px;
}

.mesa-art .tv {
  transform: rotate(-1.5deg);
}

.mesa-art .tv-small {
  position: absolute;
  right: -20px;
  bottom: 0;
  width: 55%;
  transform: rotate(4deg);
  animation: float-tv 7s ease-in-out infinite;
}

@media (max-width: 960px) {
  .mesa-grid {
    grid-template-columns: 1fr;
  }

  .mesa-text {
    justify-items: center;
    text-align: center;
  }

  .mesa-text .kicker,
  .mesa-text .title {
    margin-left: auto;
    text-align: center;
  }

  .mesa-art .tv-small {
    right: 0;
  }
}

/* ── Pass and safety ────────────────────────────────────────────────── */

.pass-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 88px;
}

.pass-text .kicker,
.pass-text .title {
  margin-left: 0;
  text-align: left;
}

.pass-card {
  position: relative;
  padding: 34px 30px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--edge);
  background:
    radial-gradient(rgba(255, 255, 255, 0.25) 2px, transparent 2.5px) 0 0 / 22px 22px,
    linear-gradient(135deg, #8a5cff, #ff4f8b 110%);
  color: #fff;
  display: grid;
  gap: 18px;
  transform: rotate(1.5deg);
}

.pass-card::after {
  content: '★';
  position: absolute;
  top: -22px;
  right: -14px;
  font: 700 3rem/1 var(--display);
  color: var(--sun);
  -webkit-text-stroke: 3px var(--ink);
  animation: spin 12s linear infinite;
}

.pass-name {
  font-size: clamp(2rem, 4.2vw, 2.8rem);
  line-height: 1;
}

.bouncy.small span {
  -webkit-text-stroke: 0.12em var(--ink);
}

.pass-note {
  font-weight: 800;
}

.safety {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.safety li {
  padding: 22px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.safety h3 {
  font-size: 1.2rem;
}

@media (max-width: 960px) {
  .pass-grid {
    grid-template-columns: 1fr;
  }

  .pass-text .kicker,
  .pass-text .title,
  .section-lead.align-left {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .safety {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .safety {
    grid-template-columns: 1fr;
  }
}

/* ── FAQ ────────────────────────────────────────────────────────────── */

.faq {
  display: grid;
  gap: 14px;
}

.faq details {
  padding: 0;
  border-radius: 20px;
  box-shadow: var(--edge-small);
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 56px 18px 22px;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary h3 {
  font-size: 1.2rem;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  margin-top: -16px;
  font: 700 2rem/1 var(--display);
  color: var(--primary);
  transition: transform 0.25s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 22px 20px;
  color: var(--ink-soft);
  animation: open 0.3s ease;
}

@keyframes open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ── Call to action ─────────────────────────────────────────────────── */

.cta {
  text-align: center;
}

.cta .wrap {
  display: grid;
  justify-items: center;
  gap: 22px;
}

.octavio-cta {
  width: 150px;
  animation: octavio-hop 3.2s ease-in-out infinite;
}

.sticker-title {
  max-width: 820px;
}

.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chips li {
  padding: 8px 16px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--edge-small);
  font: 700 1.05rem/1 var(--display);
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.footer {
  background: #1a1030;
  color: rgba(255, 246, 234, 0.86);
  padding: 56px 0 40px;
  font-size: 0.95rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 246, 234, 0.14);
}

.footer-brand {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-brand .logo img {
  height: 92px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-cols h2 {
  font-size: 1.05rem;
  color: var(--bg);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-cols a {
  text-decoration: none;
  color: var(--sun);
  font-weight: 700;
}

.footer-cols a:hover {
  text-decoration: underline;
}

.footer-legal {
  display: grid;
  gap: 10px;
  padding-top: 24px;
  font-size: 0.88rem;
  color: rgba(255, 246, 234, 0.7);
}

.amber {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  text-decoration: none;
  color: rgba(255, 246, 234, 0.82);
  width: fit-content;
}

.amber strong {
  color: var(--bg);
}

.amber img {
  width: 102px;
  height: 28px;
  transition: transform 0.2s;
}

.amber:hover img {
  transform: scale(1.06);
}

@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .footer-cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Text pages ─────────────────────────────────────────────────────── */

.page {
  padding: 56px 0 80px;
  background: var(--bg) radial-gradient(rgba(36, 19, 63, 0.07) 2px, transparent 2.5px) 0 0 / 28px
    28px;
  min-height: 70vh;
}

.page .wrap {
  display: grid;
  gap: 18px;
}

.page-octavio {
  width: 110px;
  justify-self: center;
  animation: bob 3s ease-in-out infinite;
}

.updated {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.page-lead {
  text-align: center;
  font-size: 1.15rem;
  max-width: 720px;
  justify-self: center;
}

.prose {
  padding: 28px 30px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.prose h2 {
  font-size: 1.4rem;
  margin-top: 10px;
  color: var(--primary-dark);
}

.prose ul {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 6px;
}

/* ── Breadcrumbs, the games' pages, the 404 page ───────────────────── */

.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.crumbs li + li::before {
  content: '›';
  margin-right: 6px;
}

.crumbs a {
  color: var(--primary-dark);
  font-weight: 700;
}

.page-actions {
  text-align: center;
  margin-top: 24px;
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}

.game-head .kicker {
  margin-bottom: 10px;
}

.game-head .title {
  margin-bottom: 6px;
}

.game-head .game-badge {
  width: 128px;
  height: 128px;
}

.game-page .chips li {
  font-size: 0.95rem;
}

.game-steps {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.game-steps .step-n {
  background: var(--game);
}

.examples {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.examples li {
  padding: 18px 20px;
  display: grid;
  gap: 8px;
  font: 600 1.1rem/1.35 var(--display);
  border-left: 10px solid var(--game);
}

/* A game's whole list: numbered, in two columns where there is room. */
.idea-list {
  list-style: none;
  counter-reset: idea;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.idea-list li {
  counter-increment: idea;
  position: relative;
  padding: 14px 18px 14px 58px;
  display: grid;
  gap: 6px;
  align-content: start;
  font: 600 1.05rem/1.4 var(--display);
  border-left: 8px solid var(--game);
  box-shadow: var(--edge-small);
}

.idea-list li::before {
  content: counter(idea);
  position: absolute;
  left: 14px;
  top: 14px;
  min-width: 32px;
  color: var(--ink-soft);
  font: 700 1.05rem/1.4 var(--display);
  text-align: right;
}

.idea-list p {
  margin: 0;
}

.idea-list .idea-alt {
  font: 400 0.95rem/1.45 var(--body);
  color: var(--ink-soft);
}

/* The quiz's answers: a «+» on the right, so the browser's own marker doesn't hide the number. */
.idea-list summary {
  position: relative;
  padding-right: 30px;
  cursor: pointer;
  list-style: none;
}

.idea-list summary::-webkit-details-marker {
  display: none;
}

.idea-list summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  color: var(--primary-dark);
  font: 700 1.3rem/1.1 var(--display);
}

.idea-list details[open] summary::after {
  content: '−';
}

.idea-list details p {
  margin-top: 8px;
  font: 400 1rem/1.45 var(--body);
}

.idea-app {
  margin-top: 40px;
  border-left: 10px solid var(--game);
}

.idea-app p:last-child {
  margin: 4px 0 0;
}

/* Links to the whole lists: on the games page and under each list. */
.idea-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.idea-links a {
  display: block;
  height: 100%;
  padding: 18px 20px;
  border-left: 10px solid var(--game);
  color: var(--ink);
  font: 600 1.1rem/1.35 var(--display);
  text-decoration: none;
}

.idea-links a:hover,
.idea-links a:focus-visible {
  transform: translateY(-2px);
}

/* The Christmas page: one card per night, with the games that suit it. */
.nights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.night {
  padding: 24px 26px;
  display: grid;
  align-content: start;
  gap: 10px;
  border-top: 10px solid var(--game);
}

.night h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.night p {
  margin: 0;
}

.night-label {
  margin-top: 4px;
  font: 700 0.85rem/1.2 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.night-games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.night-games a {
  display: inline-block;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  border-left: 8px solid var(--game);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font: 600 1rem/1.2 var(--display);
  text-decoration: none;
}

.night-games a:hover,
.night-games a:focus-visible {
  background: var(--sun);
}

.play-card {
  margin-top: 40px;
  padding: 28px;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.play-card .small-title {
  margin: 0;
}

.not-found + .not-found {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed rgba(36, 19, 63, 0.2);
}

@media (max-width: 860px) {
  .examples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .idea-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .idea-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .game-head {
    flex-direction: column;
    gap: 12px;
  }

  .examples,
  .idea-links,
  .nights {
    grid-template-columns: 1fr;
  }
}

.press-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.press-images {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.press-images li {
  padding: 14px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.press-images img {
  max-height: 260px;
  width: auto;
  border-radius: 14px;
}

@media (max-width: 760px) {
  .press-grid,
  .press-images {
    grid-template-columns: 1fr;
  }
}

/* ── Less motion ────────────────────────────────────────────────────── */

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .confetti {
    display: none;
  }
}
