/* Preview edits (Nov 2026) — layout changes layered on top of the live
   site's styles. Kept in one file so they are easy to port to the source. */

/* Results: NMC slide without the video — quote runs the full width. */
.stories__slide--quote {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.stories__slide--quote .stories__quote p {
  max-width: none;
}

/* Results: tighter section — smaller Firstsource logo (it set the height
   of both slides) and less padding below the slides. */
.stories__results-logo {
  height: 64px;
}
@media (min-width: 768px) {
  .stories__slide { padding-bottom: 40px; }
}
@media (max-width: 767px) {
  .stories__results-logo { height: 56px; }
  /* Phones stack each slide, so the taller Firstsource slide used to set the
     height for both and leave a gap under the NMC quote. Collapse the hidden
     slide so the section is only as tall as the slide being shown. */
  .stories__slide[aria-hidden="true"] {
    max-height: 0;
    overflow: hidden;
  }
}

/* Research: split into two columns, each with its own eyebrow. */
.research__aside--split {
  gap: var(--intro-gap);
  padding-top: 0;
}
/* Pills spread out a little (more space between and inside them) so the
   Research column fills more of the section and balances the left column. */
.research__aside--split .research__chips {
  gap: 16px 12px;
  margin-bottom: 12px;
}
.research__aside--split .research__chip {
  padding: 11px 18px;
}

/* Work Knowledge Graph animation between the heading and the lead. */
.research__video {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  margin-inline: auto; /* centred in its column */
  border-radius: var(--r-sm);
}
/* The Research column used to push its button to the bottom of the row;
   with the taller left column that opened a gap under the pills. Keep the
   button directly under the pills instead. */
.research__aside--split .research__cta {
  margin-top: 0;
}

/* Research: the Work Knowledge Graph column is taller than the Research
   column, which left a large empty area under "Read research".
   1) Centre the pills + button in the space below the Research eyebrow,
      so the slack is shared above and below instead of all at the bottom.
   2) Match the section's bottom padding to its top (56px, was 96px). */
.research__aside--split .research__chips { margin-top: auto; }
.research__aside--split .research__cta { margin-bottom: auto; }
body.page-grid .research > .container { padding-block: 56px; }
@media (max-width: 767px) {
  body.page-grid .research > .container { padding-block: 40px; }
}

/* How it works: copy on the left, sphere animation on the right.
   Uses the same grid, gap, media box and type sizes as the site's
   original split hero (.hero__top / .hero__media / .hero__title /
   .hero__lead in sections.css) so the two read as one system. */
.how-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  margin-top: 56px;
}
.how-split__copy {
  margin: 0;
  gap: 0;
}
.how-split__copy .screenshot__title {
  margin-top: 16px;            /* eyebrow → title, as .hero__eyebrow */
  /* size, line height and tracking stay the section-heading defaults,
     matching the Product section heading (.bento__title) */
}
.how-split__copy .screenshot__lead {
  margin-top: 28px;            /* title → lead, as .hero__sub-row */
  max-width: 560px;            /* as .hero__lead */
  color: var(--fg-secondary);
  text-wrap: pretty;
}
@media (max-width: 767px) {
  .how-split {
    grid-template-columns: 1fr;
    gap: 40px;                 /* as the stacked hero */
    margin-top: 40px;
  }
  .how-split .hero__media {
    max-width: 560px;
    width: 70%;
    margin-inline: auto;
    order: 0;                  /* below the copy (the hero rule lifts it above) */
  }
}

/* Centred hero: a fixed amount of breathing room above and below the
   headline block (it used to stretch to fill the screen, which left
   ~140px of empty space on each side on a laptop). The trust-logo bar
   stays on the first screen and the next section starts to show below
   it. Tablet and up only; phones keep the natural stacked height. */
@media (min-width: 768px) {
  .hero--centered .hero__top {
    padding-block: 16px 24px;
  }
  /* Headline close under the nav: ~48px from the nav to the title
     (was 56px section padding + 48px above = ~104px). */
  body.page-grid .hero--centered > .container { padding-top: 32px; }
}

/* Centred hero headline: split evenly across its lines rather than
   leaving two words on the last line. */
.hero--centered .hero__title {
  text-wrap: balance;
}

