/* How it works: the layout of the biograph.com "How Biograph works" section (measured from the live
   site at 1440, 1680, 900 and 390px), dressed in the hero's design: its headline and subtext at the
   same sizes and steps, and the product cards' 30px corners. No button; the product cards below carry
   the action. Text, headline included, is the site's black (#120c08) on white. The copy is Saccade placeholder; steps 1
   and 2 have their photos, step 3 a stand-in. Photos are shown as they are: no fade,
   tint or filter over them (only the hover panels and their blur).
   Desktop and tablet are fixed sizes, as on their site, but the row is held to 1240px (their 1480px
   felt cramped), so a wide window keeps open space on either side. From 1199px down the steps stack,
   each caption under its photo as on desktop (their site sets it on the photo over a dark fade). */
.method {
  --method-ink: #120c08;
  --method-muted: rgba(18, 12, 8, .8);
  padding: calc(150 * var(--px)) calc(60 * var(--px)); background: #fff; color: var(--method-ink); font-family: var(--landing-body);
}
.method__inner { max-width: calc(1240 * var(--w)); margin: 0 auto; }
.method__intro { max-width: calc(800 * var(--px)); margin: 0 auto; text-align: center; }
/* Headline and subtext: the hero's, on a light background. */
.method__title {
  margin: 0; font: 500 calc(46 * var(--px))/calc(51.06 * var(--px)) var(--landing-head); letter-spacing: normal; color: var(--method-ink);
  text-wrap: balance;
}
.method__sub {
  max-width: calc(560 * var(--px)); margin: calc(18 * var(--px)) auto 0; font: 400 calc(15 * var(--px))/calc(22 * var(--px)) var(--landing-body); letter-spacing: -0.2px;
  color: var(--method-muted); text-wrap: pretty;
}

.method__steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(10 * var(--px));
  margin: calc(50 * var(--px)) 0 0; padding: 0; list-style: none;
}
.method-step { position: relative; min-width: 0; }
/* Their photos sit at 110% inside the rounded frame. */
/* On a short window the photos stop growing before they push their captions off the screen; the
   crops below hold their subjects as the frame widens. */
.method-step__frame {
  position: relative; width: 100%; overflow: hidden; aspect-ratio: 433.33 / 533; max-height: max(420px, 100svh - 300 * var(--px));
  border-radius: calc(30 * var(--px));
}
/* The doctor photo sits in a <picture> (a phone cut); it adds no box of its own. */
.method-step__frame picture { display: contents; }
.method-step__img {
  display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.1);
  transition: filter .6s var(--quint);
}
/* Step 3's runner is tall: the crop keeps him whole, cap to shoes, and on the wide tablet frames
   holds his head and stride. */
.method-step__img--runner { object-position: 50% 52%; transform-origin: 50% 52%; }
/* Step 1's photo is wide in a taller frame, so it always fills the frame's height and the crop is
   sideways: centred between the clinician's face and the headset (53% across). The 110% zoom grows
   from near the top (5% down), so it trims the floor rather than her hair, which starts 2.5% down. */
.method-step__img--doctor { object-position: 53% 5%; transform-origin: 53% 5%; }
/* Step 2's tablet photo is portrait: the crop keeps the screen, so Dr. South's face and the score bar
   (about 15% to 57% down) are never cut off. */
.method-step__img--tablet { object-position: 50% 32%; transform-origin: 50% 32%; }

/* Hover (or tap on touch screens): the photo blurs and a mock app panel grows in from 120%, blurred,
   to sharp. Their panels: a stack of measures, a results overview and a plan checklist. */
.method-reveal {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  opacity: 0; transform: scale(1.2); filter: blur(5px);
  transition: opacity .5s var(--quint), transform .6s var(--quint), filter .5s var(--quint);
}
.method-step.is-revealed .method-step__img { filter: blur(20px); }
.method-step.is-revealed .method-reveal { opacity: 1; transform: none; filter: none; }
@media (hover: hover) and (pointer: fine) {
  .method-step:hover .method-step__img { filter: blur(20px); }
  .method-step:hover .method-reveal { opacity: 1; transform: none; filter: none; }
}
.method-reveal p { margin: 0; }

/* Step 1: one stack of glass cards, the headset's eye-movement measures mixed with the blood panel's
   markers. Each card: an image, a name and a line under it. After the "30+ advanced
   diagnostics" box on biograph.com/how-biograph-works: every 2s while shown (landing.js) the front
   card drops 68px and fades as it shrinks to 90%, the two behind step forward and a new one fades in
   at the back. Positions are their rendered ones: front at full size, then 90% and 80%, each
   peeking ~10px below the last.
   The hover is the same as steps 2 and 3 (photo blurs, panel grows in) and so is the glass: 8% white
   with a faint inner edge. The cards behind are clipped to the strip that peeks out below the one in
   front, so no two cards overlap and the front card is exactly as light as steps 2 and 3's rows. Only
   the front card shows its contents. */
