/* The three-column scroll narrative blends directly into the page background. */
.focus-home .home-story .hero-gallery {
  --story-columns: minmax(0, 1fr) minmax(210px, 300px) minmax(0, 1fr);
  --story-gap: clamp(18px, 2.4vw, 34px);
  display: grid;
  grid-template-columns: var(--story-columns);
  align-items: stretch;
  gap: var(--story-gap);
  width: min(1220px, calc(100% - 80px));
  height: auto;
  min-height: 460px;
  overflow: visible;
}
.home-story .hero-gallery::before { display: none; }
html.motion-paused .focus-home .hero-with-story .motion-control { display: flex; }
.home-story .story-side {
  position: relative;
  min-width: 0;
  grid-row: 1;
  padding: clamp(20px, 2.4vw, 34px);
  display: grid;
  align-content: center;
  border: 7px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.home-story .story-side-left { grid-column: 1; }
.home-story .story-side-right { grid-column: 3; }
.home-story .story-scene {
  margin: 0;
  color: #737a76;
  font-size: clamp(21px, 2.2vw, 30px);
  line-height: 1.25;
  letter-spacing: -.035em;
  font-weight: 400;
  text-align: left;
}
.home-story .story-scene + .story-scene { margin-top: 32px; }
.home-story .story-line { display: block; }
.home-story .story-line + .story-line { margin-top: .10em; }
.home-story .story-line strong { color: var(--ink); font-weight: 540; }
.focus-home .home-story .well-card {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 460px;
  transform: none;
  will-change: auto;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.focus-home .home-story.is-story-animated .hero-gallery { height: 460px; }
.is-story-animated .story-scene { grid-area: 1 / 1; }
.is-story-animated .story-scene + .story-scene { margin: 0; }
.is-story-animated .story-line {
  opacity: var(--line-opacity, 0);
  transform: translateY(var(--line-offset, 8px));
  will-change: opacity, transform;
}
.is-story-animated .well-artboard { opacity: var(--well-content-opacity, 1); }

/* In static views the closing sentence follows the cards in reading order. */
.home-story .story-finale {
  display: grid;
  grid-column: 1 / -1;
  justify-items: center;
  align-items: center;
  gap: 32px;
  width: 100%;
  margin: 24px 0;
  color: var(--ink);
}
.story-finale p { margin: 0; }
.story-finale .story-sentence {
  display: block;
  width: 100%;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 540;
  line-height: 1.15;
  letter-spacing: -.04em;
  text-align: center;
  text-wrap: balance;
}
.story-phrase { display: inline-block; padding: 0; }
.story-finale .story-united {
  font-size: clamp(26px, 2.9vw, 40px);
  font-weight: 560;
  line-height: 1.1;
  letter-spacing: -.045em;
  text-align: center;
}
.home-story.is-story-animated .story-finale {
  position: absolute;
  inset: 0;
  grid-template-columns: var(--story-columns);
  margin: 0;
  gap: var(--story-gap);
  pointer-events: none;
  z-index: 5;
}
.is-story-animated .story-sentence { grid-column: 1 / -1; grid-row: 1; }
.is-story-animated .story-phrase {
  opacity: var(--phrase-opacity, 0);
  transform: translateY(var(--phrase-offset, 12px));
}
.is-story-animated .story-united {
  grid-column: 2;
  grid-row: 1;
  opacity: var(--together-opacity, 0);
  transform: translateY(var(--together-offset, 10px));
}
@media (min-width: 1440px) {
  .focus-home .home-story .hero-gallery { min-height: 510px; }
  .focus-home .home-story .well-card { height: 510px; }
}
@media (min-width: 851px) {
  .focus-home .home-story.is-story-animated .hero-gallery {
    height: var(--story-height, 460px);
    min-height: var(--story-height, 460px);
  }
  .focus-home .home-story.is-story-animated .well-card { height: 100%; }
  /* Fit shorter desktop windows while preserving the fixed heading. */
  .focus-home .hero-compact .hero-stage { padding-top: 16px; }
  .focus-home .hero-compact h1 { font-size: clamp(48px, 5vw, 70px); }
  .focus-home .hero-compact .hero-description { margin-top: 12px; font-size: 18px; }
  .focus-home .hero-compact .hero-service-rotator { padding-top: 14px; font-size: 32px; }
  .focus-home .hero-compact .hero-actions { margin-top: 14px; }
  .focus-home .hero-compact .home-gallery { padding-top: 16px; }
  .hero-compact .home-story .story-side { padding: 12px; border-width: 0; }
  .hero-compact .home-story .story-scene { font-size: clamp(19px, 1.65vw, 23px); }
}
@media (max-width: 850px) {
  .focus-home .home-story .hero-gallery {
    --story-columns: repeat(3, minmax(0, 1fr));
    --story-gap: 8px;
    --well-width: clamp(108px, 29vw, 170px);
    --final-card-width: calc((100% - 16px) / 3);
    width: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 0;
  }
  .home-story .story-side {
    width: 100%;
    padding: 16px;
    border-width: 3px;
    border-radius: 0;
  }
  .home-story .story-scene { font-size: clamp(19px, 4.7vw, 26px); overflow-wrap: break-word; }
  .focus-home .home-story .well-card { width: 210px; height: 330px; }
  .focus-home .home-story.is-story-animated .hero-gallery { display: block; height: 320px; }
  .is-story-animated .story-side {
    position: absolute;
    top: 0;
    height: 100%;
    width: calc((1 - var(--finale-layout, 0)) * (100% - var(--well-width) - 18px) + var(--finale-layout, 0) * var(--final-card-width));
  }
  .is-story-animated .story-side-left { left: 0; opacity: var(--left-panel-opacity, 1); }
  .is-story-animated .story-side-right { right: 0; opacity: var(--right-panel-opacity, 0); }
  .focus-home .home-story.is-story-animated .well-card {
    position: absolute;
    left: var(--well-position, 100%);
    top: 0;
    width: calc((1 - var(--finale-layout, 0)) * var(--well-width) + var(--finale-layout, 0) * var(--final-card-width));
    height: 100%;
    transform: translateX(var(--well-anchor, -100%));
    border-width: 3px;
    border-radius: 0;
  }
  .story-finale .story-sentence { font-size: clamp(20px, 3.7vw, 28px); }
  .story-finale .story-united { font-size: clamp(14px, 3.8vw, 24px); letter-spacing: -.035em; }
}
@media (max-width: 380px) {
  .focus-home .home-story .hero-gallery { width: calc(100% - 32px); }
  .home-story .story-side { padding: 12px; }
}
@media (prefers-reduced-motion: reduce), print {
  .home-story .story-line,
  .home-story .story-phrase,
  .home-story .story-united { opacity: 1 !important; transform: none !important; will-change: auto; }
  .home-story .story-finale { position: static !important; margin: 24px 0 !important; }
  .home-story .story-united { grid-column: 1 / -1; grid-row: 2; }
  .home-story .well-artboard { opacity: 1 !important; }
}
