/* TLH colour and motion polish.
   A changing editorial ground gives each chapter its own energy while the
   repeated purple actions make the journey feel like one coherent system. */

:root {
  --tlh-purple: #4c3074;
  --tlh-purple-hover: #3d265d;
  --tlh-lilac: #ded0ee;
  --tlh-mist: #f3eef8;
  /* Shared chapter ground. What we do and Impact run continuous, so they read
     as one field rather than two bands with a seam between them. */
  --tlh-chapter: #e9def2;
  --tlh-pointer-x: 0px;
  --tlh-pointer-y: 0px;
}

body,
.page-content { background: #fff; }

body.film-handoff .site-bg { opacity: 0 !important; }

/* The Who We Are chapter stays open enough for the existing 3D monogram, but
   it no longer sits on a blank white sheet. */
.page-content {
  background-color: #fff;
  background-image:
    linear-gradient(rgba(95, 60, 145, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 60, 145, .045) 1px, transparent 1px);
  background-size: clamp(4rem, 7vw, 7rem) clamp(4rem, 7vw, 7rem);
}

/* Service chapter: a lilac editorial field with soft, unfocused colour moving
   behind the content. There are deliberately no visible geometric edges. */
.what-we-do.what-index-section {
  isolation: isolate;
  overflow: clip;
  /* The fixed page-wash is the ground here; transparency keeps its scrubbed
     circles visible as this chapter rises over the finished film. */
  background: transparent;
}
body.wash-on .what-we-do.what-index-section {
  --ink: #211b29;
  --slate: #64647d;
}

/* Post-film colour handoff: scrolling releases the two circles once, then a
   long time-based transition carries them to the light-lilac ground. */
.page-wash-circle {
  width: 72vmax;
  height: 72vmax;
  opacity: 1;
  transition: transform 2.58s cubic-bezier(.45, 0, .55, 1);
}
.page-wash-circle.is-left {
  left: -23vmax;
  bottom: -27vmax;
  background: var(--tlh-chapter);
}
.page-wash-circle.is-right {
  top: -28vmax;
  right: -24vmax;
  background: var(--tlh-chapter);
  transition-duration: 2.75s;
  transition-delay: .17s;
}
body.wash-on .page-wash-circle { --wash-scale: 2.65; }

/* Ambient haze is generated in short-lived pairs instead of being anchored to
   a section edge. Every blob receives a fresh size, position and route in JS. */
.ambient-haze-layer {
  position: fixed;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease;
}
body.wash-settled .ambient-haze-layer { opacity: 1; }
.ambient-haze-blob {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--haze-size);
  height: var(--haze-size);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--haze-colour) 0%, rgba(76, 35, 126, .38) 38%, transparent 72%);
  filter: blur(var(--haze-blur));
  opacity: 0;
  mix-blend-mode: multiply;
  will-change: transform, opacity;
}

/* Impact is the richest light chapter: the globe sits over a diffused bloom
   inspired by light passing through frosted glass. */
