/* Zennyt public site (zennyt.com). Colors and type come from the app theme:
   mobile/lib/core/theme/app_colors.dart and app_typography.dart (Inter). */

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-VariableFont.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #11428d;
  --navy-deep: #0a2e5c;
  --indigo: #4f46e5;
  --indigo-soft: #eef2ff;
  --magenta: #d12e7d;
  --magenta-dark: #b0256a;
  --bg: #f9fbff;
  --surface: #ffffff;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --border: rgba(17, 24, 39, 0.08);
  --border-strong: rgba(17, 24, 39, 0.14);
  /* Game family accents (games_hub_screen.dart, _defaultCatalog). */
  --fam-flex: #e0559b;
  --fam-memory: #4f6bed;
  --fam-decision: #ee8a1e;
  --fam-planning: #22a06b;
  --fam-emotion: #7c5ce0;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 12px 32px -12px rgba(17, 66, 141, 0.18);
  --shadow-lg: 0 2px 4px rgba(17, 24, 39, 0.04), 0 30px 60px -20px rgba(17, 66, 141, 0.28);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s;
}

.btn-primary {
  background: var(--magenta);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(209, 46, 125, 0.7);
}

.btn-primary:hover {
  background: var(--magenta-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(209, 46, 125, 0.75);
}

.btn-primary .arrow {
  transition: transform 0.25s var(--ease);
}

.btn-primary:hover .arrow {
  transform: translateX(4px);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  padding: 0 16px;
}

.btn-ghost:hover {
  background: var(--indigo-soft);
}

.btn-sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 251, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
}

/* Wordmark: Inter Extra Bold, +8 % tracking (ZennytWordmark). */
.wordmark {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.nav a:hover {
  color: var(--navy);
  background: var(--indigo-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
}

.lang-switch button {
  min-width: 40px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}

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

.hero {
  position: relative;
  padding: clamp(48px, 9vw, 112px) 0 clamp(64px, 9vw, 120px);
  isolation: isolate;
}

/* A soft light that follows the pointer (set by main.js). */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at var(--mx, 70%) var(--my, 30%), rgba(79, 70, 229, 0.1), transparent 60%),
    radial-gradient(900px circle at 100% 0%, rgba(209, 46, 125, 0.07), transparent 55%);
  transition: background-position 0.2s;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--indigo);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 0 4px rgba(209, 46, 125, 0.15);
}

