/* =============================================================================
   PEAKFY — LIGHT-MODE LANDING (v2, 2026)
   Design system: brand-guide v1.4 (Off-White + Indigo), Space Grotesk + Inter.
   Benchmark = restortrain.com (structure / motion only). All copy original.
   -----------------------------------------------------------------------------
   Table of contents
     1.  Fonts
     2.  Tokens (:root)
     3.  Reset + base
     4.  Typography helpers (eyebrow, display, lead)
     5.  Layout (container, section, grid)
     6.  Buttons + store badges
     7.  Header + nav + language switcher
     8.  Hero
     9.  Floating cards / chat bubbles
     10. Feature rows (alternating phone)
     11. Moat / See-it-think
     12. Stat + readiness + workout visuals
     13. Integrations
     14. Comparison table
     15. Why / trust
     16. FAQ accordion
     17. CTA card
     18. Footer
     19. Motion (reveal / float / parallax) + reduced-motion
     20. Responsive
   ========================================================================== */

/* 1. FONTS ------------------------------------------------------------------ */
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700; /* variable — full range for heavier landing headlines */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900; /* variable */
  font-style: normal;
  font-display: swap;
}

/* 2. TOKENS ----------------------------------------------------------------- */
:root {
  /* Brand + action (Indigo is the ONLY accent — the 10% rule) */
  --anthracite: #17181c;
  --offwhite: #fbfbf9;
  --cta: #5a57f0;
  --cta-hover: #4a47e0;
  --cta-text: #ffffff;

  /* Light neutrals (60% + 30%) */
  --bg: #fbfbf9;
  --bg-2: #f6f6f2; /* faint alternating band */
  --card: #f1f1ed;
  --line: #e0e0da;
  --line-strong: #d3d3cb;
  --text: #17181c;
  --text-2: #6b6d73;
  --text-3: #9a9ca3;

  /* Status (green good / yellow moderate / red low) — ONLY for readiness/status */
  --green: #1d9e75;
  --green-ink: #0f6e56;
  --green-tint: #e1f5ee;
  --yellow: #ef9f27;
  --yellow-ink: #854f0b;
  --yellow-tint: #faeeda;
  --red: #e24b4a;
  --red-ink: #a32d2d;
  --red-tint: #fcebeb;

  /* Power zones (charts / workouts only) */
  --z1: #8f9bb0;
  --z2: #3b9ed8;
  --z3: #1d9e75;
  --z4: #ef9f27;
  --z5: #e24b4a;
  --z6: #d6336c;
  --z7: #b5179e;

  /* Indigo wash for soft accents behind CTAs / active glyphs (kept faint) */
  --cta-tint: #ecebfe;
  --cta-ring: rgba(90, 87, 240, 0.16);

  /* Type */
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  /* Radii (brand guide §8) */
  --r-lg: 28px; /* big cards / CTA */
  --r-md: 20px; /* standard cards */
  --r-sm: 14px; /* small cards */
  --r-btn: 12px;
  --r-chip: 999px;

  /* Elevation — soft + restrained (floating marketing surfaces only) */
  --shadow-sm: 0 1px 2px rgba(23, 24, 28, 0.04), 0 2px 8px rgba(23, 24, 28, 0.05);
  --shadow-md: 0 8px 24px rgba(23, 24, 28, 0.07), 0 2px 6px rgba(23, 24, 28, 0.04);
  --shadow-lg: 0 24px 60px rgba(23, 24, 28, 0.1), 0 6px 16px rgba(23, 24, 28, 0.05);
  --shadow-phone: 0 40px 90px rgba(23, 24, 28, 0.14),
    0 12px 30px rgba(23, 24, 28, 0.08);

  /* Layout */
  --maxw: 1140px;
  --gutter: clamp(1.15rem, 5vw, 2.25rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);

  /* Spacing rhythm — one scale, applied consistently (Apple-grade precision) */
  --space-sm: 1rem; /* tight groupings */
  --space-md: 2rem; /* lead → supporting element within a block */
  --space-lg: 3rem; /* heading block → content */

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.7s;
}