/* Work Knowledge Graph section (homepage): header, then the animation
   large and centred. Section borders and padding follow the Integrations
   section so it sits in the page grid the same way. */
.wkg {
  border-top: 1px solid var(--border);
}
/* Tight to the section lines above and below (was 56px / 96px). */
.page-grid .wkg > .container { padding-block: 20px; }
.wkg__media {
  width: 100%;
}
/* Work Knowledge Graph reuses the How it works split, mirrored. */
.wkg .how-split { margin-top: 0; }
@media (min-width: 768px) {
  .how-split--media-left .wkg__media { order: -1; }
  /* Animation column a little wider than the copy (7:5) so the
     animation reads larger while staying at or near the file's true
     size on Retina screens. */
  .how-split--media-left {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}
.wkg__video {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 767px) {
  .page-grid .wkg > .container { padding-block: 24px; }
}

/* Research + Enterprise-grade security in one section, two equal
   columns split by a hairline. Each column shares the same five rows
   (label, heading, text, content, button) through subgrid, so the
   headings, pills and badges line up across the divide. Research has
   no text row, so its pills and button are placed on rows 4 and 5. */
.trust-split__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(5, auto);
  row-gap: 20px;
}
.trust-split__col {
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  align-items: start;
  justify-items: start;
  min-width: 0;
}
.trust-split__col:first-child { padding-right: 64px; }
.trust-split__col:last-child {
  padding-left: 64px;
  border-left: 1px solid var(--border);
}
.trust-split__col .research__chips { grid-row: 4; }
.trust-split__col .research__cta,
.trust-split__col .compliance__cta {
  grid-row: 5;
  margin-top: 8px;
}
.trust-split__col .compliance__badges { grid-row: 4; }
@media (max-width: 767px) {
  .trust-split__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 0;
  }
  .trust-split__col {
    grid-row: auto;
    grid-template-rows: none;
    row-gap: 20px;
  }
  .trust-split__col .research__chips,
  .trust-split__col .compliance__badges,
  .trust-split__col .research__cta,
  .trust-split__col .compliance__cta { grid-row: auto; }
  .trust-split__col:first-child { padding: 0 0 40px; }
  .trust-split__col:last-child {
    padding: 40px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

/* Work Knowledge Graph heading: even lines in the narrower copy column. */
.wkg .screenshot__title { text-wrap: balance; }

/* Research + Security balance:
   - Research pills start straight under the heading (taking the row
     Security uses for its text) and spread evenly down to the button.
   - Security badges sit in the middle of their row, so the space above
     and below them is even instead of all falling under the badges. */
@media (min-width: 768px) {
  .trust-split__col .research__chips {
    grid-row: 3 / 5;
    align-self: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
  }
  .trust-split__col .compliance__badges {
    align-self: center;
  }
}

/* Product page Research (heading left, papers right): same pill
   spacing as the homepage, one per line, 20px apart. */
@media (min-width: 768px) {
  .research__aside .research__chips {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .research__aside .research__cta { margin-top: 8px; }
}

/* Product stages: header cap 720px → 760px so "Turn the agreed process
   into a working workflow." fits on one line at full heading size
   (it needs 726px). Applied to all four stages to keep them consistent. */
.stage__head { max-width: 760px; }

/* Product page Research: centre the label and heading vertically
   against the papers instead of pinning them to the top. */
@media (min-width: 768px) {
  .research__layout > .research__intro {
    justify-content: center;
  }
}

/* How it works: less height. The sphere was ~515px tall beside ~180px of
   copy, so the section carried ~170px of empty space above and below the
   text. Cap the sphere (centred in its column), and trim the space above
   the split and at the bottom of the section. */
@media (min-width: 768px) {
  .how-split { margin-top: 40px; }
  .how-split .hero__media {
    width: 100%;
    max-width: 440px;
    justify-self: center;
  }
  body.page-grid .hero--centered > .container { padding-bottom: 48px; }
}

/* Hero sphere stage: the full cube sphere under the trust-logo bar,
   centred and nearly rail to rail, with How Opus works centred on top of
   it. Both share one grid cell, so the copy sits on the sphere's vertical
   middle at any width. Order in the hero: copy, trust-logo bar, stage.
   The card background and rounded corners are dropped so the video's
   near-white frame melts into the page. */
.hero__stage {
  display: grid;
  /* the video frame has empty space above and below the sphere; pull the
     stage up under the logo bar and the next section up under the sphere */
  margin-block: 4px -56px;
}
.hero__stage > * {
  grid-area: 1 / 1;
}
.hero__media--sphere {
  width: min(1100px, 100%);
  justify-self: center;
  background: transparent;
  border-radius: 0;
  /* soft fade on every edge so the frame's edges never show */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 4%, #000 94%, transparent 100%),
                      linear-gradient(to right, transparent 4%, #000 16%, #000 84%, transparent 96%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, transparent 0%, #000 4%, #000 94%, transparent 100%),
                      linear-gradient(to right, transparent 4%, #000 16%, #000 84%, transparent 96%);
          mask-composite: intersect;
  pointer-events: none;
}
.hero__media--sphere .hero__video {
  mix-blend-mode: multiply;   /* the frame's off-white disappears on white */
  filter: brightness(1.04);   /* lifts the frame's ~245 grey to pure white */
}
/* How Opus works: centred over the sphere's middle, with a soft white
   glow behind the copy so it reads over the cubes. */
.hero__stage .how-split {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  margin-top: 0;
  max-width: 720px;
}
.hero__stage .how-split::before {
  content: "";
  position: absolute;
  inset: -90px -140px;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(255 255 255 / 0.96) 55%, rgb(255 255 255 / 0.8) 72%, rgb(255 255 255 / 0) 100%);
  pointer-events: none;
}
.hero__stage .screenshot__eyebrow { justify-content: center; }
.hero__stage .screenshot__lead { margin-inline: auto; }
@media (max-width: 767px) {
  .hero__media--sphere { width: 100%; }
  .hero__stage .how-split::before { inset: -40px -24px; }
}

/* Trust-logo bar a little closer to the hero buttons (56px → 32px). */
@media (min-width: 768px) {
  .page-grid .hero--centered .trust-bar { margin-top: 32px; }
}

/* Results: both customer quotes on the page at once (the carousel is
   gone). Two quote cards side by side in rail-to-rail cells split by a
   hairline, then a full-width band with the Firstsource numbers. Each card
   has an oversized brand-blue quote mark, a large quote, and a soft blue
   glow in its corner that warms up on hover. Phones stack everything. */
.quotes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 40px calc(-1 * var(--gutter)) 0;
  border-top: 1px solid var(--border);
}
.quote-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
  padding: 48px var(--gutter) 44px;
  overflow: hidden;
  isolation: isolate;
}
.quote-card + .quote-card { border-left: 1px solid var(--border); }
.quote-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px circle at 0% 0%, rgb(var(--brand-rgb) / 0.09), transparent 62%);
  opacity: 0.7;
  transition: opacity 400ms ease;
}
.quote-card:hover::before { opacity: 1; }
.quote-card::after { /* brand accent line along the top of each card */
  content: "";
  position: absolute;
  left: var(--gutter);
  top: -1px;
  width: 64px;
  height: 2px;
  background: var(--brand);
  transition: width 500ms cubic-bezier(.2, .7, .2, 1);
}
.quote-card:hover::after { width: 160px; }
.quote-card__mark {
  display: block;
  height: 56px;
  font-size: 140px;
  line-height: 0.9;
  font-weight: 500;
  color: var(--brand);
  letter-spacing: -0.04em;
  user-select: none;
}
.quote-card__text { margin: 0; }
.quote-card__text p {
  margin: 0;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.38;
  letter-spacing: -0.012em;
  color: var(--fg);
  text-wrap: pretty;
}
.quote-card__person {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.quote-card__logo {
  display: block;
  height: 48px;
  width: auto;
  flex-shrink: 0;
}
.quote-card__logo--nmc { /* square image, wordmark in a thin middle band;
                           60px tall like the Firstsource crop so the
                           two person rows line up */
  width: 150px;
  height: 60px;
  object-fit: cover;
  margin-left: -11px;
}
/* Firstsource: the mark sits in the middle of a wide white image; the
   wrapper crops to the mark (x 65-335, y 65-180 of 400x241) at 0.52 scale. */
.quote-card__logo-crop {
  display: block;
  flex-shrink: 0;
  width: 140px;
  height: 60px;
  overflow: hidden;
}
.quote-card__logo-crop img {
  display: block;
  width: 208px;
  height: auto;
  margin: -33px 0 0 -34px;
}
.quote-card__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
  min-width: 0;
}
.quote-card__name { font-weight: 500; font-size: 15px; color: var(--fg); }
.quote-card__role { font-size: 14px; color: var(--fg-secondary); }

