/* ==========================================================================
   MotionJoy landing page: site.css
   Layout and components. Tokens come from tokens.css; no raw values here.
   Mobile first: base rules are for phones, media queries add width.
   ========================================================================== */

/* ---- Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 760px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  padding: var(--space-3) var(--space-4); background: var(--ink-900); color: var(--white);
  border-radius: var(--radius-sm); font-weight: var(--fw-bold);
}
.skip-link:focus { top: var(--space-4); }

/* ---- Device-based visibility (set by download.js on <html data-device>) -- */
/* Without JavaScript nothing is hidden except the phone/other notices, so the
   default view is the Windows download view. */
html .only-phone, html .only-other { display: none; }
html[data-device="phone"] .only-phone,
html[data-device="other"] .only-other { display: block; }
html[data-device="phone"] .notice.only-phone,
html[data-device="other"] .notice.only-other { display: flex; }
html[data-device="phone"] .only-windows,
html[data-device="other"] .only-windows { display: none; }

/* ---- Icons --------------------------------------------------------------- */
.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--lg { width: 28px; height: 28px; }
.icon--xl { width: 36px; height: 36px; }

/* ---- Typography ---------------------------------------------------------- */
.display, .h2, .h3 { text-wrap: balance; }
.display { font-size: var(--text-display); font-weight: var(--fw-extrabold); line-height: var(--lh-tight); letter-spacing: -0.025em; }
.h2 { font-size: var(--text-h2); font-weight: var(--fw-extrabold); line-height: 1.15; letter-spacing: -0.02em; }
.h3 { font-size: var(--text-h3); font-weight: var(--fw-bold); line-height: var(--lh-snug); letter-spacing: -0.01em; }
.lead { font-size: var(--text-lead); font-weight: var(--fw-medium); color: var(--color-text-muted); line-height: 1.5; }
.eyebrow { font-size: var(--text-caption); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--blue-600); }
.section__lead { margin-top: var(--space-3); max-width: 38rem; color: var(--color-text-muted); }
.fine { margin-top: var(--space-6); font-size: var(--text-caption); color: var(--color-text-muted); }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.9em; padding: 0.05em 0.5em;
  font: var(--fw-bold) 0.85em/1.5 var(--font-sans);
  background: var(--white); color: var(--ink-900);
  border: var(--border-w-thin) solid var(--ink-900); border-bottom-width: 3px; border-radius: var(--radius-sm);
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--target-min); padding: 0 var(--space-6);
  font: var(--fw-bold) 1rem/1 var(--font-sans); text-decoration: none; white-space: nowrap;
  color: var(--ink-900); background: var(--white);
  border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop); cursor: pointer; user-select: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--ink-100); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-900); }
.btn--primary { color: var(--color-on-primary); background: var(--color-primary); }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--primary:active { background: var(--color-primary-press); }
.btn--accent { color: var(--ink-900); background: var(--lime-400); box-shadow: 0 3px 0 var(--blue-500); }
.btn--accent:hover { background: var(--lime-300); }
.btn--accent:active { box-shadow: 0 1px 0 var(--blue-500); }
.btn--lg { min-height: 60px; padding: 0 var(--space-8); font-size: 1.125rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 0 var(--space-4); font-size: var(--text-caption); }

.link-btn {
  padding: var(--space-2) 0; font: inherit; font-weight: var(--fw-bold); color: var(--color-link);
  background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { text-decoration-thickness: 2px; }

/* ---- Badge --------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; padding: 0.25em 0.8em;
  font: var(--fw-bold) var(--text-caption)/1.2 var(--font-sans);
  border-radius: var(--radius-pill); white-space: nowrap;
}
.badge--proto { color: var(--ink-900); background: var(--lime-400); border: var(--border-w-thin) solid var(--ink-900); }

/* ---- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white); border-bottom: var(--border-w) solid var(--ink-900);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink-900); text-decoration: none; }
.brand__name { font-size: var(--text-h3); font-weight: var(--fw-extrabold); letter-spacing: -0.02em; }
.site-nav { display: none; gap: var(--space-6); }
.site-nav a { font-weight: var(--fw-semibold); color: var(--ink-700); text-decoration: none; padding: var(--space-2) 0; }
.site-nav a:hover { color: var(--blue-600); text-decoration: underline; text-underline-offset: 6px; }
.header-dl { display: none; }

/* ---- Download block ------------------------------------------------------ */
.dl { margin-top: var(--space-8); max-width: 30rem; }
.dl__meta { margin-top: var(--space-3); font-size: var(--text-caption); font-weight: var(--fw-semibold); color: var(--color-text-muted); }
.dl__alt { margin-top: var(--space-1); font-size: var(--text-caption); color: var(--color-text-muted); }
.dl__warn {
  display: flex; gap: var(--space-2); align-items: flex-start; margin-top: var(--space-4);
  font-size: var(--text-caption); color: var(--warning-700);
}
.dl__warn .icon { margin-top: 0.1em; }
.dl__warn a { color: var(--warning-700); font-weight: var(--fw-bold); }
.dl--dark .dl__meta { color: var(--ink-300); }

/* ---- Notices ------------------------------------------------------------- */
.notice {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-4); border: var(--border-w) solid; border-radius: var(--radius-md);
  font-size: 1rem; line-height: 1.5;
}
.notice > .icon { margin-top: 0.15em; }
.notice--info { color: var(--blue-700); background: var(--blue-100); border-color: var(--blue-500); }
.notice--warn { color: var(--warning-700); background: var(--warning-50); border-color: var(--warning-500); margin-top: var(--space-8); }
.notice--dark { color: var(--white); background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); text-align: left; }
.notice--dark .link-btn { color: var(--lime-400); }
.notice__actions { margin-top: var(--space-1); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.copy-status { font-size: var(--text-caption); font-weight: var(--fw-semibold); }
.url { font-weight: var(--fw-extrabold); white-space: nowrap; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: var(--space-8) 0 var(--section-pad); }
.hero::before {
  content: ""; position: absolute; z-index: 0; width: 520px; height: 520px; border-radius: 50%;
  right: -160px; top: -120px; background: var(--blue-100);
}
.hero__grid { grid-template-columns: minmax(0, 1fr); position: relative; z-index: 1; display: grid; gap: var(--space-12); align-items: center; }
.hero__text { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-4); justify-items: start; }
.hero__text .lead { max-width: 34rem; }
.hero__text .dl { margin-top: var(--space-4); }
.hero__shot figcaption { margin-top: var(--space-4); text-align: center; font-size: var(--text-caption); color: var(--color-text-subtle); }

