/* A staged introduction: well engineering, focus, then the service sequence. */
.focus-home .focus-hero {
  --hero-stage-height: calc(100svh - var(--header-h));
  --hero-travel: 800px;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow-anchor: none;
}
.focus-home .hero-stage {
  position: relative;
  top: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 26px 0 16px;
  overflow: hidden;
}
.focus-home .hero-copy {
  width: 100%;
  max-width: 1260px;
  padding-inline: 28px;
  transform: none;
  will-change: auto;
}
.focus-home .focus-hero h1 {
  gap: 0;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1.06;
  font-weight: 560;
  letter-spacing: -.055em;
  word-spacing: 0;
}
.focus-home .focus-line {
  flex-shrink: 0;
  min-width: 0;
  min-height: 0;
  margin-top: 9px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #fff;
  letter-spacing: inherit;
}
.focus-home #focus-word {
  display: block;
  flex-shrink: 0;
  padding: .025em .28em .1em;
  border: 2px solid #966ee3;
  border-radius: .19em;
  background: #7041c4;
  color: #fff;
  transition: none;
}
.focus-home .hero-outro #focus-word {
  font-size: .84em;
  font-weight: 400;
  border-color: transparent;
  background: none;
  color: var(--ink);
}
.focus-home .hero-description {
  max-width: 760px;
  margin: 16px auto 0;
  color: #686e69;
  font-size: clamp(16px, 1.55vw, 21px);
  line-height: 1.5;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.focus-home .hero-outro .hero-description { display: none; }
.hero-sector-summary { display: block; }
.hero-description-sequence { display: none; }
.hero-scroll-enabled .hero-description-static {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hero-scroll-enabled .hero-description-sequence { display: grid; }
.hero-description-line {
  grid-area: 1 / 1;
  align-self: center;
  opacity: var(--description-opacity, 0);
  transform: translateY(var(--description-offset, 0px));
}
.hero-description-line:first-child { --description-opacity: 1; }
.hero-service-reveal { display: none; }
.hero-service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 30px auto;
  padding: 0;
  list-style: none;
  color: #303b33;
  font-size: clamp(18px, 2.4vw, 30px);
  line-height: 1.25;
  letter-spacing: -.025em;
}
.hero-future-note {
  display: grid;
  gap: 12px;
  margin: 0 auto 24px;
  color: #303b33;
  font-size: clamp(18px, 2.4vw, 30px);
  line-height: 1.25;
  letter-spacing: -.025em;
}
.focus-home .hero-actions { margin-top: 18px; }
.focus-home .hero-bottom {
  flex-shrink: 0;
  margin-top: 8px;
  padding: 16px 0 8px;
}
.focus-home .motion-control { display: none; }

/* The complete list stays in reading order for assistive technology. */
.focus-home .hero-scroll-enabled { height: calc(var(--hero-stage-height) + var(--hero-travel)); }
.focus-home .hero-scroll-enabled .hero-stage {
  position: sticky;
  top: var(--header-h);
  height: auto;
  padding-top: 24px;
}
.hero-scroll-enabled .hero-copy { margin-block: 0; }
.focus-home .hero-scroll-enabled .focus-line {
  height: calc(var(--focus-reveal, 0) * var(--focus-line-height));
  margin-top: calc(var(--focus-reveal, 0) * 9px);
  opacity: var(--focus-reveal, 0);
  transform: translateY(calc((1 - var(--focus-reveal, 0)) * 10px));
}
.hero-scroll-enabled .hero-service-reveal {
  display: block;
  height: calc(var(--services-reveal, 0) * var(--hero-service-height));
  overflow: hidden;
  opacity: var(--services-reveal, 0);
}
.hero-scroll-enabled.hero-outro .hero-service-reveal {
  height: 0;
}
.hero-scroll-enabled .hero-service-list,
.hero-scroll-enabled .hero-future-note {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hero-scroll-enabled .hero-service-rotator {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 0 1px;
  color: #303b33;
  font-size: clamp(27px, 3.15vw, 44px);
  line-height: 1.15;
  font-weight: 450;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero-service-progress { display: flex; gap: 5px; width: 110px; margin-bottom: 12px; }
.hero-service-progress span { flex: 1; height: 2px; background: #d9dcd6; border-radius: 2px; transition: background-color 300ms ease; }
.hero-service-progress .is-current { background: #48534b; }
.hero-service-message { width: 100%; }
.hero-service-message [data-hero-service] { display: grid; place-items: center; min-height: max(1.15em, var(--service-title-height, 0px)); }
.focus-home .hero-scroll-enabled .hero-bottom { margin-top: 0; }
.focus-home .hero-scroll-enabled .motion-control { display: flex; }

/* Images share the pinned scene, immediately below the compact text block. */
.home-gallery {
  --progress: 0;
  width: 100%;
  flex-shrink: 0;
  padding: 24px 0 0;
  overflow: hidden;
}
.focus-home .home-gallery .hero-gallery {
  flex: none;
  width: min(1220px, 94%);
  height: clamp(340px, 42vw, 520px);
  min-height: 0;
  max-height: none;
  margin: 0 auto;
}
@media (max-width: 850px) {
  .focus-home .hero-copy { padding-inline: 24px; }
  .focus-home .focus-hero h1 { font-size: clamp(43px, 7.7vw, 65px); }
  .focus-home .hero-description { max-width: 590px; font-size: 18px; }
  .hero-scroll-enabled .hero-service-rotator { font-size: clamp(27px, 4.5vw, 38px); }
  .focus-home .hero-bottom { width: calc(100% - 48px); gap: 12px; }
  .focus-home .hero-bottom > span { display: none; }
  .focus-home .hero-bottom .scroll-cue { position: static; transform: none; }
  .focus-home .home-gallery .hero-gallery { width: 100%; height: 410px; }
}
@media (max-width: 520px) {
  .focus-home .hero-stage { padding-top: 24px; }
  .focus-home .hero-copy { padding-inline: 20px; }
  .focus-home .focus-hero h1 { font-size: clamp(33px, 8.5vw, 44px); }
  html[lang="hu"] .focus-home .focus-hero h1 { font-size: clamp(33px, 8.5vw, 44px); }
  .focus-home .hero-description { max-width: 360px; margin-top: 16px; font-size: 16px; }
  .hero-scroll-enabled .hero-service-rotator {
    padding: 16px 0 0;
    font-size: clamp(25px, 6.7vw, 30px);
  }
  .hero-service-message [data-hero-service] { min-height: max(2.3em, var(--service-title-height, 0px)); }
  .hero-service-progress { margin-bottom: 10px; }
  .focus-home .hero-actions { flex-wrap: wrap; gap: 17px 20px; }
  .focus-home .hero-actions .button { font-size: 13px; }
  .focus-home .hero-actions .text-link { font-size: 13px; }
  .focus-home .hero-bottom { font-size: 11px; }
  .focus-home .hero-bottom .motion-control { font-size: 11px; }
  .focus-home .home-gallery .hero-gallery { height: 350px; }
  .home-gallery .card-center { left: 22%; width: 56%; }
  .home-gallery .card-left { left: -16%; width: 48%; }
  .home-gallery .card-right { right: -16%; width: 48%; }
}
@media (prefers-reduced-motion: reduce), print {
  .hero-scroll-enabled .hero-description-sequence { display: none; }
  .hero-scroll-enabled .hero-description-static { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal; }
  .focus-home .hero-outro .hero-description { display: block; }
  .hero-service-progress span { transition: none; }
  .focus-home .hero-scroll-enabled { height: auto; }
  .focus-home .hero-scroll-enabled .hero-stage { position: relative; top: 0; height: auto; }
  .focus-home .hero-scroll-enabled .focus-line { height: auto; margin-top: 9px; opacity: 1; transform: none; }
  .hero-scroll-enabled .hero-service-reveal { display: none; }
  .hero-scroll-enabled .hero-service-list,
  .hero-scroll-enabled .hero-future-note { position: static; width: auto; height: auto; margin: 30px auto; clip-path: none; white-space: normal; }
  .focus-home .hero-scroll-enabled .motion-control { display: none; }
}
html.motion-paused .focus-home .focus-line { transform: none; }
