/* The pinned stage and the content that scrolls beside it. Loaded after site.css and overrides it.
   The first half is the base layout (also what narrow screens use, stacked); the second half, under .vc, is the
   desktop layout: logo and stage fixed, menu with two places, content scrolling in a band with faded edges. */

:root {
  --stage-h: max(100svh, 40rem);
  --nav-drop: clamp(2.5rem, 9vh, 5.5rem); /* how far below the top the menu rests before you scroll */
}

.split { position: relative; }

/* ---------- the stage: logo, dots, streams and footage stay put for the whole page ---------- */

.hero {
  position: sticky;
  top: 0;
  height: var(--stage-h);
  min-height: 0;
  margin-bottom: calc(-1 * var(--stage-h));
}

/* nothing leaves any more, so the exit animations go */
.hero__media-inner, .hero__streams, .wordmark { animation: none; }

/* once you're reading, the footage and streams behind the column step back: frosted and washed with the page colour */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
  background: linear-gradient(to right, transparent 36%, color-mix(in srgb, var(--bg) 84%, transparent) 54%);
  -webkit-backdrop-filter: blur(0.625rem);
  backdrop-filter: blur(0.625rem);
  -webkit-mask-image: linear-gradient(to right, transparent 36%, #000 54%);
  mask-image: linear-gradient(to right, transparent 36%, #000 54%);
}
.split.is-reading .hero__scrim { opacity: 1; }

/* ---------- the content column: same two columns as the stage, content in the second ---------- */

.pane-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  padding: 0 var(--gutter);
  pointer-events: none; /* the logo underneath stays clickable */
}

.pane {
  grid-column: 2;
  pointer-events: auto;
  /* the menu rests a little way down; the first bit of scrolling carries it up to the top, where it sticks */
  padding: var(--nav-drop) 0 0 clamp(0rem, 4vw, 4rem);
}

/* the menu rides at the top of the column */
.pane__nav {
  position: sticky;
  top: 0;
  z-index: 5;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);

  /* a frosted strip so text scrolling under it doesn't collide with the links; soft on its left edge */
  &::before {
    content: "";
    position: absolute;
    inset: 0 calc(-1 * var(--gutter)) 0 -3rem;
    z-index: -1;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(0.875rem);
    backdrop-filter: blur(0.875rem);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem);
    mask-image: linear-gradient(to right, transparent, #000 3rem);
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  & nav { display: flex; align-self: stretch; gap: clamp(1.25rem, 3vw, 2.5rem); }

  & nav a {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--muted);
    transition: color 0.2s ease;

    &:hover, &[aria-current="true"] { color: var(--ink); }

    /* the section you're in: a short accent line sitting on the rule */
    &::after {
      content: "";
      position: absolute;
      inset: auto 0 -1px 0;
      height: 2px;
      background: var(--accent);
      scale: 0 1;
      transition: scale 0.3s ease;
    }
    &[aria-current="true"]::after { scale: 1 1; }
  }

  & .theme-toggle { margin-left: auto; }
}
.split.is-reading .pane__nav::before { opacity: 1; }

/* first screen: the headline, level with the logo exactly as before */
.pane__intro {
  min-height: calc(var(--stage-h) - var(--header-h) - var(--nav-drop));
  display: grid;
  align-content: center;

  & .hero__copy { margin: calc(-1vh - var(--nav-drop)) 0 0; }
}

/* the headline block: wider than site.css makes it and a size smaller, so this headline runs as two long lines
   instead of a stack of short ones */
.pane__intro .hero__copy {
  max-width: 48rem;

  & h1 { font-size: clamp(2rem, 2.8vw, 3.125rem); }
}

/* the headline block hugs its words, up to two long lines */
.pane__intro .hero__copy { width: fit-content; max-width: 46rem; }

/* the caption under the headline: wrapped evenly, so no word or two is left alone on a line */
.pane__intro .hero__copy p { max-width: 40rem; text-wrap: balance; }