.hero h1 {
  font-size: clamp(40px, 6.2vw, 74px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--navy), var(--indigo) 45%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin-top: 24px;
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(17px, 1.6vw, 19px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 36px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  display: flex;
  flex-direction: column;
  color: var(--text-3);
  font-size: 14px;
}

.hero-facts strong {
  color: var(--navy);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ── Fit Score demo card ─────────────────────────────────────────────── */

.fit-demo {
  perspective: 1200px;
}

.fit-card {
  position: relative;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
}

.fit-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fit-card-kicker {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}

.fit-card-title {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.score-ring {
  position: relative;
  flex-shrink: 0;
  width: 84px;
  height: 84px;
}

.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring circle {
  fill: none;
  stroke-width: 8;
}

.score-ring .track {
  stroke: var(--indigo-soft);
}

.score-ring .value {
  stroke: url(#ringGradient);
  stroke-linecap: round;
  stroke-dasharray: 238.76;
  stroke-dashoffset: 238.76;
  transition: stroke-dashoffset 0.9s var(--ease);
}

.score-ring output {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.radar {
  width: 100%;
  max-width: 340px;
  margin: 8px auto 0;
  overflow: visible;
}

.radar .grid {
  fill: none;
  stroke: rgba(17, 66, 141, 0.1);
}

.radar .axis {
  stroke: rgba(17, 66, 141, 0.1);
}

.radar .shape-offer {
  fill: rgba(209, 46, 125, 0.1);
  stroke: var(--magenta);
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.radar .shape-candidate {
  fill: rgba(79, 70, 229, 0.18);
  stroke: var(--indigo);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.radar .dot {
  stroke: #fff;
  stroke-width: 2;
}

.radar text {
  fill: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
}

.fit-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 6px;
  color: var(--text-3);
  font-size: 13px;
}

.fit-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fit-legend i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--indigo);
}

.fit-legend .offer i {
  background: repeating-linear-gradient(90deg, var(--magenta) 0 4px, transparent 4px 7px);
}

.fit-offers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.fit-offers-label {
  width: 100%;
  color: var(--text-3);
  font-size: 13px;
}

.chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.chip[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.fit-note {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 12px;
}

.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
  transform: translateZ(50px);
  animation: bob 6s ease-in-out infinite;
}

.float-badge img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--indigo-soft);
  padding: 3px;
}

.float-badge small {
  display: block;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}

.float-badge.b1 {
  bottom: -26px;
  left: -48px;
}

.float-badge.b2 {
  top: 118px;
  right: -48px;
  animation-delay: -3s;
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

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

.section {
  padding: clamp(72px, 10vw, 128px) 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-head h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 800;
}

.section-head p {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 18px;
}

/* ── How it works (sticky stage) ─────────────────────────────────────── */

.how {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 88px);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  gap: 20px;
  min-height: 52vh;
  padding: 8px 0;
  opacity: 0.35;
  transition: opacity 0.5s var(--ease);
}

.step:last-child {
  min-height: auto;
  padding-bottom: 20vh;
}

.step.is-active {
  opacity: 1;
}

.step-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  color: var(--text-3);
  font-weight: 800;
  transition: all 0.4s var(--ease);
}

.step.is-active .step-num {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.step h3 {
  margin-top: 6px;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
}

.step p {
  margin-top: 12px;
  max-width: 28em;
  color: var(--text-2);
}

.stage {
  position: sticky;
  top: 104px;
  align-self: start;
  height: min(560px, 70vh);
  /* No frame: the scenes sit right on the section background. */
}

.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  pointer-events: none;
}

.scene.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.stage .pill {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

/* Scene 1: game tiles. */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(100%, 430px);
  margin-top: 10px;
}

.tile-item {
  margin: 0;
  padding: 8px 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 3px 0 rgba(17, 24, 39, 0.08);
  opacity: 0;
  transform: translateY(18px) rotate(0deg);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.3s var(--ease);
  transition-delay: calc(var(--i) * 70ms);
}

/* Laid down by hand: each card sits at its own small angle. */
.tile-item:nth-child(1) {
  --tilt: -3deg;
}

.tile-item:nth-child(2) {
  --tilt: 2deg;
}

.tile-item:nth-child(3) {
  --tilt: -1.5deg;
}

.tile-item:nth-child(4) {
  --tilt: 2.5deg;
}

.tile-item:nth-child(5) {
  --tilt: -2deg;
}

.tile-item:nth-child(6) {
  --tilt: 1.5deg;
}

.scene.is-active .tile-item {
  opacity: 1;
  transform: rotate(var(--tilt));
}

.scene.is-active .tile-item:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: 0 8px 0 rgba(17, 24, 39, 0.08);
  transition-delay: 0ms;
}

.tile-item figcaption {
  overflow: hidden;
  margin-top: 8px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tile {
  /* overflow keeps the square: the image can't stretch it. */
  overflow: hidden;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 18%;
  border-radius: 12px;
  background: var(--tint, var(--indigo-soft));
}

.tile img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

/* Scene 2 and 3: radar. */
.scene .radar {
  max-width: 400px;
}

.scene .radar .shape-candidate,
.scene .radar .shape-offer {
  transition: opacity 0.6s var(--ease);
}

.scene-profile .shape-candidate {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}

.scene-profile.is-active .shape-candidate {
  animation: draw 1.4s var(--ease) forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.scene-stack {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 100%;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.pill-accent {
  background: rgba(209, 46, 125, 0.1);
  color: var(--magenta-dark);
}

.big-score {
  color: var(--navy);
  font-size: clamp(56px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Scene 4: match. */
.match {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  width: min(100%, 460px);
}

.match-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transform: translateX(var(--from, 0));
  transition: transform 0.8s var(--ease);
}

.scene-match:not(.is-active) .match-card {
  --from: -30px;
}

.scene-match:not(.is-active) .match-card + .match-card {
  --from: 30px;
}

.match-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo);
  font-weight: 800;
}

.match-card.offer .match-avatar {
  background: rgba(209, 46, 125, 0.1);
  color: var(--magenta);
}

.match-card strong {
  display: block;
  margin-top: 12px;
  font-size: 15px;
}

.match-card span {
  color: var(--text-3);
  font-size: 13px;
}

.match-bar {
  height: 6px;
  margin-top: 8px;
  border-radius: 3px;
  background: var(--indigo-soft);
}

.match-bar + .match-bar {
  width: 70%;
}

.match-link {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--magenta));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.9), var(--shadow);
  scale: 0;
  transition: scale 0.5s var(--ease) 0.4s;
}

