/* anim-c.css — extra animations, loaded last
   Sections: How it works, Why choose us, the CTA band, Contact and the footer.
   Only transform, opacity, background-position and (on small elements) box-shadow move.
   Loops pause with html.is-paused and .perf-off; reduced motion shows the still final look. */

/* ==========================================================================
   1. How it works: the active step's tile breathes, its copy slides in
   ========================================================================== */
.process2 .p2-tile::after {
  /* a soft halo around the lit tile; only opacity and scale move */
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 5px rgba(255, 107, 61, .16), 0 0 34px 2px rgba(255, 107, 61, .55);
  opacity: 0;
  transition: opacity .5s ease;
}
.process2 .p2-step--on .p2-tile::after { box-shadow: 0 0 0 5px rgba(92, 242, 194, .16), 0 0 36px 2px rgba(92, 242, 194, .5); }
.process2 .p2-step.is-on.is-lit .p2-tile::after { opacity: .5; animation: pc-breathe 3.2s ease-in-out infinite; }
.process2 .p2-step.is-on.is-lit .p2-tile { animation: pc-tile-pop .7s var(--ease-spring) both; }

@media (min-width: 1100px) and (prefers-reduced-motion: no-preference) {
  /* desktop sticky mode: each step's copy glides in as the current reaches it */
  .js .process2 .p2-step.is-on .p2-title { animation: pc-copy-in .8s var(--ease-out) both; }
  .js .process2 .p2-step.is-on .p2-text { animation: pc-copy-in .9s var(--ease-out) both .09s; }
}

@keyframes pc-breathe {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes pc-tile-pop {
  0% { transform: scale(.9); }
  100% { transform: none; }
}
@keyframes pc-copy-in {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   2. Why choose us: a light sweep across the glass on hover, a ring pulse on the icon
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  .why2 .why2__card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(110deg, transparent 36%, rgba(255, 236, 220, .1) 46%, rgba(255, 255, 255, .2) 50%, rgba(255, 236, 220, .1) 54%, transparent 64%) 130% 0 / 260% 100% no-repeat;
    transition: background-position 0s .9s;
  }
  .why2 .why2__item:hover .why2__card::before {
    background-position: -30% 0;
    transition: background-position 1.1s cubic-bezier(.3, .7, .2, 1);
  }

  .why2 .why2__ico::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid rgba(255, 143, 102, .7);
    opacity: 0;
  }
  .why2 .why2__item:hover .why2__ico::after { animation: wc-ring 1.8s var(--ease-out) infinite; }
  .why2 .why2__item:hover .why2__ico .icon { animation: wc-ico-nudge .6s var(--ease-spring) both; }
}
@keyframes wc-ring {
  0% { opacity: .9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}
@keyframes wc-ico-nudge {
  0% { transform: scale(1); }
  45% { transform: scale(1.14) rotate(-6deg); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   3. CTA: a slow aurora behind the LED sign; the quote button breathes
   ========================================================================== */
.cta .ledsign::before,
.cta .ledsign::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}
.cta .ledsign::before {
  left: -6%; right: 30%;
  top: -40%; bottom: -45%;
  background: radial-gradient(closest-side, rgba(255, 107, 61, .34), rgba(255, 107, 61, .12) 55%, transparent);
  animation: cc-aurora-a 16s ease-in-out infinite alternate;
}
.cta .ledsign::after {
  left: 34%; right: -6%;
  top: -30%; bottom: -50%;
  background: radial-gradient(closest-side, rgba(255, 150, 96, .22), rgba(92, 242, 194, .07) 60%, transparent);
  animation: cc-aurora-b 19s ease-in-out infinite alternate;
}
@keyframes cc-aurora-a {
  0% { opacity: .55; transform: translate3d(-4%, 2%, 0) scale(1); }
  50% { opacity: 1; transform: translate3d(6%, -4%, 0) scale(1.12); }
  100% { opacity: .7; transform: translate3d(14%, 3%, 0) scale(.96); }
}
@keyframes cc-aurora-b {
  0% { opacity: .8; transform: translate3d(4%, -2%, 0) scale(1.05); }
  50% { opacity: .45; transform: translate3d(-8%, 4%, 0) scale(.94); }
  100% { opacity: 1; transform: translate3d(-16%, -3%, 0) scale(1.1); }
}

.cta .cta__actions .btn--primary { animation: cc-breathe 3.6s ease-in-out infinite 1s; }
.cta .cta__actions .btn--primary:hover,
.cta .cta__actions .btn--primary:focus-visible { animation: none; }
@keyframes cc-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 61, 0), 0 10px 30px -12px rgba(255, 107, 61, .6); }
  50% { box-shadow: 0 0 0 7px rgba(255, 107, 61, .13), 0 14px 42px -10px rgba(255, 107, 61, .85); }
}

/* the sheen on the two key buttons (CTA quote, Send enquiry) */
.cta .cta__actions .btn--primary,
.contact .form__foot .btn--primary { overflow: hidden; }
.cta .cta__actions .btn--primary::after,
.contact .form__foot .btn--primary::after {
  content: "";
  position: absolute;
  top: -10%; bottom: -10%;
  left: -60%;
  width: 40%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-18deg);
}
@media (hover: hover) and (pointer: fine) {
  .cta .cta__actions .btn--primary:hover::after,
  .contact .form__foot .btn--primary:hover::after { animation: cc-sheen .95s var(--ease-out) both; }
}
.cta .cta__actions .btn--primary > *,
.contact .form__foot .btn--primary > * { position: relative; z-index: 1; }
@keyframes cc-sheen {
  from { transform: skewX(-18deg) translateX(0); }
  to { transform: skewX(-18deg) translateX(480%); }
}