/* Firstsource results band across both columns */
.quotes__results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.quotes__results-label {
  margin: 0;
  max-width: 140px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.quotes__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
}
.quotes__stat { margin: 0; }
.quotes__stat-num {
  font-size: clamp(36px, 3.6vw, 52px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--brand) 0%, rgb(var(--brand-rgb) / 0.55) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.quotes__stat-label {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg-secondary);
}
.quotes__cta { margin: 0; }

@media (max-width: 1023px) {
  .quotes__results { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .quotes__results-label { max-width: none; }
}
@media (max-width: 767px) {
  .quotes { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .quote-card { padding: 36px var(--gutter) 32px; gap: 20px; }
  .quote-card + .quote-card { border-left: 0; border-top: 1px solid var(--border); }
  .quote-card__mark { font-size: 104px; height: 40px; }
  .quotes__stats { gap: 16px; }
  .quotes__stat-num { font-size: 32px; }
  .quotes__stat-label { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .quote-card::before, .quote-card::after { transition: none; }
}

/* Product: one graphic (the agent-canvas screenshot with the animated
   cursors) replaces the four per-stage mocks. The four stages follow as
   text in one row of four cells (two by two on tablet, stacked on phones). */
.bento .screenshot--hero { margin-top: 40px; }
/* the four stages now sit above the graphic, so the graphic closes the
   section and needs the bottom padding the cards used to give */
body.page-grid .bento > .container { padding-bottom: 64px; }
.bento__grid--text {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: none;   /* the 2x2 grid's fixed 360px rows were for the mocks */
  grid-auto-rows: auto;
  margin-top: 0;              /* straight under the section divider */
  border-bottom: 1px solid var(--border);
}
@media (max-width: 1023px) {
  .bento__grid--text { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .bento__grid--text { grid-template-columns: minmax(0, 1fr); }
  body.page-grid .bento > .container { padding-bottom: 40px; }
  .bento .screenshot--hero { margin-top: 32px; }
}

/* Hero lead: one sentence on one line from tablet up (the centred hero's
   640px cap would wrap it). Phones wrap naturally. */
@media (min-width: 768px) {
  .hero--centered .hero__lead { max-width: none; white-space: nowrap; }
}

/* Partnership spotlight: copy on the left (as the live site), and on the
   right a small stack of press-release sheets on the light panel. The top
   sheet carries the McKinsey and Applied AI logos, each cropped out of the
   co-brand lockup (hero.png, 2400x1254) so they read large:
     McKinsey   x 270-1010, y 500-750
     Applied AI x 1255-2130, y 545-705
   Crop offsets are % of each crop box's width. The sheets fan out a little
   on hover. */
.spotlight__cell--papers {
  padding: 56px var(--gutter);
  overflow: hidden;
}
.press-stack {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 8.5 / 10;
}
.press-stack__sheet {
  position: absolute;
  inset: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px rgb(14 14 16 / 0.08);
  transition: transform 500ms cubic-bezier(.2, .7, .2, 1);
}
.press-stack__sheet--back { transform: translate(18px, 14px) rotate(5deg); }
.press-stack__sheet--mid  { transform: translate(-12px, 8px) rotate(-3.5deg); }
.press-stack__sheet--front {
  display: flex;
  flex-direction: column;
  padding: 26px 28px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 18px 44px rgb(14 14 16 / 0.12);
}
.spotlight__cell--papers:hover .press-stack__sheet--back { transform: translate(30px, 18px) rotate(8deg); }
.spotlight__cell--papers:hover .press-stack__sheet--mid  { transform: translate(-24px, 10px) rotate(-6deg); }
.spotlight__cell--papers:hover .press-stack__sheet--front { transform: translateY(-4px); }
.press-stack__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.press-stack__kicker { color: var(--brand); }
.press-stack__date { color: var(--fg-muted); }
.press-stack__logos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 30px 0 26px;
}
.press-stack__logo { display: block; overflow: hidden; }
.press-stack__logo img {
  display: block;
  max-width: none;
  filter: brightness(1.03);   /* the lockup's off-white ground becomes white */
  -webkit-user-drag: none;
}
.press-stack__logo--mck { width: 72%; aspect-ratio: 740 / 250; }
.press-stack__logo--mck img { width: 324.3%; margin: -67.6% 0 0 -36.5%; }
.press-stack__logo--aai { width: 76%; aspect-ratio: 875 / 160; }
.press-stack__logo--aai img { width: 274.3%; margin: -62.3% 0 0 -143.4%; }
.press-stack__and {
  font-size: 18px;
  line-height: 1;
  color: var(--fg-muted);
}
.press-stack__lines {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: auto;
}
.press-stack__lines span {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-elevated);
}
.press-stack__lines .is-short { width: 58%; }
@media (max-width: 767px) {
  .spotlight__cell--papers { padding: 40px var(--gutter) 48px; }
  .press-stack { width: min(300px, 82%); }
}
@media (prefers-reduced-motion: reduce) {
  .press-stack__sheet { transition: none; }
}

/* Homepage scroll motion (IIFE #21). `.reveal` is only ever added by the
   script, to content that starts below the fold, so without JS (or with
   reduced motion) everything simply shows. Items fade and rise 28px, with
   a per-item --reveal-delay for a soft stagger inside a group. The Product
   screenshot's scale is set inline by the same script. */
.reveal {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity 700ms ease var(--reveal-delay, 0ms),
    translate 900ms cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0ms);
}
.reveal.is-in {
  opacity: 1;
  translate: 0 0;
}
.bento .screenshot--hero {
  transform-origin: 50% 0;
  will-change: scale;
}
.quotes__stat-num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
}

