/* ============================================================================
   HOW IT WORKS — four step cards
   ============================================================================
   Structure follows the reference Alec supplied: a square card carrying a
   full-bleed gradient, a light plate or a photograph, a numbered chip in the
   top-left, floating glass panels inside it, and the title/copy sitting
   OUTSIDE the card underneath. The card is decoration; the words are page
   text, so they stay readable and selectable and do not depend on the art.

   The gradient cards are built from the same family as the hero ramp
   (#2B2848 -> #5B5179 -> #C55E8C -> #FF5A57), so this section belongs to the
   same page rather than looking like stock art dropped in.

   Four abreast, so everything inside a card is tuned small: at a 1200px
   container each card is ~282px wide, roughly 100px narrower than it was at
   three. Type inside the glass runs 10-13px for that reason, and it is the
   reason the copy under each card is short.
   ========================================================================= */

/* Padding is set for THIS section's neighbours, which changed when the block
   moved under the hero (2026-08-08). Above it is now the hero, a full-bleed
   dark band, so the top needs real air to separate white page from dark art.
   Below it is the results panel, which is inset and carries its own top margin
   — so the bottom is trimmed to stop the two gaps compounding.

   The .proof:has(+ .hiw) rule that used to live here is gone with the move:
   proof is no longer followed by this section, so it was dead weight, and
   .proof keeps its own 96px rhythm again. */
.hiw{ padding: 88px 0 72px; background: var(--bg); }

/* CENTRING FOLLOWS THE CONTENT, NOT THE SHELL (2026-08-16). These two used to be
   keyed .hiw, because the four steps lived there. The steps moved into the .services
   shell in the 08-16 swap and Choose Your Path took this one, so the selectors moved
   with them — otherwise the swap silently centred "Choose Your Path." (which is
   left-aligned by design) and left "The Path Forward" hanging on the left margin. */
.services .section-title{ text-align: center; }
.services .eyebrow{ text-align: center; }

/* THE STEP COPY ON THE RAMP (2026-08-16). The .services field falls from white to
   black, and the words under each card sit in its lower half — .hiw-copy's charcoal
   h3 and 64% ink were set for the flat cream field this section used to have and are
   effectively invisible on the new one. Same flip .band-services already does for its
   own steps. The eyebrow, title and lead are NOT flipped: they are up in the white
   part of the ramp, where dark ink is correct. */