/* the copy's intro animation, now that it lives outside .hero */
.js .split:has(.hero:not(.is-playing):not(.is-done)) .hero__copy > * { opacity: 0; }
.split:has(.hero.is-playing) .hero__copy > * { opacity: 0; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--after-logo) + 0.25s) forwards; }
.split:has(.hero.is-playing) .hero__copy > :nth-child(2) { animation-delay: calc(var(--after-logo) + 0.4s); }
.split:has(.hero.is-playing) .hero__copy > :nth-child(3) { animation-delay: calc(var(--after-logo) + 0.55s); }
.split:has(.hero.is-playing) .hero__copy > :nth-child(4) { animation-delay: calc(var(--after-logo) + 0.7s); }

/* ---------- sections ---------- */

.pane .section {
  max-width: 36rem;
  margin: 0;
  padding: clamp(4rem, 14vh, 7.5rem) 0;
  scroll-margin-top: calc(var(--header-h) - 2px); /* tucks the section's top rule under the menu's */

  & p {
    margin: 1.25rem 0 0;
    color: color-mix(in srgb, var(--ink) 80%, var(--bg));
    text-wrap: pretty;
  }

  & .lead {
    margin-top: 1.5rem;
    font-size: clamp(1.625rem, 2.5vw, 2.375rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-wrap: balance;
  }

  & h3 { margin: 0; font-size: 1.0625rem; font-weight: 500; }
  & h3.sub { margin-top: 3.5rem; }
}

.pane .section--last { min-height: var(--stage-h); padding-bottom: 2rem; display: flex; flex-direction: column; }

/* three short claims in a row */
.trio {
  list-style: none;
  margin: 2.75rem 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;

  & li {
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.875rem;
    color: var(--muted);
  }
  & strong { display: block; margin-bottom: 0.375rem; font-size: 1rem; font-weight: 500; color: var(--ink); }
}

/* the services, numbered down the column */
.steps {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  counter-reset: step;

  & li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);

    &::before {
      content: counter(step, decimal-leading-zero);
      grid-row: 1 / span 2;
      padding-top: 0.2em;
      font-size: 0.8125rem;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      color: var(--accent);
    }
    &:last-child { border-bottom: 1px solid var(--line); }
  }
  & p { margin-top: 0.375rem; font-size: 0.9375rem; }
}

/* contact: the underlined fields and the button */
.contact {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
  max-width: 26rem;

  & label { display: grid; gap: 0.25rem; font-size: 0.8125rem; font-weight: 500; color: var(--muted); }

  & input, & textarea {
    padding: 0.5rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;

    &:focus { outline: none; border-color: var(--accent); }
  }

  /* the message grows with what's typed, from two lines */
  & textarea { resize: none; field-sizing: content; min-height: 3.5rem; max-height: 12rem; line-height: 1.5; &::placeholder { color: var(--muted); opacity: 0.7; } }

  & .cta { justify-self: start; margin-top: 0.5rem; border: 0; font-family: inherit; cursor: pointer; }
}

.pane__foot { margin-top: auto; padding-top: 4rem; font-size: 0.8125rem; color: var(--muted); }

/* ---------- the demo form's states, the footer links and the cookie banner ---------- */

.contact[hidden], .contact__sent[hidden], .contact__error[hidden], .consent[hidden] { display: none; }
/* sending: the button fades away and leaves a heartbeat running in its place, on a loop */
.contact .cta {
  position: relative;

  & .cta__pulse {
    position: absolute;
    inset: 0.5rem 1rem;
    width: calc(100% - 2rem);
    height: calc(100% - 1rem);
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.75;
    stroke-linejoin: round;
    stroke-dasharray: 34 100;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  }

  &[aria-busy="true"] {
    color: transparent;
    background: transparent;
    pointer-events: none;
    & .cta__pulse { opacity: 1; animation: cta-pulse 1.3s linear infinite; }
  }
}
@keyframes cta-pulse { from { stroke-dashoffset: 34; } to { stroke-dashoffset: -100; } }
@media (prefers-reduced-motion: reduce) {
  .contact .cta[aria-busy="true"] .cta__pulse { animation: none; stroke-dasharray: none; }
}
/* the honeypot field: off screen, only bots fill it in */
.contact .contact__trap { position: absolute; left: -100vw; width: 1px; height: 1px; overflow: hidden; }
.pane .section .contact__note { margin: -0.75rem 0 0; font-size: 0.8125rem; color: var(--muted); & a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; } }
.pane .section .contact__error { margin: -0.75rem 0 0; font-size: 0.875rem; color: var(--accent); }

