/* ==========================================================================
   MOTION - the moving layer (owner, 18 Nov 2026: award-site feel, "not too
   much"). Every rule hangs off .motion, which the head script sets only when
   the reader has not asked for reduced motion. Without it, or without
   scripts, the page is the same page standing still.

   Entrances that need no script (the hero) are CSS animations, so a script
   that fails can never leave anything hidden. Everything scroll-linked is
   driven by assets/js/motion.js through classes and custom properties, and
   only ever moves transform, opacity or clip-path.
   ========================================================================== */

/* Lenis, the desktop smooth scroll (assets/js/vendor, its own CSS). */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

/* ==========================================================================
   THE RULES - every move on the page takes its timing from here, so the
   whole site moves the same way. Two kinds of move:
   - an entrance: something arriving on screen. Long, one ease, one rise.
   - a response: the page answering a click, a hover or the scroll. Short.
   Things that arrive together step in --m-step apart (main.js sets
   --reveal-delay from what reaches the line in the same frame); words in a
   heading step half that.
   ========================================================================== */

.motion {
  --m-ease: var(--ease-soft);
  --m-in: 600ms;        /* entrance: the rise */
  --m-fade: 380ms;      /* entrance: opacity */
  --m-rise: 20px;
  --m-step: 48ms;
  --m-respond: 260ms;   /* response */
  --m-scrub: 120ms;     /* smoothing on a step set by the scroll */
  --m-dim: .22;         /* text waiting for its turn */
  /* Room a masked line keeps around its letters. Manrope's g, p and y reach
     .255em down, and the headings set lines as tight as .9, so .1 cut them.
     The tight letter spacing puts the last letter's edge past the box. */
  --m-mask: .25em;
  --m-mask-side: .1em;
}

@keyframes motion-rise  { from { transform: translateY(calc(105% + var(--m-mask))); } to { transform: none; } }
@keyframes motion-up    { from { opacity: 0; translate: 0 var(--m-rise); } to { opacity: 1; translate: 0 0; } }
@keyframes motion-in    { from { opacity: 0; translate: calc(var(--m-rise) * -.5) 0; } to { opacity: 1; translate: 0 0; } }
@keyframes motion-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes motion-photo { from { clip-path: inset(100% 0 0 0 round var(--r-card)); } to { clip-path: inset(0 0 0 0 round var(--r-card)); } }
@keyframes motion-zoom  { from { scale: calc(var(--photo-rest, 1) + .16); } to { scale: var(--photo-rest, 1); } }

/* ==========================================================================
   ENTRANCES - everything marked .reveal fades and rises in the same way.
   base.css holds the still version for no motion.
   ========================================================================== */

.motion .reveal {
  transform: translate3d(0, var(--m-rise), 0);
  transition: opacity var(--m-fade) var(--m-ease), transform var(--m-in) var(--m-ease);
  transition-delay: var(--reveal-delay, 0ms);
}
/* A photo in a card opens upward a beat after the card starts. */
.motion .reveal .photo {
  clip-path: inset(100% 0 0 0);
  transition: clip-path calc(var(--m-in) * 1.3) var(--m-ease) calc(var(--reveal-delay, 0ms) + var(--m-step) * 1.5);
}
.motion .reveal.is-in .photo { clip-path: inset(0 0 0 0); }

/* ==========================================================================
   HERO - the headline rises line by line, the rest follows, the phone floats.
   ========================================================================== */

/* Each line is a mask; its words rise up through it. The padding keeps the
   descenders (g, p, y) inside the mask, and the rise starts that much lower
   so no word shows before it moves. */
.motion .hero__line,
.motion .split .w {
  overflow: hidden;
  padding: 0 var(--m-mask-side) var(--m-mask);
  margin: 0 calc(var(--m-mask-side) * -1) calc(var(--m-mask) * -1);
}
.motion .hero__line > span {
  display: inline-block;
  animation: motion-rise var(--m-in) var(--m-ease) both;
  animation-delay: calc(40ms + var(--line, 0) * var(--m-step));
}
.motion .hero__line:nth-child(2) { --line: 1; }
.motion .hero__line:nth-child(3) { --line: 2; }
.motion .hero__line:nth-child(4) { --line: 3; }

