/* ==========================================================================
   Lifty for Trainers — web design system
   Tokens lifted directly from the app's DESIGN.md (Liquid Glass, dark field,
   royal-blue action color, meaning-only category hues, no drop shadows).
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Deep Field — the dark background gradient (never flat) */
  --field-1: #141627;
  --field-2: #121421;
  --field-3: #0d1622;
  --field-edge: #0a0c14;

  /* Action color — the one "do this / you are here" hue */
  --accent: #3b67f4;          /* solid fills */
  --accent-bright: #6a8dff;   /* text / links / glow on dark */
  --accent-soft: rgba(88, 130, 255, 0.16);

  /* Ink */
  --ink: #edeff5;
  --ink-2: rgba(237, 239, 245, 0.66);
  --ink-3: rgba(237, 239, 245, 0.44);
  --ink-faint: rgba(237, 239, 245, 0.10);

  /* Glass surfaces */
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.085);
  --glass-line: rgba(255, 255, 255, 0.10);
  --glass-line-2: rgba(255, 255, 255, 0.16);

  /* Meaning hues (muscle-category system) — used only where they encode */
  --cat-chest: #f2595a;
  --cat-back: #458cf2;
  --cat-quads: #66cc73;
  --cat-hamstrings: #33b3a6;
  --cat-glutes: #f28c40;
  --cat-shoulders: #9973f2;
  --cat-biceps: #e64da6;
  --cat-triceps: #59a6e6;
  --cat-core: #f2bf33;
  --pr-gold: #f2bf33;

  /* Radii */
  --r-field: 10px;
  --r-tile: 18px;
  --r-card: 22px;
  --r-pill: 9999px;

  /* Spacing scale */
  --s-xs: 4px;
  --s-s: 8px;
  --s-m: 12px;
  --s-l: 16px;
  --s-xl: 24px;
  --s-2xl: 32px;
  --s-3xl: 48px;
  --s-4xl: 72px;
  --s-5xl: 112px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    system-ui, "Segoe UI", Roboto, sans-serif;
  --num-feat: "tnum" 1, "ss01" 1;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);     /* ease-out-quint-ish */
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layered z-index scale */
  --z-base: 0;
  --z-sticky: 100;
  --z-nav: 200;
  --z-overlay: 300;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--field-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Clip (not hidden) so the off-canvas mobile drawer can't widen the page,
     without turning body into a scroll container that would break sticky bars. */
  overflow-x: clip;
}

/* The field: a deep indigo radial wash + faint cool aurora, fixed behind content */
.field {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(118% 90% at 50% -8%, #1d2742 0%, var(--field-1) 34%, var(--field-3) 68%, var(--field-edge) 100%);
  overflow: hidden;
}
.field::before,
.field::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.field::before {
  width: 52vw; height: 52vw;
  left: -12vw; top: -14vw;
  background: radial-gradient(circle, rgba(59, 103, 244, 0.42), transparent 68%);
}
.field::after {
  width: 46vw; height: 46vw;
  right: -14vw; top: 26vh;
  background: radial-gradient(circle, rgba(51, 179, 166, 0.20), transparent 70%);
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- Layout helpers ---------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.section { padding-block: clamp(56px, 9vw, 112px); }

/* ---- Type -------------------------------------------------------------- */

.eyebrow-blue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--accent-bright);
}
.eyebrow-blue::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 12px 1px var(--accent-bright);
}

h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.025em; line-height: 1.04; }
p { margin: 0; }

.lead {
  font-size: clamp(1.05rem, 0.9rem + 0.7vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 56ch;
}

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--r-pill);
  padding: 13px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), background 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.985); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(59, 103, 244, 0);
}
.btn-primary:hover {
  background: #466ff6;
  box-shadow: 0 8px 30px -8px rgba(59, 103, 244, 0.7);
}

.btn-glass {
  background: var(--glass-2);
  color: var(--ink);
  border-color: var(--glass-line-2);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(255, 255, 255, 0.24); }

.btn-lg { padding: 16px 28px; font-size: 16px; }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  padding: 13px 16px;
}
.btn-ghost:hover { color: var(--ink); }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent-bright);
}
.arrow-link svg { transition: transform 0.22s var(--ease-out); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---- Glass surface ----------------------------------------------------- */

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-card);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

/* ==========================================================================
   Top navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(15, 18, 30, 0.72);
  border-bottom-color: var(--glass-line);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--s-xl);
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.brand .mark { width: 26px; height: 26px; flex: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a.link {
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.18s var(--ease-out), background 0.18s var(--ease-out);
}
.nav-links a.link:hover { color: var(--ink); background: var(--glass); }
.nav-links a.link[aria-current="page"] { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: var(--glass); border: 1px solid var(--glass-line);
  border-radius: 12px; color: var(--ink); cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: 68px; left: 0; right: 0;
    margin: 0;
    padding: 12px 20px 20px;
    background: rgba(13, 16, 26, 0.92);
    border-bottom: 1px solid var(--glass-line);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }
  .nav.open .nav-links a.link { padding: 13px 14px; font-size: 16px; }
  .nav.open .nav-cta {
    display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    margin: 10px 0 0;
  }
  .nav.open .nav-cta .btn { width: 100%; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.foot {
  border-top: 1px solid var(--glass-line);
  margin-top: var(--s-2xl);
}
.foot-inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s-2xl);
  padding-block: clamp(40px, 6vw, 64px);
}
.foot .brand { margin-bottom: 14px; }
.foot-tag { color: var(--ink-2); font-size: 14px; max-width: 30ch; }
.foot-col h4 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px;
}
.foot-col a {
  display: block; color: var(--ink-2); font-size: 14px;
  padding: 5px 0; transition: color 0.16s var(--ease-out);
}
.foot-col a:hover { color: var(--ink); }
.foot-base {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--glass-line);
  padding-block: 22px;
  color: var(--ink-3); font-size: 13px;
}
@media (max-width: 760px) {
  .foot-inner { grid-template-columns: 1fr 1fr; gap: var(--s-xl); }
  .foot-brand-col { grid-column: 1 / -1; }
}

/* ==========================================================================
   Reveal-on-scroll (enhances an already-visible default)
   ========================================================================== */

.reveal {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease-out-soft), transform 0.7s var(--ease-out-soft);
    will-change: opacity, transform;
  }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .reveal[data-delay="1"] { transition-delay: 0.07s; }
  .js .reveal[data-delay="2"] { transition-delay: 0.14s; }
  .js .reveal[data-delay="3"] { transition-delay: 0.21s; }
  .js .reveal[data-delay="4"] { transition-delay: 0.28s; }
}