.window {
  overflow: hidden; background: var(--white);
  border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-pop-lg);
}
.window__bar { display: flex; gap: 6px; padding: 10px var(--space-4); background: var(--ink-100); border-bottom: var(--border-w) solid var(--ink-900); }
.window__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-300); }

/* ---- Sections ------------------------------------------------------------ */
.section { padding: var(--section-pad) 0; }
.section--white { background: var(--white); border-block: var(--border-w) solid var(--ink-900); }
.section .h2 { max-width: 28rem; }

/* How it works */
.steps { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-4); margin-top: var(--space-8); }
.step {
  padding: var(--space-6); background: var(--cream);
  border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-lg);
}
.step__num {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--space-4);
  font-weight: var(--fw-extrabold); color: var(--white); background: var(--blue-500); border-radius: 50%;
}
.step p { margin-top: var(--space-2); color: var(--color-text-muted); }

/* Feature cards */
.cards { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-4); margin-top: var(--space-8); }
.card {
  padding: var(--space-6); background: var(--white);
  border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-lg);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.card__icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: var(--space-4);
  color: var(--blue-700); background: var(--blue-100); border-radius: var(--radius-md);
}
.card p { margin-top: var(--space-2); color: var(--color-text-muted); }

/* Gesture cards */
.gestures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-8); }
.gesture {
  display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-6) var(--space-3);
  text-align: center; background: var(--cream);
  border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-lg);
}
.gesture__icon { display: grid; place-items: center; width: 64px; height: 64px; color: var(--white); background: var(--blue-500); border-radius: 50%; }
.gesture .h3 { font-size: 1.0625rem; }
.gesture__key { font-size: var(--text-caption); color: var(--color-text-muted); }
.gesture__key kbd { margin-top: var(--space-1); }

.games-more { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.games-more__item { padding: var(--space-6); background: var(--cream); border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-lg); }
.games-more__item p { margin-top: var(--space-2); color: var(--color-text-muted); }

/* Privacy */
.privacy { grid-template-columns: minmax(0, 1fr);
  display: grid; gap: var(--space-6); padding: var(--space-6);
  background: var(--white); border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-pop);
}
.privacy__icon {
  display: grid; place-items: center; width: 72px; height: 72px;
  color: var(--success-700); background: var(--success-50); border: var(--border-w) solid var(--success-500); border-radius: 50%;
}
.checks { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.checks li { display: flex; gap: var(--space-3); align-items: flex-start; }
.checks .icon { margin-top: 0.2em; color: var(--success-700); }

/* Install */
.install { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-8); margin-top: var(--space-8); }
.install .h3 { margin-bottom: var(--space-4); }
.install .checks { margin-top: 0; }
.numbered { grid-template-columns: minmax(0, 1fr); counter-reset: n; display: grid; gap: var(--space-4); }
.numbered li { position: relative; counter-increment: n; padding-left: calc(32px + var(--space-4)); min-height: 32px; }
.numbered li::before {
  content: counter(n); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px;
  font-size: var(--text-caption); font-weight: var(--fw-extrabold); color: var(--white); background: var(--blue-500); border-radius: 50%;
}

