/* Fresh Aqua motion layer. No content or layout changes.
   motion.js owns visibility, scroll progress and --drift-y. */

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #087f82, #59b9ad 78%, #b1e1c7);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
}

/* Three restrained, hand-drawn light trails; all are decorative. */
.ambient-lines {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  color: #278f8b;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ambient-lines--hero {
  width: 112%;
  height: auto;
  right: -8%;
  top: -2%;
  z-index: 0;
}
.ambient-lines--journey {
  width: 112%;
  height: 100%;
  left: -6%;
  top: -2%;
  z-index: -1;
}
.ambient-lines--cta {
  width: 75%;
  height: 100%;
  right: -5%;
  top: 0;
  color: #e6fff0;
  z-index: 1;
}
.ambient-lines__track {
  opacity: 0.2;
}
.ambient-lines__shine {
  stroke-width: 2;
  stroke-dasharray: 5 95;
  stroke-dashoffset: 100;
  opacity: 0.58;
  animation: aqua-line-shine 16s linear infinite;
  animation-play-state: paused;
}
.ambient-lines__star {
  opacity: 0.58;
  transform-origin: center;
  transform-box: fill-box;
  animation: aqua-star-glow 5.8s ease-in-out infinite;
  animation-play-state: paused;
}
.ambient-lines__star--small {
  animation-delay: -2.6s;
  opacity: 0.38;
}
.ambient-lines--journey .ambient-lines__shine {
  animation-delay: -5s;
}
.ambient-lines--cta .ambient-lines__shine {
  animation-delay: -9s;
  opacity: 0.7;
}
.journey::before {
  display: none;
}

/* Translate is independent of existing rotation and reveal transforms. */
.scroll-drift {
  translate: 0 0;
}
body[data-motion="on"] section.is-inview .scroll-drift {
  translate: 0 var(--drift-y, 0px);
}
.hero__inset {
  padding: 0;
  display: block;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.hero__inset img {
  animation: aqua-photo-breathe 9s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.hero__inset::after {
  content: "";
  position: absolute;
  inset: -15% -70%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    #ffffff50 50%,
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
  transform: translateX(-45%);
  animation: aqua-photo-shine 11s 2s ease-in-out infinite;
  animation-play-state: paused;
}
.hero__inset:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 5px;
}
.ambassador-label {
  animation: aqua-badge-float 7s ease-in-out infinite;
  animation-play-state: paused;
}
.ambassador-label__mark .icon {
  animation: aqua-mark-glow 5s ease-in-out infinite;
  animation-play-state: paused;
}

/* Existing ambient motion also sleeps while its section is outside the view. */
.hero__shape,
.social::before,
.intro__ambient span,
.intro__logo-frame::after,
.intro__orbit::after {
  animation-play-state: paused;
}
body[data-motion="on"][data-hidden="false"]
  section.is-inview
  :is(
    .ambient-lines__shine,
    .ambient-lines__star,
    .hero__shape,
    .hero__inset img,
    .ambassador-label,
    .ambassador-label__mark .icon
  ),
body[data-motion="on"][data-hidden="false"]
  section.is-inview
  .hero__inset::after,
body[data-motion="on"][data-hidden="false"] .social.is-inview::before,
body[data-motion="on"][data-hidden="false"].intro-active .intro__ambient span,
body[data-motion="on"][data-hidden="false"].intro-active
  .intro__logo-frame::after,
body[data-motion="on"][data-hidden="false"].intro-active .intro__orbit::after {
  animation-play-state: running;
}

/* A small icon response makes the concern choices feel tangible. */
.concern-card__icon {
  position: relative;
  isolation: isolate;
}
.concern-card__icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle, #bce6d9 0%, #e0f1e7 55%, transparent 73%);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  z-index: -1;
  transition:
    opacity 0.35s ease,
    transform 0.45s ease;
}
.concern-card__icon .icon {
  transition:
    transform 0.4s cubic-bezier(0.2, 0.75, 0.25, 1),
    stroke-width 0.3s,
    filter 0.3s;
}
.concern-card:is(:hover, :focus-visible) .concern-card__icon::before {
  opacity: 0.8;
  transform: translate(-50%, -50%) scale(1);
}
body[data-motion="on"]
  .concern-card:is(:hover, :focus-visible)
  .concern-card__icon
  .icon {
  transform: translateY(-2px) rotate(-5deg);
  stroke-width: 1.9;
  filter: drop-shadow(0 3px 8px #087f821c);
}
.concern-card:focus-visible,
.gallery-card .image-button:focus-visible,
.story-tile:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 5px;
}
.gallery-card .image-button img,
.story-tile img {
  transition:
    transform 0.75s cubic-bezier(0.2, 0.72, 0.22, 1),
    filter 0.55s ease;
}
body[data-motion="on"]
  .gallery-card
  .image-button:is(:hover, :focus-visible)
  img {
  transform: scale(1.035);
  filter: saturate(1.04);
}
body[data-motion="on"] .story-tile:is(:hover, :focus-visible) img {
  transform: scale(1.045);
}
.image-zoom,
.story-tile__view {
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.3s;
}
.image-button:is(:hover, :focus-visible) .image-zoom,
.story-tile:is(:hover, :focus-visible) .story-tile__view {
  color: var(--teal-deep);
  background: var(--ivory);
}
body[data-motion="on"] .image-button:is(:hover, :focus-visible) .image-zoom,
body[data-motion="on"]
  .story-tile:is(:hover, :focus-visible)
  .story-tile__view {
  transform: scale(1.04);
}

