/* Movio landing. One visual world: a living room in the evening, lit by a screen.
   Colours come from the Movio mockups: night navy, rep-flash yellow, sky, mint. */
:root {
  --night: #14213d;
  --deep: #0f1a30;
  --panel: #1e2f55;
  --line: #2b3f6b;
  --rep: #ffc53d;
  --rep-ink: #2a1d00;
  --sky: #6cc4ff;
  --mint: #3ddc97;
  --paper: #f4f6fa;
  --mist: #a9b6cf;
  --error: #ff8a7a;
  color-scheme: dark;
  --display: 'Baloo 2', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font: 400 1.0625rem/1.6 var(--body);
}
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: var(--paper); }
:focus-visible { outline: 3px solid var(--rep); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Top bar */
.bar { padding-block: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none;
  font: 800 1.6rem/1 var(--display); letter-spacing: -0.01em; }
.logo svg { width: 30px; height: 30px; }
.bar a.skip { font-size: 0.95rem; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px;
  align-items: center; padding-block: 28px 72px; }
.hero h1 { font: 800 clamp(2.6rem, 6.2vw, 4.6rem)/0.98 var(--display); letter-spacing: -0.02em;
  margin: 0 0 20px; text-wrap: balance; }
.lede { font-size: 1.2rem; color: var(--mist); max-width: 32em; margin: 0 0 32px; }

/* Signup */
.signup { display: grid; gap: 14px; max-width: 30rem; }
.signup .row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 15rem; min-width: 0; font: inherit; color: var(--paper); background: var(--deep);
  border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.signup input[type="email"]::placeholder { color: #7684a0; }
.signup input[type="email"]:focus { border-color: var(--sky); outline: none; }
.signup input[aria-invalid="true"] { border-color: var(--error); }
.btn {
  font: 700 1.05rem/1 var(--body); color: var(--rep-ink); background: var(--rep); border: 0;
  border-radius: 14px; padding: 16px 22px; cursor: pointer; white-space: nowrap;
}
a.btn { display: inline-block; text-decoration: none; }
.btn:hover { background: #ffd56e; color: var(--rep-ink); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; color: var(--mist); }
.consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--rep); flex: none; }
.msg { min-height: 1.6em; margin: 0; font-size: 0.98rem; }
.msg.err { color: var(--error); }
.msg.ok { color: var(--mint); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The rep counter scene */
.scene { position: relative; justify-self: center; width: min(100%, 420px); }
.scene svg { display: block; width: 100%; height: auto; }
.scene .caption { margin: 14px 0 0; text-align: center; font-size: 0.9rem; color: var(--mist); }
.bone { stroke: var(--sky); stroke-width: 9; stroke-linecap: round; }
.joint { fill: var(--paper); }
.joint.knee { fill: var(--rep); }
.count { font: 800 64px/1 var(--display); fill: var(--paper); }
.count-label { font: 600 17px/1 var(--body); fill: var(--mist); }
.flash { fill: none; stroke: var(--rep); stroke-width: 6; opacity: 0; }
.flash.on { animation: flash 520ms ease-out; }
@keyframes flash { 0% { opacity: 0.95; } 100% { opacity: 0; } }

/* Sections */
section { padding-block: 64px; border-top: 1px solid var(--line); }
h2 { font: 800 clamp(1.9rem, 3.6vw, 2.6rem)/1.05 var(--display); margin: 0 0 28px; text-wrap: balance; letter-spacing: -0.01em; }
h3 { font: 700 1.2rem/1.3 var(--body); margin: 0 0 6px; }
p { margin: 0; }
.muted { color: var(--mist); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(step); font: 800 2.4rem/1 var(--display); color: var(--rep); }
.steps .dist { color: var(--paper); font-weight: 600; }

.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.game { background: var(--panel); border-radius: 22px; padding: 26px; display: grid; gap: 8px; }
.game .tag { justify-self: start; font-size: 0.85rem; font-weight: 600; color: var(--deep); background: var(--mint); border-radius: 999px; padding: 3px 10px; }
.game.soon { background: transparent; border: 2px dashed var(--line); }
.game.soon .tag { background: var(--line); color: var(--paper); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.split p + p { margin-top: 14px; }

.again { text-align: left; }
.again p { margin-bottom: 22px; max-width: 34em; }

footer { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: 0.92rem; color: var(--mist);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Prose pages (privacy, thanks) */
.prose { max-width: 44rem; padding-block: 24px 64px; }
.prose h1 { font: 800 clamp(2.2rem, 5vw, 3.2rem)/1.02 var(--display); margin: 0 0 18px; letter-spacing: -0.02em; text-wrap: balance; }
.prose h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.prose p, .prose ul { margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose .signup { margin-top: 12px; }
.prose code { font-size: 0.95em; background: var(--deep); padding: 1px 6px; border-radius: 6px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-block: 8px 56px; }
  .scene { width: min(100%, 340px); }
  .steps, .games, .split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  section { padding-block: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .flash.on { animation: none; }
}
