/* ============================================================================
   XDV — X-Ray Data Visualisation · Showcase site
   Design system + components. Dark-first, light-theme aware.
   Brand accent: #6C63FF (matches gym_app/lib/theme.dart).
   ========================================================================== */

/* ---------- Fonts (self-hosted, privacy-friendly) ------------------------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

/* ---------- Design tokens -------------------------------------------------- */
:root {
  /* brand */
  --brand: #6c63ff;
  --brand-2: #8b84ff;
  --brand-3: #a99fff;
  --brand-ink: #cfcaff;
  --brand-glow: rgba(108, 99, 255, 0.55);

  /* data / semantic (mirrors the app's chart + readiness colours) */
  --cyan: #33d1c1;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #60a5fa;
  --amber: #f59e0b;

  /* surfaces (dark) */
  --bg: #08080d;
  --bg-2: #0c0c13;
  --surface: #13131c;
  --surface-2: #191925;
  --surface-3: #21212f;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);

  /* text */
  --text: #edecf5;
  --text-2: #b0afc4;
  --text-3: #7b7a92;

  /* app canvas (used inside device mockups so they read as the real app) */
  --app-bg: #121212;
  --app-surface: #1e1e1e;
  --app-surface-2: #262631;
  --app-border: rgba(255, 255, 255, 0.09);
  --app-text: #ececf0;
  --app-text-2: #a2a2b2;

  /* type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* geometry */
  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --maxw: 1180px;
  --gutter: clamp(18px, 5vw, 40px);

  /* shadow */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 30px 80px -30px var(--brand-glow);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f6fb;
  --bg-2: #eeeef6;
  --surface: #ffffff;
  --surface-2: #f4f3fb;
  --surface-3: #ecebf6;
  --border: rgba(20, 18, 45, 0.10);
  --border-2: rgba(20, 18, 45, 0.16);
  --text: #16151f;
  --text-2: #514f66;
  --text-3: #8b8aa0;
  --shadow-2: 0 20px 44px -22px rgba(40, 35, 90, 0.35);
  --shadow-glow: 0 30px 80px -34px rgba(108, 99, 255, 0.4);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}

::selection { background: var(--brand); color: #fff; }

/* ---------- Layout helpers ------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(64px, 10vw, 132px); position: relative; scroll-margin-top: 84px; }
.hero { scroll-margin-top: 0; }
.section--tight { padding-block: clamp(48px, 7vw, 84px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-3);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand));
}

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
.section-title {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  margin-top: 16px;
  letter-spacing: -0.03em;
}
.section-sub {
  margin-top: 18px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  color: var(--text-2);
  max-width: 62ch;
}
.section-head.center .section-sub { margin-inline: auto; }

.text-grad {
  background: linear-gradient(100deg, var(--brand-3) 0%, var(--brand) 45%, var(--cyan) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary {
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -12px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

.btn--ghost {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text);
  border-color: var(--border-2);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: color-mix(in srgb, var(--text) 12%, transparent); transform: translateY(-2px); }

.btn--sm { padding: 10px 18px; font-size: 0.88rem; }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ---------- Nav ----------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border: 1px solid var(--border-2);
}
.brand__mark img { width: 26px; height: 26px; }
.brand__name { font-size: 1.06rem; letter-spacing: 0.02em; }
.brand__name b { color: var(--text); }
.brand__tag { font-size: 0.7rem; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase; margin-left: 2px; }

.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s, background 0.18s;
}
.nav__links a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.nav__actions { display: flex; align-items: center; gap: 10px; margin-left: 6px; }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text-2);
  display: grid; place-items: center;
  transition: color 0.2s, transform 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--text); transform: rotate(-18deg); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

.nav__burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text);
}
.nav__burger span { display: block; width: 18px; height: 2px; background: currentColor; margin: 3px auto; border-radius: 2px; transition: 0.25s; }

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 68px 0 auto 0;
  z-index: 99;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 14px var(--gutter) 24px;
  display: none;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-12px);
  opacity: 0;
  transition: 0.25s ease;
}
.mobile-menu.open { display: flex; transform: none; opacity: 1; }
.mobile-menu a { padding: 13px 8px; border-radius: 10px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--border); }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .btn { margin-top: 12px; }

/* ---------- Background decor ---------------------------------------------- */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.aurora::before {
  width: 620px; height: 620px;
  top: -220px; left: -120px;
  background: radial-gradient(circle, var(--brand) 0%, transparent 68%);
}
.aurora::after {
  width: 520px; height: 520px;
  top: -80px; right: -160px;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 66%);
  opacity: 0.28;
}
.grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.5;
}