.services .hiw-copy h3{ color: #F2F0F7; }
.services .hiw-copy p{ color: rgba(242, 240, 247, 0.72); }
.hiw-lead{
  text-align: center; max-width: 640px; margin: 0 auto 56px;
  font-size: 18px; line-height: 1.6; color: var(--ink-60);
}

.hiw-grid{
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  align-items: start;
}

/* Phones only — the rail only exists below 720px, so the indicator does too. */
.hiw-dots{ display: none; }

/* ---- the card ---------------------------------------------------------- */
.hiw-card{
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
  background: var(--surface-2);
}

/* Grain, same trick as the hero: an inline feTurbulence tile. The reference
   art is heavily grained, and on a gradient this large the noise is also what
   stops 8-bit banding showing up in the smooth falloff. */
.hiw-card::after{
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  opacity: .32; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}
.hiw-card.is-light::after{ opacity: .20; mix-blend-mode: multiply; }
/* The photograph carries its own grain; ours on top made the skin mottled. */
.hiw-card.is-photo::after{ opacity: .16; }

/* ---- card 1: indigo into lavender, the blue reference ------------------- */
.hiw-card-1{
  background:
    radial-gradient(ellipse 95% 78% at 14% 92%,
      #EEDCF7 0%, #D3B8F2 16%, #9E8CEE 32%, #6355DC 50%, #3B2F9E 66%, transparent 84%),
    radial-gradient(ellipse 85% 65% at 58% 26%,
      #5B57D8 0%, #332E7A 44%, transparent 76%),
    linear-gradient(152deg, #14141F 0%, #1B1932 42%, #0B0B14 100%);
}

/* ---- card 2: the light plate the phone stands on ----------------------- */
.hiw-card-2{ background: linear-gradient(180deg, #FAF9F7 0%, #F1EFEA 100%); }

/* ---- card 3: purple into magenta into ember, the warm reference --------- */
.hiw-card-3{
  background:
    radial-gradient(ellipse 72% 58% at 74% 64%,
      #FF9A2E 0%, #F8552C 20%, #E52468 40%, #A81E70 60%, transparent 84%),
    radial-gradient(ellipse 92% 82% at 32% 38%,
      #6B1F6D 0%, #3A1243 52%, transparent 80%),
    linear-gradient(146deg, #090510 0%, #1B0A21 46%, #290B2D 100%);
}

/* ---- card 4: the member ------------------------------------------------
   The only photograph of a person in the row, and it lands on the step that is about
   being one.

   REBUILT 2026-08-16: this was a full-bleed photograph on a near-black card. It is now
   the cut-out that stood on Energy & Anti-Aging, on the same silver field the Choose
   Your Path cards carry — so the member here and the members there read as one system
   rather than as a photo in one section and portraits in another.

   The field is the same three layers as .path-card in styles.css. If that one is
   retuned, retune this with it; they are meant to be indistinguishable. */
.hiw-card-4{
  background:
    radial-gradient(104% 62% at 50% 102%, #F6F6F6 0%, #D8D8DA 26%, rgba(158, 158, 162, 0) 76%),
    radial-gradient(74% 40% at 50% 4%, rgba(0, 0, 0, 0.60), transparent 74%),
    linear-gradient(180deg, #0C0C0D 0%, #2B2B2E 24%, #62626A 46%, #9C9CA3 68%, #CACAD0 88%, #E4E4E8 100%);
  background-color: #0C0C0D;
}
/* A cut-out, so contain-and-place rather than cover-and-crop. Looser than the Choose
   Your Path cards on purpose: the glass panel parks across the bottom third here, and
   at their crop his chest would be behind it with only a face above. */
.hiw-card-4 img{
  position: absolute; z-index: 0;
  top: 3%; left: 50%; transform: translateX(-50%);
  width: auto; height: 150%;
  object-fit: contain; object-position: top center;
}
.hiw-card-4::before{
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* Softened 2026-08-16: this scrim existed to give the glass panel a footing on a
     near-black card. The silver field ends LIGHT, so at the old strength it painted a
     dark band across the bottom of an otherwise bright card. It only has to separate
     the panel now, not build a floor. */
  background: linear-gradient(180deg,
    transparent 0%, transparent 52%,
    rgba(10,10,12,.16) 74%, rgba(6,6,8,.42) 100%);
}
/* Neutral glass here too — the violet-black fill the gradient cards use would
   put the tint straight back in. Also lighter-touch than cards 1 and 3: on a
   portrait the panel is competing with a face, so it gives up some height and
   sits nearer the edge rather than parking across his chest. */
.hiw-card-4 .hiw-glass{ background: rgba(12,12,14,.54); }
.hiw-card-4 .hiw-list{ padding: 8px 10px; }
.hiw-card-4 .hiw-list-head{ padding-bottom: 7px; }
.hiw-card-4 .hiw-row{ padding: 6px 1px; }

/* ---- the numbered chip -------------------------------------------------
   Glass on the art cards, ink-on-paper on the light one — a white chip on the
   light plate would vanish. */
.hiw-num{
  position: absolute; z-index: 5; top: 14px; left: 14px;
  width: 27px; height: 27px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 13px; font-weight: 500; line-height: 1;
  color: #FFFFFF;
  background: rgba(255,255,255,.20);
  border: 1px solid rgba(255,255,255,.26);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
}
.hiw-card.is-light .hiw-num{
  color: var(--charcoal);
  background: rgba(28,28,26,.06);
  border-color: rgba(28,28,26,.10);
}
/* On the photograph the chip has to survive both a blown-out white wall and
   black hair within the same 27px, so it goes dark-glass with a bright rim
   rather than the light glass the gradient cards use. */
.hiw-card.is-photo .hiw-num{
  background: rgba(16,8,26,.44);
  border-color: rgba(255,255,255,.30);
}

/* ---- the glass panel ---------------------------------------------------
   Deliberately NOT pure white at low alpha: over a gradient this saturated a
   white veil greys the colour underneath, so the fill is a dark violet-black
   and the LIGHT comes from the hairline and the text. That keeps the ramp
   reading through the panel. */
.hiw-glass{
  position: absolute; z-index: 2; left: 13px; right: 13px;
  border-radius: 13px; padding: 11px 12px;
  background: rgba(18,12,30,.42);
  border: 1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 10px 26px rgba(6,4,14,.26);
  color: #FFFFFF;
}

/* card 1 — the confirmation */
.hiw-confirm{ top: 30%; }
.hiw-confirm-top{ display: flex; align-items: center; gap: 10px; }
.hiw-confirm-icon{
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.20);
  color: #FFFFFF;
}
.hiw-confirm-title{
  font-family: var(--font-head); font-size: 14px; font-weight: 500;
  line-height: 1.22; letter-spacing: -.01em; margin: 0; flex: 1 1 auto;
}
.hiw-check{ flex: 0 0 auto; color: #FFFFFF; opacity: .92; }
.hiw-confirm-meta{
  display: flex; gap: 10px; margin: 10px 0 0;
  font-size: 11px; color: rgba(255,255,255,.74);
}
.hiw-confirm-meta span + span{
  padding-left: 10px; border-left: 1px solid rgba(255,255,255,.20);
}

/* A free/no-cost badge. The biggest objection to a first call is what it will
   cost, so it is answered on the artwork rather than paragraphs away. */
.hiw-badge{
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 10px; padding: 4px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 500;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  color: #FFFFFF;
}

/* the list panel — cards 3 and 4 */
.hiw-list{ padding: 10px 11px; }
.hiw-list-3{ top: 22%; }
.hiw-list-4{ bottom: 13px; }
.hiw-list-head{
  display: flex; align-items: center; gap: 7px;
  padding: 1px 1px 9px; margin-bottom: 2px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  font-size: 11px; font-weight: 500; color: rgba(255,255,255,.90);
}
.hiw-row{ display: flex; align-items: center; gap: 9px; padding: 7px 1px; }
.hiw-row + .hiw-row{ border-top: 1px solid rgba(255,255,255,.10); }
.hiw-row-icon{
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  color: #FFFFFF;
}
.hiw-row-text strong{
  display: block; font-family: var(--font-head);
  font-size: 12px; font-weight: 500; letter-spacing: -.005em;
}
.hiw-row-text span{
  display: block; font-size: 10.5px; color: rgba(255,255,255,.66); margin-top: 1px;
}

/* ---- card 2: the hand holding the phone --------------------------------
   A generated photograph, not a CSS device. The screen was rendered BLANK and
   BLACK on purpose: the app interface is laid over it as live HTML, because a
   generated screen produces garbled pseudo-English, which is not something you
   can put on a clinic site. Black also means the overlay is genuine dark mode
   rather than a dark panel floating on a lit screen.

   The overlay is measured off THIS FILE: the screen occupies 20.2%-79.1%
   across and 4.0%-99.8% down. Replace the photo and those four numbers must be
   re-measured or the interface floats off the glass. The crop is a 570px
   square out of the 1024 render, which is what takes the screen to ~59% of the
   card — about 160px at four abreast, and the reason five system rows fit and
   stay legible. The crop window sits high in the source so the phone rides low
   in the card. */
.hiw-card-2{ background: #F2F0EC; }
.hiw-card-2 img{
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
}
.hiw-screen{
  position: absolute; z-index: 2;
  left: 20.5%; right: 20.9%; top: 12.3%; bottom: 0;
  display: flex; flex-direction: column;
  padding: 11% 9% 0; text-align: left; color: #FFFFFF;
}
/* the app's own top bar */
.hiw-app-mark{
  font-family: var(--font-head); font-size: 7px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.82); margin: 0;
}
.hiw-app-rule{
  width: 100%; height: 1px; margin: 7px 0 11px;
  background: rgba(255,255,255,.14);
}
.hiw-screen-big{
  font-family: var(--font-head); font-size: 13px; font-weight: 500;
  letter-spacing: -.022em; line-height: 1.16; margin: 0 0 10px;
  color: #FFFFFF;
}
/* Rows in dark mode: a violet dot off the brand ramp, the name, and a chevron,
   so it reads as a list you could tap rather than a printed table. */
.hiw-sys{ display: flex; flex-direction: column; }
.hiw-sys span{
  display: flex; align-items: center; gap: 7px;
  font-size: 9px; line-height: 1; padding: 7px 0;
  color: rgba(255,255,255,.90);
  border-top: 1px solid rgba(255,255,255,.10);
}
.hiw-sys span:first-child{ border-top: 0; }
.hiw-sys span::before{
  content: ''; flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%;
  background: #9B6CFF;
}
.hiw-sys span::after{
  content: ''; margin-left: auto; width: 4px; height: 4px;
  border-top: 1px solid rgba(255,255,255,.34);
  border-right: 1px solid rgba(255,255,255,.34);
  transform: rotate(45deg);
}

/* ---- the words under the card ------------------------------------------ */
.hiw-copy{ padding: 20px 2px 0; }
.hiw-copy h3{
  font-family: var(--font-head); font-size: 22px; font-weight: 500;
  letter-spacing: -.028em; line-height: 1.14; margin: 0 0 9px;
  color: var(--charcoal);
}
.hiw-copy p{
  font-size: 14.5px; line-height: 1.55; color: var(--ink-60); margin: 0;
}

/* ---- the flow between cards --------------------------------------------
   A chevron in the gutter, so four separate cards read as one sequence you
   move along rather than four options you choose between. */
@media (min-width: 1041px){
  .hiw-step{ position: relative; }
  .hiw-step + .hiw-step::before{
    content: ''; position: absolute; z-index: 6;
    left: -10px; top: 26%; transform: translate(-50%, -50%);
    width: 18px; height: 18px; opacity: .32;
    background: no-repeat center/18px 18px
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231C1C1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
  }
}

/* ---- responsive --------------------------------------------------------
   4 -> 2 -> 1. Two abreast is the useful middle: the glass panels get their
   width back and the numbered order still reads left-to-right, top-to-bottom. */
@media (max-width: 1040px){
  .hiw-grid{ grid-template-columns: repeat(2, 1fr); gap: 32px 24px; max-width: 760px; margin: 0 auto; }
  .hiw-copy h3{ font-size: 24px; }
}
/* ---- phones: a swipeable rail, not a stack ------------------------------
   Stacked, the four cards ran about 2,600px on a phone — the single longest
   thing on the page. Side by side in a snap rail the section is one card tall
   and you move through the sequence the same left-to-right way the desktop
   layout reads, which is also what the numbers and the chevrons imply.

   The negative margin plus matching padding is what lets the rail bleed to
   both screen edges while the first card still lines up with the container's
   gutter. scroll-padding keeps the snap position off the very edge. */
@media (max-width: 720px){
  /* 56px -> 20px of bottom padding, 2026-08-11. The swipe bars now sit under the
     rail, and 56px below THEM left the section trailing off into empty white
     before the results band. The bars are the section's last element, so they
     are what the padding should be measured from. */
  /* Top padding 64 -> 40 (2026-08-11). Above this section is the hero, which
     ends on a dark field, so the white gap before "HOW IT WORKS" was reading as
     a hole rather than as air. Bottom 20 -> 14 for the same reason under the
     swipe bars. */
  .hiw{ padding: 40px 0 14px; }
  .hiw-lead{ margin-bottom: 22px; font-size: 14px; line-height: 1.5; }

  .hiw-grid{
    display: flex;
    grid-template-columns: none;
    max-width: none;
    gap: 14px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scroll-padding-left: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hiw-grid::-webkit-scrollbar{ display: none; }

  /* 74%, down from 84%: at the wider size a single card filled most of the screen and
     the square plate alone was ~290px tall. The copy scales with it. */
  .hiw-step{
    flex: 0 0 74%;
    scroll-snap-align: start;
    /* Stops a fling carrying past a card and resting between two. */
    scroll-snap-stop: always;
  }
  .hiw-copy h3{ font-size: 18px; margin-bottom: 6px; }
  .hiw-copy p{ font-size: 13.5px; line-height: 1.45; }

  /* ---- swipe indicator (2026-08-11) -------------------------------------
     The rail has been swipeable since it was built, but nothing on screen
     said so: with a card at 74% width the next one peeks in at the edge,
     which reads as a crop rather than an invitation. These bars are the
     same object the proof and comparison rails use, so the gesture is
     signalled the same way everywhere on the page.

     Dark, not light: unlike the other two rails this section sits on white,
     so the bars are charcoal at low alpha rather than white. */
  .hiw-dots{
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
  }
  .hiw-dot{
    width: 22px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    background: rgba(28, 28, 26, 0.20);
    transition: background .28s ease, width .28s ease;
  }
  .hiw-dot.is-active{ width: 40px; background: rgba(28, 28, 26, 0.78); }

  /* …EXCEPT that the comment above stopped being true on 2026-08-16. These steps no
     longer sit on white: they moved into the .services shell, whose field is a
     white-to-black ramp, and the rail lands on the dark half of it. Charcoal bars on
     near-black are invisible, so in that shell they flip — the same flip .hiw-copy
     takes a few rules up. Kept as an override rather than a rewrite so the block is
     still correct if the steps ever move back to a light field. */
  .services .hiw-dot{ background: rgba(242, 240, 247, 0.24); }
  .services .hiw-dot.is-active{ background: rgba(242, 240, 247, 0.85); }
}