/* The rest of the hero copy follows the lines, one step apart. */
.motion .hero__copy > :not(.hero__title) { animation: motion-up var(--m-in) var(--m-ease) both; }
.motion .hero__copy > .eyebrow  { animation-delay: 40ms; }
.motion .hero__copy > .hero__lead    { animation-delay: calc(40ms + 4 * var(--m-step)); }
.motion .hero__copy > .hero__actions { animation-delay: calc(40ms + 5 * var(--m-step)); }
.motion .hero__copy > .chips         { animation-delay: calc(40ms + 6 * var(--m-step)); }

/* The phone rises in, then floats up and back once; both move translate, and
   the float is listed last so it takes over once it starts. The tilt is transform, set
   from the mouse by motion.js (--rx, --ry), so none of the three collide. */
.motion .hero__phone {
  animation: motion-up var(--m-in) var(--m-ease) 150ms both, motion-float 7s ease-in-out 1.4s 1;
}
.motion .hero__visual { perspective: 1400px; }
.motion .hero__phone,
.motion .hero__stack {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform var(--m-in) var(--m-ease);
}
.motion .hero__stack { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(40px); }
/* The lift toward the reader also enlarges the list a little; a small phone
   has no room for it (and no mouse to tilt it). */
@media (max-width: 479px) { .motion .hero__stack { transform: none; } }

.motion .hero__stack li { animation: motion-in var(--m-in) var(--m-ease) both; }
.motion .hero__stack li:nth-child(1) { animation-delay: calc(300ms + 5 * var(--m-step)); }
.motion .hero__stack li:nth-child(2) { animation-delay: calc(300ms + 6 * var(--m-step)); }
.motion .hero__stack li:nth-child(3) { animation-delay: calc(300ms + 7 * var(--m-step)); }
.motion .hero__stack li:nth-child(4) { animation-delay: calc(300ms + 8 * var(--m-step)); }
.motion .hero__stack li:nth-child(5) { animation-delay: calc(300ms + 9 * var(--m-step)); }
.motion .hero__stack li:nth-child(6) { animation-delay: calc(300ms + 10 * var(--m-step)); }

/* The picked part (main.js walks it down the list) answers at the response
   pace, and its screen settles into the phone as it fades in. */
.motion .hero__pick,
.motion .hero__step {
  transition: background-color var(--m-respond) var(--m-ease), border-color var(--m-respond) var(--m-ease),
              color var(--m-respond) var(--m-ease), box-shadow var(--m-respond) var(--m-ease);
}
.motion .hero__screens img {
  scale: 1.04;
  transition: opacity var(--m-respond) var(--m-ease), scale var(--m-in) var(--m-ease);
}
.motion .hero__screens img.is-on { scale: 1; }
/* The line along the bottom of the picked part fills while it is on show,
   then the next part takes over (main.js adds .is-walking each step). */