/* Digital Twin lead in two beats: what Opus does, then the payoff. Each
   beat is its own line block with a set break at its natural pause, and a
   small gap between them. Phones drop the set breaks and wrap naturally. */
.screenshot__lead--beats { text-wrap: wrap; }
.hero__stage .screenshot__lead--beats { max-width: none; }
.lead-beat { display: block; }
.lead-beat + .lead-beat { margin-top: 14px; }
@media (max-width: 767px) {
  .lead-break { display: none; }
}

/* Work Knowledge Graph live counter (IIFE #22): fixed-width digits so the
   sentence never shifts, and a brief brand-blue flash on each tick. */
.live-count {
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  font-weight: 500;
  transition: color 900ms ease;
}
.live-count.is-tick {
  color: var(--brand);
  transition: none;
}

/* Phones (<768px): the sphere is only ~350px wide, too small to carry the
   How Opus works copy on top of it (the copy and its white glow covered
   nearly all of it). Stack instead: sphere full width with nothing over
   it, copy underneath, no glow. IIFE #23 also plays the sphere once here
   rather than scrubbing it. */
@media (max-width: 767px) {
  .hero__stage { margin-block: 4px 0; }
  .hero__stage > .hero__media--sphere { grid-area: 1 / 1; }
  .hero__stage > .how-split {
    grid-area: 2 / 1;
    align-self: start;
    margin-top: 8px;
  }
  .hero__stage .how-split::before { display: none; }
}

