.home-page {
  --radius: var(--radius-media);
  --radius-lg: var(--radius-panel);
  --button-radius: 999px;
  --home-more-size: 17px;
  --home-description-size: clamp(16px, calc(11px + .35vw), 18px);
}

.home-page :is(h1, h2, h3, p, li, dt, dd, summary) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.home-page .visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.home-page main p { color: var(--muted); font-weight: var(--fw-body); }

/* Hero */
/* The route panel sits over the foot of the stage on wide screens, so the copy is centred in the space
   above it; below 1081px it follows the stage instead. */
.home-page .hero {
  --scene-background: #1a2028;
  --hero-routes-space: 92px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  isolation: isolate;
  overflow: clip;
  background: var(--scene-background);
}
.home-page .hero-stage {
  position: relative;
  display: grid;
  grid-area: 1 / 1;
  min-width: 0;
  min-block-size: var(--scene-height);
}
.home-page .hero-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  padding-block: clamp(56px, 8svh, 104px) calc(clamp(40px, 6svh, 80px) + var(--hero-routes-space));
}
.home-page .hero .hero-title {
  width: fit-content;
  max-width: 100%;
  color: white;
  font-size: var(--fs-h1-hero);
  font-weight: var(--fw-heading);
  letter-spacing: -.04em;
  line-height: 1.18;
}
.home-page .hero-title-line { display: block; overflow: clip; padding-block: .035em; }
.home-page .hero-title-line > span { display: block; }
.home-page .hero .hero-title em { color: var(--blue-on-dark); font-style: normal; }
/* First screen in three steps with air between them: the headline, one sentence, then the actions
   with their proof. */
.home-page .hero-subtitle {
  max-width: 32rem;
  margin-top: 28px;
  color: #e0e8ef;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.8;
  text-wrap: pretty;
}
.home-page .hero-copy { min-width: 0; max-width: min(62%, 850px); }
.home-page .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 36px; }
.home-page .hero-actions .button-primary { min-height: var(--button-height-lg); padding-inline: 28px; font-size: 16px; font-weight: var(--fw-heading); }
.home-page .hero-company-link { display: inline-flex; min-height: var(--button-height-lg); align-items: center; justify-content: center; padding: 10px 24px; border: 1px solid rgb(255 255 255 / 40%); border-radius: var(--button-radius); color: white; font-size: 16px; font-weight: var(--fw-strong); }
.home-page .hero-company-link:hover { background: rgb(255 255 255 / 10%); border-color: white; }
.home-page .hero a:focus-visible { outline-color: white; }
.home-page .hero-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.home-page .hero-visual-scene { position: absolute; inset: 0; transform-origin: 68% 58%; }
.home-page .hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% center;
}
/* The copy column runs over the left of the illustration; keep it dark enough for the longer statement. */
.home-page .hero-visual::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(16 20 25 / 90%) 0%, rgb(16 20 25 / 80%) 30%, rgb(16 20 25 / 44%) 50%, rgb(16 20 25 / 0%) 70%); content: ''; }
/* Credentials named under the actions; the evidence section shows them as certificates. */
.home-page .hero-proof { display: flex; align-items: center; gap: 12px; margin-top: 28px; color: #ccd7e1; }
.home-page .hero-proof svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--blue-on-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-page .hero-proof ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.home-page .hero-proof li { font-size: 14px; font-weight: var(--fw-strong); line-height: 1.5; white-space: nowrap; }
.home-page .hero-proof li + li::before { display: inline-block; width: 1px; height: 11px; margin-inline: 14px; background: rgb(255 255 255 / 30%); vertical-align: -1px; content: ''; }

/* The fork in the route: the white ground of the next section rises into the hero with one door for
   companies and one for institutions. */
.home-page .hero-routes { position: relative; z-index: 2; grid-area: 1 / 1; align-self: end; }
.home-page .hero-routes-panel {
  display: grid;
  grid-template-columns: minmax(0, .62fr) repeat(2, minmax(0, 1fr));
  overflow: clip;
  border-radius: var(--hs-radius) var(--hs-radius) 0 0;
  background: white;
}
.home-page .hero-routes h2 {
  align-self: center;
  padding: 18px clamp(24px, 2.6vw, 40px);
  color: var(--hs-ink);
  font-size: clamp(17px, 1.3vw, 19px);
  font-weight: var(--fw-heading);
  line-height: 1.45;
  letter-spacing: -.03em;
}
.home-page .hero-routes ul { display: contents; }
.home-page .hero-routes li { display: flex; border-left: 1px solid var(--line); }
.home-page .hero-routes a {
  display: grid;
  flex: 1;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px clamp(24px, 2.4vw, 36px);
  color: inherit;
  text-decoration: none;
}
.home-page .hero-routes a:hover { background: var(--hs-soft); }
.home-page .hero-routes a:focus-visible { outline: 2px solid var(--hs-blue); outline-offset: -6px; }
.home-page .hero-route-icon { display: grid; width: 48px; height: 48px; flex: none; place-items: center; border-radius: 50%; background: var(--hs-soft); color: var(--brand); }
.home-page .hero-routes a:hover .hero-route-icon { background: white; }
.home-page .hero-route-icon svg { width: 28px; height: 28px; }
.home-page .hero-route-text { display: block; min-width: 0; color: var(--hs-ink); font-size: clamp(16px, 1.25vw, 18px); font-weight: var(--fw-heading); line-height: 1.45; letter-spacing: -.03em; }
.home-page .hero-route-arrow { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--brand); color: white; }
.home-page .hero-routes a:hover .hero-route-arrow { background: var(--brand-hover); }
.home-page .hero-route-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Links that continue to a detail page */
.home-page .text-link {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  gap: var(--space-2);
  color: var(--action);
  font-size: var(--text-small);
  font-weight: var(--fw-heading);
}
.home-page .text-link:not(.home-more-link):hover {
  text-decoration: underline;
  text-underline-offset: .2em;
}
.home-page .text-link.home-more-link {
  --more-icon-size: 32px;
  gap: 12px;
  font-size: var(--home-more-size);
  font-weight: var(--fw-strong);
  line-height: 1.5;
  white-space: nowrap;
  text-decoration: none;
}
.home-page .home-more-label { position: relative; padding-block: 3px; }
.home-page .home-more-label::after {
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  content: "";
}
.home-page .home-more-icon {
  display: block;
  flex: 0 0 var(--more-icon-size);
  width: var(--more-icon-size);
  height: var(--more-icon-size);
  overflow: hidden;
  border-radius: 0;
  background: var(--brand);
  color: var(--white);
}
.home-page .home-more-arrow-track { display: flex; width: 200%; height: 100%; transform: translateX(-50%); }
.home-page .home-more-arrow { display: grid; flex: 0 0 50%; place-items: center; }
.home-page .home-more-arrow .ui-icon { width: 15px; height: 15px; stroke-width: 2.4; }
.home-page .home-more-link:focus-visible .home-more-label::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .home-page .home-more-link:hover .home-more-label::after { transform: scaleX(1); }
}

