/* FitNexusPRO landing page (/landing/). Standalone: no app CSS or JS.
   Tokens mirror ui/slate.css (Performance Slate), dark by default, light
   when localStorage.theme says so (pre-paint script in landing/index.html). */

:root {
  --bg: #0B0D10;
  --surface: #14171C;
  --surface-2: #1B1F26;
  --line: #262B33;
  --line-strong: #353C48;
  --text: #F2F4F7;
  --text-2: #A9B1BE;
  --text-3: #8A93A1;
  --accent: #FF8A3D;
  --accent-bg: rgba(255, 138, 61, .14);
  --on-accent: #1A0E05;
  --go: #3DDC97;
  --go-bg: rgba(61, 220, 151, .13);
  --caution: #F5A524;
  --info: #6CB6FF;
  --fuel: #FF8A3D;
  --health: #6CB6FF;
  --recovery: #3DDC97;
  --glow: rgba(255, 138, 61, .16);
  --shadow: 0 2px 4px rgba(0, 0, 0, .32), 0 24px 60px -20px rgba(0, 0, 0, .6);
  --font-ui: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --gutter: 16px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F2F3F5;
  --surface: #FFFFFF;
  --surface-2: #F4F5F7;
  --line: #E1E4E9;
  --line-strong: #CBD0D8;
  --text: #12151A;
  --text-2: #4A5261;
  --text-3: #646C79;
  --accent: #C9510C;
  --accent-bg: rgba(201, 81, 12, .10);
  --on-accent: #FFFFFF;
  --go: #12805A;
  --go-bg: rgba(18, 128, 90, .10);
  --caution: #A86500;
  --info: #1F6FC2;
  --fuel: #C9510C;
  --health: #1F6FC2;
  --recovery: #12805A;
  --glow: rgba(201, 81, 12, .10);
  --shadow: 0 1px 2px rgba(18, 21, 26, .06), 0 24px 50px -24px rgba(18, 21, 26, .22);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.lp-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

.lp-skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.lp-skip:focus { top: 12px; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.lp-nav {
  position: sticky; top: 0; z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.lp-nav.is-scrolled { border-bottom-color: var(--line); }
.lp-nav__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.lp-nav__end { display: flex; align-items: center; gap: 10px; }

.lp-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: .01em;
  text-decoration: none; min-height: 44px;
}
.lp-brand b { color: var(--accent); font-weight: 700; }
/* Same mark as favicon.svg and the login screen. */
.lp-brand__mark { width: 28px; height: 28px; }
.lp-brand__mark rect { fill: #000; }
.lp-brand__mark path { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="light"] .lp-brand__mark rect { fill: #FFF; stroke: var(--line); stroke-width: 2; }

.lp-langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lp-langs button {
  min-width: 36px; min-height: 36px; padding: 0 8px;
  background: none; border: 0; border-radius: 999px;
  color: var(--text-3); font: 600 13px/1 var(--font-ui); letter-spacing: .04em; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.lp-langs button:hover { color: var(--text); }
.lp-langs button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
@media (max-width: 340px) {
  .lp-brand span { display: none; }
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--on-accent);
  border: 1px solid var(--accent); border-radius: 12px;
  font: 600 16px/1 var(--font-ui); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--ease-out), filter .15s ease, background-color .15s ease;
}
.lp-btn:hover { filter: brightness(1.08); }
.lp-btn:active { transform: scale(.97); }
.lp-btn--small { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 10px; }
.lp-btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.lp-btn--ghost:hover { filter: none; background: var(--surface-2); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.lp-hero {
  position: relative;
  padding: 40px 0 64px;
  background:
    radial-gradient(60% 50% at 85% 20%, var(--glow), transparent 70%),
    radial-gradient(40% 40% at 0% 100%, color-mix(in srgb, var(--recovery) 9%, transparent), transparent 70%);
}
.lp-hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .lp-hero { padding: 72px 0 96px; }
  .lp-hero__grid { grid-template-columns: 1.15fr .85fr; gap: 64px; }
}
.lp-hero__title {
  margin: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(44px, 11vw, 84px); line-height: .98; letter-spacing: -.005em;
  text-transform: uppercase;
}
.lp-hero__title span { display: block; }
.lp-accent { color: var(--accent); }
.lp-lede { margin: 22px 0 0; max-width: 34em; color: var(--text-2); font-size: clamp(17px, 2.2vw, 19px); }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 420px) { .lp-cta .lp-btn { flex: 1 1 100%; } }

.lp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.lp-pills a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-2); font-weight: 500; font-size: 15px; text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.lp-pills a:hover { color: var(--text); border-color: var(--line-strong); }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; }
.lp-dot--fuel { background: var(--fuel); }
.lp-dot--health { background: var(--health); }
.lp-dot--recovery { background: var(--recovery); }

