/* The document stays visible without JavaScript; GSAP owns only active motion. */
html {
  scroll-padding-top: 100px;
}

.site-header {
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(112, 181, 216, 0.4);
  box-shadow: 0 8px 32px rgba(8, 92, 150, 0.1);
}

.reading-progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 3px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--azul), var(--menta), var(--lila), var(--rosa));
}

.hero,
.page-hero {
  isolation: isolate;
}

.hero > .container,
.page-hero > .container {
  position: relative;
  z-index: 1;
}

.motion-orbs {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.motion-orb {
  position: absolute;
  width: clamp(180px, 30vw, 460px);
  aspect-ratio: 1;
  border-radius: 50%;
}

.motion-orb--blue {
  top: -14%;
  right: 17%;
  background: radial-gradient(circle at 35% 35%, rgba(25, 185, 230, 0.17), rgba(80, 216, 199, 0.05) 65%, transparent 72%);
}

.motion-orb--pink {
  right: -9%;
  bottom: -18%;
  width: clamp(220px, 38vw, 560px);
  background: radial-gradient(circle at 40% 40%, rgba(242, 90, 166, 0.17), rgba(169, 142, 230, 0.06) 65%, transparent 72%);
}

.motion-orb--mint {
  bottom: -26%;
  left: -8%;
  background: radial-gradient(circle, rgba(80, 216, 199, 0.2), rgba(255, 225, 105, 0.05) 65%, transparent 72%);
}

.motion-orbit {
  position: absolute;
  top: 6%;
  right: -4%;
  width: clamp(280px, 46vw, 660px);
  aspect-ratio: 1;
  border: 1px solid rgba(25, 185, 230, 0.16);
  border-radius: 50%;
}

.motion-orbit::before,
.motion-orbit::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--menta);
  box-shadow: 0 0 0 7px rgba(80, 216, 199, 0.1);
}

.motion-orbit::before {
  top: 14%;
  left: 14%;
}

.motion-orbit::after {
  right: 14%;
  bottom: 14%;
  background: var(--rosa);
  box-shadow: 0 0 0 7px rgba(242, 90, 166, 0.08);
}

.motion-word {
  display: inline-block;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  overflow: clip;
  vertical-align: top;
}

.motion-word-inner {
  display: inline-block;
}

.motion-image-frame {
  overflow: hidden;
  border-radius: calc(var(--radio) - 8px);
}

.motion-image-frame--team {
  border-radius: 0;
}

.team-card > .motion-image-frame > img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.hero-scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 22px;
  left: max(20px, calc((100% - var(--max)) / 2));
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--azul-profundo);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-scroll-icon {
  display: grid;
  width: 28px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(8, 92, 150, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-scroll-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: translate 0.25s ease;
}

@media (min-width: 861px) {
  .scroll-photo-stack[data-stack-motion] {
    min-height: var(--stack-height);
    grid-template-columns: 1fr;
    place-items: center;
  }

  .scroll-photo-stack[data-stack-motion] .photo-card,
  .scroll-photo-stack[data-stack-motion] .visual-card {
    position: absolute;
    width: min(84%, 440px);
    transform: translate3d(var(--stack-x, 0px), var(--stack-y, 0px), 0)
      rotate(var(--stack-rotate, 0deg)) scale(var(--stack-scale, 1));
    opacity: var(--stack-opacity, 1);
    z-index: var(--stack-z, 1);
    transition: box-shadow 0.3s ease;
  }

  .learning-scroll-stack[data-stack-motion] .photo-card {
    width: min(88%, 500px);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .card,
  .service-card,
  .sense-card,
  .team-card,
  .step-card,
  .quick-action,
  .location-card,
  .contact-card {
    transition: translate 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }

  .card:hover,
  .service-card:hover,
  .sense-card:hover,
  .team-card:hover,
  .step-card:hover,
  .quick-action:hover,
  .location-card:hover,
  .contact-card:hover {
    translate: 0 -5px;
    box-shadow: 0 24px 44px rgba(8, 92, 150, 0.15);
  }

  .hero-scroll-cue:hover svg {
    translate: 0 3px;
  }
}

@media (max-width: 640px) {
  .hero-scroll-cue {
    left: 32px;
    bottom: 16px;
  }

  .motion-orbit {
    top: auto;
    bottom: 2%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-orbs,
  .reading-progress,
  .hero-scroll-cue {
    display: none;
  }
}