.scene-match.is-active .match-link {
  scale: 1;
}

.bubble {
  grid-column: 1 / -1;
  justify-self: end;
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s var(--ease) 0.8s;
}

.scene-match.is-active .bubble {
  opacity: 1;
  transform: none;
}

/* ── Audiences ───────────────────────────────────────────────────────── */

.audiences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.audience {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.audience.recruiters {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.audience.recruiters h3,
.audience.recruiters .audience-tag {
  color: #fff;
}

.audience-tag {
  color: var(--indigo);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.audience h3 {
  margin-top: 12px;
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 800;
}

.audience ul {
  display: grid;
  gap: 14px;
  margin: 28px 0 32px;
  padding: 0;
  list-style: none;
}

.audience li {
  display: flex;
  gap: 12px;
  color: var(--text-2);
}

.audience.recruiters li {
  color: rgba(255, 255, 255, 0.82);
}

.audience li::before {
  content: "";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--indigo-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234F46E5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.audience.recruiters li::before {
  background-color: rgba(255, 255, 255, 0.14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

.audience .btn {
  margin-top: auto;
  align-self: flex-start;
}

.audience.recruiters .btn-primary {
  background: #fff;
  color: var(--navy);
  box-shadow: none;
}

.audience.recruiters .btn-primary:hover {
  background: var(--indigo-soft);
}

/* ── Games: picker + phones ──────────────────────────────────────── */

.games-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.games-info .section-head {
  margin-bottom: 32px;
}

.family-picker {
  display: grid;
  gap: 10px;
}

.family-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.family-option:hover {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.family-option[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--accent);
  box-shadow: 0 10px 24px -16px var(--accent);
}

.family-option img {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 6px;
  border-radius: 12px;
  background: var(--tint);
}

.family-option[aria-pressed="true"] img {
  background: var(--surface);
}

.family-option-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.family-option-text strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.family-option-text span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.family-option-count {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}

.games-hint {
  margin-top: 18px;
  color: var(--text-3);
  font-size: 14px;
}

/* Family colors (games_hub_screen.dart, _defaultCatalog); darker text
   shades where the hub accent is too light for small text. */
.fam-flex {
  --accent: var(--fam-flex);
  --tint: #fdedf4;
}

.fam-memory {
  --accent: var(--fam-memory);
  --tint: #eef1fe;
}

.fam-decision {
  --accent: #c76b06;
  --tint: #fff4e6;
}

.fam-planning {
  --accent: #178352;
  --tint: #e8f7ef;
}

.fam-emotion {
  --accent: var(--fam-emotion);
  --tint: #f2eefe;
}

/* The two devices. Titanium frames, thin bezel, Dynamic Island, glare. */
.phones-wrap {
  display: grid;
  justify-items: center;
}

.phones {
  --tx: 0deg;
  --ty: 0deg;
  position: relative;
  width: 480px;
  height: 590px;
  perspective: 1400px;
}

.device {
  position: absolute;
  width: 262px;
  height: 540px;
  padding: 5px;
  border-radius: 50px;
  background: linear-gradient(145deg, #f6f7f9 0%, #c8ccd4 20%, #eef0f3 46%, #a9afba 72%, #e7e9ed 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.85),
    inset 0 0 1px 2px rgba(17, 24, 39, 0.12),
    0 60px 90px -40px rgba(17, 66, 141, 0.5),
    0 24px 36px -24px rgba(17, 24, 39, 0.4);
  transition: transform 0.6s var(--ease);
}

.device-back {
  left: 0;
  top: 0;
  background: linear-gradient(145deg, #5a6f9c 0%, #22345c 22%, #4c6290 48%, #16243f 74%, #41557f 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    inset 0 0 1px 2px rgba(0, 0, 0, 0.3),
    0 50px 80px -40px rgba(17, 66, 141, 0.55),
    0 20px 30px -24px rgba(17, 24, 39, 0.45);
  transform: rotateX(var(--tx)) rotateY(var(--ty)) rotate(-6deg) translateZ(-40px);
}

.device-front {
  right: 0;
  top: 44px;
  z-index: 1;
  transform: rotateX(var(--tx)) rotateY(var(--ty)) rotate(4deg);
}

.device-bezel {
  height: 100%;
  padding: 4px;
  border-radius: 45px;
  background: #15171c;
}

.device-screen {
  position: relative;
  height: 100%;
  border-radius: 41px;
  background: var(--bg);
  overflow: hidden;
}

.device-glare {
  position: absolute;
  inset: 5px;
  border-radius: 45px;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 28%, transparent 42%);
  pointer-events: none;
}

.device-key {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: inherit;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.key-action {
  left: -3px;
  top: 96px;
  height: 22px;
}

.key-vol-up {
  left: -3px;
  top: 134px;
  height: 40px;
}

.key-vol-down {
  left: -3px;
  top: 184px;
  height: 40px;
}

.key-power {
  right: -3px;
  top: 150px;
  height: 64px;
}

.island {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 3;
  width: 72px;
  height: 22px;
  margin-left: -36px;
  border-radius: 999px;
  background: #0b0c0f;
}

.status-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 4px 22px 0 28px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-icons i {
  display: block;
}

.status-icons .sig {
  width: 15px;
  height: 10px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 3px 40% no-repeat,
    linear-gradient(currentColor, currentColor) 4px 100% / 3px 60% no-repeat,
    linear-gradient(currentColor, currentColor) 8px 100% / 3px 80% no-repeat,
    linear-gradient(currentColor, currentColor) 12px 100% / 3px 100% no-repeat;
}

.status-icons .wifi {
  width: 12px;
  height: 9px;
  border-radius: 12px 12px 0 0 / 10px 10px 0 0;
  background: radial-gradient(circle at 50% 100%, currentColor 2px, transparent 2.5px, transparent 4px, currentColor 4.5px, currentColor 6px, transparent 6.5px);
}

.status-icons .bat {
  position: relative;
  width: 22px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  opacity: 0.9;
}

.status-icons .bat::after {
  content: "";
  position: absolute;
  inset: 1px 5px 1px 1px;
  border-radius: 1px;
  background: currentColor;
}

.home-bar {
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 96px;
  height: 4px;
  margin-left: -48px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.8);
}

/* In-phone app UI (styled after the app's Progress hub). */
.screen-body {
  position: absolute;
  inset: 44px 0 0;
  padding: 6px 16px 22px;
  overflow: hidden;
}

.app-title {
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.app-sub {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.45;
}

.app-tagline {
  margin-top: 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.app-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), 0 2px 6px -4px rgba(17, 24, 39, 0.2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease);
}

.app-row:hover {
  transform: scale(1.02);
}

.app-row:active {
  transform: scale(0.98);
}

.app-row img {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 4px;
  border-radius: 11px;
  background: var(--tint);
  object-fit: contain;
}

.app-row strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
}

.progress-row.is-current {
  box-shadow: inset 0 0 0 2px var(--accent), 0 8px 18px -12px var(--accent);
}

.app-row-text {
  flex: 1;
  min-width: 0;
}

.app-row-meta {
  display: block;
  margin-top: 3px;
  color: var(--text-3);
  font-size: 10.5px;
}

.app-bar {
  display: block;
  height: 5px;
  margin-top: 5px;
  border-radius: 3px;
  background: var(--tint);
  overflow: hidden;
}

.app-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.9s var(--ease);
}

.app-view:not(.is-in) .app-bar i {
  width: 0 !important;
}

.app-view {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.app-view.is-in {
  opacity: 1;
  transform: none;
}

.app-head {
  margin: -6px -16px 0;
  padding: 10px 16px 16px;
  background: var(--tint);
}

.app-head img {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
  padding: 7px;
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 6px 14px -8px var(--accent);
}

.game-row strong {
  flex: 1;
}

.app-play {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.app-back {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.app-splash {
  display: grid;
  justify-items: center;
  margin-top: 18px;
  text-align: center;
}

.app-halo {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--tint);
}

.app-halo::before,
.app-halo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: halo 2.4s var(--ease) infinite;
}

.app-halo::after {
  animation-delay: 1.2s;
}

@keyframes halo {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.app-halo img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.app-splash .app-sub {
  max-width: 200px;
  margin-top: 12px;
}

.app-loading {
  width: 100%;
  margin-top: 18px;
}

.app-loading-label {
  color: var(--text-3);
  font-size: 11px;
}

.app-bar-lg {
  height: 6px;
}

.app-view.is-in .app-bar-lg i {
  width: 100%;
  transition-duration: 1.6s;
}

.app-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--magenta);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease) 1.6s, transform 0.4s var(--ease) 1.6s;
}

.app-view.is-in .app-cta {
  opacity: 1;
  transform: none;
}

.phones-note {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 12px;
}

/* ── Trust ───────────────────────────────────────────────────────────── */

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

.trust-item {
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--border);
}

.trust-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--indigo-soft);
  color: var(--indigo);
}

.trust-icon svg {
  width: 26px;
  height: 26px;
}

.trust-item h3 {
  margin-top: 22px;
  font-size: 21px;
  font-weight: 800;
}

.trust-item p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 16px;
}