/* what replaces the form once a request is sent */
.contact__sent {
  margin-top: 2.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 26rem;

  & svg { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.15em; color: var(--accent); }
  & strong { display: block; font-weight: 500; color: var(--ink); }
  & span { color: var(--muted); }
}

/* the footer's links and its "Cookie settings" button, which looks like a link */
.pane__foot a, .pane__foot button { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; &:hover { color: var(--ink); } }
.pane__foot button { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }

/* asked once, bottom right; Accept is the filled button */
.consent {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  width: min(23rem, calc(100vw - 2rem));
  padding: 1rem 1.125rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 1rem 2.5rem -1rem rgb(0 0 0 / 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 0.875rem;
  line-height: 1.45;

  & p { margin: 0; color: var(--ink); }
  & .consent__actions { display: flex; gap: 0.5rem; margin-top: 0.875rem; }
  & button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 62rem;
    background: none;
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;

    &:hover { border-color: var(--ink); }
  }
  & .consent__accept {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);

    &:hover { border-color: var(--accent); background: var(--accent); }
  }
}

/* ---------- narrower screens: back to a stacked page, stage on top ---------- */

@media (max-width: 56rem) {
  .hero {
    position: relative;
    height: 62svh;
    min-height: 26rem;
    margin-bottom: 0;
    grid-template-rows: 1fr;
  }
  .hero__scrim { display: none; }

  .pane-grid { position: static; display: block; pointer-events: auto; }
  .pane { padding: 0; }

  /* the menu stays at the top of the screen for the whole page. Clear over the stage; frosted, with its rule,
     as soon as you scroll so the page passing under it doesn't collide with the links */
  .pane__nav {
    position: fixed;
    inset: 0 0 auto;
    padding: 0 var(--gutter);
    gap: 0.5rem;
    border-bottom-color: transparent;
    transition: border-color 0.4s ease;

    &::before { inset: 0; -webkit-mask-image: none; mask-image: none; }

    /* the links share the width, so five of them and the theme switch fit a small phone */
    & nav { flex: 1; min-width: 0; gap: 0; justify-content: space-between; }
    & nav a { padding: 0 0.25rem; font-size: 0.8125rem; }
    & nav a:first-child { margin-left: -0.25rem; }
    & .theme-toggle { flex: none; margin-left: 0.5rem; }
  }
  .split.is-raised .pane__nav, .split.is-reading .pane__nav { border-bottom-color: var(--line); }
  .split.is-raised .pane__nav::before { opacity: 1; }

  /* the headline sits on the plain page here, so its shade isn't needed (and it reached past the screen's edge) */
  .pane__intro .hero__copy::before { display: none; }

  .pane__intro { min-height: 0; padding: 0 0 2rem; & .hero__copy { margin: 0; } }
  .pane .section { max-width: none; }
  .trio { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scrim, .pane__nav::before, .pane__nav nav a::after { transition: none; }
}

/* ---------- content blocks: icons, feature grid, graphics ---------- */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent);
}

.pane .section {
  max-width: 40rem;

  & h4 { margin: 0; font-size: 1rem; font-weight: 500; }
  & ul, & ol { list-style: none; margin: 0; padding: 0; }
  & li p, & .duo p { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.45; }
  & h3.sub { margin-top: 4.5rem; font-size: 1.25rem; letter-spacing: -0.01em; }
}

/* blocks ease in the first time they're scrolled to (content.js adds .is-in) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; translate: 0 1.25rem; transition: opacity 0.7s ease, translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js [data-reveal].is-in { opacity: 1; translate: 0 0; }
}

/* a soft panel: the page colour, mostly opaque, so blocks read as one object over the footage */
.cards li, .stages li, .modalities, .insight {
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
}

/* ---------- the ways to run Influx: three options over a board of parts you can switch (content.js) ---------- */

.plan {
  margin-top: 2.75rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: color-mix(in srgb, var(--bg) 62%, transparent);
}

/* the three options, as one pill */
.plan__tabs {
  display: inline-flex;
  padding: 0.1875rem;
  border: 1px solid var(--line);
  border-radius: 62rem;

  & button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 1rem 0.4375rem 0.8125rem;
    border: 0;
    border-radius: 62rem;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;

    & .ico { width: 1rem; height: 1rem; color: inherit; }
    &:hover { color: var(--ink); }
    &[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
  }
}

