/* Base layer: tokens, reset, typography, shared components (nav, buttons, pills).
   Colors mirror the mobile app palette (mobile/src/theme/palettes.ts) so the
   landing page and the app read as one brand. Dark-only by design: it matches
   the app's ambient dark hero and the gym-at-night mood. */
:root {
  color-scheme: dark;
  --bg: #0B1220;
  --bg-2: #0F172A;
  --surface: #1E293B;
  --surface-2: #162033;
  --border: #334155;
  --hairline: rgba(51, 65, 85, 0.6);
  --text: #F1F5F9;
  --text-2: #94A3B8;
  --text-3: #64748B;
  --primary: #0EA5E9;
  --primary-dark: #0284C7;
  --primary-light: #7DD3FC;
  --accent: #F59E0B;
  --success: #10B981;

  --r-card: 20px;
  --r-btn: 12px;
  --shadow: 0 20px 50px rgba(2, 6, 23, 0.5);
  --font-display: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 760px; }
.muted { color: var(--text-2); }

/* ----- Typography ----- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.display--md { font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1; }
.display--sm { font-size: clamp(1.8rem, 3.5vw, 2.4rem); line-height: 1; margin-bottom: 10px; }
.lead { font-size: 1.125rem; color: var(--text-2); max-width: 540px; margin-top: 20px; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 16px;
}
.text-gradient {
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----- Buttons & pills ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r-btn);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
/* sky-700/800 rather than the brand sky-500/600: white 16px text needs 4.5:1,
   which #0EA5E9 (2.8:1) and #0284C7 (4.1:1) miss; #0369A1 gives 5.9:1. */
.btn--primary { background: #0369A1; color: #fff; box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3); }
.btn--primary:hover { background: #075985; }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { padding: 9px 18px; font-size: 0.9rem; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pill--accent { background: rgba(245, 158, 11, 0.15); color: #FCD34D; }
.pill--primary { background: rgba(14, 165, 233, 0.15); color: var(--primary-light); }

/* ----- Navigation ----- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.is-scrolled, .nav.is-open {
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 0.95rem; color: var(--text-2); }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links .btn { color: #fff; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.logo__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #fff;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease;
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded='true'] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded='true'] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 16px 24px;
    background: var(--bg); /* opaque: hero text must not show through the open menu */
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav__links a:not(.btn) { padding: 12px 0; font-size: 1.05rem; }
  .nav__links .btn { margin-top: 8px; }
  .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; }
}

/* ----- Scroll reveal: only hidden when JS is present to reveal it (see <head>) ----- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
