/* Landing — Off / On */

.wm {
  display: inline-block;
  height: 24px;
  aspect-ratio: 110.64 / 32.06;
  background: currentColor;
  -webkit-mask: url(../assets/img/wordmark.svg) center / contain no-repeat;
  mask: url(../assets/img/wordmark.svg) center / contain no-repeat;
}
.wm--footer { height: 34px; color: var(--white); margin-bottom: 14px; }

/* keep pinned copy clear of the mobile buy bar */
:root { --safe-b: 104px; }
@media (min-width: 900px) { :root { --safe-b: 48px; } }

/* every pinned scene fills one viewport */
.switch__pin, .inside__pin, .reveal__pin, .close__pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* =========================================================
   0  HERO — THE MISSING PIECE
   A real woman, the top of her head torn open, a tower of noise erupting
   from it. Two Switch capsules go in, the noise lifts away, the missing
   piece drops back, and she is whole and calm. Layers: tools/build_hero_e.py
   ========================================================= */
.site-header:not(.is-dark) .brand { color: var(--indigo); }
.he { position: relative; background: #e1e5eb; }
.he__pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #dfe3e9;
}

/* the whole composite lives in the plate's natural pixel space; JS scales + places it */
.he__stage {
  position: absolute;
  left: 0; top: 0;
  width: 1376px; height: 1068px;
  transform-origin: 0 0;
  will-change: transform;
}
.he__stage img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.he__plate { left: 0; top: 0; width: 1376px; height: 1068px; }
.he__clutter { position: absolute; inset: 0; }

.ob { position: absolute; }
.ob__s, .ob__p { position: absolute; inset: 0; }
.ob img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  filter: drop-shadow(0 6px 10px rgba(13, 20, 48, 0.16)) drop-shadow(0 1px 2px rgba(13, 20, 48, 0.12));
  animation: ob-drift var(--dur, 6s) ease-in-out var(--del, 0s) infinite alternate;
}
@keyframes ob-drift {
  from { translate: 0 0; rotate: 0deg; }
  to { translate: var(--dx, 3px) var(--dy, -7px); rotate: var(--dr, 1.5deg); }
}

.he__cap { width: 170px; z-index: 3; opacity: 0; filter: drop-shadow(0 16px 22px rgba(13, 20, 48, 0.28)) drop-shadow(0 2px 4px rgba(13, 20, 48, 0.18)); }
.he__cap--b { width: 104px; }
.he__head, .he__piece { z-index: 2; }
.he__piece { opacity: 0; }

.he__ripple {
  position: absolute;
  width: 220px; height: 220px;
  margin: -110px 0 0 -110px;
  border-radius: 50%;
  border: 2px solid var(--indigo);
  opacity: 0;
  z-index: 3;
}

.he__veil {
  position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(120% 90% at 60% 60%, rgba(70, 80, 102, 0.06), rgba(70, 80, 102, 0.2));
  pointer-events: none;
}

.he__take {
  position: absolute; z-index: 3;
  font-family: var(--f-label); font-weight: 600; font-size: 22px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo); white-space: nowrap; opacity: 0;
}

/* the product, first full look: grand, in front of the soft-focus portrait */
.he__product {
  position: absolute; z-index: 1;
  width: 90vw; height: auto; left: 5vw; bottom: max(20px, 3svh);
  opacity: 0; visibility: hidden; pointer-events: none;
  filter: drop-shadow(0 40px 60px rgba(13, 20, 48, 0.22));
}
@media (min-width: 900px) {
  .he__product { width: auto; height: min(84svh, 860px, 50vw); left: auto; right: max(3vw, calc((100vw - 1500px) / 2)); bottom: 2svh; }
}