/* Hero headline rotator: the second line cycles through phrases
   (#24 in script.js). Every phrase sits in the same grid cell, so the slot
   always reserves the tallest one and nothing below the headline moves.
   Tablet and up keep the line on one row and glide the slot's width to fit
   the phrase showing; phones let the phrase wrap. Without JS only the
   first phrase shows, with its highlight in plain blue. */
.rotator { white-space: nowrap; }
/* The phrases waiting off-screen can be wider than the one showing; clip
   sideways at the headline's edges so they never widen the page. */
.hero__title:has(.rotator) { overflow-x: clip; overflow-clip-margin: 0.2em; }
.rotator__slot {
  display: inline-grid;
  vertical-align: top;
  text-align: left;
}
.rotator__phrase {
  grid-area: 1 / 1;
  width: max-content;
}
.rotator:not(.is-ready) .rotator__phrase:not(.is-in) { visibility: hidden; }
.rotator:not(.is-ready) .rotator__key { color: var(--brand); }
.rotator.is-ready .rotator__slot {
  width: var(--rotator-w, auto);
  transition: width 700ms var(--ease-out);
}

/* Masked roll: each word is a window (.rotator__w, clipped, with room
   below for descenders) and its inner .rotator__wi sits just below it.
   .is-in rolls the words up into view one after another; .is-out rolls
   them on up and out of the top. */