/* ==========================================================================
   4. Contact: underline draws in on focus, chips pop, a floating light on the card
   ========================================================================== */
.contact .field input,
.contact .field textarea {
  background-image: linear-gradient(90deg, var(--coral) 50%, transparent 50%);
  background-repeat: no-repeat;
  background-size: 200% 2.5px;
  background-position: 100% 100%;
  transition: border-color .2s, box-shadow .2s, background-position .55s var(--ease-out);
}
.contact .field input:focus,
.contact .field textarea:focus { background-position: 0 100%; }

.contact .chip input:checked + span { animation: ct-chip-pop .5s var(--ease-spring); }
.contact .chip input:checked + span::before { animation: ct-dot-pop .55s var(--ease-spring); }
.contact .chip.is-flash input:checked + span { animation: ct-chip-pop .5s var(--ease-spring), chip-flash 1.6s ease; }
@keyframes ct-chip-pop {
  0% { transform: scale(.94); }
  55% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes ct-dot-pop {
  0% { transform: scale(.4); }
  60% { transform: scale(1.7); }
  100% { transform: scale(1); }
}

.contact .ccard { position: relative; isolation: isolate; }
.contact .ccard::before {
  /* a soft light drifting slowly across the green card */
  content: "";
  position: absolute;
  z-index: -1;
  top: -40%;
  left: -20%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(92, 242, 194, .16), rgba(244, 240, 230, .05) 55%, transparent);
  animation: ct-float 14s ease-in-out infinite alternate;
}
@keyframes ct-float {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: .8; }
  50% { transform: translate3d(45%, 18%, 0) scale(1.15); opacity: 1; }
  100% { transform: translate3d(95%, 4%, 0) scale(.95); opacity: .75; }
}

/* ==========================================================================
   5. Footer: columns rise in, link underlines draw, the back-to-top arrow bobs
   ========================================================================== */
@supports (animation-timeline: view()) and (overflow: clip) {
  /* clip instead of hidden: same clipping, but the footer stops being a scroll box,
     so the columns follow the page scroll */
  .site-footer { overflow: clip; }
  @media (prefers-reduced-motion: no-preference) {
    html:not(.is-paused) .site-footer .ft > * {
      animation: ft-col-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }
    html:not(.is-paused) .site-footer .ft > :nth-child(2) { animation-range: entry 8% entry 88%; }
    html:not(.is-paused) .site-footer .ft > :nth-child(3) { animation-range: entry 16% entry 96%; }
    html:not(.is-paused) .site-footer .ft > :nth-child(4) { animation-range: entry 24% cover 50%; }
  }
}
@keyframes ft-col-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

/* labels sit on one line from 1100px, so the underline can follow the text baseline */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  .site-footer .ft__links a::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% + 12px);
    height: 2px;
    border-radius: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, var(--coral), var(--coral-soft));
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .45s var(--ease-out);
  }
  .site-footer .ft__links a:hover::before {
    transform: scaleX(1);
    transform-origin: left center;
  }
}

@media (hover: hover) and (pointer: fine) {
  .site-footer .ft__top:hover .ft__top-ico .icon { animation: ft-bob 1.1s ease-in-out infinite; }
}
@keyframes ft-bob {
  0%, 100% { transform: rotate(-90deg) translateX(0); }
  50% { transform: rotate(-90deg) translateX(4px); }
}

/* ==========================================================================
   Pause, the performance switch and reduced motion
   ========================================================================== */
html.is-paused :is(.process2, .why2, .cta, .contact, .site-footer) *,
html.is-paused :is(.process2, .why2, .cta, .contact, .site-footer) *::before,
html.is-paused :is(.process2, .why2, .cta, .contact, .site-footer) *::after,
.perf-off .p2-tile::after,
.perf-off .ledsign::before,
.perf-off .ledsign::after,
.perf-off .cta__actions .btn--primary,
.perf-off .ccard::before,
.process2.is-off .p2-tile::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .process2 .p2-tile,
  .process2 .p2-tile::after,
  .why2 .why2__ico::after,
  .why2 .why2__ico .icon,
  .cta .ledsign::before,
  .cta .ledsign::after,
  .cta .cta__actions .btn--primary,
  .cta .cta__actions .btn--primary::after,
  .contact .form__foot .btn--primary::after,
  .contact .chip span,
  .contact .chip span::before,
  .contact .ccard::before,
  .site-footer .ft__top-ico .icon { animation: none !important; }
  .why2 .why2__card::before,
  .contact .form__foot .btn--primary::after,
  .cta .cta__actions .btn--primary::after { display: none; }
  .process2 .p2-step.is-on.is-lit .p2-tile::after { opacity: .6; }
  .contact .field input,
  .contact .field textarea { transition: border-color .2s, box-shadow .2s; }
  .site-footer .ft__links a::before { transition: none; }
}