@keyframes motion-dwell { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.motion [data-hero-screens].is-walking .hero__pick[aria-pressed='true']::after {
  opacity: .5;
  animation: motion-dwell var(--hero-dwell) linear both;
}

/* The Coaches photo opens upward while the picture settles inside it. */
.motion .hero__photo { animation: motion-photo calc(var(--m-in) * 1.3) var(--m-ease) var(--m-step) both; }
.motion .hero__photo img { animation: motion-zoom calc(var(--m-in) * 2) var(--m-ease) var(--m-step) both; }

/* Depth on the way out (motion.js sets --hy, the scroll in px, and --hp,
   0 to 1, while the hero is leaving; mouse only). The picture moves slower
   than the words, and the hero clips it so it never slides over the next
   section. */
.motion .hero.has-depth { overflow: clip; }
.motion .has-depth .hero__copy {
  translate: 0 calc(var(--hy, 0) * .06px);
  opacity: calc(1 - var(--hp, 0) * .55);
}
.motion .has-depth .hero__visual { translate: 0 calc(var(--hy, 0) * .18px); }
/* A hero photo keeps its frame in place (moved, the hero would cut its
   corners) and drifts inside it like every other photo. */
@media (hover: hover) and (pointer: fine) {
  .motion .hero__photo img { --photo-rest: 1.1; translate: 0 calc(var(--py, 0) * 1%); }
}

/* ==========================================================================
   HEADINGS - words rise in when the heading reveals (motion.js splits them).
   ========================================================================== */

.motion .split { opacity: 1 !important; transform: none !important; filter: none !important; }
/* Each word is a mask, like the hero lines (overflow and room set there). */
.motion .split .w { display: inline-block; vertical-align: top; }
.motion .split .wi { display: inline-block; transform: translateY(calc(108% + var(--m-mask))); }
/* The words wait for the heading's own turn in the cascade. */
.motion .split.is-in .wi {
  transform: none;
  transition: transform var(--m-in) var(--m-ease);
  transition-delay: calc(var(--reveal-delay, 0ms) + var(--wi, 0) * var(--m-step) / 2);
}

/* A statement that lights up word by word as it scrolls past (data-light). */
.motion [data-light] .w { transition: opacity var(--m-scrub) ease; }
.motion [data-light].is-lighting .w:not(.is-lit) { opacity: var(--m-dim); }

/* ==========================================================================
   OPENING UP - large surfaces open as they arrive (motion.js sets --grow
   from 0 to 1 and adds .is-growing). From 768px.
   ========================================================================== */

@media (min-width: 768px) {
  /* The green bands: from a rounded card to the full width. */
  .motion .surface-brand.is-growing {
    clip-path: inset(0 calc((1 - var(--grow, 1)) * min(4vw, 40px)) round calc((1 - var(--grow, 1)) * 40px));
  }
  /* The Coaches video: from a slightly smaller frame to its own size. */
  .motion .promo__frame.is-growing { scale: calc(.92 + var(--grow, 1) * .08); }
}

/* ==========================================================================
   SECTIONS - small touches.
   ========================================================================== */

/* Photos settle as their card arrives. With a mouse they also drift inside
   the frame (motion.js --py, in %), so they rest a little larger, enough
   that the drift never shows an edge, and lean in under the mouse. */
.motion .duo__photo img { scale: 1.1; transition: scale calc(var(--m-in) * 1.6) var(--m-ease); }
.motion .duo__card.is-in .duo__photo img { scale: 1; }
@media (hover: hover) and (pointer: fine) {
  .motion .duo__photo img { scale: 1.2; translate: 0 calc(var(--py, 0) * 1%); }
  .motion .duo__card.is-in .duo__photo img { scale: 1.1; }
  .motion .duo__card.is-in:hover .duo__photo img { scale: 1.14; transition-duration: var(--m-in); }
}

/* The four questions arrive one after the other (main.js cascade), and the
   answer's marker draws under it once it is in. */
.motion .problem__answer span { background-size: 0% 100%; background-repeat: no-repeat; transition: background-size calc(var(--m-in) * 1.2) var(--m-ease) calc(var(--reveal-delay, 0ms) + 300ms); }
.motion .problem__answer.is-in span { background-size: 100% 100%; }

/* How It Works: each box ticks in turn once the checklist is in. */
.motion .checklist__item.is-done .checklist__box {
  background: transparent;
  border-color: var(--ink);
  transition: background-color var(--m-respond) var(--m-ease), border-color var(--m-respond) var(--m-ease);
  transition-delay: calc(var(--reveal-delay, 0ms) + 350ms + var(--ti, 0) * 260ms);
}
.motion .checklist__box path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset var(--m-respond) var(--m-ease);
  transition-delay: calc(var(--reveal-delay, 0ms) + 450ms + var(--ti, 0) * 260ms);
}
.motion .checklist__item:nth-child(2) { --ti: 1; }
.motion .checklist__item:nth-child(3) { --ti: 2; }
.motion .checklist.is-in .checklist__item.is-done .checklist__box { background: var(--brand); border-color: var(--brand); }
.motion .checklist.is-in .checklist__box path { stroke-dashoffset: 0; }

/* Levels: each tag swings in on its string and settles, one after the
   other; with a mouse it sways when pointed at. */
