/* anim.css — extra animations, loaded last
   Global entrance system for every section except the hero (#top).
   Hidden states apply only once anim.js has set html.anim-ready, so without
   JavaScript (or with reduced motion) everything is simply shown.
   Only transform / translate / scale, opacity, filter, clip-path and stroke move. */

/* ---------- 1. Section headings: words rise from a mask, sharpening as they come ---------- */
.ah-w { display: inline-block; }
.ah-i { display: inline-block; }
.ah-nw { white-space: nowrap; }

/* the container's own fade is replaced by the choreography below */
.anim-ready .ag-own[data-reveal] { opacity: 1; transform: none; transition: none; }

.anim-ready .ah:not(.is-done) .ah-w { clip-path: inset(-.32em -.3em -.26em -.3em); }
.anim-ready .ah .ah-i {
  transform: translateY(135%);
  filter: blur(8px);
  opacity: 0;
  will-change: transform, filter;
}
.anim-ready .ah.is-on .ah-i {
  transform: none;
  filter: blur(0);
  opacity: 1;
  transition:
    transform 1.05s cubic-bezier(.16, 1, .3, 1) var(--ad, 0ms),
    filter .9s cubic-bezier(.3, .6, .3, 1) var(--ad, 0ms),
    opacity .45s linear var(--ad, 0ms);
}
.anim-ready .ah.is-done .ah-i { will-change: auto; }

/* the coral full stop pops in last, with a brief glow */
.anim-ready .ah .px-stop { transform: scale(0); }
.anim-ready .ah.is-on .px-stop { animation: ah-stop .8s cubic-bezier(.34, 1.56, .64, 1) var(--ad-stop, 0ms) both; }
@keyframes ah-stop {
  0%   { transform: scale(0); filter: drop-shadow(0 0 0 rgba(255, 107, 61, 0)); }
  55%  { transform: scale(1.45); filter: drop-shadow(0 0 .22em rgba(255, 107, 61, .95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 107, 61, 0)); }
}

/* ---------- 2. Eyebrows: the dot pops and a hairline draws out from it ---------- */
.ae-rel { position: relative; }
.anim-ready .ae { opacity: 0; translate: -6px 0; }
.anim-ready .ae::before { transform: scale(0); }
.anim-ready .ae::after {
  content: "";
  position: absolute;
  left: 3px;
  top: calc(100% + 6px);
  width: 56px;
  height: 1px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--coral, #FF6B3D), rgba(255, 107, 61, 0));
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
}
.anim-ready .ae.is-on {
  opacity: 1;
  translate: 0 0;
  transition: opacity .6s ease var(--ad, 0ms), translate .9s cubic-bezier(.16, 1, .3, 1) var(--ad, 0ms);
}
.anim-ready .ae.is-on::before { animation: ae-dot .7s cubic-bezier(.34, 1.56, .64, 1) var(--ad, 0ms) both; }
.anim-ready .ae.is-on::after { animation: ae-line 1.5s cubic-bezier(.16, 1, .3, 1) calc(var(--ad, 0ms) + 180ms) both; }
@keyframes ae-dot {
  0%   { transform: scale(0); }
  55%  { transform: scale(1.7); }
  100% { transform: scale(1); }
}
@keyframes ae-line {
  0%   { transform: scaleX(0); opacity: 1; }
  55%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* ---------- 3. Intros and body copy: fade and rise just after the heading ---------- */
.anim-ready .ap { opacity: 0; translate: 0 18px; }
.anim-ready .ap.is-on {
  opacity: 1;
  translate: 0 0;
  transition: opacity .9s ease var(--ad, 0ms), translate 1.1s cubic-bezier(.16, 1, .3, 1) var(--ad, 0ms);
}

/* ---------- 4. Line icons draw themselves in; the coral dot pops after ----------
   stroke-dash values set on the <svg> are inherited by the <use> copy of the symbol.
   --L is the longest stroked shape in that symbol, measured in anim.js. */
.anim-ready .aic {
  stroke-dasharray: var(--L, 80) var(--L, 80);
  stroke-dashoffset: var(--L, 80);
  --dot-s: 0;
  --dot-o: 0;
}
.anim-ready .aic.is-on {
  stroke-dashoffset: 0;
  --dot-s: 1;
  --dot-o: 1;
  --dot-d: calc(var(--ad, 0ms) + 620ms);
  transition: stroke-dashoffset 1s cubic-bezier(.65, 0, .35, 1) var(--ad, 0ms), transform .35s cubic-bezier(.16, 1, .3, 1);
}
.dot {
  transform-box: fill-box;
  transform-origin: center;
  scale: var(--dot-s, 1);
  opacity: var(--dot-o, 1);
  transition: scale .6s cubic-bezier(.34, 1.8, .64, 1) var(--dot-d, 0s), opacity .2s linear var(--dot-d, 0s);
}

/* ---------- 5. Scroll progress hairline under the fixed header ---------- */
.anim-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--coral, #FF6B3D), var(--cream, #F4F0E6));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
  z-index: 2;
}

/* ---------- 6. Buttons: a light sheen on hover for every primary button ---------- */
.btn--primary.anim-sheen { overflow: hidden; }
.btn--primary.anim-sheen::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: -70%;
  width: 45%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-18deg);
  transition: transform .9s cubic-bezier(.16, 1, .3, 1);
}
.btn--primary.anim-sheen:hover::after,
.btn--primary.anim-sheen:focus-visible::after { transform: skewX(-18deg) translateX(420%); }

/* magnetic pull on large calls to action (desktop): uses `translate`, so hover transforms still work */
.anim-mag {
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s cubic-bezier(.16, 1, .3, 1), translate .45s cubic-bezier(.16, 1, .3, 1), background-color .25s, color .25s, border-color .25s;
}

/* ---------- Paused or reduced motion: jump to the end state ---------- */
html.is-paused .ah .ah-i,
html.is-paused .ae,
html.is-paused .ap {
  transition: none !important;
  opacity: 1;
  transform: none;
  translate: none;
  filter: none;
}
html.is-paused .ah .ah-w { clip-path: none; }
html.is-paused .ah .px-stop { animation: none !important; transform: none; }
html.is-paused .ae::before { animation: none !important; transform: none; }
html.is-paused .ae::after { animation: none !important; opacity: 0; }
html.is-paused .aic { transition: none !important; stroke-dashoffset: 0; --dot-s: 1; --dot-o: 1; }
html.is-paused .aic .dot { transition: none; }
html.is-paused .anim-mag { translate: none; }

@media (prefers-reduced-motion: reduce) {
  .anim-ready .ah .ah-i,
  .anim-ready .ae,
  .anim-ready .ap { transition: none !important; opacity: 1; transform: none; translate: none; filter: none; }
  .anim-ready .ah .ah-w { clip-path: none; }
  .anim-ready .ah .px-stop { animation: none !important; transform: none; }
  .anim-ready .ae::before { animation: none !important; transform: none; }
  .anim-ready .ae::after { animation: none !important; opacity: 0; }
  .anim-ready .aic { transition: none !important; stroke-dashoffset: 0; --dot-s: 1; --dot-o: 1; }
  .dot { transition: none; }
  .btn--primary.anim-sheen::after { display: none; }
  .anim-mag { translate: none; }
}