.trust-item a {
  color: var(--indigo);
  font-weight: 600;
}

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

.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.faq-wrap .section-head {
  position: sticky;
  top: 104px;
}

.faq details {
  border-bottom: 1px solid var(--border-strong);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--indigo-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2311428D' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform 0.35s var(--ease);
}

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

.faq-body {
  padding: 0 48px 24px 0;
  color: var(--text-2);
}

.faq-wrap .section-head a {
  color: var(--indigo);
  font-weight: 600;
}

.faq-body a {
  color: var(--indigo);
  font-weight: 600;
}

/* ── Final call ──────────────────────────────────────────────────────── */

.final {
  padding: clamp(72px, 10vw, 120px) 0;
}

.final-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  align-items: center;
  padding: clamp(40px, 6vw, 80px);
  border-radius: 32px;
  background:
    radial-gradient(600px circle at 85% 50%, rgba(209, 46, 125, 0.28), transparent 60%),
    linear-gradient(130deg, var(--navy-deep), var(--navy) 45%, var(--indigo));
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.final-card h2 {
  max-width: 13em;
  color: #fff;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  text-wrap: balance;
}

.final-card p {
  margin-top: 18px;
  max-width: 30em;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.final-card .hero-actions .btn-ghost {
  color: #fff;
}

.final-card .hero-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.final-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.final-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.final-facts li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 0 3px rgba(209, 46, 125, 0.25);
}