/* Sections */
.home-page .home-scenes {
  --scene-height: calc(100svh - var(--header-height));
  position: relative;
}
.home-page .home-scene { position: relative; isolation: isolate; }
.home-page .home-scene:focus-visible { outline-offset: -4px; }

/* Three questions. Narrow screens read them as a plain sequence; wide screens get a held visual stage. */
.home-page .journey-scene { background: white; }
/* The film hands focus to this reading destination; keep rings on its interactive controls. */
.home-page .journey-scene[tabindex="-1"]:focus { outline: none; }
.home-page .journey-shell { display: contents; }
.home-page .journey-stage,
.home-page .journey-rail { display: none; }
.home-page .journey-steps {
  display: grid;
  width: min(calc(100% - 2 * var(--gutter)), var(--site-width));
  margin-inline: auto;
  gap: clamp(64px, 11vw, 104px);
  padding-block: clamp(64px, 12vw, 104px);
}
.home-page .journey-step { display: grid; gap: clamp(24px, 4vw, 36px); }
.home-page .journey-step-media { position: relative; overflow: hidden; background: var(--hs-panel); }
.home-page .journey-step-number {
  position: absolute;
  z-index: 1;
  bottom: 14px;
  left: 18px;
  color: var(--brand);
  font-size: clamp(48px, 13vw, 72px);
  font-weight: var(--fw-heading);
  line-height: 1;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.home-page .journey-visual { width: 100%; height: 100%; margin: 0; }
/* Each question answers itself on pale blue: the entrances, the order of proof, the GICUS screen. */
.home-page .journey-visual--board { position: relative; display: grid; place-items: center; padding: 28px 20px 40px; background: var(--hs-panel); }
.home-page .journey-board { display: block; width: min(100%, 520px); height: auto; font-family: inherit; }
/* Room below the drawing for the step number. */
.home-page .journey-step-media .journey-visual--board { padding-bottom: clamp(76px, 20vw, 96px); }
.home-page .journey-step-copy h3 {
  color: var(--navy);
  font-size: var(--fs-h2);
  font-weight: var(--fw-heading);
  line-height: 1.3;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.home-page main .journey-step-body { max-width: 34rem; margin-top: var(--space-5); color: var(--muted); font-size: var(--home-description-size); line-height: 1.8; text-wrap: pretty; }
.home-page .journey-step-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; max-width: 40rem; margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.home-page .journey-step-items li { padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); font-size: 15px; font-weight: var(--fw-strong); line-height: 1.55; }
.home-page main .journey-step-note { margin-top: var(--space-3); color: var(--quiet); font-size: var(--fs-caption); line-height: 1.7; }
.home-page .journey-step-action { margin-top: var(--space-5); }

/* Wide screens that do not pin the stage (reduced motion, or too short): each step as image beside text. */
@media (min-width: 1081px) and (prefers-reduced-motion: reduce), (min-width: 1081px) and (max-height: 619px) {
  .home-page .journey-step { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 5vw, 88px); }
}
@media (min-width: 1081px) and (min-height: 620px) and (prefers-reduced-motion: no-preference) {
  /* The scene (stage + copy) holds for one screen while the page scrolls a track three steps long.
     Each step owns a third of the track; the scene is released only after the last third. */
  .home-page .journey {
    --journey-height: calc(100svh - var(--header-height));
    --journey-step-scroll: 48svh;
    --journey-ease: cubic-bezier(.22, .8, .2, 1);
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    height: calc(var(--journey-height) + 3 * var(--journey-step-scroll));
  }
  .home-page :is(.journey-stage, .journey-steps) {
    position: sticky;
    top: var(--header-height);
    align-self: start;
    height: var(--journey-height);
  }
  .home-page .journey-stage { display: block; overflow: hidden; background: var(--hs-panel); }
  .home-page .journey-layers,
  .home-page .journey-layer { position: absolute; inset: 0; }
  /* Each later step wipes up over the one before it, and wipes back down when scrolled back. */
  .home-page .journey-layer { clip-path: inset(100% 0 0 0); }
  .home-page .journey-layer:is([data-state="past"], [data-state="current"]) { clip-path: inset(0); }
  /* Centred in the space above the large step number. */
  .home-page .journey-layer .journey-visual--board { place-items: center; padding: clamp(48px, 8svh, 96px) clamp(40px, 5vw, 88px) clamp(180px, 26svh, 260px); }
  /* Short screens narrow the board so it ends above the large step number. As a layer wipes in,
     its board rises the last few pixels into place. */
  .home-page .journey-layer .journey-board { width: min(100%, 540px, calc(100svh - 360px)); translate: 0 28px; }
  .home-page .journey-layer[data-state="current"] .journey-board { translate: none; }

  .home-page .journey-numerals {
    position: absolute;
    z-index: 2;
    bottom: clamp(64px, 9svh, 96px);
    left: clamp(32px, 4vw, 64px);
    height: 1em;
    width: 2.2em;
    overflow: hidden;
    color: var(--brand);
    font-size: clamp(104px, 10vw, 156px);
    font-weight: var(--fw-heading);
    line-height: 1;
    letter-spacing: -.055em;
    font-variant-numeric: tabular-nums;
  }
  .home-page .journey-numerals span { position: absolute; inset: 0 auto auto 0; translate: 0 105%; }
  .home-page .journey-numerals span[data-current] { translate: none; }
  .home-page .journey[data-active="1"] .journey-numerals span:nth-child(1),
  .home-page .journey[data-active="2"] .journey-numerals span:is(:nth-child(1), :nth-child(2)) { translate: 0 -105%; }
  .home-page .journey-progress { position: absolute; z-index: 2; right: clamp(32px, 4vw, 64px); bottom: 36px; left: clamp(32px, 4vw, 64px); height: 2px; background: #d3dae2; }
  .home-page .journey-progress span { display: block; height: 100%; background: var(--brand); transform: scaleX(var(--journey-progress, 0)); transform-origin: left center; }

  /* Copy: the rail on top, the three steps stacked in one cell below it. */
  .home-page .journey-steps {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: auto;
    margin: 0;
    gap: 0;
    padding: 0 clamp(40px, 5.5vw, 104px);
  }
  .home-page .journey-rail {
    display: flex;
    gap: clamp(20px, 2.4vw, 36px);
    margin: 0;
    padding: 28px 0 18px;
    border-bottom: 1px solid var(--line);
    list-style: none;
  }
  .home-page .journey-rail a { display: inline-flex; min-height: 32px; align-items: baseline; gap: 8px; color: var(--quiet); font-size: var(--fs-small); font-weight: var(--fw-strong); text-decoration: none; }
  .home-page .journey-rail b { font-variant-numeric: tabular-nums; font-weight: var(--fw-heading); }
  .home-page .journey-rail a[aria-current] { color: var(--brand); }
  .home-page .journey-rail a:hover { color: var(--brand-hover); }
  .home-page .journey-step { grid-area: 2 / 1; align-content: center; padding-block: 32px; opacity: 0; translate: 0 28px; pointer-events: none; }
  .home-page .journey-step[data-current] { opacity: 1; translate: none; pointer-events: auto; }
  .home-page .journey-step-media { display: none; }
}
@media (min-width: 1081px) and (min-height: 620px) and (prefers-reduced-motion: no-preference) {
  .home-page .journey-layer { transition: clip-path 650ms var(--journey-ease); }
  .home-page .journey-layer .journey-board { transition: translate 800ms var(--journey-ease); }
  .home-page .journey-numerals span { transition: translate 700ms var(--journey-ease); }
  .home-page .journey-step { transition: opacity 450ms ease, translate 700ms var(--journey-ease); }
  .home-page .journey-step[data-current] { transition-delay: 40ms; }
  .home-page .journey-rail a { transition: color 200ms ease; }
}

/* Laptop screens: the copy and the route panel share a short first screen. */
@media (min-width: 1081px) and (max-height: 820px) {
  .home-page .hero-main { padding-block: 40px calc(24px + var(--hero-routes-space)); }
  .home-page .hero-proof { margin-top: 28px; }
}

@media (max-width: 1080px) {
  .home-page { --home-description-size: 16px; --home-more-size: 16px; }
  /* The illustration follows the copy instead of running under it, and stays short enough for the route
     panel's question to show on arrival. */
  .home-page .hero-stage { display: flex; min-block-size: 0; flex-direction: column; }
  .home-page .hero-main { align-content: start; padding-block: clamp(48px, 7svh, 72px) 8px; }
  .home-page .hero-routes { grid-area: 2 / 1; }
  .home-page .hero-routes .container { padding-inline: 0; }
  .home-page .hero-routes-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: max(0px, calc(var(--gutter) - 20px)); }
  .home-page .hero-routes h2 { grid-column: 1 / -1; padding: 22px 20px 6px; }
  .home-page .hero-routes li { border-left: 0; }
  .home-page .hero-routes li + li { border-left: 1px solid var(--line); }
  .home-page .hero-routes a { gap: 14px; padding: 16px 20px; }
  .home-page .hero-route-icon { width: 44px; height: 44px; }
  .home-page .hero-route-icon svg { width: 26px; height: 26px; }
  .home-page .hero-copy { max-width: 44rem; }
  .home-page .hero-subtitle { max-width: 32rem; margin-top: 24px; font-size: 16px; line-height: 1.75; }
  .home-page .hero-actions { gap: 12px 20px; margin-top: 28px; }
  .home-page .hero-actions .button-primary { padding-inline: 20px; font-size: 15px; }
  .home-page .hero-company-link { gap: 4px; font-size: 15px; }
  .home-page .hero-visual { position: relative; inset: auto; flex: none; order: 1; height: clamp(200px, 50vw, 36svh); }
  .home-page .hero-visual img { object-position: 50% center; }
  .home-page .hero-visual::after { background: linear-gradient(180deg, #1a2028 0%, rgb(26 32 40 / 18%) 30%, rgb(26 32 40 / 0%) 70%); }
  .home-page .text-link.home-more-link { --more-icon-size: 28px; gap: 10px; }
}
@media (max-width: 640px) {
  .home-page .hero-proof { align-items: flex-start; margin-top: 32px; }
  .home-page .hero-proof svg { margin-top: 1px; }
  .home-page .hero-proof ul { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: start; gap: 6px 20px; }
  .home-page .hero-proof li { white-space: normal; }
  .home-page .hero-proof li + li::before { display: none; }
  .home-page .hero-routes-panel { grid-template-columns: minmax(0, 1fr); }
  .home-page .hero-routes li + li { border-top: 1px solid var(--line); border-left: 0; }
  .home-page .hero-route-text { font-size: 16px; }
}
@media (max-width: 340px) {
  .home-page .hero-routes a { gap: 8px; padding: 14px 12px; }
  .home-page .hero-route-icon { width: 32px; height: 32px; }
  .home-page .hero-route-icon svg { width: 22px; height: 22px; }
  .home-page .hero-route-arrow { width: 28px; height: 28px; }
}