/* ---------- Hero ---------------------------------------------------------- */
.hero { position: relative; padding-top: 128px; padding-bottom: clamp(60px, 8vw, 110px); overflow: hidden; }
.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  font-size: 0.82rem; color: var(--text-2);
  margin-bottom: 24px;
}
.hero__badge b { color: var(--text); font-weight: 600; }
.hero__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 25%, transparent); }
.hero__pill { padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand-ink); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.04em; }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  letter-spacing: -0.035em;
}
.hero__sub {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--text-2);
  max-width: 40ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__trust {
  display: flex; flex-wrap: wrap; gap: 18px 26px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.hero__trust .ti { display: inline-flex; align-items: center; gap: 9px; font-size: 0.9rem; color: var(--text-2); }
.hero__trust .ti svg { width: 18px; height: 18px; color: var(--brand-3); flex: none; }

.hero__visual { position: relative; z-index: 2; display: grid; place-items: center; }

/* ---------- Marquee / integration strip ----------------------------------- */
.integrations { border-block: 1px solid var(--border); background: var(--bg-2); }
.integrations__inner { display: flex; align-items: center; gap: clamp(20px, 4vw, 46px); flex-wrap: wrap; justify-content: center; padding-block: 30px; }
.integrations__label { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.integrations__logos { display: flex; align-items: center; gap: clamp(18px, 3.4vw, 40px); flex-wrap: wrap; justify-content: center; }
.ilogo { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2); font-weight: 600; font-family: var(--font-display); letter-spacing: -0.01em; font-size: 0.98rem; opacity: 0.86; transition: opacity 0.2s, color 0.2s; }
.ilogo:hover { opacity: 1; color: var(--text); }
.ilogo svg { width: 22px; height: 22px; color: var(--brand-3); }

/* ---------- Pillars ------------------------------------------------------- */
.pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pillar {
  padding: 22px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.pillar:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: var(--shadow-2); }
.pillar__ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-3);
  border: 1px solid var(--border-2);
}
.pillar__ico svg { width: 23px; height: 23px; }
.pillar h3 { font-size: 1.06rem; margin-bottom: 7px; }
.pillar p { font-size: 0.9rem; color: var(--text-2); margin: 0; }

/* ---------- Interactive showcase (tabs) ----------------------------------- */
.showcase { position: relative; }
.showcase__tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  width: fit-content;
  margin: 0 auto clamp(34px, 4vw, 52px);
  box-shadow: var(--shadow-1);
}
.showcase__tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px;
  background: transparent; border: none; color: var(--text-2);
  font-weight: 600; font-size: 0.94rem;
  transition: color 0.2s, background 0.2s;
}
.showcase__tab svg { width: 18px; height: 18px; }
.showcase__tab:hover { color: var(--text); }
.showcase__tab.active { color: #fff; background: linear-gradient(180deg, var(--brand-2), var(--brand)); box-shadow: 0 8px 22px -10px var(--brand-glow); }

.showcase__panel {
  display: none;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(28px, 5vw, 66px);
  align-items: center;
}
.showcase__panel.active { display: grid; animation: fade-up 0.5s ease both; }
.showcase__copy .eyebrow { margin-bottom: 14px; }
.showcase__copy h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.showcase__copy > p { color: var(--text-2); margin-top: 14px; font-size: 1.05rem; }
.feat-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.feat-list li { display: flex; gap: 13px; align-items: flex-start; }
.feat-list .fi {
  flex: none; width: 26px; height: 26px; border-radius: 8px; margin-top: 1px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--brand-3);
}
.feat-list .fi svg { width: 15px; height: 15px; }
.feat-list b { color: var(--text); font-weight: 600; }
.feat-list span { color: var(--text-2); }