/* Orbit: the mark in the middle, the five family icons around it. */
.final-visual {
  display: grid;
  place-items: center;
}

.orbit {
  --r: 128px;
  position: relative;
  width: 320px;
  height: 320px;
}

.orbit-ring {
  position: absolute;
  inset: calc(50% - var(--r));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.orbit-ring-outer {
  inset: -6px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
}

.orbit-spin {
  position: absolute;
  inset: 0;
  animation: orbit 48s linear infinite;
}

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1));
}

/* Keeps each icon upright while the ring turns. */
.orbit-item img {
  width: 34px;
  height: 34px;
  animation: orbit 48s linear infinite reverse;
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.1), 0 0 0 28px rgba(255, 255, 255, 0.05), 0 24px 48px -16px rgba(0, 0, 0, 0.45);
}

.orbit-core img {
  width: 64px;
  height: 64px;
}

@keyframes orbit {
  to {
    rotate: 360deg;
  }
}

.final-card:hover .orbit-spin,
.final-card:hover .orbit-item img {
  animation-play-state: paused;
}

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

.site-footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 15px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--navy);
  text-decoration: underline;
}

/* ── Legal pages ─────────────────────────────────────────────────────── */

.legal {
  max-width: 780px;
  padding-top: clamp(40px, 7vw, 80px);
  padding-bottom: 96px;
}