.pane .section .plan__pitch { margin-top: 1rem; min-height: 3em; font-size: 0.9375rem; }

/* the parts: three groups, each a row of tiles */
.plan__board {
  margin-top: 1rem;
  display: grid;
  gap: 1.25rem;
}

.plan__group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;

  & h4 { grid-column: 1 / -1; font-size: 0.75rem !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
}

/* one part, as a tile: its icon, where it comes from, its name.
   From Influx: lit in orange. Yours: dashed edge, plain icon. Off: faint */
.module {
  display: grid;
  grid-template: "icon state" auto "name name" 1fr / auto 1fr;
  gap: 0.75rem 0.5rem;
  align-items: start;
  min-height: 6.25rem;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 0.75rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, transparent), color-mix(in srgb, var(--accent) 3%, transparent) 70%);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, opacity 0.3s ease, translate 0.2s ease;

  &:hover { border-color: var(--accent); translate: 0 -2px; }

  /* the icon in its own small square */
  & .module__icon {
    grid-area: icon;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5625rem;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    transition: background-color 0.3s ease;

    & .ico { width: 1.25rem; height: 1.25rem; transition: color 0.3s ease; }
  }
  & .module__name { grid-area: name; align-self: end; font-weight: 500; text-wrap: balance; }
  & .module__state {
    grid-area: state;
    justify-self: end;
    padding: 0.125rem 0.5rem;
    border-radius: 62rem;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--accent);
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  &[data-state="yours"] {
    border: 1px dashed color-mix(in srgb, var(--ink) 40%, transparent);
    background: none;

    & .module__icon { background: color-mix(in srgb, var(--ink) 10%, transparent); }
    & .module__icon .ico { color: var(--ink); }
    & .module__state { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
  }

  &[data-state="off"], &[data-state="none"] {
    border-color: var(--line);
    background: none;
    color: var(--muted);
    opacity: 0.55;

    & .module__icon { background: color-mix(in srgb, var(--ink) 7%, transparent); }
    & .module__icon .ico { color: var(--muted); }
    & .module__state { background: none; padding-inline: 0; color: var(--muted); }
  }
}

/* the one part that is never optional */
.plan__engine {
  margin-top: 1.25rem;
  padding: 0.75rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 0.5rem;
  box-shadow: 0 0 2rem color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 0.875rem;

  & .ico { width: 1.125rem; height: 1.125rem; }
  & strong { font-weight: 500; white-space: nowrap; }
  & span { color: var(--muted); }

  /* a heartbeat running off the end of the bar */
  & .plan__beat {
    flex: 1 1 4rem;
    min-width: 3rem;
    height: 1.5rem;
    margin-left: auto;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.25;
    stroke-linejoin: round;
    opacity: 0.8;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 30%, #000 70%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 30%, #000 70%, transparent);

    & path { vector-effect: non-scaling-stroke; }
  }
}

/* four facts called out in a row: a large ringed icon, a strong title, one line, all centred */
.facts {
  margin: 4.5rem 0 4.5rem !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem 1.75rem;
  text-align: center;

  & li { display: grid; justify-items: center; align-content: start; }

  /* the icon, in a ring with a soft glow */
  & .ico {
    box-sizing: content-box;
    width: 2rem;
    height: 2rem;
    padding: 1.125rem;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 9%, transparent);
    box-shadow: 0 0 2.5rem color-mix(in srgb, var(--accent) 14%, transparent);
    stroke-width: 1.4;
  }

  & h4 { margin-top: 1.25rem; font-size: 1.1875rem !important; letter-spacing: -0.01em; text-wrap: balance; }
  & p { max-width: 15rem; margin-top: 0.5rem !important; text-wrap: balance; }
}

/* two columns of icon, name, one line */
.features {
  margin-top: 3.5rem !important;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 2.5rem;

  & h4 { margin-top: 0.75rem; }
}

/* the perfusion map beside the modality names */
.modalities {
  margin-top: 1.5rem;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;

  & p { margin-top: 1rem; font-size: 0.9375rem; }
}

.bullseye {
  width: 100%;
  height: auto;
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 34%, transparent);
  stroke-width: 1;

  & .is-hit { fill: color-mix(in srgb, var(--accent) calc(var(--hit) * 100%), transparent); }
}

