/* Scroll-driven hero → first-section slide-up */
:root {
  --transition-progress: 0;
}

body:has(#transitionRoot) {
  overflow-x: hidden;
}

.transition-root {
  position: relative;
  height: 200vh;
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.hero-scroll,
.hero-liquid {
  position: absolute;
  inset: 0;
}

.hero-scroll {
  background: #ffffff;
  display: grid;
  place-items: center;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  transform: translate3d(0, 0, 0) scale(calc(1 - (var(--transition-progress) * 0.04)));
}

.hero-scroll:not(.hero-scroll--image)::before,
.hero-scroll:not(.hero-scroll--image)::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.35;
  z-index: 0;
}

.hero-scroll:not(.hero-scroll--image)::before {
  background:
    radial-gradient(42% 38% at 18% 28%, color-mix(in srgb, var(--color-navy) 55%, white), transparent 72%),
    radial-gradient(36% 34% at 82% 22%, color-mix(in srgb, var(--color-gold) 65%, white), transparent 74%);
}

.hero-scroll:not(.hero-scroll--image)::after {
  background:
    radial-gradient(34% 30% at 72% 78%, color-mix(in srgb, var(--color-gold) 50%, white), transparent 72%),
    radial-gradient(38% 32% at 28% 72%, color-mix(in srgb, var(--color-navy) 40%, white), transparent 74%);
}

.hero-scroll__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-scroll__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scroll__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(11, 20, 38, 0.92) 0%,
    rgba(11, 20, 38, 0.55) 45%,
    rgba(11, 20, 38, 0.35) 100%
  );
  pointer-events: none;
}

.hero-scroll--image {
  background: transparent;
}

.hero-scroll__inner {
  position: relative;
  z-index: 2;
  padding: 2rem 24px;
  max-width: 52rem;
  display: grid;
  gap: clamp(10px, 1.5vh, 16px);
  justify-items: center;
}

.hero-scroll__logo {
  width: clamp(140px, 16vw, 220px);
  height: auto;
}

.hero-scroll__inner h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: var(--font-weight-heading);
  line-height: 1.08;
  color: var(--color-navy);
  max-width: 14ch;
  font-synthesis: weight;
}

.hero-scroll__regions {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.hero-scroll__lead {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.6;
  color: var(--color-muted);
  max-width: 40ch;
}

.hero-scroll__hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  opacity: calc(1 - (var(--transition-progress) * 2));
}

.hero-scroll--image .hero-scroll__inner h1 {
  color: var(--color-white);
  max-width: 18ch;
}

.hero-scroll--image .hero-scroll__eyebrow {
  margin: 0;
  color: var(--color-gold-light);
}

.hero-scroll--image .hero-scroll__regions {
  color: var(--color-gold-light);
}

.hero-scroll--image .hero-scroll__lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 42ch;
}

.hero-scroll--image .hero-scroll__hint {
  color: rgba(255, 255, 255, 0.75);
}

/* Sliding first section (services / vision / qualities) */
.section-panel {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-white);
  transform: translate3d(0, calc((1 - var(--transition-progress)) * 100%), 0);
}

.section-panel .section-header,
.section-panel .content-split,
.section-panel .values-grid,
.section-panel .vision-panel__footer,
.section-panel .panel-fill__footer,
.section-panel .cta-banner {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

.section-panel.is-revealed .section-header,
.section-panel.is-revealed .content-split,
.section-panel.is-revealed .values-grid,
.section-panel.is-revealed .vision-panel__footer,
.section-panel.is-revealed .panel-fill__footer,
.section-panel.is-revealed .cta-banner {
  opacity: 1;
  transform: translateY(0);
}

.section-panel.is-revealed .content-split,
.section-panel.is-revealed .values-grid {
  transition-delay: 80ms;
}

.section-panel.is-revealed .vision-panel__footer,
.section-panel.is-revealed .panel-fill__footer,
.section-panel.is-revealed .cta-banner {
  transition-delay: 160ms;
}

@media (prefers-reduced-motion: reduce) {
  .transition-root {
    height: auto;
  }

  .hero-stage {
    position: relative;
    height: auto;
    min-height: 70vh;
    overflow: visible;
  }

  .hero-scroll,
  .hero-liquid {
    position: relative;
    transform: none;
  }

  .section-panel {
    position: relative;
    inset: auto;
    transform: none;
    overflow: visible;
  }

  .section-panel .section-header,
  .section-panel .content-split,
  .section-panel .values-grid,
  .section-panel .vision-panel__footer,
  .section-panel .panel-fill__footer,
  .section-panel .cta-banner {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-scroll__hint {
    opacity: 1;
  }
}