.rotator__w,
.rotator__wi { display: inline-block; }
.rotator.is-ready .rotator__w {
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  /* The headline's line height is 1, so the top of each window sits under
     the first line's descenders. Trim the window down to the letter tops
     so words rolling out never draw over line one. */
  clip-path: inset(var(--rotator-clip-top, 0.1em) -0.1em 0 -0.1em);
}
.rotator.is-ready .rotator__wi {
  transform: translateY(125%);
  transition: transform 720ms cubic-bezier(0.7, 0, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.rotator.is-ready .is-in .rotator__wi { transform: none; }
.rotator.is-ready .is-out .rotator__wi {
  transform: translateY(-125%);
  transition-duration: 520ms;
  transition-delay: calc(var(--i, 0) * 30ms);
}
.rotator.is-ready .is-reset .rotator__wi { transition: none; }

/* Highlighted words: once a phrase settles, a light glint sweeps across
   them and leaves them in brand blue. The gradient runs blue → glint →
   black and starts shifted to its black end; #24 sizes it to the whole
   highlighted group and offsets each word's slice, so the glint crosses
   a multi-word highlight in one pass. --shim (0 → 1) drives the sweep and
   is registered so it can animate. */
@property --shim {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
.rotator.is-ready .rotator__k {
  background-image: linear-gradient(100deg,
    var(--brand) 0%, var(--brand) 38%, #9cc2ff 50%, var(--fg) 62%, var(--fg) 100%);
  background-repeat: no-repeat;
  background-size: calc(var(--G, 0) * 1px) 100%;
  background-position: calc((var(--shim) - 1) * (var(--G, 0) - var(--K, 0)) * 1px - var(--ox, 0) * 1px) 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rotator.is-ready .is-in {
  animation: rotator-shim 1100ms var(--ease-out) calc(var(--n, 1) * 40ms + 650ms) forwards;
}
.rotator.is-ready .is-out { --shim: 1; }
.rotator.is-ready .is-reset { animation: none; --shim: 0; transition: none; }
/* First phrase on page load: already settled, highlight blue, no glint. */
.rotator.is-ready .is-static { animation: none; --shim: 1; }
@keyframes rotator-shim {
  from { --shim: 0; }
  to { --shim: 1; }
}

/* Phones: the phrases are too long for one row, so each wraps; the
   stacked grid still reserves the tallest one. */
@media (max-width: 767px) {
  .rotator { display: block; white-space: normal; }
  .rotator__slot,
  .rotator.is-ready .rotator__slot {
    display: grid;
    width: auto;
    text-align: center;
  }
  .rotator__phrase { width: auto; }
}

/* Reduced motion: phrases cross-fade in place; no roll and no glint,
   so highlighted words are simply blue. */
@media (prefers-reduced-motion: reduce) {
  .rotator.is-ready .rotator__wi,
  .rotator.is-ready .is-in .rotator__wi,
  .rotator.is-ready .is-out .rotator__wi { transform: none; transition: none; }
  .rotator.is-ready .rotator__phrase { opacity: 0; transition: opacity 600ms ease; }
  .rotator.is-ready .rotator__phrase.is-in { opacity: 1; }
  .rotator.is-ready .rotator__slot { transition: none; }
  .rotator.is-ready .is-in { animation: none; }
  .rotator.is-ready .rotator__phrase { --shim: 1; }
}

/* Homepage closing line ("A 2-minute form. … where to start.") on one
   line wherever it fits (it needs ~702px at 16px); narrower screens wrap
   it into balanced lines. */
.outro__lead--one-line { text-wrap: balance; }
@media (min-width: 820px) {
  .outro__lead--one-line { max-width: none; white-space: nowrap; }
}
