/* ==========================================================================
   VARIANT 6 — VINYASA
   Motion-led. The storefront opens with a moving practice, not a still image.
   Reference cluster: Alo Yoga's calm + Apple-style product motion.

   Art-direction rule: one orchestrated moment, everything else holds still.
   The Flow is the only place anything moves on its own; the rest of the page
   is as quiet as the other five variants. Colour stays strictly on brand —
   ink stage, off-white commerce, magenta and cyan as the two breath states.
   ========================================================================== */

:root {
  /* ---- colour ---------------------------------------------------------- */
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #ececef;
  --text: #0b0b0d;
  --text-muted: #63666d;
  --text-faint: #8b8e95;
  --line: #e2e3e7;
  --line-strong: #c2c4ca;
  --inverse-bg: #0b0b0d;
  --inverse-text: #f5f5f7;
  --inverse-muted: #b7bac1;

  --accent: #ec008c;
  --accent-text: #b4006b;      /* 6.12:1 on the off-white base */
  --accent-dark: #ff4fae;      /* 6.54:1 on the ink stage */
  --accent-2: #00aeef;
  --accent-2-text: #00789f;    /* 4.61:1 on the off-white base */
  --accent-soft: rgba(236, 0, 140, 0.05);

  --hdr-bg: rgba(245, 245, 247, 0.94);
  --hdr-text: #0b0b0d;
  --hdr-line: #e2e3e7;
  --ann-bg: #ffffff;
  --ann-text: #63666d;
  --ftr-bg: #ffffff;
  --ftr-text: #0b0b0d;
  --ftr-line: #e2e3e7;

  --btn-bg: #0b0b0d;
  --btn-text: #ffffff;
  --btn-bg-hover: #2f3238;
  --btn-line: #0b0b0d;
  --btn-py: 1rem;
  --btn-px: 1.875rem;
  --btn-transform: none;
  --btn-tracking: 0.02em;
  --btn-weight: 500;
  --btn-fs: 0.9375rem;

  /* ---- type ------------------------------------------------------------
     Fraunces has an optical-size axis, so it stays elegant at display sizes
     without turning brittle — it suits type that has to sit beside motion.
     Figtree keeps the interface calm and highly legible underneath it. */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.02em;
  --display-lh: 1.06;
  --nav-tracking: 0.1em;
  --nav-fs: 0.75rem;
  --nav-weight: 500;
  --body-lh: 1.68;

  --fs-hero: clamp(2.5rem, 8vw, 5.25rem);
  --fs-h1: clamp(2.25rem, 6.5vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 4.5vw, 2.75rem);

  /* ---- shape & rhythm --------------------------------------------------- */
  --product-bg: #f4f2ee;
  --radius: 4px;
  --radius-lg: 8px;
  --radius-img: 6px;
  --border-w: 1px;
  --card-ratio: 1 / 1;
  --card-gap: 1.25rem;
  --section-y: 4rem;
  --logo-h: 26px;
  --focus: #00789f;
  --shadow: 0 24px 70px rgba(11, 11, 13, 0.14);

  /* the one easing the whole variant moves on */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 360ms;
}

@media (min-width: 64rem) {
  :root { --section-y: 7rem; --card-gap: 1.75rem; --logo-h: 32px; --grid-cols: 4; }
}

.hdr__ann { text-transform: none; letter-spacing: 0.02em; font-size: 0.8125rem; }
.hdr__ann a { color: var(--accent-text); }

/* ==========================================================================
   THE FLOW — scroll-driven, on light
   `.flow` is tall; `.fl__pin` is sticky inside it. That is the pin. The driver
   never touches layout — it only reads how far through the tall element we are.
   ========================================================================== */
.flow {
  position: relative;
  background: var(--bg);
  height: calc(var(--flow-len, 476vh) + 100vh);
}
.flow[data-reduced='true'] { height: auto; }

.fl__pin {
  position: sticky; top: 0; height: 100svh;
  display: flex; align-items: center; overflow: hidden;
  /* the two halves of the mark, as light in the room */
  background:
    radial-gradient(52% 44% at 18% 30%, rgba(236, 0, 140, 0.05) 0%, transparent 60%),
    radial-gradient(52% 44% at 82% 70%, rgba(0, 174, 239, 0.05) 0%, transparent 60%);
}
.flow[data-reduced='true'] .fl__pin { position: static; height: auto; padding-block: var(--s8); }

.fl__grid {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid; gap: var(--s5); align-items: center;
}
@media (min-width: 64rem) {
  .fl__grid { grid-template-columns: 0.85fr 1.15fr; gap: var(--s8); }
}