/* Illustrative phone-sized Today card */
.lp-device { margin: 0; justify-self: center; width: min(100%, 360px); }
.lp-screen {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  padding: 22px; box-shadow: var(--shadow);
}
.lp-screen__head { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.lp-chip {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2);
  font: 600 12px/1 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
.lp-chip--go { background: var(--go-bg); color: var(--go); }
.lp-ring { position: relative; width: 168px; height: 168px; margin: 18px auto 6px; }
.lp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.lp-ring circle { fill: none; stroke-width: 10; }
.lp-ring__track { stroke: var(--surface-2); }
.lp-ring__bar {
  stroke: var(--recovery); stroke-linecap: round;
  stroke-dasharray: var(--v) 100; stroke-dashoffset: 0;
  animation: lp-ring 1.2s var(--ease-out) .2s both;
}
@keyframes lp-ring { from { stroke-dasharray: 0 100; } }
.lp-ring__val { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.lp-ring__val b { font-family: var(--font-display); font-weight: 700; font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.lp-ring__val small { color: var(--text-3); font-size: 13px; font-weight: 500; }
.lp-screen__note { margin: 6px 0 18px; color: var(--text-2); font-size: 15px; text-align: center; }
.lp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lp-tile { background: var(--surface-2); border-radius: 14px; padding: 12px 10px; min-width: 0; }
.lp-tile small { display: block; color: var(--text-3); font-size: 12px; font-weight: 500; }
.lp-tile b { display: block; margin: 2px 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.lp-tile em { font-style: normal; color: var(--text-3); font-size: 12px; font-family: var(--font-ui); font-weight: 500; }
.lp-sample { margin-top: 10px; text-align: center; color: var(--text-3); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.lp-meter { display: block; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; }
.lp-meter i {
  display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c);
  transform-origin: left; animation: lp-grow 1s var(--ease-out) .3s both;
}
@keyframes lp-grow { from { transform: scaleX(0); } }

/* ── Sections ────────────────────────────────────────────────────────── */
.lp-section { padding: 64px 0 8px; }
.lp-h2 {
  margin: 0; max-width: 18em;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(32px, 6vw, 52px); line-height: 1.02;
}
.lp-sub { margin: 16px 0 0; max-width: 36em; color: var(--text-2); font-size: 18px; }

.lp-pillar { padding: 56px 0; }
.lp-pillar + .lp-pillar { border-top: 1px solid var(--line); }
.lp-pillar__grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .lp-pillar { padding: 88px 0; }
  .lp-pillar__grid { grid-template-columns: 1fr 1fr; gap: 72px; }
  .lp-pillar__grid--flip .lp-pillar__copy { order: 2; }
}
.lp-pillar--fuel { --c-pillar: var(--fuel); }
.lp-pillar--health { --c-pillar: var(--health); }
.lp-pillar--recovery { --c-pillar: var(--recovery); }

.lp-tag {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  color: var(--c-pillar); font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
}
.lp-tag svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lp-h3 {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4.6vw, 40px); line-height: 1.05;
}
.lp-list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.lp-list li { position: relative; padding-left: 28px; color: var(--text-2); font-size: 17px; }
.lp-list li::before {
  content: ''; position: absolute; left: 2px; top: .5em;
  width: 12px; height: 7px; border-left: 2px solid var(--c-pillar); border-bottom: 2px solid var(--c-pillar);
  transform: rotate(-45deg);
}

.lp-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 20px; box-shadow: var(--shadow);
}
.lp-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; color: var(--text-2); font-weight: 500; }
.lp-card__head b { color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 26px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp-card__foot { margin: 16px 0 0; color: var(--text-2); font-size: 15px; }
.lp-macro, .lp-src { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; }
.lp-src { grid-template-columns: 74px 1fr 32px 72px; }
.lp-macro + .lp-macro, .lp-src + .lp-src { border-top: 1px solid var(--line); }
.lp-macro > span:first-child, .lp-src > span:first-child { color: var(--text-2); font-size: 15px; }
.lp-macro em, .lp-src em { font-style: normal; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lp-src .lp-chip { justify-self: end; }
.lp-water { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 15px; }
.lp-drops { display: flex; gap: 6px; }
.lp-drops i { width: 14px; height: 18px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: color-mix(in srgb, var(--info) 18%, transparent); }
.lp-drops i.on { background: var(--info); }

.lp-spark { width: 100%; height: 120px; overflow: visible; }
.lp-spark__band { fill: color-mix(in srgb, var(--health) 12%, transparent); }
.lp-spark__line {
  fill: none; stroke: var(--health); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.lp-spark__dot { fill: var(--health); stroke: var(--surface); stroke-width: 3; }
.lp-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--text-3); font-size: 13px; }
.lp-legend > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.lp-legend__band { width: 16px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--health) 22%, transparent); }

/* ── Fit / trust ─────────────────────────────────────────────────────── */
.lp-section--fit { padding: 40px 0 24px; border-top: 1px solid var(--line); }
.lp-fit { display: grid; gap: 28px; }
@media (min-width: 768px) { .lp-fit { grid-template-columns: repeat(3, 1fr); gap: 36px; } }
.lp-fit h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.1; }
.lp-fit p { margin: 0; color: var(--text-2); }

/* ── Final CTA ───────────────────────────────────────────────────────── */
.lp-final { padding: 48px 0 72px; }
.lp-final__box {
  text-align: center; padding-top: 48px; padding-bottom: 48px;
  background:
    radial-gradient(70% 90% at 50% 0%, var(--glow), transparent 70%),
    var(--surface);
  border: 1px solid var(--line); border-radius: 24px;
  max-width: calc(1120px - 2 * var(--gutter));
  width: calc(100% - 2 * var(--gutter));
}
.lp-final .lp-h2 { margin: 0 auto; }
.lp-final .lp-sub { margin: 14px auto 26px; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.lp-foot { border-top: 1px solid var(--line); padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--text-3); font-size: 14px; }
.lp-foot__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.lp-foot__links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.lp-foot__links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.lp-foot__links a:hover { color: var(--text); text-decoration: underline; }
.lp-foot__note { flex-basis: 100%; margin: 0; }

/* ── Scroll reveal (landing.js adds .is-in) ──────────────────────────── */
.js .lp-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .lp-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .lp-reveal { opacity: 1; transform: none; transition: none; }
  .lp-ring__bar, .lp-meter i { animation: none; }
  .lp-btn { transition: none; }
}