.home-impact {
  isolation: isolate;
  background: transparent;
}
.home-impact-copy > p:not(.home-impact-eyebrow),
.home-impact-hint,
.home-impact-partners > p { color: #594a67; }

/* Team continues the same lavender field as What We Do. */
.team {
  isolation: isolate;
  overflow: hidden;
  background: transparent;
}

@keyframes tlh-haze-drift-a {
  0% {
    opacity: var(--haze-low);
    transform: translate3d(var(--tlh-pointer-x), var(--tlh-pointer-y), 0) scale(.94) rotate(-3deg);
    animation-timing-function: cubic-bezier(.45, 0, .2, 1);
  }
  16% {
    opacity: var(--haze-high);
    transform: translate3d(calc(20vw + var(--tlh-pointer-x)), calc(-10vh + var(--tlh-pointer-y)), 0) scale(1.08) rotate(2deg);
    animation-timing-function: cubic-bezier(.7, 0, .3, 1);
  }
  35% {
    opacity: .1;
    transform: translate3d(calc(6vw + var(--tlh-pointer-x)), calc(15vh + var(--tlh-pointer-y)), 0) scale(.98) rotate(-1deg);
    animation-timing-function: cubic-bezier(.25, .1, .25, 1);
  }
  57% {
    opacity: var(--haze-mid);
    transform: translate3d(calc(-24vw + var(--tlh-pointer-x)), calc(-7vh + var(--tlh-pointer-y)), 0) scale(1.12) rotate(4deg);
    animation-timing-function: cubic-bezier(.55, 0, .25, 1);
  }
  72% {
    opacity: var(--haze-low);
    transform: translate3d(calc(-8vw + var(--tlh-pointer-x)), calc(18vh + var(--tlh-pointer-y)), 0) scale(.92) rotate(1deg);
    animation-timing-function: cubic-bezier(.35, 0, .2, 1);
  }
  88% {
    opacity: var(--haze-high);
    transform: translate3d(calc(26vw + var(--tlh-pointer-x)), calc(7vh + var(--tlh-pointer-y)), 0) scale(1.06) rotate(-2deg);
  }
  100% {
    opacity: var(--haze-low);
    transform: translate3d(var(--tlh-pointer-x), var(--tlh-pointer-y), 0) scale(.94) rotate(-3deg);
  }
}
@keyframes tlh-haze-drift-b {
  0% {
    opacity: var(--haze-low);
    transform: translate3d(var(--tlh-pointer-x), var(--tlh-pointer-y), 0) scale(.96) rotate(2deg);
    animation-timing-function: cubic-bezier(.4, 0, .2, 1);
  }
  21% {
    opacity: var(--haze-mid);
    transform: translate3d(calc(-22vw + var(--tlh-pointer-x)), calc(11vh + var(--tlh-pointer-y)), 0) scale(1.1) rotate(-3deg);
    animation-timing-function: cubic-bezier(.65, 0, .2, 1);
  }
  43% {
    opacity: var(--haze-high);
    transform: translate3d(calc(16vw + var(--tlh-pointer-x)), calc(-16vh + var(--tlh-pointer-y)), 0) scale(1.02) rotate(4deg);
    animation-timing-function: cubic-bezier(.3, .1, .2, 1);
  }
  61% {
    opacity: .07;
    transform: translate3d(calc(25vw + var(--tlh-pointer-x)), calc(4vh + var(--tlh-pointer-y)), 0) scale(.91) rotate(1deg);
    animation-timing-function: cubic-bezier(.55, 0, .3, 1);
  }
  79% {
    opacity: var(--haze-high);
    transform: translate3d(calc(-14vw + var(--tlh-pointer-x)), calc(18vh + var(--tlh-pointer-y)), 0) scale(1.12) rotate(-4deg);
  }
  100% {
    opacity: var(--haze-low);
    transform: translate3d(var(--tlh-pointer-x), var(--tlh-pointer-y), 0) scale(.96) rotate(2deg);
  }
}

/* One unmistakable CTA language. Secondary controls (carousel arrows, map
   pins and panel triggers) keep their component-specific interaction styles. */
.header-cta,
.hero-cta,
.what-index-cta,
.home-impact-link,
.home-impact-card-copy > a,
.team-more,
.impact-pill,
.impact-text-link,
.impact-hover-link {
  border-color: transparent;
  background: var(--tlh-purple);
  color: #fff;
  box-shadow: 0 .65rem 1.5rem rgba(56, 31, 84, .16);
}

.home-impact-link,
.team-more,
.impact-text-link,
.impact-hover-link {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-height: 44px;
  width: fit-content;
  padding: .78rem 1.15rem;
  border-radius: 999px;
}
.home-impact-card-copy > a {
  justify-content: space-between;
  padding: .8rem 1rem;
  border: 0;
  border-radius: 999px;
}
.team-more span,
.home-impact-link span,
.home-impact-card-copy > a span { color: #fff; }
.what-index-cta { background: var(--tlh-purple); }
.what-index-cta span { color: var(--tlh-purple); }

.header-cta:hover,
.hero-cta:hover,
.what-index-cta:hover,
.home-impact-link:hover,
.home-impact-card-copy > a:hover,
.team-more:hover,
.impact-pill:hover,
.impact-text-link:hover,
.impact-hover-link:hover {
  background: var(--tlh-purple-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 .9rem 2rem rgba(56, 31, 84, .24);
}

/* The impact destination keeps its cinematic map, while the chapters after it
   pick up the new changing ground and CTA system. */
.impact-page { background: #f1eaf6; }
.impact-page .impact-partners {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: #eee4f5;
}
.impact-page .impact-partners::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -10%;
  bottom: -35%;
  width: 68%;
  height: 80%;
  border-radius: 55% 45% 62% 38% / 40% 58% 42% 60%;
  background: radial-gradient(ellipse at center, rgba(78, 31, 132, .5), transparent 64%);
  filter: blur(52px);
  --haze-low: .05;
  --haze-mid: .52;
  --haze-high: .78;
  opacity: var(--haze-mid);
  pointer-events: none;
  animation: tlh-haze-drift-a 18s linear -17s infinite;
}
.impact-page .impact-contact { background: #d9c4ec; }

/* The story-card action reads as an editorial link inside the white card;
   the primary page action above remains the solid TLH-purple CTA. */
.impact-page .impact-hover-link {
  min-height: 32px;
  margin-top: .55rem;
  padding: .3rem 0;
  border-radius: 0;
  background: transparent;
  color: var(--tlh-purple);
  box-shadow: none;
}
.impact-page .impact-hover-link:hover {
  background: transparent;
  color: var(--tlh-purple-hover);
  box-shadow: none;
  transform: none;
}
.impact-page .impact-header .header-cta { background: var(--tlh-purple); color: #fff; }

@media (min-width: 900px) {
  .home-impact-link,
  .team-more,
  .impact-text-link { padding-inline: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-haze-layer { display: none; }
  .what-we-do.what-index-section::before,
  .what-we-do.what-index-section::after,
  .home-impact::before,
  .team::before,
  .impact-page .impact-partners::before,
  .header-cta,
  .hero-cta,
  .what-index-cta,
  .home-impact-link,
  .home-impact-card-copy > a,
  .team-more,
  .impact-pill,
  .impact-text-link,
  .impact-hover-link { transition: none; animation: none; }
}