/* ---- left column: the copy ---------------------------------------------- */
.fl__copy { max-width: 46ch; }
.fl__count {
  font-family: var(--font-body); font-size: var(--fs-micro); font-weight: 600;
  letter-spacing: 0.22em; color: var(--accent-text);
}
.fl__of { color: var(--text-faint); margin-left: 0.4em; }
.fl__pose {
  font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.02em; margin-top: var(--s3);
  display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap;
}
.fl__en {
  font-family: var(--font-body); font-size: var(--fs-micro); font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2-text);
}
.fl__line {
  color: var(--text-muted); margin-top: var(--s4); font-size: 1.0625rem;
  min-height: 5.2em;
}
@media (min-width: 64rem) { .fl__line { min-height: 4.4em; } }

.fl__prod {
  display: inline-flex; align-items: center; gap: var(--s4); margin-top: var(--s4);
  padding: var(--s3) var(--s4) var(--s3) var(--s3);
  border: var(--border-w) solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); transition: border-color var(--dur) var(--ease);
}
.fl__prod:hover { border-color: var(--text); }
.fl__swatch {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--sw); border: 1px solid var(--line-strong);
  transition: background 420ms var(--ease);
}
.fl__prodtext { display: flex; flex-direction: column; }
.fl__prodname { font-size: var(--fs-sm); font-weight: 600; }
.fl__prodmeta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

.fl__ticks { display: flex; gap: 6px; margin-top: var(--s6); }
.fl__tick {
  width: 30px; height: 3px; border-radius: 999px; background: var(--line-strong);
  transition: background 320ms var(--ease);
}
.fl__tick[data-on='true'] {
  background: linear-gradient(to right, var(--accent) 0 50%, var(--accent-2) 50% 100%);
}
.flow[data-reduced='true'] .fl__tick { height: 10px; width: 44px; cursor: pointer; }
.fl__hint {
  font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--s3);
  letter-spacing: 0.04em;
}

/* ---- right column: the pinned pair --------------------------------------- */
.fl__stage {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4);
  align-items: end;
}
.fl__slot { position: relative; }
.fl__fig {
  display: block; width: 100%;
  height: clamp(260px, 46vh, 520px); overflow: visible;
}
.fl__breath {
  position: absolute; top: 0; right: 0;
  font-size: var(--fs-micro); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent-2-text); opacity: 0.8;
}

/* ---- the rig -------------------------------------------------------------
   Joint angles are custom properties written by the scroll driver each frame,
   so there is deliberately NO transition here — the scrub is the animation. */
.fl__body { transform: translateY(var(--drop, 0px)); }
.fl__j { transform-box: view-box; }
.fl__torso     { transform: rotate(var(--torso, 0deg)); }
.fl__head      { transform: rotate(var(--head, 0deg)); }
.fl__shoulderL { transform: rotate(var(--shoulderL, 0deg)); }
.fl__shoulderR { transform: rotate(var(--shoulderR, 0deg)); }
.fl__foreL     { transform: rotate(var(--elbowL, 0deg)); }
.fl__foreR     { transform: rotate(var(--elbowR, 0deg)); }
.fl__hipL      { transform: rotate(var(--hipL, 0deg)); }
.fl__hipR      { transform: rotate(var(--hipR, 0deg)); }
.fl__kneeL     { transform: rotate(var(--kneeL, 0deg)); }
.fl__kneeR     { transform: rotate(var(--kneeR, 0deg)); }

.fl__skin   { fill: #8f8a9c; }
.fl__hair   { fill: #2a2733; }
.fl__shadow { fill: rgba(11, 11, 13, 0.10); }
.fl__tee    { fill: var(--tee, #f4f2ee); stroke: rgba(11,11,13,0.10); stroke-width: 1; }
.fl__print  { opacity: 0.94; }

@media (prefers-reduced-motion: reduce) {
  .fl__body, .fl__j { transition: none; }
}

/* ==========================================================================
   the rest of the storefront — quiet, so the flow is the only moving thing
   ========================================================================== */
.hero { padding-block: var(--s7) var(--s6); }
.hero__grid { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 64rem) { .hero__grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--s8); } }
.hero h1 { font-size: var(--fs-hero); }
.hero h1 em { font-style: italic; color: var(--accent-text); }
.hero__sub { max-width: 46ch; margin-top: var(--s5); color: var(--text-muted); font-size: 1.0625rem; }
.hero__cta { display: flex; gap: var(--s3); margin-top: var(--s6); flex-wrap: wrap; align-items: center; }
.hero__media {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--product-bg); border-radius: var(--radius-img);
  transition: transform 500ms var(--ease);
}
.hero__media:hover { transform: translateY(-3px); }
.hero__media img { width: 100%; height: 100%; object-fit: contain; }
.hero__tag {
  position: absolute; left: 0; bottom: 0; padding: var(--s4) var(--s5);
  font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase;
}

.sechead { margin-bottom: var(--s6); }
.sechead h2 { font-size: var(--fs-h2); }
.sechead p { color: var(--text-muted); margin-top: var(--s3); max-width: 56ch; }
.sechead__row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; }