/* ---------------------------------------------------------------- copy */
.he__copy {
  position: absolute; inset: 0; z-index: 2;
  padding: 88px var(--gutter) 0;
  pointer-events: none;
}
.he__copy a, .he__copy .btn { pointer-events: auto; }
.he__c1, .he__c2, .he__c3 { position: absolute; left: var(--gutter); right: var(--gutter); top: 84px; }
.he__h {
  margin: 0;
  font-weight: 800;
  font-size: clamp(38px, 10.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 9.5ch;
}
.he__h .em { color: var(--indigo); }
.he__cue {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 0;
  font-size: 14px; font-weight: 500; color: var(--mute);
}
.he__cue i {
  width: 1.5px; height: 26px; background: currentColor; transform-origin: top;
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.he__c2, .he__c3 { visibility: hidden; }
.js:not(.reduced) .he__c1 { opacity: 0; }
.he__kick { margin: 0 0 10px; font-family: var(--f-label); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--indigo); }
.he__cat {
  margin: 0;
  font-weight: 800;
  font-size: clamp(40px, 11.4vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  color: var(--ink);
  max-width: 8ch;
}
.he__cat span { color: var(--indigo); white-space: nowrap; }
.he__lead { margin: 14px 0 18px; font-size: 17px; line-height: 1.35; font-weight: 500; color: var(--ink); max-width: 24ch; }
.btn--lg { min-height: 54px; padding: 0 24px; font-size: 16px; }
.he__fine { margin: 12px 0 0; font-size: 12.5px; color: var(--mute); }

@media (min-width: 900px) {
  .he__c1, .he__c2, .he__c3 {
    top: 50%; left: clamp(32px, 6vw, 96px); right: auto;
    width: min(38vw, 560px);
    transform: translateY(-50%);
  }
  .he__h { font-size: clamp(56px, 5.8vw, 96px); }
  .he__cat { font-size: clamp(56px, 6.8vw, 116px); }
  .he__cue { margin-top: 28px; }
  .he__kick { font-size: 13px; margin-bottom: 18px; }
  .he__lead { font-size: 20px; margin: 22px 0 28px; }
  .btn--lg { min-height: 60px; padding: 0 30px; font-size: 17px; }
}

.reduced .he__plate--before, .reduced .he__head, .reduced .he__clutter, .reduced .he__veil, .reduced .he__c1 { display: none; }
.reduced .he__c3, .reduced .he__product { visibility: visible; opacity: 1; }
.reduced .he__plate--soft { opacity: 1; }
.he__plate--soft { opacity: 0; }

/* =========================================================
   1  THE CATEGORY — pre-workout loses its "out"
   ========================================================= */
.cat, .cat__pin { background: var(--off); }
.cat__pin {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; place-content: center; justify-items: center; text-align: center;
  padding: 0 var(--gutter);
}
.cat__line { position: relative; height: 1.4em; margin: 0 0 clamp(14px, 3vh, 28px); font-size: clamp(16px, 1.8vw, 22px); font-weight: 500; color: var(--mute); width: 100%; }
.cat__line span { position: absolute; left: 0; right: 0; top: 0; }
.cat__l2 { opacity: 0; color: var(--ink); }
.cat__word {
  margin: 0; display: flex; align-items: baseline; justify-content: center;
  font-weight: 800; font-size: clamp(64px, 16.5vw, 260px); line-height: 0.9; letter-spacing: -0.055em;
  color: var(--ink); white-space: nowrap;
}
.cat__out { display: inline-flex; color: var(--mute); }
.cat__out i { font-style: normal; display: inline-block; }
.cat__formula {
  margin: 0.06em 0 0; font-weight: 800; font-size: clamp(64px, 16.5vw, 260px); line-height: 0.9; letter-spacing: -0.055em;
  color: var(--indigo); opacity: 0;
}
.reduced .cat__out { display: none; }
.reduced .cat__formula, .reduced .cat__l2 { opacity: 1; }
.reduced .cat__l1 { opacity: 0; }

/* =========================================================
   1b  THE RITUAL — six gestures, from the box
   ========================================================= */
.ritual { padding: clamp(88px, 14vh, 160px) var(--gutter); background: var(--off); }
.ritual__inner { max-width: var(--max); margin: 0 auto; }
.ritual__h { margin: 0 0 clamp(28px, 5vh, 56px); font-weight: 800; font-size: clamp(34px, 5.4vw, 72px); line-height: 1; letter-spacing: -0.04em; }
.ritual__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .ritual__grid { grid-template-columns: repeat(6, 1fr); gap: 16px; } .rt { aspect-ratio: 4 / 5; } }
.rt {
  position: relative; aspect-ratio: 1 / 0.82;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: start;
  padding: 16px; border-radius: 22px; background: var(--white); color: var(--indigo);
  box-shadow: 0 1px 0 rgba(13, 20, 48, 0.04), 0 18px 40px -28px rgba(13, 20, 48, 0.35);
}
.rt__n { font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: 0.12em; opacity: 0.55; }
.rt svg { width: 46%; max-width: 88px; align-self: center; justify-self: center; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.rt__c { font-weight: 700; font-size: clamp(15px, 1.35vw, 19px); letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
.rt--hero { background: var(--indigo); color: var(--white); }
.rt--hero .rt__c { color: var(--white); }
.rt--hero svg { fill: none; }
.rt--hero .cap rect { fill: var(--white); stroke: var(--white); }
.rt--hero .cap line { stroke: var(--indigo); stroke-width: 1.6; }

/* the gestures: each icon does its one thing when its tile arrives */
.rt .mv { transition: transform 0.7s var(--ease) var(--d, 0s), opacity 0.6s var(--ease) var(--d, 0s); }
.rt .draw { stroke-dasharray: 60; stroke-dashoffset: 60; transition: stroke-dashoffset 0.7s var(--ease) calc(0.25s + var(--d, 0s)); }
.rt .water { fill: currentColor; opacity: 0.18; transform: translateY(34px); transition: transform 1.2s var(--ease) 0.2s; stroke: none; }
.rt .caret { opacity: 0; }
.rt .cap { opacity: 0; transform: translateY(-22px); transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s), opacity 0.4s var(--d, 0s); }
.rt.is-on .mv { opacity: 0; transform: translateX(26px); }
.rt.is-on:nth-child(2) .mv { transform: scale(0.6); }
.rt.is-on:nth-child(3) .mv { transform: translateY(5px); }
.rt.is-on .draw { stroke-dashoffset: 0; }
.rt.is-on .water { transform: none; }
.rt.is-on .caret { animation: blink 1.06s steps(1) 0.9s infinite; }
.rt.is-on .cap { opacity: 1; transform: none; }
.reduced .rt .mv { opacity: 0; } .reduced .rt .draw { stroke-dashoffset: 0; } .reduced .rt .water { transform: none; } .reduced .rt .cap { opacity: 1; transform: none; }

/* =========================================================
   2  THE SWITCH
   ========================================================= */
.switch-scene, .switch__pin { background: var(--off); }
.flood {
  position: absolute;
  inset: 0;
  background: var(--indigo);
  clip-path: circle(0% at 50% 50%);
}
.seq { position: absolute; inset: 0; width: 100%; height: 100%; }
.seq--bolt { opacity: 0; }
.seq--toggle { z-index: 2; }
.switch__copy {
  position: absolute;
  inset: auto var(--gutter) calc(var(--safe-b) + 2svh);
  z-index: 3;
  color: var(--white);
  text-align: center;
}
.switch__copy .display { opacity: 0; }
.switch__copy .s-begin { color: var(--indigo-soft); }

/* =========================================================
   3  WHAT'S INSIDE
   ========================================================= */
.inside, .inside__pin { background: var(--white); }
.inside__head {
  position: absolute;
  top: 84px;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 2;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.inside__head .label { color: var(--indigo); margin: 0; }
.inside__head .lead { text-align: center; }
.inside__stage { position: absolute; inset: 0; }
.actives { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.actives { --s: clamp(104px, 19vmin, 220px); }
.active {
  position: absolute;
  translate: -50% calc(var(--s) * -0.5);
  display: grid;
  justify-items: center;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
}
.active b {
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--indigo);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.active span { font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-top: 4px; }
.active small { font-size: 11px; color: var(--mute); }
/* the real ingredient: transparent PNG-style webp, every grain of powder kept (tools/build_flow_assets.py) */
.active__img { display: block; width: var(--s); height: var(--s); margin-bottom: calc(var(--s) * -0.2); }
.inside__foot { position: absolute; top: 92px; left: 0; right: 0; text-align: center; color: var(--mute); }

/* =========================================================
   6  THE BOX OPENS
   ========================================================= */
.reveal, .reveal__pin { background: var(--off); }
.reveal__pin .seq { inset: 8svh 0 0; height: 92svh; }
.reveal__copy { position: absolute; left: var(--gutter); right: var(--gutter); text-align: center; z-index: 2; }
.reveal__copy--a { top: 84px; }
.reveal__copy--b { bottom: var(--safe-b); display: grid; justify-items: center; gap: 18px; opacity: 0; }
.reveal__copy--b .h2 { max-width: 16ch; }

/* =========================================================
   7  THE CLOSE
   ========================================================= */
.close, .close__pin { background: var(--ink); color: var(--white); }
.close__pin { display: grid; place-items: center; padding: 0 var(--gutter); }
.cl {
  grid-area: 1 / 1;
  margin: 0;
  max-width: 16ch;
  text-align: center;
  opacity: 0;
}
.cl--3 { color: var(--white); max-width: 10ch; }

/* =========================================================
   reduced motion: everything is laid out statically
   ========================================================= */
.reduced .stage__pin, .reduced .switch__pin, .reduced .inside__pin, .reduced .reveal__pin, .reduced .close__pin { height: auto; min-height: 100svh; }
.reduced .rail li, .reduced .phase, .reduced .active, .reduced .reveal__copy--b, .reduced .switch__copy .display { opacity: 1; transform: none; }
.reduced .cl { position: static; opacity: 1; }
.reduced .close__pin { gap: 24px; padding: 96px var(--gutter); }

/* =========================================================
   4  WHAT TO EXPECT — vertical timeline
   ========================================================= */
.expect { background: var(--off); padding: 104px var(--gutter) 80px; }
.expect__inner { max-width: var(--max); margin: 0 auto; }
.expect__head { display: grid; gap: 14px; margin-bottom: 40px; }
.expect__head .label { color: var(--indigo); margin: 0; }
.expect__head .h1 { max-width: 12ch; }
.expect__grid { display: grid; gap: 0; }

.expect__sticky {
  position: sticky;
  top: 64px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 12px var(--gutter);
  background: rgba(233, 237, 241, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.clock { display: flex; align-items: baseline; gap: 6px; color: var(--indigo); }
.clock__t, .clock__u { font-family: var(--f-label); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.clock__n { font-size: 44px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; min-width: 2.2ch; text-align: right; }

/* the instrument: time on x, focus on y */
.chart { position: relative; min-width: 0; }
.chart__y, .chart__x, .curve__note { display: none; }
.chart__plot { position: relative; height: 46px; }
.chart__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.phases { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.phases::before { content: ""; position: absolute; left: 6px; top: 24px; bottom: 24px; width: 2px; background: rgba(35, 66, 126, 0.15); }
.phase {
  position: relative;
  padding: 44px 0 44px 6px;
  min-height: 62svh;
  display: grid;
  align-content: center;
  gap: 14px;
  opacity: 0.28;
  transition: opacity 0.6s var(--ease);
}
.phase::before {
  content: "";
  position: absolute;
  left: -26px;
  top: calc(50% - 7px);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--off);
  box-shadow: inset 0 0 0 2px rgba(35, 66, 126, 0.35);
  transition: background-color 0.4s, box-shadow 0.4s, transform 0.5s var(--ease);
}
.phase.is-active { opacity: 1; }
.phase.is-active::before, .phase.is-past::before { background: var(--indigo); box-shadow: 0 0 0 6px rgba(35, 66, 126, 0.14); }
.phase.is-active::before { transform: scale(1.25); }
.phase.is-past { opacity: 0.45; }
.phase__t { color: var(--indigo); }
.phase .h2 { max-width: 14ch; }
.phase p { margin: 0; max-width: 44ch; font-size: 18px; line-height: 1.5; color: var(--mute); }
.chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 12px; border-radius: 99px; background: var(--white); color: var(--indigo); font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; box-shadow: inset 0 0 0 1px var(--line); }

@media (min-width: 900px) {
  .expect__grid { grid-template-columns: minmax(320px, 0.9fr) 1.1fr; gap: 64px; }
  .expect__sticky {
    top: 0;
    height: 100svh;
    margin: 0;
    padding: 96px 0 56px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
  }
  .clock__n { font-size: clamp(72px, 8vw, 128px); }
  .chart__y { display: block; margin-bottom: 10px; font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--indigo); }
  .chart__y::before { content: "↑ "; }
  .chart__plot { height: auto; aspect-ratio: 1.55; }
  .chart__x { display: block; position: relative; height: 18px; margin-top: 10px; font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
  .chart__x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
  .chart__x span:first-child { transform: none; }
  .chart__x span:last-child { transform: translateX(-100%); }
  .curve__note { display: block; margin: 0; font-size: 12px; color: var(--mute); }
  .phase { min-height: 80svh; }
}
.chart__axis { stroke: rgba(35, 66, 126, 0.22); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart__grid line { stroke: rgba(35, 66, 126, 0.1); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.curve__ghost { fill: none; stroke: rgba(35, 66, 126, 0.16); stroke-width: 2; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.curve__line { fill: none; stroke: var(--indigo); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.curve__area { fill: url(#curveFill); }
.curve__dot {
  position: absolute;
  left: 0; top: 0;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 4px var(--white), 0 0 0 10px rgba(35, 66, 126, 0.15);
}
@media (max-width: 639px) { .actives { --s: 96px; } .active b { font-size: 20px; } .active span { font-size: 10px; } }
