/* Musculator landing page. Colours are the app's Nocturne tokens
   (src/styles/tokens.css) so the page and the app read as one product; the
   only addition is --hl, the app's own --color-good, used sparingly for
   emphasis. System fonts on purpose: the page loads nothing from a third
   party. Mobile first — every breakpoint below widens, none narrows. */

:root {
  --bg: #161826;
  --bg-2: #1c1e2c;
  --surface: #232532;
  --text: #e9e9ed;
  --muted: #b2b6ca;
  --accent: #9184d9;
  --accent-strong: #b5abfc;
  --accent-fill: #5d5294;
  --hl: #5fd08a;
  --divider: color-mix(in srgb, #e9e9ed 16%, transparent);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* Anchored sections must clear the sticky header. */
section[id] { scroll-margin-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--hl); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--hl); color: #0b1a10; padding: 10px 14px; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 12px;
  font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  border: 1px solid transparent; transition: background-color .15s, border-color .15s;
}
.btn-primary { background: var(--accent-fill); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #6b5fae; color: #fff; }
.btn-ghost { border-color: var(--divider); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 1.1rem; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--divider);
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { border-radius: 9px; }
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); border: 1px solid var(--divider); cursor: pointer;
}
.menu-btn[hidden] { display: none; }
.menu-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav { width: 100%; padding: 0 0 16px; }
.nav ul { list-style: none; margin: 0 0 12px; padding: 0; }
.nav li a { display: block; padding: 12px 4px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--divider); }
.nav li a:hover { color: var(--accent-strong); }
/* With JavaScript the mobile nav collapses behind the button; without it, it
   simply stays open, so the links are never unreachable. */
.js .nav[data-collapsed='true'] { display: none; }

@media (min-width: 860px) {
  .menu-btn { display: none !important; }
  .top-inner { flex-wrap: nowrap; }
  .nav, .js .nav[data-collapsed='true'] { display: flex; align-items: center; gap: 20px; width: auto; padding: 0; }
  .nav ul { display: flex; gap: 4px; margin: 0; }
  .nav li a { border: 0; padding: 8px 12px; border-radius: 8px; }
}

/* Hero */
.hero { padding: 40px 0 56px; background:
  radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
  var(--bg); overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.eyebrow { color: var(--hl); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.hl { color: var(--accent-strong); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; }
.cta-row .btn { flex: 1 1 220px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .95rem; }
.facts strong { color: var(--text); font-size: 1.15rem; }

.hero-visual { position: relative; display: flex; justify-content: center; min-height: 420px; }
.phone {
  margin: 0; width: min(56vw, 240px); border-radius: 28px; overflow: hidden;
  border: 6px solid #2c2e3c; background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.phone-front { position: relative; z-index: 2; transform: translateX(-18%); }
.phone-back { position: absolute; top: 34px; left: 50%; z-index: 1; opacity: .9; transform: translateX(-6%) rotate(4deg); }

@media (min-width: 860px) {
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .cta-row .btn { flex: 0 0 auto; }
  .phone { width: 250px; }
}

/* Sections */
.section { padding: 64px 0; }
.alt { background: var(--bg-2); border-block: 1px solid var(--divider); }
.section-lead { color: var(--muted); max-width: 46em; margin-bottom: 28px; }
.note { color: var(--muted); font-size: .95rem; margin-top: 24px; }

.two-col { display: grid; gap: 32px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.1fr .9fr; gap: 56px; } }
.pour-qui { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); padding: 24px; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 16px; height: 9px;
  border-left: 3px solid var(--hl); border-bottom: 3px solid var(--hl); transform: rotate(-45deg);
}

/* Feature cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--muted); margin-bottom: .6em; }
.card p:last-child { margin-bottom: 0; }
.card .ex { font-size: .9rem; color: var(--accent-strong); }
.ico {
  width: 44px; height: 44px; padding: 10px; margin-bottom: 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-strong);
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* Gallery: a horizontal strip on phones, a grid from tablets up. */
.gallery {
  list-style: none; margin: 0; padding: 0 0 8px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(70vw, 240px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.gallery li { scroll-snap-align: start; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 18px; border: 1px solid var(--divider); background: #000; }
.gallery figcaption { font-size: .92rem; color: var(--muted); margin-top: 10px; }
.gallery figcaption strong { color: var(--text); }
@media (min-width: 720px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; gap: 28px; }
}
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(3, minmax(0, 260px)); justify-content: space-between; } }

/* Benefits */
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.benefits li { border-left: 3px solid var(--hl); padding: 4px 0 4px 18px; }
.benefits p { color: var(--muted); margin: 0; }

/* Steps */
.steps { list-style: none; counter-reset: s; margin: 0 0 40px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); padding: 22px; }
.steps li::before {
  content: counter(s); display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 12px;
  border-radius: 50%; background: var(--accent-fill); color: #fff; font-weight: 800;
}
.steps p { color: var(--muted); margin: 0; }

.install, .offline { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); padding: 24px; margin-top: 16px; }
.install-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 16px; }
.install-grid ol { margin: 0; padding-left: 1.2em; color: var(--muted); }
.install-grid li { margin-bottom: 6px; }
.offline p { color: var(--muted); }
.offline p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-sm); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative;
  min-height: 48px; border-radius: var(--radius-sm);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--accent-strong); border-bottom: 2px solid var(--accent-strong); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

/* Final CTA */
.final { padding: 72px 0; text-align: center; background:
  radial-gradient(40rem 18rem at 50% 120%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%), var(--bg); }
.final p { color: var(--muted); max-width: 36em; margin: 0 auto 28px; }

/* Footer */
.foot { border-top: 1px solid var(--divider); padding: 36px 0 28px; background: var(--bg-2); font-size: .95rem; }
.foot-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: auto 1fr; align-items: center; } }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { border-radius: 50%; }
.foot-brand p { margin: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
@media (min-width: 720px) { .foot ul { justify-content: flex-end; } }
.foot ul a { display: inline-block; padding: 8px 0; color: var(--text); }
.foot-note { color: var(--muted); font-size: .85rem; margin-top: 20px; }

/* Legal pages */
.doc { padding: 40px 0 64px; }
.doc h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.doc h2 { font-size: 1.3rem; margin-top: 2em; }
.doc p, .doc dd { color: var(--muted); }
.doc .avert { border-left: 3px solid #f0a35e; padding-left: 16px; }
.doc dl { display: grid; gap: 2px 16px; margin: 0 0 1.5em; }
@media (min-width: 600px) { .doc dl { grid-template-columns: max-content 1fr; gap: 6px 16px; } }
.doc dt { font-weight: 700; }
.doc dd { margin: 0 0 8px; overflow-wrap: anywhere; }
@media (min-width: 600px) { .doc dd { margin: 0; } }
.back { display: inline-block; margin-bottom: 24px; }