.pcard__media { background: var(--product-bg); }
.pcard__badge { background: #fff; border: 1px solid var(--line); font-weight: 600; letter-spacing: 0.1em; }
.pcard__title { font-weight: 600; font-size: 0.9375rem; }
.pcard__member { color: var(--accent-text); }

/* membership sits on white with a brand hairline across the top edge, rather
   than the ink slab the other variants use */
.memb { background: var(--surface); border-block: var(--border-w) solid var(--line); position: relative; }
.memb::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(to right, var(--accent) 0 50%, var(--accent-2) 50% 100%);
}
.memb__num { color: var(--accent-2-text); font-weight: 700; }
.memb__benefit:nth-child(even) .memb__num { color: var(--accent-text); }

.section--alt { background: var(--surface); }
.co__aside { background: var(--surface); }
.ftr__grid a:hover { color: var(--accent-text); }
.quote { font-family: var(--font-display); line-height: 1.32; }

/* ==========================================================================
   YOGA 3D — the scroll-scrubbed film
   Tees LEFT, film RIGHT. `.y3` is tall; `.y3__pin` is sticky inside it and is
   inset below the sticky site chrome so the models heads are never clipped.
   The collection is a SIBLING section, not an overlay — two sticky layers
   cross-fading was what smeared its first row.
   ========================================================================== */
.y3 { position: relative; background: var(--bg); height: var(--y3-len, 620vh); }
.y3[data-fallback='true'] { height: auto; }

.y3__pin {
  position: sticky;
  /* clear the announcement bar + header, measured at runtime */
  top: var(--chrome-h, 112px);
  height: calc(100svh - var(--chrome-h, 112px));
  overflow: hidden;
  background:
    radial-gradient(50% 40% at 20% 26%, rgba(236, 0, 140, 0.05) 0%, transparent 62%),
    radial-gradient(50% 40% at 80% 74%, rgba(0, 174, 239, 0.05) 0%, transparent 62%);
}
.y3[data-fallback='true'] .y3__pin { position: static; height: auto; }

.y3__grid { display: grid; height: 100%; }
/* tees left, film right. The clip is 16:9, so the film takes the wider share
   or it letterboxes down into a stamp. */
@media (min-width: 64rem) { .y3__grid { grid-template-columns: 38fr 62fr; } }

/* ---- RIGHT: the film ----------------------------------------------------- */
.y3__stage { position: relative; min-height: 42svh; order: 2; }
.y3__canvas { position: absolute; inset: 0; }
.y3__canvas canvas { display: block; width: 100% !important; height: 100% !important; }
/* `contain`, not `cover`: the pair reaches wide in Warrior and Triangle, and
   cover was cutting their hands off at the frame edge. */
.y3__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: transparent;
}
/* sampled from this clip: #A9AAA4 top, #CDCEC8 mid, #C6C6C6 floor. The
   letterbox now reads as the studio continuing, not as empty space. */
.y3[data-stage='video'] .y3__canvas {
  background: linear-gradient(180deg, #a9aaa4 0%, #cdcec8 52%, #c6c6c6 100%);
}

.y3__loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: var(--s3); font-size: var(--fs-sm); color: var(--text-muted);
  background: var(--bg); transition: opacity 500ms var(--ease);
}
.y3__loading[data-done='true'] { opacity: 0; pointer-events: none; }
.y3__spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--accent);
  animation: y3-spin 800ms linear infinite;
}
@keyframes y3-spin { to { transform: rotate(360deg); } }

.y3__switch {
  position: absolute; right: var(--s5); top: var(--s5); display: flex; gap: 2px;
  border: var(--border-w) solid var(--line); border-radius: var(--radius-pill);
  background: var(--surface); padding: 3px; z-index: 2;
}
.y3__switch button {
  min-height: 36px; padding: 0 var(--s4); border-radius: var(--radius-pill);
  font-size: var(--fs-xs); letter-spacing: 0.06em; color: var(--text-muted);
}
.y3__switch button[aria-pressed='true'] { background: var(--text); color: var(--bg); }
/* the film shows both models at once, so the switcher has nothing to switch */
.y3[data-stage='video'] .y3__switch { display: none; }
.y3__nogl { display: grid; place-content: center; height: 100%; padding: var(--s6);
  text-align: center; font-size: var(--fs-sm); color: var(--text-muted); }