/* 3. RESET + BASE ----------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* sticky header offset for anchor jumps */
}
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-wrap: pretty; /* avoid orphans / ragged last lines in body copy */
  overflow-x: hidden;
}
img,
svg {
  display: block;
  max-width: 100%;
}
/* Keep images in proportion when CSS constrains their width (esp. on mobile):
   height follows from the intrinsic/attribute aspect ratio, never fixed. */
img {
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
ul {
  list-style: none;
}
:focus-visible {
  outline: 2px solid var(--cta);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: var(--cta-tint);
  color: var(--anthracite);
}

/* 4. TYPOGRAPHY HELPERS ----------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--text-3);
}
.eyebrow--center {
  justify-content: center;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
/* Display / hero — heavier than the app's 500 cap (landing exception, approved) */
.display {
  font-weight: 700;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h2 {
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}
.h3 {
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.55;
  color: var(--text-2);
  font-weight: 400;
}
.section-head {
  max-width: 720px;
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
/* Centered subtext reads as intentional when its lines are balanced */
.section-head--center .lead {
  text-wrap: balance;
}
.section-head .lead {
  margin-top: 1.1rem;
}
.section-head .eyebrow {
  margin-bottom: 1.1rem;
}
/* numbers are heroes of data display */
.num {
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* 5. LAYOUT ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-y);
}
.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}
.section--band {
  background: var(--bg-2);
}
.divider {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* 6. BUTTONS + STORE BADGES ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: var(--r-btn);
  transition: background var(--dur) var(--ease), transform 0.12s var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--cta);
  color: var(--cta-text);
}
.btn--primary:hover {
  background: var(--cta-hover);
}
.btn--primary:active {
  transform: scale(0.98);
}
.btn--ghost {
  color: var(--text);
  border: 1.5px solid var(--line-strong);
  background: transparent;
}
.btn--ghost:hover {
  border-color: var(--text-2);
  background: rgba(23, 24, 28, 0.02);
}
.btn--ghost:active {
  transform: scale(0.98);
}
.btn--sm {
  padding: 0.7rem 1.15rem;
  font-size: 0.9375rem;
}
.btn svg {
  width: 18px;
  height: 18px;
}

/* App-store badges (coming-soon state) */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1.15rem 0.7rem 1rem;
  border-radius: var(--r-btn);
  background: var(--anthracite);
  color: #fff;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.badge[aria-disabled="true"] {
  cursor: default;
  opacity: 0.92;
}
.badge:not([aria-disabled="true"]):hover {
  transform: translateY(-2px);
}
.badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.badge__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.badge__top {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}
.badge__bot {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
}
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-2);
}
.coming-soon .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cta);
  box-shadow: 0 0 0 4px var(--cta-ring);
}

/* 7. HEADER ----------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(251, 251, 249, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 74px;
  transition: height 0.35s var(--ease);
}
.header.is-scrolled .header__inner {
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--anthracite);
}
/* Real Peakfy wordmark (anthracite on light). Sized by height, auto width. */
.brand__logo {
  display: block;
  height: 25px;
  width: auto;
  transition: height 0.35s var(--ease);
}
.header.is-scrolled .brand__logo {
  height: 22px;
}
.footer__brand .brand__logo {
  height: 26px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav__links a {
  font-size: 0.95rem;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav__links a:hover {
  color: var(--text);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

/* Language switcher */
.lang {
  position: relative;
}
.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-2);
  padding: 0.45rem 0.6rem;
  border-radius: var(--r-btn);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang__btn:hover {
  color: var(--text);
  background: rgba(23, 24, 28, 0.03);
}
.lang__btn svg {
  width: 15px;
  height: 15px;
}
.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease),
    visibility 0.2s;
}
.lang.is-open .lang__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
  font-size: 0.92rem;
  color: var(--text-2);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.lang__menu a:hover {
  background: var(--card);
  color: var(--text);
}
.lang__menu a[aria-current="true"] {
  color: var(--text);
  font-weight: 500;
}
.lang__menu a[aria-current="true"]::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cta);
}