.motion .hang__tag { transition: rotate 1400ms cubic-bezier(.3, 1.5, .5, 1); transition-delay: var(--reveal-delay, 0ms); }
.motion .hang.reveal:not(.is-in) .hang__tag { rotate: -5deg; }
/* A tag mid-swing leans past the column; it must never widen the page. */
.motion .levels { overflow-x: clip; }
@media (hover: hover) and (pointer: fine) {
  .motion .hang.is-in:hover .hang__tag { rotate: 2.5deg; transition-duration: 900ms; transition-delay: 0ms; }
}

/* TRACKMAN: the notes come in from the side after the phone, one by one,
   and their lines reach for the screen. */
.motion .board__note {
  opacity: 0;
  translate: 0 var(--m-rise);
  transition: opacity var(--m-fade) var(--m-ease), translate var(--m-in) var(--m-ease);
  transition-delay: calc(var(--reveal-delay, 0ms) + 400ms + var(--ni, 0) * 160ms);
}
.motion .board__note:nth-child(2) { --ni: 1; }
.motion .board__note:nth-child(3) { --ni: 2; }
.motion .board.is-in .board__note { opacity: 1; translate: 0 0; }
@media (min-width: 768px) {
  .motion .board__note { translate: 24px 0; }
  .motion .board__note::before {
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--m-in) var(--m-ease);
    transition-delay: calc(var(--reveal-delay, 0ms) + 700ms + var(--ni, 0) * 160ms);
  }
  .motion .board.is-in .board__note::before { transform: none; }
}

/* ==========================================================================
   PAGE HEADS - Pricing and Our Coaches open like the home hero (owner, 19
   Nov 2026: "not animated as home screen"). The title rises line by line
   through the same masks, the rest follows one step apart, and the light
   behind it drifts slowly.
   ========================================================================== */

.motion .page-head__intro > :not(.page-head__title) { animation: motion-up var(--m-in) var(--m-ease) both; }
.motion .page-head__intro > .eyebrow          { animation-delay: 40ms; }
.motion .page-head__intro > .page-head__lead  { animation-delay: calc(40ms + 3 * var(--m-step)); }
.motion .page-head__intro > .page-head__chips,
.motion .page-head__intro > .directory__search { animation-delay: calc(40ms + 4 * var(--m-step)); }
@keyframes motion-drift {
  0%, 100% { translate: -50% 0; scale: 1; }
  50%      { translate: -46% 28px; scale: 1.08; }
}
/* One slow pass, then it rests: a loop kept the GPU drawing for as long as
   the page stayed open. */
.motion .page-head::before { animation: motion-drift 16s ease-in-out both; }

/* A plan: the price comes up after the card, then the ticks one by one. */
.motion .plan__price > * {
  opacity: 0;
  translate: 0 .35em;
  transition: opacity var(--m-fade) var(--m-ease), translate var(--m-in) var(--m-ease);
  transition-delay: calc(var(--reveal-delay, 0ms) + 250ms);
}
.motion .plan__price > .plan__period { transition-delay: calc(var(--reveal-delay, 0ms) + 330ms); }
.motion .plan.is-in .plan__price > * { opacity: 1; translate: 0 0; }
.motion .plan__ticks li {
  opacity: 0;
  translate: -12px 0;
  transition: opacity var(--m-fade) var(--m-ease), translate var(--m-in) var(--m-ease);
  transition-delay: calc(var(--reveal-delay, 0ms) + 420ms + var(--ti, 0) * 70ms);
}
.motion .plan__ticks li:nth-child(2) { --ti: 1; }
.motion .plan__ticks li:nth-child(3) { --ti: 2; }
.motion .plan__ticks li:nth-child(4) { --ti: 3; }
.motion .plan__ticks li:nth-child(5) { --ti: 4; }
.motion .plan.is-in .plan__ticks li { opacity: 1; translate: 0 0; }

/* A coach card rises in when the list arrives, one after the other (main.js
   sets --ci), and again when a search brings it back; the photo settles
   inside it. Only the way in is held (backwards), so the hover lift and the
   photo's lean still apply afterward. */
.motion .coach-card {
  animation: motion-up var(--m-in) var(--m-ease) backwards;
  animation-delay: calc(120ms + var(--ci, 0) * var(--m-step));
}
.motion .coach-card__photo img {
  animation: motion-zoom calc(var(--m-in) * 2) var(--m-ease) backwards;
  animation-delay: calc(120ms + var(--ci, 0) * var(--m-step));
}
@media (hover: hover) and (pointer: fine) {
  .motion .coach-card__photo img { transition: scale var(--m-in) var(--m-ease); }
  .motion .coach-card:hover .coach-card__photo img { scale: 1.05; }
}