.trace {
  display: block;
  width: 100%;
  height: 2.5rem;
  margin-top: 1rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.25;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.8;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 80%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 80%, transparent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;

  flex-wrap: nowrap;
  gap: 0;

  /* plain labels, not pills, so they don't read as buttons; every item carries its own trailing dot so the
     two copies in the ticker join without a seam */
  & li {
    flex: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
  }
  & li::after {
    content: "\00b7";
    margin: 0 0.75rem;
    color: var(--accent);
  }
}

/* the modality list as one line that scrolls by on its own: the list is in twice, and the track slides left by
   exactly one copy before it loops, so the join can't be seen */
.ticker {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}
/* once content.js drives it: no CSS animation, a pointer to say it can be grabbed, and no text selection while dragging.
   pan-y keeps vertical page scrolling working on touch */
.ticker.is-live {
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;

  & .ticker__track { animation: none; }
}
@keyframes ticker { to { translate: -50% 0; } }

/* no motion wanted: show the single list, wrapped, and drop the copy */
@media (prefers-reduced-motion: reduce) {
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker__track { animation: none; width: auto; }
  .ticker .chips { flex-wrap: wrap; row-gap: 0.25rem; }
  .ticker .chips[aria-hidden="true"] { display: none; }
}


/* "Cardiology" over the headline, in the accent colour, with a strong soft glow of the page colour (black on the
   dark theme, the warm off-white on the light one): stacked layers clear a calm pocket behind the word, so it
   stands off the video */
.hero__copy .eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow:
    0 0 0.25rem var(--bg),
    0 0 0.5rem var(--bg),
    0 0 0.875rem var(--bg),
    0 0 1.375rem var(--bg),
    0 0 2rem var(--bg);
}

/* a product name set beside a heading */
h3.sub .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: 0.75rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 62rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  vertical-align: middle;

  & .ico { width: 0.875rem; height: 0.875rem; }
}

/* three small cards in a row */
.cards, .stages {
  margin-top: 1.5rem !important;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;

  & li { padding: 1.125rem; }
  & h4 { margin-top: 0.75rem; }
}
.stages { margin-top: 2.75rem !important; }

/* a single line with an icon in front */
.pane .section .note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 2rem;
  font-size: 0.9375rem;

  & .ico { width: 1.25rem; height: 1.25rem; margin-top: 0.1em; }
}

/* the two flows, side by side: imaging and practice */
.flows {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;

  & .flows__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3125rem !important;
    letter-spacing: -0.01em;

    /* the side's icon, in a ring like the stops below it */
    & .ico {
      box-sizing: content-box;
      width: 1.25rem;
      height: 1.25rem;
      padding: 0.6875rem;
      border-radius: 50%;
      background: color-mix(in srgb, var(--accent) 16%, transparent);
    }
  }
  & .flows__about { margin-top: 0.75rem !important; min-height: 3em; font-size: 0.9375rem; color: var(--muted) !important; }
  & .flow { margin-top: 1.5rem !important; }
  & .flow li { padding-bottom: 1.375rem; }
}

/* one flow: stops down a line */
.flow {
  margin-top: 2.75rem !important;

  & li {
    position: relative;
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    gap: 1.25rem;
    padding-bottom: 1.75rem;

    /* the line to the next stop */
    &:not(:last-child)::before {
      content: "";
      position: absolute;
      left: calc(1.375rem - 0.5px);
      top: 2.75rem;
      bottom: 0;
      width: 1px;
      background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 70%, transparent), var(--line));
    }
    &:last-child { padding-bottom: 0; }
  }
  & h4 { padding-top: 0.625rem; }

  & .flow__dot {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg) 70%, transparent);

    & .ico { width: 1.25rem; height: 1.25rem; }
  }
}

/* the chart over two short lists */
.insight {
  margin-top: 1.5rem;
  padding: 1.5rem;
}

.chart {
  display: block;
  width: 100%;
  height: auto;

  & .chart__bars { fill: color-mix(in srgb, var(--ink) 16%, transparent); }
  & .chart__line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
  & .chart__dots { fill: var(--accent); }
}