/* Mobile menu button */
.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--r-btn);
  align-items: center;
  justify-content: center;
}
.hamburger span {
  position: relative;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.hamburger span::before,
.hamburger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease);
}
.hamburger span::before {
  top: -6px;
}
.hamburger span::after {
  top: 6px;
}
body.menu-open .hamburger span {
  background: transparent;
}
body.menu-open .hamburger span::before {
  transform: translateY(6px) rotate(45deg);
}
body.menu-open .hamburger span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  padding: 96px var(--gutter) 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  visibility: hidden;
}
body.menu-open .mobile-nav {
  transform: translateX(0);
  visibility: visible;
}
.mobile-nav a.m-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--text);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn {
  margin-top: 1.6rem;
}
.mobile-nav__langs {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 2rem;
}
.mobile-nav__langs a {
  font-size: 0.9rem;
  color: var(--text-2);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
}
.mobile-nav__langs a[aria-current="true"] {
  color: var(--text);
  border-color: var(--text-2);
}

/* 8. HERO ------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(7rem, 13vw, 9.5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  overflow: clip;
}
.hero::before {
  /* faint indigo aura behind the phones, very restrained */
  content: "";
  position: absolute;
  top: 8%;
  left: 50%;
  width: min(720px, 85vw);
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(90, 87, 240, 0.09),
    rgba(90, 87, 240, 0) 68%
  );
  pointer-events: none;
  z-index: 0;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 3.5rem);
}
.hero__copy {
  max-width: 560px;
}
.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 1.6rem;
}
.hero__chip b {
  font-weight: 500;
  color: var(--text);
}
.hero__chip .pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  background: var(--anthracite);
  color: #fff;
  border-radius: var(--r-chip);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.hero h1 {
  margin-bottom: 1.4rem;
}
.hero .lead {
  max-width: 30em;
}
.hero__cta {
  margin-top: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.hero__trust {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero__trust li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-2);
}
.hero__trust svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex: none;
}

/* Hero phone stage */
.stage {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage__phone {
  position: relative;
  width: clamp(220px, 26vw, 300px);
  filter: drop-shadow(0 30px 60px rgba(23, 24, 28, 0.16));
  z-index: 2;
}
.stage__phone--back {
  position: absolute;
  width: clamp(180px, 21vw, 244px);
  left: 8%;
  top: 12%;
  z-index: 1;
  opacity: 0.96;
  filter: drop-shadow(0 24px 46px rgba(23, 24, 28, 0.12));
}

/* 9. FLOATING CARDS / CHAT BUBBLES ----------------------------------------- */
.float {
  position: absolute;
  z-index: 3;
  background: var(--offwhite);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  padding: 0.85rem 1rem;
  width: max-content;
  max-width: 230px;
}
.float--chat {
  border-radius: 16px 16px 16px 5px;
}
.float__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.float__label {
  font-size: 0.72rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-display);
  font-weight: 500;
}
.float__val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
.float__val small {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
}
.float p {
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text);
}
.float__coach {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.float__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--anthracite);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.7rem;
  flex: none;
}
.float__coach span {
  font-size: 0.74rem;
  color: var(--text-2);
}
.float--a {
  top: 6%;
  left: -4%;
}
.float--b {
  bottom: 16%;
  right: -6%;
}
.float--c {
  bottom: 2%;
  left: 2%;
}
.ring {
  --p: 62;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(var(--yellow) calc(var(--p) * 1%), var(--line) 0);
  display: grid;
  place-items: center;
}
.ring::after {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--offwhite);
}
.ring span {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--yellow-ink);
}