@keyframes aqua-line-shine {
  to {
    stroke-dashoffset: -100;
  }
}
@keyframes aqua-star-glow {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.92);
  }
  45% {
    opacity: 0.75;
    transform: scale(1.04);
  }
}
@keyframes aqua-photo-breathe {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1.065);
  }
}
@keyframes aqua-photo-shine {
  0%,
  72%,
  100% {
    opacity: 0;
    transform: translateX(-45%);
  }
  76% {
    opacity: 0.42;
  }
  87% {
    opacity: 0;
    transform: translateX(45%);
  }
}
@keyframes aqua-badge-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -5px;
  }
}
@keyframes aqua-mark-glow {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .ambient-lines--hero {
    width: 108%;
    right: -3%;
    top: 0;
    opacity: 0.68;
  }
  .ambient-lines--journey {
    width: 105%;
    left: -2.5%;
    opacity: 0.6;
  }
  .ambient-lines--cta {
    width: 100%;
    height: 65%;
    top: auto;
    bottom: 0;
    right: -10%;
    opacity: 0.65;
  }
  .scroll-drift,
  body[data-motion="on"] section.is-inview .scroll-drift {
    translate: 0 0;
  }
  .concern-card__icon::before {
    width: 66px;
    height: 66px;
  }
}

/* Pause must never freeze content at an animation's invisible first frame. */
body[data-motion="off"]
  :is(.intro__logo, .intro__title, .intro__description, .intro__portrait > img),
body.motion-paused
  :is(
    .intro__logo,
    .intro__title,
    .intro__description,
    .intro__portrait > img
  ) {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
body[data-motion="off"] :is(.reveal),
body.motion-paused :is(.reveal) {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
body[data-motion="off"] :is(.scroll-drift, .ambassador-label),
body.motion-paused :is(.scroll-drift, .ambassador-label) {
  translate: 0 0 !important;
}
body[data-motion="off"]
  :is(
    .hero__inset img,
    .concern-card,
    .concern-card__icon .icon,
    .gallery-card .image-button img,
    .story-tile,
    .story-tile img,
    .image-zoom,
    .story-tile__view
  ) {
  animation: none !important;
  transition: none !important;
  transform: none !important;
}
body[data-motion="off"] .intro__progress span {
  animation: none !important;
  transform: scaleX(1);
}
body[data-motion="off"] .intro__logo-frame::after,
body[data-motion="off"] .hero__inset::after {
  opacity: 0 !important;
}
body[data-hidden="true"] *,
body[data-hidden="true"] *::before,
body[data-hidden="true"] *::after {
  animation-play-state: paused !important;
}
html:has(body[data-motion="off"]) {
  scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
  .ambient-lines *,
  .hero__inset img,
  .hero__inset::after,
  .ambassador-label,
  .ambassador-label__mark .icon,
  .intro__logo,
  .intro__title,
  .intro__description,
  .intro__portrait > img {
    animation: none !important;
    transition: none !important;
  }
  .intro__logo,
  .intro__title,
  .intro__description,
  .intro__portrait > img {
    opacity: 1 !important;
    transform: none !important;
  }
  .scroll-drift,
  .ambassador-label {
    translate: 0 0 !important;
  }
  .hero__inset::after {
    display: none;
  }
  .hero__inset img,
  .concern-card,
  .concern-card__icon .icon,
  .gallery-card .image-button img,
  .story-tile,
  .story-tile img,
  .image-zoom,
  .story-tile__view {
    transform: none !important;
  }
  .intro__progress span {
    transform: scaleX(1) !important;
  }
}