/* How to join: each dot fills as its step arrives, and the line reaches for
   the next one. */
.motion .join__dot {
  background: transparent;
  color: var(--brand);
  transition: background-color var(--m-respond) var(--m-ease), color var(--m-respond) var(--m-ease);
  transition-delay: calc(var(--reveal-delay, 0ms) + 350ms);
}
.motion .join.is-in .join__dot { background: var(--brand); color: var(--on-brand); }
@media (min-width: 768px) {
  .motion .join::after {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--m-in) var(--m-ease);
    transition-delay: calc(var(--reveal-delay, 0ms) + 550ms);
  }
  .motion .join.is-in::after { transform: none; }
}

/* ==========================================================================
   PINNED SCREENS
   ========================================================================== */

/* TRACKMAN page: one phone stays put while the steps scroll beside it, and
   its screen changes with the step in the middle of the window. */
.motion .walk--pinned {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  column-gap: var(--sp-8);
  gap: 0 var(--sp-8);
  align-items: start;
}
.motion .walk--pinned .walk__row {
  grid-column: 2;
  display: flex;
  align-items: center;
  min-height: 78vh;
  opacity: var(--m-dim);
  transition: opacity var(--m-respond) var(--m-ease);
}
.motion .walk--pinned .walk__row.is-active { opacity: 1; }
.motion .walk--pinned .walk__row > .walk__phone { display: none; }
.walk__stage { display: none; }
.motion .walk--pinned .walk__stage {
  grid-column: 1;
  grid-row: 1 / span 5;
  align-self: start;
  position: sticky;
  top: calc(50vh - min(300px, 34vh));
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  justify-self: center;
}
.motion .walk__stage .phone { position: relative; width: min(280px, 31vh); }
.motion .walk__stage .phone__screen { display: grid; }
.motion .walk__stage .phone__screen img {
  grid-area: 1 / 1;
  opacity: 0;
  scale: 1.04;
  transition: opacity var(--m-respond) var(--m-ease), scale var(--m-in) var(--m-ease);
}
.motion .walk__stage .phone__screen img.is-active { opacity: 1; scale: 1; }
.walk__dots { display: grid; gap: 10px; }
.walk__dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--edge-strong);
  transition: background-color var(--m-respond) ease, scale var(--m-respond) var(--m-ease);
}
.walk__dots span.is-active { background: var(--brand); scale: 1.4; }

/* ==========================================================================
   HOVER - buttons lean toward the mouse; cards lift with a soft light that
   follows it (motion.js sets --mx/--my and --gx/--gy). Mouse only.
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {
  .motion .btn {
    translate: var(--mx, 0) var(--my, 0);
    transition: transform var(--dur-fast) var(--ease), translate var(--m-respond) var(--m-ease),
                background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease;
  }

  /* The entrance transitions of a revealed card are listed again, with its
     place in the cascade, so the lift does not cancel them. */
  .motion .glow {
    position: relative;
    isolation: isolate;
    transition-property: opacity, transform, translate, box-shadow, border-color;
    transition-duration: var(--m-fade), var(--m-in), var(--m-respond), var(--m-respond), var(--dur-fast);
    transition-timing-function: var(--m-ease);
    transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0ms, 0ms, 0ms;
  }
  .motion .glow::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgb(54 107 24 / .09), transparent 65%);
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
  }
  .motion .glow:hover { translate: 0 -4px; box-shadow: 0 22px 40px -26px rgb(16 32 13 / .45); }
  .motion .glow:hover::after { opacity: 1; }
}

/* ==========================================================================
   FOOTER - the name, large, rising in at the very end.
   ========================================================================== */

.footer__mark {
  margin-top: var(--sp-8);
  font-family: var(--font-display);
  /* Capped with the headings (owner, 19 Nov 2026: far too large). */
  font-size: clamp(2.25rem, 1rem + 4.4vw, 4.5rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.04em;
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
}
.footer__mark-soft { color: var(--fg-muted); }