/* 10. FEATURE ROWS (alternating phone) ------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
}
.feature + .feature {
  margin-top: clamp(4rem, 9vw, 8rem);
}
.feature__media {
  position: relative;
  display: flex;
  justify-content: center;
}
.feature--reverse .feature__media {
  order: 2;
}
.feature__phone {
  width: clamp(230px, 30vw, 320px);
  filter: drop-shadow(0 34px 70px rgba(23, 24, 28, 0.15));
}
.feature__glow {
  position: absolute;
  inset: 10% 0 0 0;
  z-index: -1;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(90, 87, 240, 0.08),
    transparent 62%
  );
}
.feature__body {
  max-width: 460px;
}
.feature__body .h2 {
  margin: 1rem 0 1.1rem;
}
.feature__list {
  margin-top: var(--space-md);
  display: grid;
  gap: 0.9rem;
}
.feature__list li {
  display: flex;
  gap: 0.7rem;
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.5;
}
.feature__list svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--cta);
}
.feature__list b {
  color: var(--text);
  font-weight: 500;
}

/* mini stat chips under a feature */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: var(--space-md);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-chip);
  font-size: 0.85rem;
  color: var(--text-2);
}
.chip .num {
  color: var(--text);
  font-size: 0.92rem;
}
.chip .zdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* 11. MOAT / SEE-IT-THINK --------------------------------------------------- */
.moat__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: var(--space-lg);
}
.moat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(1.6rem, 3vw, 2.2rem);
}
.moat-card h3 {
  margin-bottom: 0.7rem;
}
.moat-card p {
  color: var(--text-2);
  font-size: 0.98rem;
}
.moat-card__tag {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.1rem;
}

/* 12. STAT / READINESS / WORKOUT VISUALS ----------------------------------- */
.readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: var(--space-md);
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.4rem 1.5rem;
}
.stat__k {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-bottom: 0.6rem;
}
.stat__v {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat__v small {
  font-size: 0.9rem;
  color: var(--text-2);
  font-weight: 500;
}

/* interval bar preview (workout) */
.intervals {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 66px;
  margin-top: 1rem;
}
.intervals i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  min-width: 3px;
}

/* 13. INTEGRATIONS ---------------------------------------------------------- */
.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.6rem, 5vw, 3.4rem);
  margin-top: var(--space-lg);
}
.logos span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--text-3);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.25s var(--ease);
}
.logos span:hover {
  color: var(--text-2);
}
.logos svg {
  height: clamp(22px, 3vw, 28px);
  width: auto;
}

/* 14. COMPARISON TABLE ------------------------------------------------------ */
.compare {
  margin-top: var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--offwhite);
}
.compare__row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  align-items: stretch;
}
.compare__row + .compare__row {
  border-top: 1px solid var(--line);
}
.compare__cell {
  padding: 1.1rem 1.25rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}
.compare__cell--head {
  color: var(--text);
  font-weight: 500;
}
.compare__row--head .compare__cell {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-2);
  align-items: flex-end;
  padding-block: 1.25rem;
}
.compare__col-peakfy {
  background: var(--cta-tint);
  color: var(--anthracite);
  position: relative;
}
.compare__row--head .compare__col-peakfy {
  color: var(--cta-hover);
  font-weight: 600;
}
.compare__cell .yes {
  color: var(--green);
}
.compare__cell .no {
  color: var(--text-2);
}
.compare__cell svg {
  width: 20px;
  height: 20px;
}
.compare__note {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 0.9rem;
  text-align: center;
}

/* 15. WHY / TRUST ----------------------------------------------------------- */
.why {
  position: relative;
  background: var(--anthracite);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}
