/* My Health, "Your health, beyond the visit." (28 Oct, feature cards; the 27 Oct app window is archived in
   09_Archive/My Health window section - before WHOOP-style cards - 2026-10-28/). Presentation after WHOOP's "Start reaching
   your goals": large rounded photo cards in one sideways row, the real My Health phone screen laid over the left of each
   photo, the feature title and one line under it, one action under the row. Site type and palette: Starlight ground, Void
   type, no Gold on Starlight (the action is a Void button, as the header's on light sections). Photos are Cinema Studio
   illustrations; the phone screens are the live portal at 390 x 844 with its sample data. */
.mh { position: relative; z-index: 7; background: var(--star); color: var(--void);
  --mh-gap: clamp(16px, 1.8vw, 28px); --mh-card: min(62vw, 960px, 82vh); /* 82vh: heading, photo and title fit one screen */
  padding: clamp(64px, 6vw, 104px) var(--m) clamp(72px, 7vw, 112px); }
.mh ::selection { background: var(--void); color: var(--star); }

/* Heading left, arrows right (as Wellness). */
.mh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.mh-h { margin: 0; max-width: 12em; font: 400 clamp(32px, 3.4vw, 54px)/1.02 var(--f-display); letter-spacing: -0.04em; color: var(--void); text-wrap: balance; }
.mh-h:focus { outline: none; }
.mh-lead { margin: 14px 0 0; max-width: 34em; font-size: var(--t-lead); line-height: 1.5; color: rgba(14, 14, 15, 0.7); text-wrap: pretty; }
.mh-nav { display: none; }
html.js .mh-nav:not([hidden]) { display: flex; gap: 8px; flex: none; }
.mh-btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 1px rgba(14, 14, 15, 0.22); color: var(--void);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease; }
.mh-btn svg { width: 24px; height: 24px; fill: currentColor; }
.mh-btn:hover:not(:disabled) { background: rgba(14, 14, 15, 0.06); box-shadow: inset 0 0 0 1px rgba(14, 14, 15, 0.4); }
.mh-btn:disabled { opacity: 0.32; cursor: default; }
.mh-btn:focus-visible { outline: 2px solid var(--void); outline-offset: 2px; }

/* The row runs to the right screen edge; one card and a glimpse of the next. */
.mh-rail { margin-top: clamp(32px, 3.4vw, 48px); margin-right: calc(-1 * var(--m)); }
.mh-track { list-style: none; margin: 0; padding: 0 var(--m) 8px 0; display: flex; gap: var(--mh-gap); overflow-x: auto;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mh-track::-webkit-scrollbar { display: none; }
.mh-track:focus-visible { outline: 2px solid var(--void); outline-offset: 4px; border-radius: 24px; }
.mh-card { flex: 0 0 var(--mh-card); margin: 0; scroll-snap-align: start; }

/* Photo with the phone over its left side. */
.mh-media { position: relative; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; background: rgba(14, 14, 15, 0.06); isolation: isolate; }
.mh-photo, .mh-photo img { display: block; width: 100%; height: 100%; }
.mh-photo img { object-fit: cover; object-position: 60% 50%; transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
/* A soft light veil on the left, only behind the phone, so its edge reads on any photo. */
.mh-media::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 14, 15, 0.16) 0%, rgba(14, 14, 15, 0) 42%); }
.mh-phone { position: absolute; z-index: 1; left: 7%; top: 50%; height: 86%; width: auto; aspect-ratio: 780 / 1688;
  transform: translateY(-50%); border-radius: clamp(22px, 2.6vw, 38px); background: #F3F2F0;
  box-shadow: 0 0 0 clamp(4px, 0.42vw, 6px) var(--void), 0 30px 60px rgba(14, 14, 15, 0.28), 0 8px 18px rgba(14, 14, 15, 0.16);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
@media (hover: hover) and (pointer: fine) {
  .mh-card:hover .mh-photo img { transform: scale(1.03); }
  .mh-card:hover .mh-phone { transform: translateY(calc(-50% - 6px)); }
}
.mh-ct { margin: 22px 0 0; font: 400 clamp(22px, 1.9vw, 28px)/1.15 var(--f-display); letter-spacing: -0.02em; color: var(--void); }
.mh-cd { margin: 8px 0 0; max-width: 36em; font-size: 16px; line-height: 1.5; color: rgba(14, 14, 15, 0.7); text-wrap: pretty; }

/* Under the row: the sample-data note left, one action right (stacked and full width on phones). */
.mh-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: clamp(36px, 4vw, 56px);
  padding-top: 24px; border-top: 1px solid rgba(14, 14, 15, 0.12); }
.mh-note { margin: 0; font-size: 14px; line-height: 1.5; color: rgba(14, 14, 15, 0.6); }
.mh-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 0; border-radius: 12px;
  background: var(--void); color: var(--star); font: 400 16px/1.2 var(--f-text); cursor: pointer; transition: background-color 0.25s ease, transform 0.2s ease; }
.mh-cta:hover { background: #2a2a2b; }
.mh-cta:active { transform: scale(0.985); }
.mh-cta:focus-visible { outline: 2px solid var(--void); outline-offset: 3px; }

/* Tablets: bigger cards, still a glimpse of the next. */
@media (max-width: 1099px) { .mh { --mh-card: 82vw; } }
/* Phones: portrait photos (their own crop), the phone centred low over the photo, swipe with a peek; no arrows. */
@media (max-width: 759px) {
  .mh { --mh-card: 86vw; padding: 48px var(--m) calc(56px + env(safe-area-inset-bottom)); }
  html.js .mh-nav:not([hidden]) { display: none; }
  .mh-lead { font-size: 16px; }
  .mh-media { aspect-ratio: 4 / 5; border-radius: 20px; }
  .mh-media::after { background: linear-gradient(30deg, rgba(14, 14, 15, 0.2) 0%, rgba(14, 14, 15, 0) 50%); }
  /* The portrait crops keep the person right of centre (export script in the asset folder), so the phone sits bottom left. */
  .mh-phone { left: 6%; top: auto; bottom: 6%; height: 72%; transform: none; border-radius: 22px;
    box-shadow: 0 0 0 4px var(--void), 0 22px 44px rgba(14, 14, 15, 0.3), 0 6px 14px rgba(14, 14, 15, 0.16); }
  .mh-ct { margin-top: 18px; font-size: 22px; }
  .mh-foot { flex-direction: column; align-items: stretch; gap: 16px; }
  .mh-cta { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .mh-photo img, .mh-phone, .mh-btn, .mh-cta { transition: none; }
  .mh-track { scroll-behavior: auto; }
}