.method-stack { position: relative; width: min(336 * var(--px), calc(100% - 24 * var(--px))); height: calc(65 * var(--px)); margin: 0 0 calc(28 * var(--px)); padding: 0; list-style: none; }
.method-stack__card {
  position: absolute; inset: 0; display: flex; align-items: center; gap: calc(9 * var(--px)); padding: calc(10 * var(--px)) calc(14 * var(--px)) calc(10 * var(--px)) calc(12 * var(--px));
  border-radius: calc(16 * var(--px)); background: rgba(255, 255, 255, .08); box-shadow: inset 1px 1px 1px rgba(255, 255, 255, .09);
  font: 500 calc(14 * var(--px))/calc(14 * var(--px)) var(--landing-body); color: #fff; white-space: nowrap;
  opacity: 0; transform: translateY(calc(17.5 * var(--px))) scale(.8); clip-path: inset(calc(53 * var(--px)) 0 0 0);
  transition: transform .5s var(--quint), opacity .5s var(--quint), clip-path .5s var(--quint);
}
.method-stack__card[data-pos="0"] { z-index: 3; opacity: 1; transform: none; clip-path: inset(0); }
.method-stack__card[data-pos="1"] { z-index: 2; opacity: 1; transform: translateY(calc(13.75 * var(--px))) scale(.9); }
.method-stack__card[data-pos="2"] { z-index: 1; opacity: 1; transform: translateY(calc(25.5 * var(--px))) scale(.8); }
.method-stack__card[data-pos="exit"] { z-index: 4; opacity: 0; transform: translateY(calc(67.75 * var(--px))) scale(.9); clip-path: inset(0); }
.method-stack__card > * { opacity: 0; transition: opacity .3s var(--quint); }
.method-stack__card[data-pos="0"] > * { opacity: 1; }
.method-stack__thumb { flex: none; width: calc(41 * var(--px)); height: calc(41 * var(--px)); overflow: hidden; border-radius: calc(10 * var(--px)); background: rgba(255, 255, 255, .12); }
.method-stack__thumb img,
.method-plan__icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.method-stack__text { display: grid; gap: calc(4 * var(--px)); min-width: 0; }
.method-stack__name,
.method-stack__desc { overflow: hidden; text-overflow: ellipsis; }
.method-stack__desc { font: 400 calc(12 * var(--px))/calc(14 * var(--px)) var(--landing-body); color: rgba(255, 255, 255, .7); }