.why::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(90, 87, 240, 0.35), transparent 65%);
  pointer-events: none;
}
.why .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}
.why .eyebrow::before {
  background: rgba(255, 255, 255, 0.4);
}
.why h2 {
  color: #fff;
  max-width: 16ch;
  margin: 1.2rem 0 1.5rem;
}
.why p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 60ch;
  font-size: 1.08rem;
  position: relative;
}
.why__points {
  position: relative;
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.why__point {
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.why__point h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}
.why__point p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
}

/* 16. FAQ ACCORDION --------------------------------------------------------- */
.faq {
  max-width: 780px;
  margin-inline: auto;
  margin-top: var(--space-lg);
}
.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
  padding: 1.35rem 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.12rem;
  color: var(--text);
}
.faq__icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex: none;
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 1.8px;
  background: var(--text-2);
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease);
}
.faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.faq__item.is-open .faq__icon::after {
  transform: translate(-50%, -50%) rotate(0);
}
.faq__a {
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
/* Collapsed only when JS is present; without JS every answer stays readable. */
.js .faq__a {
  max-height: 0;
}
.faq__a-inner {
  padding: 0 0 1.5rem;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 62ch;
}

/* 17. CTA CARD -------------------------------------------------------------- */
.cta-card {
  position: relative;
  text-align: center;
  background: var(--anthracite);
  color: #fff;
  border-radius: var(--r-lg);
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter);
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      ellipse at 50% 120%,
      rgba(90, 87, 240, 0.4),
      transparent 60%
    ),
    radial-gradient(
      ellipse at 15% -20%,
      rgba(90, 87, 240, 0.22),
      transparent 55%
    );
  pointer-events: none;
}
.cta-card > * {
  position: relative;
}
.cta-card h2 {
  color: #fff;
  max-width: 18ch;
  margin-inline: auto;
  margin-bottom: 1rem;
}
.cta-card p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 46ch;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.cta-card .badges {
  justify-content: center;
}
.cta-card .badge {
  background: #fff;
  color: var(--anthracite);
}
.cta-card .badge__top {
  color: var(--text-2);
}
.cta-card .coming-soon {
  color: rgba(255, 255, 255, 0.7);
  justify-content: center;
  margin-top: 1.2rem;
}

/* 18. FOOTER ---------------------------------------------------------------- */
.footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.footer__brand .brand {
  margin-bottom: 1rem;
}
.footer__brand p {
  color: var(--text-2);
  font-size: 0.95rem;
  max-width: 34ch;
}
.footer__social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.3rem;
}
.footer__social a {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.footer__social a:hover {
  color: var(--text);
  border-color: var(--text-2);
  transform: translateY(-2px);
}
.footer__social svg {
  width: 18px;
  height: 18px;
}
.footer__col h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
}
.footer__col a {
  display: block;
  color: var(--text-2);
  font-size: 0.95rem;
  padding: 0.35rem 0;
  transition: color 0.2s var(--ease);
}
.footer__col a:hover {
  color: var(--text);
}
.footer__bot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 0.88rem;
  color: var(--text-3);
}

