/* Home page sections. */
.hero { max-width: 1200px; margin: 0 auto; padding: 32px 24px 96px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px 64px; }
.hero-copy { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero h1 { font-size: clamp(44px, 5.6vw, 74px); line-height: 1.04; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); }
.hero-lede { font-size: 20px; line-height: 1.55; color: var(--body); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding-top: 4px; }
.hero-actions .btn-secondary { min-height: 64px; padding: 0 22px; border-radius: 16px; font-size: 18px; }
.hero-actions .btn-secondary svg { width: 18px; height: 18px; }
.avatar-stack { display: flex; align-items: center; gap: 14px; padding-top: 8px; font-size: 15px; font-weight: 600; color: var(--body); }
.avatar-stack .faces { display: flex; }
.avatar-stack .faces img { width: 46px; height: 46px; border-width: 2.5px; }
.avatar-stack .faces img + img { margin-left: -12px; }

/* Trial game */
.trial { flex: 1 1 460px; min-width: 0; max-width: 540px; margin: 0 auto; position: relative; padding-top: 52px; scroll-margin-top: 24px; }
.trial-peek { position: absolute; z-index: 3; top: 0; width: 96px; display: flex; flex-direction: column; align-items: center; }
.trial-peek img { width: 96px; height: 96px; transform: rotate(var(--tilt)); }
.trial-peek.you { left: -16px; --tilt: -8deg; }
.trial-peek.quinn { right: -16px; --tilt: 7deg; animation-delay: -1.4s; }
.trial-score { position: relative; margin-top: -14px; display: flex; align-items: baseline; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--yellow); border: 2.5px solid var(--navy); font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.trial-score strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.trial-card { position: relative; overflow: hidden; min-height: 470px; display: flex; flex-direction: column; border-radius: 30px; box-shadow: 8px 8px 0 var(--navy); }
.trial-top { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 92px 8px; min-height: 92px; }
.trial-round, .trial-opponent .label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.trial-opponent { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 18px 24px 0; }
.trial-opponent .guess-boxes { width: 100%; gap: 6px; }
.trial-opponent .guess-box { max-width: 34px; border-radius: 8px; background: #f0f0f3; font-size: 18px; color: var(--muted); }
.trial-meta { display: flex; align-items: center; gap: 12px; }
.worth { padding: 6px 12px; border-radius: 999px; background: var(--pale-yellow); border: 2px solid var(--navy); font-size: 14px; font-weight: 700; color: var(--navy); }
.trial-card .clue { margin: 10px 24px 0; }
.trial-card .slots { margin: 24px 20px 20px; }
.trial-guess { padding: 0 24px 26px; }
.trial-guess label { display: block; text-align: center; font-size: 17px; font-weight: 700; margin-bottom: 12px; color: var(--navy); }
.trial-message { margin-top: 14px; min-height: 22px; text-align: center; font-size: 16px; font-weight: 700; color: var(--warm); }
.trial-result { padding: 0 24px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.trial-result .title-row { display: flex; align-items: center; gap: 12px; }
.trial-result .title { font-size: 26px; font-weight: 700; color: var(--navy); }
.trial-result .note { font-size: 16px; font-weight: 600; color: var(--body); }
.trial-result .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.trial-result .actions, .trial-result > .btn { margin-top: 14px; }
.trial-end { flex: 1; justify-content: center; padding-bottom: 52px; }
.trial-end .title { font-size: 32px; }
.celebrate { position: relative; width: min(300px, 100%); height: 150px; display: flex; align-items: flex-end; justify-content: center; }
.celebrate .confetti { position: absolute; inset: 0; width: 100%; height: 100%; }
.champ { position: relative; padding-top: 30px; }
.champ img { width: 112px; height: 112px; border-width: 3.5px; }
.champ .crown { position: absolute; z-index: 1; top: 0; left: 50%; width: 58px; height: 44px; transform: translateX(-50%); }
.champ.quinn { animation-delay: -1.4s; }
/* The winner wears the crown; a tie shows both players without one. */
.trial-end[data-result="win"] .champ.quinn, .trial-end[data-result="loss"] .champ.you { display: none; }
.trial-end[data-result="tie"] :is(.crown, .confetti), .trial-end[data-result="loss"] .confetti { display: none; }
.trial-end[data-result="tie"] .champ + .champ { margin-left: -14px; }
.final-score { display: flex; align-items: center; gap: 18px; padding: 10px 30px; border: 3px solid var(--navy); border-radius: 22px; background: var(--pale-yellow); box-shadow: 4px 4px 0 var(--navy); color: var(--navy); }
.final-score .side { display: flex; flex-direction: column; align-items: center; min-width: 76px; font-size: 15px; font-weight: 700; }
.final-score strong { font-size: 52px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.final-score .dash { font-size: 32px; font-weight: 700; }
.trial-result .score-pill { font-size: 17px; padding: 6px 14px; }
/* The board is blurred directly rather than through the overlay's backdrop-filter, which the browser can drop for a frame or two (the board then flashes sharp). */
.trial[data-phase="ready"] :is(.trial-top, .clue, .trial-opponent, .slots, .trial-guess) { filter: blur(8px); pointer-events: none; user-select: none; }
.trial-overlay { position: absolute; inset: 0; z-index: 2; background: rgba(253, 247, 233, 0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 32px; text-align: center; }
.trial-overlay h2 { font-size: 36px; line-height: 1.15; font-weight: 700; color: var(--navy); }
.trial[data-phase="lost"] .slot { color: var(--warm); }
/* A new round eases into focus, starting close to the blurred look of the opening screen. */
@keyframes fw-round-in { from { opacity: 0.3; filter: blur(8px); } to { opacity: 1; filter: blur(0); } }
@media (prefers-reduced-motion: no-preference) {
  .trial.round-in :is(.trial-top, .clue, .trial-opponent, .slots, .trial-guess) { animation: fw-round-in 600ms ease-out; }
}

/* Preview video */
.preview-dialog { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; overflow: visible; }
.preview-dialog::backdrop { background: rgba(27, 31, 59, 0.78); }
.preview-frame { position: relative; }
/* As tall as the window allows, narrowed on small screens so the 886×1920 frame is never cropped. */
.preview-dialog video { display: block; box-sizing: content-box; width: min(calc(100vw - 54px), calc((100vh - 96px) * 886 / 1920)); width: min(calc(100vw - 54px), calc((100dvh - 96px) * 886 / 1920)); height: auto; aspect-ratio: 886 / 1920; border: 3px solid var(--navy); border-radius: 24px; background: #000; }
.preview-close { position: absolute; z-index: 1; top: -18px; right: -14px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 2.5px solid var(--navy); border-radius: 50%; background: #fff; color: var(--navy); cursor: pointer; }
.preview-close svg { width: 20px; height: 20px; }
body:has(.preview-dialog[open]) { overflow: hidden; }

/* How it works */
.how { background: #fff; border-top: 3px solid var(--navy); border-bottom: 3px solid var(--navy); scroll-margin-top: 0; }
.how .inner { max-width: 1200px; margin: 0 auto; padding: 96px 24px; display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.section-head h2, .features > h2 { font-size: clamp(34px, 4vw, 50px); line-height: 1.1; font-weight: 700; color: var(--navy); text-align: center; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.step { display: flex; flex-direction: column; gap: 16px; padding: 28px; border: 3px solid var(--navy); border-radius: 26px; background: var(--cream); }
.step .num { width: 48px; height: 48px; border-radius: 50%; background: var(--yellow); border: 2.5px solid var(--navy); display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--navy); }
.step h3 { font-size: 24px; font-weight: 700; color: var(--navy); }
.step p { font-size: 17px; line-height: 1.55; color: var(--body); }
.step .demo { margin-top: auto; }
.step .demo.clue { padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.step .demo.slots { gap: 8px; padding: 8px 0; min-height: 0; }
.step .demo .slot { width: 28px; min-height: 32px; border-bottom-width: 3px; font-size: 24px; }
.step .demo.solved { display: flex; align-items: center; justify-content: center; gap: 10px; }
.step .demo.solved span:first-child { font-size: 22px; font-weight: 700; letter-spacing: 0.12em; color: var(--navy); }

/* Features */
.features { max-width: 1200px; margin: 0 auto; padding: 110px 24px 40px; display: flex; flex-direction: column; gap: 96px; scroll-margin-top: 0; }
.feature { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 72px; }
.feature.reverse { flex-wrap: wrap-reverse; }
.feature-art { flex: 1 1 360px; min-width: 0; display: flex; justify-content: center; }
.feature-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.feature-copy h3 { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.12; font-weight: 700; color: var(--navy); }
.feature-copy p { font-size: 19px; line-height: 1.6; color: var(--body); }
.scene { position: relative; width: min(440px, 100%); aspect-ratio: 1; border-radius: 40px; border: 3px solid var(--navy); background: var(--cream-card); }
.scene.friends { box-shadow: 8px 8px 0 var(--teal); transform: rotate(-2deg); padding: 30px 26px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.scene.friends .clue { padding: 10px 14px; border-radius: 14px; font-size: 15px; text-align: center; }
.scene.friends .players { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scene.friends .player { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scene.friends .player img { width: 104px; height: 104px; }
.scene.friends .name { padding: 3px 12px; border-radius: 999px; background: #fff; border: 2px solid var(--navy); font-size: 14px; font-weight: 700; }
.scene.friends .vs { width: 56px; height: 56px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--navy); display: grid; place-items: center; font-size: 19px; font-weight: 700; color: var(--navy); transform: rotate(-8deg); }
.scene.friends .board { display: flex; justify-content: center; gap: 8px; padding: 14px; background: #fff; border: 2.5px solid var(--navy); border-radius: 18px; }
.scene.friends .board .slot { width: 26px; min-height: 30px; border-bottom-width: 3px; font-size: 22px; }
.scene.friends .chat { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bubble { padding: 10px 16px; border: 2.5px solid var(--navy); font-size: 16px; font-weight: 700; background: #fff; }
.bubble.left { border-radius: 18px 18px 18px 4px; }
.bubble.right { margin-top: 22px; border-radius: 18px 18px 4px 18px; background: var(--teal-ink); color: #fff; }
.scene.computer { box-shadow: 8px 8px 0 var(--yellow); transform: rotate(2deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.tile { position: absolute; width: 46px; height: 50px; display: grid; place-items: center; background: #fff; border: 2.5px solid var(--navy); border-radius: 10px; font-size: 24px; font-weight: 700; }
.tile.q { top: 34px; left: 36px; transform: rotate(-12deg); }
.tile.z { bottom: 92px; left: 30px; transform: rotate(8deg); background: var(--pale-yellow); }
.tile.a { bottom: 110px; right: 32px; transform: rotate(-6deg); }
.cpu { position: relative; }
.cpu > img { width: 190px; height: 190px; border-width: 3.5px; }
.cpu .chip-badge { position: absolute; right: -6px; top: -6px; width: 64px; height: 64px; border-radius: 50%; background: var(--teal); border: 3px solid var(--navy); display: grid; place-items: center; }
.cpu .chip-badge svg { width: 42px; height: 42px; }
.cpu .thinking { position: absolute; top: -36px; right: -86px; display: flex; gap: 6px; padding: 12px 16px; background: #fff; border: 2.5px solid var(--navy); border-radius: 20px 20px 20px 4px; }
.cpu .thinking span { width: 10px; height: 10px; border-radius: 50%; background: var(--navy); }
.cpu .thinking span:nth-child(2) { opacity: .6; }
.cpu .thinking span:nth-child(3) { opacity: .3; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: #fff; border: 2.5px solid var(--navy); font-size: 16px; font-weight: 700; }
.status-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); }

.mini-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.mini { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 24px; border: 3px solid var(--navy); border-radius: 26px; background: #fff; box-shadow: 5px 5px 0 var(--navy); }
.mini h3 { padding: 0 6px; font-size: 22px; font-weight: 700; color: var(--navy); }
.mini p { padding: 0 6px; font-size: 16px; line-height: 1.55; color: var(--body); }
.mini .art { height: 160px; margin-bottom: 6px; border: 2.5px solid var(--navy); border-radius: 18px; background: var(--cream-card); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mini .art.sets { flex-wrap: wrap; align-content: center; gap: 8px; padding: 14px; }
.mini .art.sets .chip:nth-child(odd) { transform: rotate(-3deg); }
.mini .art.sets .chip:nth-child(even) { transform: rotate(2deg); }
.mini .art.podium { align-items: flex-end; gap: 6px; padding: 0 14px; }
.podium .place { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.podium .place img { width: 42px; height: 42px; border-width: 2.5px; }
.podium .place.first img { width: 48px; height: 48px; }
.podium .bar { width: 58px; display: grid; place-items: center; background: #fff; border: 2.5px solid var(--navy); border-bottom: 0; border-radius: 8px 8px 0 0; font-size: 20px; font-weight: 700; }
.podium .first .bar { height: 72px; background: var(--yellow); }
.podium .second .bar { height: 52px; }
.podium .third .bar { height: 36px; }
.mini .art.share { flex-direction: column; gap: 12px; }
.mini-score { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border: 2.5px solid var(--navy); border-radius: 16px; transform: rotate(-3deg); }
.mini-score img { width: 38px; height: 38px; border-width: 2px; }
.mini-score span { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.share-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--teal-ink); color: #fff; border: 2.5px solid var(--navy); font-size: 15px; font-weight: 700; transform: rotate(2deg); }
.share-pill svg { width: 16px; height: 16px; }
.calendar { width: 168px; background: #fff; border: 2.5px solid var(--navy); border-radius: 14px; overflow: hidden; transform: rotate(3deg); text-align: center; }
.calendar .top { background: var(--warm); color: #fff; padding: 8px 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; border-bottom: 2.5px solid var(--navy); }
.calendar .body { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.calendar .word { font-size: 19px; font-weight: 700; letter-spacing: 0.06em; color: var(--navy); }
.calendar .def { font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--body); }

/* Avatars */
.parade { max-width: 1200px; margin: 0 auto; padding: 80px 24px 110px; display: flex; flex-direction: column; align-items: center; gap: 36px; text-align: center; }
.parade h2 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; font-weight: 700; color: var(--navy); }
.parade p { max-width: 560px; font-size: 19px; line-height: 1.55; color: var(--body); }
.parade .faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; max-width: 980px; padding: 0; margin: 0; list-style: none; }
.parade .faces img { width: 104px; height: 104px; }
.parade .faces li:nth-child(3n+1) img { --r: -4deg; }
.parade .faces li:nth-child(3n+2) img { --r: 3deg; animation-delay: -0.8s; }
.parade .faces li:nth-child(3n) img { --r: -2deg; animation-delay: -1.6s; }

/* CTA */
.cta { max-width: 1200px; margin: 0 auto; padding: 0 24px 96px; }
.cta .panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding: 56px clamp(28px, 5vw, 72px); border: 3px solid var(--navy); border-radius: 40px; background: var(--yellow); box-shadow: 10px 10px 0 var(--navy); }
.cta .copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cta h2 { font-size: clamp(34px, 4vw, 52px); line-height: 1.08; font-weight: 700; color: var(--navy); }
.cta p { font-size: 19px; line-height: 1.55; font-weight: 600; color: var(--navy); }

.cta .art { flex: 0 1 260px; display: flex; justify-content: center; }
.cta .art img { width: 230px; height: 230px; --r: 6deg; }

@media (max-width: 560px) {
  .trial-top { padding-left: 80px; padding-right: 80px; }
  .trial-card .slots { gap: 6px; margin-left: 14px; margin-right: 14px; }
  .trial-peek, .trial-peek img { width: 76px; }
  .trial-peek img { height: 76px; }
  .trial-peek.you { left: -6px; }
  .trial-peek.quinn { right: -6px; }
  .cpu .thinking { right: -40px; }
  .parade .faces img { width: 84px; height: 84px; }
}

/* Once the hero and feature rows stack (below ~1024px), center their copy and actions. */
@media (max-width: 1023px) {
  .hero-copy { align-items: center; text-align: center; }
  .hero-lede { margin: 0 auto; }
  .hero-actions, .avatar-stack { justify-content: center; }
  .avatar-stack { flex-wrap: wrap; }
  .feature-copy { align-items: center; text-align: center; }
  .feature-copy p { max-width: 560px; }
}
@media (max-width: 600px) {
  .cpu .thinking { top: -52px; right: -24px; }
}

/* The download banner keeps text and owl side by side, left-aligned, until a phone-sized width; then it stacks and centers. */
.cta .panel { flex-wrap: nowrap; }
@media (max-width: 760px) {
  .cta .panel { flex-direction: column; justify-content: center; }
  .cta .copy { flex-basis: auto; align-items: center; text-align: center; }
  .cta .art { flex-basis: auto; }
}