/* Step 2: a glass results overview. */
.method-report {
  position: relative; width: calc(280 * var(--px)); height: calc(310 * var(--px)); padding: calc(20 * var(--px)) calc(15 * var(--px)) 0; border-radius: calc(16 * var(--px));
  background: rgba(255, 255, 255, .08); box-shadow: inset 1px 1px 1px rgba(255, 255, 255, .09); color: #fff;
}
.method-report__hello {
  display: flex; align-items: center; justify-content: space-between; padding: 0 calc(5 * var(--px));
  font: 400 calc(10 * var(--px))/calc(15 * var(--px)) var(--landing-body); color: rgba(255, 255, 255, .7);
}
.method-report__avatar {
  width: calc(13 * var(--px)); height: calc(13 * var(--px)); border-radius: 50%; background: linear-gradient(135deg, #d9c3a5, #8a6f55);
}
.method-report__title { margin-top: calc(5 * var(--px)) !important; padding: 0 calc(5 * var(--px)); font: 500 calc(20 * var(--px))/calc(24 * var(--px)) var(--landing-head); }
.method-report__rows { display: grid; margin: calc(33 * var(--px)) 0 0; padding: 0; list-style: none; }
.method-report__row {
  display: flex; align-items: center; gap: calc(7 * var(--px)); height: calc(38 * var(--px)); padding: 0 calc(10 * var(--px));
  border-radius: calc(8 * var(--px)); font: 400 calc(12 * var(--px))/calc(18 * var(--px)) var(--landing-body);
}
.method-report__row.is-flagged { background: rgba(255, 255, 255, .06); }
.method-report__dot { flex: none; width: calc(7 * var(--px)); height: calc(7 * var(--px)); border-radius: 50%; }
.method-report__dot--1 { background: #8fb6e0; }
.method-report__dot--2 { background: #b49be0; }
.method-report__dot--3 { background: #e98b74; }
.method-report__dot--4 { background: #e6c46f; }
.method-report__dot--5 { background: #84c9a8; }
.method-report__pill {
  margin-left: auto; padding: calc(4 * var(--px)) calc(6 * var(--px)); border-radius: calc(60 * var(--px)); background: rgba(255, 255, 255, .1);
  font: 400 calc(8 * var(--px))/calc(8 * var(--px)) var(--landing-body); color: rgb(226, 225, 230); opacity: .6;
}
.method-report__row.is-flagged .method-report__pill {
  background: rgba(255, 255, 255, .3); box-shadow: inset 1px 1px 1px rgba(255, 255, 255, .09); color: #fff; opacity: 1;
}

/* Step 3: a plan checklist, two items in progress and two done. */
.method-plan { display: grid; gap: calc(12 * var(--px)); width: calc(280 * var(--px)); margin: 0; padding: 0; list-style: none; }
.method-plan__row {
  display: flex; align-items: center; gap: calc(8 * var(--px)); height: calc(56 * var(--px)); padding: 0 calc(16 * var(--px)) 0 calc(10 * var(--px)); border-radius: calc(16 * var(--px));
  background: rgba(255, 255, 255, .08); box-shadow: inset 1px 1px 1px rgba(255, 255, 255, .09);
}
.method-plan__icon { flex: none; width: calc(34 * var(--px)); height: calc(34 * var(--px)); overflow: hidden; border-radius: calc(8 * var(--px)); background: rgba(255, 255, 255, .12); }
.method-plan__text {
  display: grid; min-width: 0; font: 400 calc(12 * var(--px))/calc(18 * var(--px)) var(--landing-body); color: rgba(255, 255, 255, .7);
  white-space: nowrap;
}
.method-plan__text strong { font-weight: 500; line-height: calc(12 * var(--px)); color: #fff; margin-bottom: calc(3 * var(--px)); }
.method-plan__status {
  flex: none; width: calc(12 * var(--px)); height: calc(12 * var(--px)); margin-left: auto; border-radius: 50%;
  border: 1.5px dotted rgba(255, 255, 255, .6);
}
.method-plan__status.is-done {
  border: 0; background: rgb(94, 196, 151) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 6.2l1.7 1.7L8.6 4.4' fill='none' stroke='%23fff' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / calc(12 * var(--px)) no-repeat;
}

/* Touch screens have no hover, so a small chip shows the panel on tap, as on their site. */
.method-step__tap {
  position: absolute; top: calc(20 * var(--px)); left: calc(20 * var(--px)); z-index: 2; display: none;
  padding: calc(6 * var(--px)) calc(10 * var(--px)); border: 0; border-radius: calc(60 * var(--px)); background: rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font: 400 calc(11 * var(--px))/calc(14 * var(--px)) var(--landing-body); cursor: pointer;
}
.method-step__tap:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: none), (pointer: coarse) {
  .method-step__tap { display: block; }
}
.method-step__name { margin: calc(18 * var(--px)) 0 0; font: 500 calc(18 * var(--px))/calc(24 * var(--px)) var(--landing-head); color: var(--method-ink); }
.method-step__num { margin-right: .4em; }
.method-step__text {
  max-width: 90%; margin: calc(6 * var(--px)) 0 0; font: 400 calc(15 * var(--px))/calc(22 * var(--px)) var(--landing-body); letter-spacing: -0.2px;
  color: var(--method-muted); text-wrap: pretty;
}

/* The hero's own step down below 1440px. */
@media (max-width: 1439.98px) {
  .method__title { font-size: 36px; line-height: 39.96px; letter-spacing: -0.5px; }
  .method__sub { margin-top: 25px; font-size: 16px; line-height: 24px; }
  .method-step__text { font-size: 16px; line-height: 24px; }
}

/* Tablet: one column of 3:2 photos (their site uses a fixed 500px, too short for step 2's portrait
   photo on wider tablets), each caption under its photo. */
@media (max-width: 1199.98px) {
  .method { padding: 80px 15px; }
  .method__intro { padding: 0 30px; }
  .method__steps { grid-template-columns: minmax(0, 1fr); gap: 36px; margin-top: 40px; }
  .method-step__frame { aspect-ratio: 3 / 2; }
  .method-step__img--runner { object-position: 50% 20%; transform-origin: 50% 20%; }
  .method-step__body { padding: 0 15px; }
  .method-step__text { max-width: 540px; }
}
/* Phone: the same stack, with taller photos. */
@media (max-width: 809.98px) {
  .method__intro { padding: 0 15px; }
  .method__title { font-size: 32px; line-height: 35.52px; }
  .method__steps { gap: 32px; }
  .method-step__frame { aspect-ratio: 360 / 461.5; }
  .method-step__img--runner { object-position: 50% 52%; transform-origin: 50% 52%; }
  .method-step__body { padding: 0 5px; }
  .method-step__text { max-width: none; }
  /* The stack is 321px wide here, so its cards tighten a little. */
  .method-stack__card { gap: 8px; padding: 10px 12px 10px 10px; }
  .method-stack__thumb { width: 36px; height: 36px; border-radius: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .method-step__img, .method-reveal { transition: none; }
  .method-reveal { transform: none; }
  .method-stack__card, .method-stack__card > * { transition: none; }
}