/* ---------- Feature deep-dive rows ---------------------------------------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
}
.feature-row + .feature-row { margin-top: clamp(70px, 9vw, 130px); }
.feature-row.reverse .feature-row__media { order: -1; }
.feature-row__copy .eyebrow { margin-bottom: 16px; }
.feature-row__copy h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.feature-row__copy > p { margin-top: 16px; color: var(--text-2); font-size: 1.08rem; }
.mini-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; margin-top: 28px; }
.mini-feat { }
.mini-feat h4 { font-family: var(--font-body); font-weight: 600; font-size: 0.98rem; display: flex; align-items: center; gap: 8px; }
.mini-feat h4 svg { width: 17px; height: 17px; color: var(--brand-3); flex: none; }
.mini-feat p { margin: 6px 0 0 25px; font-size: 0.9rem; color: var(--text-2); }

/* ---------- Cards / chips generic ----------------------------------------- */
.tagchips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.tagchip {
  font-size: 0.82rem; font-weight: 500;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--border-2);
  background: color-mix(in srgb, var(--text) 4%, transparent);
  color: var(--text-2);
}
.tagchip svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; color: var(--brand-3); }

/* ============================================================================
   DEVICE MOCKUPS  (the "screenshots" — faithful HTML/CSS recreations)
   ========================================================================== */
.device-stage { position: relative; display: grid; place-items: center; width: 100%; }