/* ---- LEFT: the tee reel -------------------------------------------------- */
.y3__panel {
  order: 1; position: relative; display: flex; flex-direction: column;
  padding: var(--s5) var(--gutter); border-right: var(--border-w) solid var(--line);
  background: var(--surface); min-width: 0; overflow: hidden;
}
@media (max-width: 63.99rem) {
  .y3__panel { order: 2; border-right: 0; border-top: var(--border-w) solid var(--line); }
  .y3__stage { order: 1; }
}
.y3__count {
  display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap;
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.22em;
  color: var(--accent-text);
}
.y3__of { color: var(--text-faint); }
.y3__worn {
  color: var(--text-muted); font-weight: 500; letter-spacing: 0.18em;
  margin-left: auto; text-transform: uppercase;
}

/* the reel: a window onto a vertical strip that steps with the film */
.y3__reel { position: relative; flex: 1; min-height: 0; margin-top: var(--s4);
  overflow: hidden; }
.y3__reel::before, .y3__reel::after {
  content: ''; position: absolute; left: 0; right: 0; height: 12%; z-index: 2;
  pointer-events: none;
}
.y3__reel::before { top: 0; background: linear-gradient(var(--surface), transparent); }
.y3__reel::after { bottom: 0; background: linear-gradient(transparent, var(--surface)); }

.y3__track {
  /* offset is measured in JS: a percentage height cannot resolve against an
     auto-height absolutely-positioned parent, which left every slide collapsed. */
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; flex-direction: column; gap: var(--s4);
  transform: translateY(var(--y, 0px));
  transition: transform 620ms var(--ease);
}
.y3__slide {
  display: grid; grid-template-rows: 1fr auto; gap: var(--s3);
  height: var(--slide-h, 320px); opacity: 0.25; transform: scale(0.92);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
.y3__slide[data-on='true'] { opacity: 1; transform: scale(1); }
.y3__shot {
  display: block; min-height: 0; background: var(--product-bg);
  border-radius: var(--radius-img); overflow: hidden;
}
.y3__shot img { width: 100%; height: 100%; object-fit: contain; }
.y3__meta { display: flex; flex-direction: column; gap: 1px; }
.y3__name { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.1; }
.y3__colour { font-size: var(--fs-xs); color: var(--text-muted); }
.y3__price { font-size: var(--fs-sm); display: flex; gap: var(--s3); align-items: baseline; }
.y3__member { font-size: var(--fs-micro); color: var(--accent-text); }

.y3__cta { margin-top: var(--s4); align-self: flex-start; }
.y3__ticks { display: flex; gap: 4px; margin-top: var(--s4); }
.y3__tick {
  flex: 1; height: 3px; border-radius: 999px; background: var(--line-strong);
  transition: background 300ms var(--ease);
}
.y3__tick[data-on='true'] {
  background: linear-gradient(to right, var(--accent) 0 50%, var(--accent-2) 50% 100%);
}
.y3__hint {
  font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--s2);
  transition: opacity 400ms var(--ease);
}
.y3[data-done='true'] .y3__hint { opacity: 0; }

/* ---- the collection: an ordinary section, no overlay --------------------- */
.y3__collection { background: var(--bg); padding-block: var(--s8) var(--s9); }
.y3__collection h2 { font-size: var(--fs-h1); margin-top: var(--s3); }
.y3__grid-products {
  display: grid; gap: var(--s4); margin-block: var(--s6);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 48rem) { .y3__grid-products { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 80rem) { .y3__grid-products { grid-template-columns: repeat(6, 1fr); } }
.y3__card { display: flex; flex-direction: column; }
.y3__cardshot {
  aspect-ratio: 1 / 1; background: var(--product-bg); border-radius: var(--radius-img);
  overflow: hidden; display: block;
}
.y3__cardshot img { width: 100%; height: 100%; object-fit: contain; transition: transform 500ms var(--ease); }
.y3__card:hover .y3__cardshot img { transform: scale(1.04); }
.y3__cardname { font-size: var(--fs-xs); font-weight: 600; margin-top: var(--s2); }
.y3__cardmeta { font-size: var(--fs-micro); color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  .y3 { height: auto; }
  .y3__pin { position: static; height: auto; }
  .y3__track { transition: none; }
}

/* the collection's count line, under "Everything they were wearing." */
.y3__collnote {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--s3);
  max-width: 52ch;
}