/* FAQ */
.faq { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-3); margin-top: var(--space-8); }
.faq details { background: var(--white); border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-md); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: 56px; padding: var(--space-3) var(--space-5);
  font-weight: var(--fw-bold); cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--blue-600); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 var(--space-5) var(--space-5); color: var(--color-text-muted); }

/* Status */
.status { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-8); }
.status__now { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-4); justify-items: start; align-content: start; }
.status__now p { color: var(--color-text-muted); max-width: 36rem; }
.status__next { padding: var(--space-6); background: var(--cream); border: var(--border-w) solid var(--ink-900); border-radius: var(--radius-lg); }
.roadmap { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.roadmap li { position: relative; padding-left: var(--space-6); color: var(--color-text-muted); }
.roadmap li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 10px; height: 10px; background: var(--blue-500); border-radius: 50%; }

/* Final call to action */
.cta { padding: var(--section-pad) 0; color: var(--color-on-dark); background: var(--color-dark); text-align: center; }
.cta__inner { grid-template-columns: minmax(0, 1fr); display: grid; justify-items: center; }
.cta .h2 { max-width: 30rem; }
.cta__lead { margin-top: var(--space-3); color: var(--color-on-dark-muted); }
.cta .dl { margin-top: var(--space-8); }

/* Footer */
.site-footer { padding: var(--space-12) 0; background: var(--white); border-top: var(--border-w) solid var(--ink-900); font-size: var(--text-caption); color: var(--color-text-muted); }
.site-footer__inner { grid-template-columns: minmax(0, 1fr); display: grid; gap: var(--space-6); }
.site-footer__brand { display: flex; gap: var(--space-4); align-items: flex-start; }
.site-footer__brand p + p { margin-top: var(--space-1); }
.site-footer__name { font-size: 1.125rem; font-weight: var(--fw-extrabold); color: var(--ink-900); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
.site-footer__links a { font-weight: var(--fw-semibold); }
.url--footer { color: var(--ink-900); }
.site-footer__fine { max-width: 44rem; color: var(--color-text-subtle); }

/* ==========================================================================
   Wider screens
   ========================================================================== */
@media (min-width: 600px) {
  .btn { font-size: 1.0625rem; }
  .btn--lg { font-size: 1.1875rem; }
  .header-dl { display: inline-flex; }
  html[data-device="phone"] .header-dl, html[data-device="other"] .header-dl { display: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .games-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .privacy { grid-template-columns: auto 1fr; padding: var(--space-8); gap: var(--space-8); align-items: center; }
  .hero { padding-top: var(--space-12); }
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-16); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gestures { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
  .install { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16); }
  .status { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-12); align-items: start; }
  .site-footer__inner { grid-template-columns: 1fr auto; align-items: start; }
  .site-footer__fine { grid-column: 1 / -1; }
  .section--white .h2, .section .h2 { max-width: 34rem; }
}

/* ---- Decoration (v2) ----------------------------------------------------- */
/* Dot grid and a lime accent in the hero */
.hero::after {
  content: ""; position: absolute; z-index: 0; left: -40px; bottom: -40px; width: 340px; height: 260px;
  background-image: radial-gradient(var(--ink-300) 1.5px, transparent 1.5px); background-size: 20px 20px;
  opacity: .55; pointer-events: none;
}
.hero__shot { position: relative; }
.hero__shot::before {
  content: ""; position: absolute; z-index: -1; width: 96px; height: 96px; border-radius: 50%;
  right: -18px; bottom: 36px; background: var(--lime-400); border: var(--border-w) solid var(--ink-900);
}
.hero__shot .window { max-width: 30rem; margin-inline: auto; }

/* Tinted sections with a soft dot pattern */
.section--tint { position: relative; background: var(--blue-50); border-block: var(--border-w) solid var(--ink-900); }
.section--tint::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--blue-200) 1.5px, transparent 1.5px); background-size: 24px 24px; opacity: .6;
}
.section--tint > .container { position: relative; }

/* Step cards with an icon */
.step__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.step__top .step__num { margin-bottom: 0; }
.step__icon { width: 36px; height: 36px; color: var(--blue-600); }

/* Setup screenshot under the steps */
.setup-shot { max-width: 40rem; margin: var(--space-12) auto 0; }
.setup-shot figcaption { margin-top: var(--space-4); text-align: center; font-size: var(--text-caption); color: var(--color-text-subtle); }

/* Bigger gesture icons with a pop shadow */
.gesture__icon { width: 76px; height: 76px; border: var(--border-w) solid var(--ink-900); box-shadow: var(--shadow-pop); }

/* Dark call-to-action with colored blobs */
.cta--deco { position: relative; overflow: hidden; }
.cta--deco::before, .cta--deco::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.cta--deco::before { width: 320px; height: 320px; left: -120px; bottom: -160px; background: var(--blue-500); opacity: .45; }
.cta--deco::after { width: 160px; height: 160px; right: -50px; top: -60px; background: var(--lime-400); opacity: .9; }
.cta--deco > .container { position: relative; z-index: 1; }