/* phone frame */
.phone {
  position: relative;
  width: min(310px, 82vw);
  border-radius: 42px;
  padding: 11px;
  background: linear-gradient(160deg, #2a2a34, #121218);
  box-shadow: var(--shadow-glow), 0 40px 80px -40px rgba(0,0,0,0.9), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.phone::before {
  content: "";
  position: absolute; top: 15px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 26px; border-radius: 999px;
  background: #000; z-index: 5;
}
.phone__screen {
  border-radius: 32px;
  overflow: hidden;
  background: var(--app-bg);
  aspect-ratio: 9 / 19.2;
  position: relative;
  color: var(--app-text);
  font-size: 12px;
  display: flex; flex-direction: column;
}

/* browser frame */
.browser {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-2);
  background: var(--app-bg);
  box-shadow: var(--shadow-glow), 0 40px 80px -44px rgba(0,0,0,0.85);
  color: var(--app-text);
}
.browser__bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; background: #1a1a22; border-bottom: 1px solid var(--app-border); }
.browser__dots { display: flex; gap: 6px; }
.browser__dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a46; display: block; }
.browser__dots i:nth-child(1) { background: #ff5f57; }
.browser__dots i:nth-child(2) { background: #febc2e; }
.browser__dots i:nth-child(3) { background: #28c840; }
.browser__url { flex: 1; margin-left: 8px; height: 26px; border-radius: 8px; background: #0f0f16; border: 1px solid var(--app-border); display: flex; align-items: center; padding: 0 12px; font-size: 11px; color: var(--app-text-2); gap: 7px; }
.browser__url svg { width: 12px; height: 12px; color: var(--good); }
.browser__body { padding: 16px; }

/* app chrome inside mockups */
.appbar { display: flex; align-items: center; gap: 8px; padding: 30px 14px 10px; background: color-mix(in srgb, var(--brand) 12%, var(--app-bg)); border-bottom: 1px solid var(--app-border); }
.browser .appbar { padding-top: 12px; }
.appbar__logo { width: 20px; height: 20px; border-radius: 6px; background: color-mix(in srgb, var(--brand) 22%, transparent); display: grid; place-items: center; }
.appbar__logo img { width: 15px; height: 15px; }
.appbar__title { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; }
.appbar__spacer { flex: 1; }
.appbar__ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: var(--app-text-2); background: color-mix(in srgb, #fff 5%, transparent); }
.appbar__ico svg { width: 14px; height: 14px; }

.app-scroll { flex: 1; overflow: hidden; padding: 12px; display: flex; flex-direction: column; gap: 11px; }
.app-scroll::-webkit-scrollbar { display: none; }

.mcard { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 14px; padding: 12px; }
.mcard__h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mcard__t { font-weight: 600; font-size: 12px; }
.mcard__a { font-size: 10px; color: var(--brand-3); font-weight: 600; }
.muted { color: var(--app-text-2); }

/* bottom nav in phone */
.mbottomnav { display: flex; padding: 8px 6px 12px; background: color-mix(in srgb,#fff 3%, var(--app-bg)); border-top: 1px solid var(--app-border); justify-content: space-around; }
.mbottomnav .bn { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 8.5px; color: var(--app-text-2); flex: 1; }
.mbottomnav .bn svg { width: 17px; height: 17px; }
.mbottomnav .bn.active { color: var(--brand-3); }

/* stat chips grid (health snapshot) */
.chipgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.statchip { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 12px; padding: 9px 10px; }
.statchip .sc-l { font-size: 9px; color: var(--app-text-2); display: flex; align-items: center; gap: 5px; }
.statchip .sc-l svg { width: 11px; height: 11px; }
.statchip .sc-v { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-top: 3px; }
.statchip .sc-v small { font-size: 9px; color: var(--app-text-2); font-family: var(--font-body); font-weight: 400; }
.statchip .sc-u { font-size: 8.5px; }

/* macro donut ring built with conic-gradient */
.donut { position: relative; width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--brand) 0 62%, var(--app-surface-2) 0 100%); }
.donut::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--app-surface); }
.donut__c { position: relative; z-index: 1; text-align: center; }
.donut__c b { font-family: var(--font-display); font-size: 21px; font-weight: 600; display: block; line-height: 1; }
.donut__c span { font-size: 8.5px; color: var(--app-text-2); }

/* macro bars */
.mbar { margin-top: 7px; }
.mbar__l { display: flex; justify-content: space-between; font-size: 9.5px; margin-bottom: 4px; }
.mbar__l b { font-weight: 600; }
.mbar__track { height: 6px; border-radius: 999px; background: var(--app-surface-2); overflow: hidden; }
.mbar__fill { height: 100%; border-radius: 999px; transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.donut { transition: background 0.4s ease; }

/* set-log rows (workout) */
.exhead { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.exhead .ex-rail { width: 4px; height: 30px; border-radius: 3px; background: var(--brand); }
.exhead b { font-size: 12.5px; font-weight: 600; }
.exhead .ex-sub { font-size: 9px; color: var(--app-text-2); }
.setrow { display: grid; grid-template-columns: 22px 1fr 1fr 26px; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--app-border); font-size: 11px; }
.setrow .sn { width: 20px; height: 20px; border-radius: 6px; background: var(--app-surface-2); display: grid; place-items: center; font-size: 9.5px; font-weight: 600; }
.setrow .sn.warm { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.setrow .val { background: var(--app-surface-2); border-radius: 7px; padding: 5px 8px; text-align: center; font-weight: 600; }
.setrow .val small { color: var(--app-text-2); font-weight: 400; font-size: 8.5px; }
.setrow .chk { width: 21px; height: 21px; border-radius: 6px; display: grid; place-items: center; }
.setrow .chk.done { background: var(--good); color: #05130c; }
.setrow .chk.todo { border: 1.5px solid var(--app-border); }
.setrow .chk svg { width: 13px; height: 13px; }
.pr-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 8.5px; font-weight: 700; color: var(--warn); }

.resttimer { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 9px 11px; border-radius: 11px; background: color-mix(in srgb, var(--brand) 15%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.resttimer .rt-ring { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--brand); border-right-color: transparent; }
.resttimer b { font-family: var(--font-display); font-size: 15px; }
.resttimer .rt-x { margin-left: auto; font-size: 10px; color: var(--app-text-2); }

.plate-pills { display: flex; gap: 5px; margin-top: 9px; flex-wrap: wrap; }
.plate { font-size: 9px; font-weight: 700; padding: 4px 8px; border-radius: 6px; color: #08080d; }

/* tier selector (interactive) */
.tierbar { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 2px; }
.tierbtn {
  flex: 1 1 auto; min-width: 54px;
  padding: 8px 6px; border-radius: 10px;
  border: 1px solid var(--app-border); background: var(--app-surface-2);
  color: var(--app-text-2); font-size: 9.5px; font-weight: 600; text-align: center;
  transition: 0.2s;
}
.tierbtn small { display: block; font-size: 8px; font-weight: 500; opacity: 0.8; }
.tierbtn.active { background: color-mix(in srgb, var(--brand) 24%, transparent); color: #fff; border-color: color-mix(in srgb, var(--brand) 45%, transparent); }

/* Fueling target card = an always-dark "app preview", like the device frames,
   so it reads consistently in both site themes. */
.app-preview { background: var(--app-surface); color: var(--app-text); border-color: var(--app-border); }
.app-preview .mcard__t { color: var(--app-text); }

/* The fueling tier selector is a site control, so it follows the site theme. */
#tierSelect .tierbtn { cursor: pointer; }
:root[data-theme="light"] #tierSelect .tierbtn { background: color-mix(in srgb, var(--text) 5%, transparent); border-color: var(--border-2); color: var(--text-2); }
:root[data-theme="light"] #tierSelect .tierbtn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* calendar strip */
.calstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calstrip .cd { aspect-ratio: 1; border-radius: 8px; background: var(--app-surface-2); display: grid; place-items: center; font-size: 9px; position: relative; color: var(--app-text-2); }
.calstrip .cd .dots { position: absolute; bottom: 4px; display: flex; gap: 2px; }
.calstrip .cd .dots i { width: 3.5px; height: 3.5px; border-radius: 50%; display: block; }
.calstrip .cd.today { outline: 1.5px solid var(--brand); color: var(--app-text); }
.calstrip .cd.ring { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 60%, transparent); }

/* report narrative */
.ai-narr { background: color-mix(in srgb, var(--brand) 8%, var(--app-surface)); border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent); border-radius: 12px; padding: 12px; position: relative; }
.ai-narr__tag { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-3); margin-bottom: 8px; }
.ai-narr__tag svg { width: 13px; height: 13px; }
.ai-narr p { font-size: 11px; line-height: 1.55; margin: 0 0 8px; color: var(--app-text); }
.ai-narr p:last-child { margin-bottom: 0; }
.ai-narr .hl { color: var(--brand-3); font-weight: 600; }
.skeleton-line { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--app-surface-2), color-mix(in srgb,#fff 8%, var(--app-surface-2)), var(--app-surface-2)); background-size: 200% 100%; }

/* report tiles */
.rtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rtile { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 11px; padding: 10px; }
.rtile .rt-t { font-size: 9px; color: var(--app-text-2); }
.rtile .rt-v { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-top: 2px; }
.rtile .rt-d { font-size: 8.5px; margin-top: 1px; }

/* map heat */
.mapwrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--app-border); background: #0d1117; }
.map-layers { position: absolute; top: 10px; right: 10px; background: color-mix(in srgb,#0d1117 82%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--app-border); border-radius: 9px; padding: 8px 9px; font-size: 9px; display: grid; gap: 6px; }
.map-layers .ml { display: flex; align-items: center; gap: 6px; color: var(--app-text-2); }
.map-layers .ml i { width: 9px; height: 9px; border-radius: 3px; display: block; }

/* floating chips around device */
.float-chip {
  position: absolute; z-index: 6;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-2);
  font-size: 0.82rem; color: var(--text);
}
.float-chip .fc-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.float-chip b { font-family: var(--font-display); font-size: 1.02rem; display: block; line-height: 1.1; }
.float-chip small { color: var(--text-2); font-size: 0.72rem; }
.float-chip svg { width: 16px; height: 16px; }

/* ---------- Why / differentiators ----------------------------------------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.why-card {
  padding: 26px 22px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  position: relative;
}
.why-card__n { font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; color: var(--brand-3); letter-spacing: 0.1em; }
.why-card h3 { font-size: 1.16rem; margin: 14px 0 9px; }
.why-card p { font-size: 0.92rem; color: var(--text-2); margin: 0; }
.why-card__ico { position: absolute; top: 22px; right: 22px; color: color-mix(in srgb, var(--brand) 55%, transparent); }
.why-card__ico svg { width: 22px; height: 22px; }

/* comparison table */
.compare { margin-top: clamp(40px, 6vw, 70px); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.compare__scroll { overflow-x: auto; }
.compare table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.compare thead th { font-family: var(--font-display); font-size: 0.86rem; letter-spacing: 0.02em; color: var(--text-2); background: var(--bg-2); font-weight: 600; }
.compare thead th.xdv { color: var(--brand-3); }
.compare tbody tr:last-child td { border-bottom: none; }
.compare td:first-child { color: var(--text-2); font-weight: 500; }
.compare td.xdv { color: var(--text); font-weight: 600; }
.compare td.xdv .yes { color: var(--good); }
.compare td.other { color: var(--text-3); }
.compare .col-xdv { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.compare svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }

/* ---------- Trust / security ---------------------------------------------- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trust-card { padding: 24px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); }
.trust-card__ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-3); margin-bottom: 15px; border: 1px solid var(--border-2); }
.trust-card__ico svg { width: 21px; height: 21px; }
.trust-card h3 { font-size: 1.06rem; margin-bottom: 8px; }
.trust-card p { font-size: 0.9rem; color: var(--text-2); margin: 0; }

/* ---------- Metrics band -------------------------------------------------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.metric b { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.03em; display: block; }
.metric span { color: var(--text-2); font-size: 0.92rem; }

/* ---------- CTA / early access -------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-2);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--brand) 24%, transparent), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, color-mix(in srgb, var(--cyan) 16%, transparent), transparent 55%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
  padding: clamp(38px, 6vw, 72px);
  text-align: center;
}
.cta h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.cta p { color: var(--text-2); max-width: 52ch; margin: 18px auto 0; font-size: 1.06rem; }
.access-form { display: flex; gap: 10px; max-width: 460px; margin: 32px auto 0; flex-wrap: wrap; }
.access-form input {
  flex: 1 1 220px;
  padding: 15px 18px; border-radius: 999px;
  border: 1px solid var(--border-2);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  color: var(--text); font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.access-form input::placeholder { color: var(--text-3); }
.access-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 24%, transparent); }
.access-note { margin-top: 16px; font-size: 0.84rem; color: var(--text-3); display: inline-flex; align-items: center; gap: 7px; }
.access-note svg { width: 15px; height: 15px; }
.form-msg { margin-top: 18px; font-size: 0.95rem; min-height: 1.2em; }
.form-msg.ok { color: var(--good); }
.form-msg.err { color: var(--bad); }
.access-form.done input, .access-form.done button { opacity: 0.5; pointer-events: none; }

/* ---------- Footer -------------------------------------------------------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-block: 54px 34px; }
.footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__brand { max-width: 320px; }
.footer__brand p { color: var(--text-2); font-size: 0.9rem; margin: 14px 0 0; }
.footer__cols { display: flex; gap: clamp(30px, 6vw, 72px); flex-wrap: wrap; }
.footer__col h4 { font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 14px; }
.footer__col a { display: block; color: var(--text-2); font-size: 0.92rem; padding: 5px 0; transition: color 0.18s; }
.footer__col a:hover { color: var(--text); }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 0.84rem; }
.footer__built { display: inline-flex; align-items: center; gap: 8px; }
.footer__built svg { width: 15px; height: 15px; color: var(--brand-3); }

/* ---------- Reveal animations ---------------------------------------------
   Hidden state is opt-in via html.anim, which JS only adds when scroll
   animation can actually run. If JS fails or IO is unavailable, content
   stays fully visible (graceful degradation). */
.reveal { transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.anim .reveal { opacity: 0; transform: translateY(26px); }
html.anim .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-line { animation: shimmer 1.6s linear infinite; }
.resttimer .rt-ring { animation: spin 1.4s linear infinite; }
.float-chip.f1 { animation: float-y 6s ease-in-out infinite; }
.float-chip.f2 { animation: float-y 7s ease-in-out infinite 0.6s; }

/* hero pulse line draw */
.pulse-path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 3s ease forwards 0.3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 1080px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__actions .btn { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { margin-top: 20px; }
  .showcase__panel.active { grid-template-columns: 1fr; }
  .showcase__copy { order: 2; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-row__media { order: 0; }
  .feature-row__media { order: -1; }
  .trust-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .mini-feats { grid-template-columns: 1fr; }
  .footer__top { flex-direction: column; }
  .showcase__tabs { width: 100%; overflow-x: auto; justify-content: flex-start; flex-wrap: nowrap; border-radius: 16px; }
  .float-chip { display: none; }
}
@media (max-width: 460px) {
  .pillars { grid-template-columns: 1fr; }
}