.duo {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;

  & h4 { display: flex; align-items: center; gap: 0.625rem; }
  & h4 .ico { width: 1.25rem; height: 1.25rem; }
  & ul { margin-top: 0.75rem !important; display: grid; gap: 0.375rem; font-size: 0.9375rem; color: color-mix(in srgb, var(--ink) 80%, var(--bg)); }
  & ul li { padding-left: 1rem; position: relative; }
  & ul li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.25rem; height: 0.25rem; border-radius: 50%; background: var(--accent); }

  &.duo--plain { margin-top: 2.5rem; & > div { padding-top: 1rem; border-top: 1px solid var(--line); } }
}

/* four figures in a row */
.stats {
  margin: 2.75rem 0 2rem !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;

  & li { padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
  & strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: clamp(1.75rem, 2.6vw, 2.5rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
  }
}

@media (max-width: 75rem) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stages, .cards { grid-template-columns: minmax(0, 1fr); }
  .stages li, .cards li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: 1rem; & h4 { margin-top: 0; } & p { grid-column: 2; } }
}

@media (max-width: 56rem) {
  .facts, .flows { grid-template-columns: minmax(0, 1fr); }
  .plan__group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan__tabs button { padding-inline: 0.625rem 0.75rem; white-space: nowrap; }
  .plan__engine { flex-wrap: wrap; & .plan__beat { display: none; } }
  .features, .duo { grid-template-columns: minmax(0, 1fr); }
  .modalities { grid-template-columns: minmax(0, 1fr); & .bullseye { max-width: 11rem; } }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* phones: the three options share the row so each label stays on one line; the smallest drop the icons to fit */
@media (max-width: 30rem) {
  .plan__tabs { display: flex; }
  .plan__tabs button { flex: 1 1 auto; justify-content: center; gap: 0.3125rem; padding-inline: 0.375rem; font-size: 0.8125rem; }
}
@media (max-width: 22.4375rem) {
  .plan__tabs button svg { display: none; }
  /* and the menu tightens so the last link clears the theme switch */
  .pane__nav nav a { padding: 0 0.125rem; font-size: 0.75rem; letter-spacing: 0; }
  .pane__nav nav a:first-child { margin-left: -0.125rem; }
}

/* touch screens keep :hover on the last thing tapped, which left a tapped menu link looking like the current one */
@media (hover: none) {
  .pane__nav nav a:hover:not([aria-current="true"]) { color: var(--muted); }
}

/* ---------- desktop layout (.vc on body) ----------
   The big logo and the stage never change. The menu rests just above the headline and, once you
   scroll, rides up to a stop a little below the top of the screen. Content scrolls in a band beside the logo:
   it comes up from the bottom and fades out again under the menu.
   Desktop widths only; narrower screens keep the stacked layout. */

@media (min-width: 56.0625rem) {
  .vc {
    --nav-h: 3rem;
    --stage-h: 100vh; /* the stage is exactly the screen here: the page itself doesn't scroll, the content band does */
    --nav-stick: clamp(1rem, 8vh, 6rem);  /* where the menu stops, measured from the top of the screen */
    /* where the menu rests: on the dark wall of the footage, above the monitors (their top edge sits about 27-31% down) */
    --nav-drop: max(var(--nav-stick), calc(21vh - var(--nav-h)));
    /* the logo's right edge, from the content area's left edge, so the column can always clear it */
    --area-width: calc(100vw - 2 * var(--gutter));
    --logo-right: calc(var(--area-width) * 5 / 22 + clamp(15rem, 29vw, 27rem) / 2);
    --column-left: max(calc(var(--area-width) / 2 - 25rem), calc(var(--logo-right) + 4rem));
    --headline-left: calc(var(--area-width) * 5 / 11 + clamp(0rem, 4vw, 4rem));
  }

  /* the page is one screen and stays put; the stage fills it */
  .vc .split { height: 100vh; overflow: hidden; }
  .vc .hero { margin-bottom: 0; }

  /* the content area is laid over the whole screen */
  .vc .pane-grid { position: fixed; inset: 0; display: block; padding: 0; pointer-events: auto; }
  .vc .pane { height: 100%; padding: 0; }

  /* the band: content scrolls inside this box, and the box's edges do the fading. The fade is part of the box and
     never moves, so however fast the content goes it can't get ahead of it (an earlier version moved a mask with the
     scroll, and fast scrolling outran it). The top padding is the room the resting menu takes */
  .vc .pane__body {
    --fade-from: calc(var(--nav-stick) + var(--nav-h));
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    padding: calc(var(--nav-drop) + var(--nav-h)) var(--gutter) 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent var(--fade-from), #000 calc(var(--fade-from) + 5rem), #000 calc(100% - 8rem), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent var(--fade-from), #000 calc(var(--fade-from) + 5rem), #000 calc(100% - 8rem), transparent 100%);
  }

  /* the menu: just the links, lined up with the headline, no bar behind them */
  /* it has two places and never slides between them: menu.js fades it out in one and in again in the other.
     Resting: on the wall, lined up with the headline */
  .vc .pane__nav {
    position: fixed;
    top: var(--nav-drop);
    left: calc(var(--gutter) + var(--headline-left));
    width: fit-content;
    height: var(--nav-h);
    border-bottom: 0;
    pointer-events: auto;

    &::before { display: none; }
    & nav a::after { inset: auto 0 0.3125rem 0; height: 1.5px; }
    & nav a:is(:hover, :focus-visible)::after { scale: 1 1; }
  }

  /* until the intro brings the menu in (menu.js adds .is-menu-in), the links aren't there */
  .js .vc .split:not(.is-menu-in) .pane__nav nav { visibility: hidden; }

  /* the copy waits for the menu: held back until menu.js adds .is-copy-in, then headline, paragraph and button
     fade in and up one after another (the page's own "rise") */
  .js .vc .split:has(.hero.is-playing):not(.is-copy-in) .hero__copy > * { animation: none; opacity: 0; }
  .vc .split.is-copy-in:has(.hero.is-playing) .hero__copy > * { animation-delay: 0s; }
  .vc .split.is-copy-in:has(.hero.is-playing) .hero__copy > :nth-child(2) { animation-delay: 0.15s; }
  .vc .split.is-copy-in:has(.hero.is-playing) .hero__copy > :nth-child(3) { animation-delay: 0.3s; }
  .vc .split.is-copy-in:has(.hero.is-playing) .hero__copy > :nth-child(4) { animation-delay: 0.45s; }

  /* raised: near the top of the screen, at the content column's left edge */
  .vc .split.is-raised .pane__nav { top: var(--nav-stick); left: calc(var(--gutter) + var(--column-left)); }

  /* the theme switch leaves the menu for the corner of the screen */
  .vc .theme-toggle { position: fixed; top: 1.125rem; right: var(--gutter); }

  /* first screen: the headline where it has always been, level with the logo */
  .vc .pane__intro {
    min-height: calc(var(--stage-h) - var(--nav-h) - var(--nav-drop));
    grid-template-columns: minmax(0, 1fr);

    & .hero__copy { margin: calc(-1vh - var(--nav-drop) - var(--nav-h) + var(--header-h)) 0 0 var(--headline-left); }
  }

  /* content: a column that starts clear of the logo, centred when the screen is wide enough */
  .vc .pane .section {
    max-width: 50rem;
    margin-left: var(--column-left);
    padding-block: clamp(3rem, 9vh, 5.5rem);
    scroll-margin-top: calc(var(--nav-stick) + var(--nav-h));
    border-top: 0;
  }
  .vc .pane .section > p, .vc .pane .section > .lead { max-width: 40rem; }
  .vc .pane .section--last { min-height: calc(100vh - var(--nav-stick) - var(--nav-h)); padding-bottom: 9rem; }

  /* the wash starts just right of the logo, so the logo and the streams through it are never dimmed */
  .vc .hero__scrim {
    --wash-from: calc(var(--gutter) + var(--logo-right));
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent var(--wash-from), #000 calc(var(--wash-from) + 6rem));
    mask-image: linear-gradient(to right, transparent var(--wash-from), #000 calc(var(--wash-from) + 6rem));
  }
}

/* ---------- the trace: in the intro an ECG line swoops from the logo and uncovers the menu ---------- */

/* menu.js builds this over the whole screen for one run, then removes it */
.trace-run {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: visible;

  & path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.75;
    stroke-linejoin: round;
    stroke-linecap: butt;
  }
}

/* the dot that leads the line; menu.js moves it along the route, centred on the line */
.trace-run__dot {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 21;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0.75rem 0.125rem color-mix(in srgb, var(--accent) 75%, transparent);
  pointer-events: none;
}