.legal h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
}

.legal-meta {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 15px;
}

.legal-note {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--indigo-soft);
  color: var(--navy);
  font-size: 15px;
}

.legal-body {
  margin-top: 40px;
}

.legal-body h2 {
  margin: 44px 0 14px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.legal-body p,
.legal-body li {
  color: var(--text-2);
}

.legal-body p + p,
.legal-body ul + p,
.legal-body p + ul {
  margin-top: 12px;
}

.legal-body ul {
  margin: 0;
  padding-left: 22px;
}

.legal-status {
  margin-top: 40px;
  color: var(--text-3);
}

.legal-status a {
  color: var(--indigo);
  font-weight: 600;
}

/* ── Reveal on scroll ────────────────────────────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* The hero plays on load, not on scroll. The headline only slides, never
   fades, so it paints at once (largest contentful paint). */
.js .hero .reveal {
  opacity: 1;
  transform: none;
  transition: none;
  animation: rise 0.9s var(--ease) both;
  animation-delay: var(--d, 0ms);
}

.js .hero h1.reveal {
  animation-name: slide;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes slide {
  from {
    transform: translateY(24px);
  }
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .nav {
    display: none;
  }

  .float-badge.b1 {
    left: -16px;
  }

  .float-badge.b2 {
    right: -16px;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .faq-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-wrap .section-head {
    position: static;
  }

  .fit-demo {
    max-width: 520px;
  }

  .games-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The phones keep their real proportions and shrink as one block. */
  /* The phones keep their real proportions and shrink as one block,
     centred in a box of the scaled height. */
  .phones-wrap {
    position: relative;
    display: block;
    height: calc(590px * var(--k, 0.8) + 32px);
    overflow-x: clip;
  }

  .phones {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(var(--k, 0.8));
    transform-origin: top center;
  }

  .phones-note {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    text-align: center;
  }

  .audiences,
  .trust {
    grid-template-columns: minmax(0, 1fr);
  }

  .final-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .final-visual {
    display: none;
  }

  /* Steps scroll under a compact sticky stage. */
  .how {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .stage {
    order: -1;
    top: 64px;
    z-index: 2;
    height: 300px;
    /* Same color as the section: the steps scroll under it unseen. */
    background: var(--surface);
  }

  .step {
    min-height: 46vh;
  }

  .step:last-child {
    padding-bottom: 8vh;
  }

  .scene {
    padding: 20px;
  }

  .tiles {
    width: min(100%, 250px);
    gap: 10px;
  }

  /* The compact stage has no room for the names. */
  .tile-item figcaption {
    display: none;
  }

  .tile {
    border-radius: 16px;
  }

  .scene .radar {
    max-width: 230px;
  }

  .big-score {
    font-size: 44px;
  }

  .scene-stack {
    gap: 8px;
  }

  .match {
    gap: 28px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    height: 64px;
    gap: 12px;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .header-actions {
    gap: 4px;
  }

  .lang-switch button {
    min-width: 34px;
    min-height: 30px;
  }

  .header-actions .btn-primary {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .float-badge {
    display: none;
  }

  .fit-card {
    padding: 18px;
  }

  .score-ring {
    width: 72px;
    height: 72px;
  }

  .phones-wrap {
    --k: 0.68;
  }

  .match-card {
    padding: 12px;
  }

  .match-card span {
    display: block;
    font-size: 11.5px;
    line-height: 1.35;
  }

  .match-link {
    width: 48px;
    height: 48px;
    font-size: 12px;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9), var(--shadow);
  }

  .score-ring output {
    font-size: 18px;
  }

  .faq summary {
    font-size: 17px;
  }

  .faq-body {
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .fit-card {
    transform: none !important;
  }
}