/* 19. MOTION ---------------------------------------------------------------- */
/* Reveal is gated behind .js — without JavaScript, nothing is ever hidden. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] {
  transition-delay: 0.08s;
}
[data-reveal-delay="2"] {
  transition-delay: 0.16s;
}
[data-reveal-delay="3"] {
  transition-delay: 0.24s;
}
[data-reveal-delay="4"] {
  transition-delay: 0.32s;
}

/* floating cards drift + enter (gated behind .js like the reveals) */
.js .float {
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.stage.is-in .float {
  opacity: 1;
  transform: none;
}
.stage.is-in .float--a {
  transition-delay: 0.35s;
  animation: drift 7s ease-in-out 1.2s infinite;
}
.stage.is-in .float--b {
  transition-delay: 0.55s;
  animation: drift 8s ease-in-out 1.6s infinite;
}
.stage.is-in .float--c {
  transition-delay: 0.7s;
  animation: drift 9s ease-in-out 1.4s infinite;
}
@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
/* parallax hook (JS sets --py) */
.parallax {
  transform: translate3d(0, var(--py, 0px), 0);
}

@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;
  }
  [data-reveal],
  .float {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 20. RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 940px) {
  .nav__links,
  .header .lang,
  .header .btn--primary {
    display: none;
  }
  .hamburger {
    display: inline-flex;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  .hero__copy {
    max-width: 620px;
    margin-inline: auto;
  }
  .hero .eyebrow--center,
  .hero__chip {
    margin-inline: auto;
  }
  .hero .lead {
    margin-inline: auto;
  }
  .hero__cta {
    align-items: center;
  }
  .hero__trust {
    justify-content: center;
  }
  .hero {
    padding-top: 88px;
    padding-bottom: 2rem;
  }
  .stage {
    /* image-first on mobile (RestOrTrain-style): the phones lead, headline follows */
    order: -1;
    position: relative;
    min-height: 366px;
    margin: 0.25rem 0 0.5rem;
  }
  .feature,
  .moat__grid,
  .why__points {
    grid-template-columns: 1fr;
  }
  .feature__media {
    order: -1 !important;
  }
  .feature__body {
    max-width: 620px;
    margin-inline: auto;
    text-align: center;
  }
  .feature__list {
    text-align: left;
    max-width: 440px;
    margin-inline: auto;
  }
  .chips,
  .feature .badges {
    justify-content: center;
  }
  .readout {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }
  .why__points {
    gap: 0;
  }
  .why__point {
    padding-block: 1.4rem;
  }
}
/* 21. SUBPAGES (legal, privacy, methodology, story) ------------------------ */
.header--solid {
  background: rgba(251, 251, 249, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.header__back:hover {
  color: var(--text);
}
.header__back svg {
  width: 16px;
  height: 16px;
}
.subpage {
  padding-top: 74px;
}
.subhead {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(1.6rem, 3vw, 2.6rem);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.subhead .eyebrow {
  margin-bottom: 1rem;
}
.subhead h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.03;
  max-width: 18ch;
}
.subhead .lead {
  margin-top: 1.1rem;
  max-width: 60ch;
}
.prose {
  max-width: 760px;
  margin-inline: auto;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}
.prose > * + * {
  margin-top: 1.1rem;
}
.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  letter-spacing: -0.02em;
  margin-top: 2.8rem;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  margin-top: 1.8rem;
}
.prose p,
.prose li {
  color: var(--text-2);
  line-height: 1.7;
}
.prose ul {
  padding-left: 1.3rem;
  list-style: disc;
  display: grid;
  gap: 0.5rem;
}
.prose li::marker {
  color: var(--text-3);
}
.prose a {
  color: var(--cta-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose strong {
  color: var(--text);
  font-weight: 500;
}
.prose__meta {
  color: var(--text-3);
  font-size: 0.9rem;
}
.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin-block: 2.5rem;
}
/* methodology callout cards reuse .moat-card; add a grid + source note */
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-block: 1.6rem;
}
.method-grid .moat-card p {
  font-size: 0.94rem;
}
.source-note {
  font-size: 0.85rem;
  color: var(--text-3);
  border-left: 2px solid var(--line-strong);
  padding-left: 0.9rem;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .method-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --r-lg: 22px;
  }
  .compare__row {
    grid-template-columns: 1.2fr 0.9fr;
  }
  .compare__col-generic,
  .compare__col-apps {
    display: none;
  }
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  /* Header leads with two offset, tilted phones (like RestOrTrain); no floating
     cards on mobile keeps the composition clean and clearly "finished". */
  .float {
    display: none;
  }
  .stage__phone {
    width: 204px;
    transform: translateX(-34px) rotate(-4deg);
  }
  .stage__phone--back {
    display: block;
    width: 172px;
    left: auto;
    right: 2%;
    top: 0;
    transform: rotate(6deg);
  }
}
