/* intro v29 — Rolls-Royce thread: circle-expand reveal, half-ring, chat alignment, dual-layer parallax */

.intro-thread { min-height: 88vh; }

/* Clip-path circle expand from centre on load */
.intro-thread__reveal {
    animation: intro-thread-expand 900ms ease forwards;
}
@keyframes intro-thread-expand {
    from { clip-path: circle(0% at 50% 50%); }
    to   { clip-path: circle(150% at 50% 50%); }
}

/* Half-ring at the boundary (fixed size — no BS w-N/h-N utility) */
.intro-thread__half {
    width: 16rem;
    height: 8rem;
    opacity: 0.7;
    filter: blur(2px);
}
.intro-thread__sun { width: 6rem; height: 6rem; }
.intro-thread [data-msg] { max-width: 28rem; }

/* Dual-layer parallax offset (set by JS via custom props) */
.intro-thread__island [data-layer] {
    transition: transform 200ms ease-out;
    transform: translate(var(--px, 0), var(--py, 0));
}

/* Chat thread alternate alignment + retro corner tails */
.intro-thread [data-msg] { border-bottom-left-radius: 0.25rem; }
.intro-thread [data-msg]:nth-child(even) {
    margin-left: auto;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
    .intro-thread__reveal { animation: none; }
    .intro-thread__island [data-layer] { transition: none; }
}

/* sticky intro + hover CTA / links */
.services__intro {
  align-self: flex-start;
}

@media (min-width: 992px) {
  .services__intro {
    position: sticky;
    top: 6rem;
    z-index: 2;
  }
}

.services__hero-cta--lift {
  transition: filter 0.2s ease, transform 0.2s ease;
}

.services__hero-cta--lift:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.services__link--lift {
  transition: filter 0.2s ease;
}

.services__link--lift:hover {
  filter: brightness(1.12);
}

/* steps v23 - scroll progress fill driven by a JS-set --progress custom property */

.steps-scroll-timeline__fill {
    --progress: 0%;
    height: var(--progress);
    transition: height 120ms linear;
}

/* whyus v29 — woodblock print texture, glitch-flicker hero entrance, ECG heartbeat trace, hover blur/sharpen, run-in heading helper */

/* Woodblock print texture overlay — diagonal ruled lines drawn with currentColor, no literal color values */
.whyus-woodcut__texture {
    position: relative;
    isolation: isolate;
}

.whyus-woodcut__texture::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(118deg, currentColor 0, currentColor 1px, transparent 1px, transparent 7px);
    opacity: 0.05;
}

/* Glitch-flicker entrance on the hero card — brief opacity/position jitter settling to stable */
.whyus-woodcut__hero {
    animation: whyus-woodcut-glitch 700ms steps(1, end) both;
}

@keyframes whyus-woodcut-glitch {
    0% { opacity: 0; transform: translate(0, 0); }
    12% { opacity: 1; transform: translate(-3px, 2px); }
    24% { opacity: 0.6; transform: translate(3px, -2px); }
    36% { opacity: 1; transform: translate(-2px, 0); }
    48% { opacity: 0.75; transform: translate(2px, 1px); }
    62% { opacity: 1; transform: translate(-1px, -1px); }
    78% { opacity: 0.9; transform: translate(1px, 0); }
    100% { opacity: 1; transform: translate(0, 0); }
}

/* ECG heartbeat trace — draws in via stroke-dash, then loops softly (no BS/TW animation utility) */
.whyus-woodcut__ecg-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: whyus-woodcut-ecg-draw 3.4s ease-in-out infinite;
}

@keyframes whyus-woodcut-ecg-draw {
    0% { stroke-dashoffset: 500; }
    55% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -500; }
}

/* Card hover — background shape blurs out while foreground content sharpens/scales up */
.whyus-woodcut__card-decor {
    filter: blur(2px);
    transition: filter 300ms ease;
}

.whyus-woodcut__card-fg {
    transition: transform 250ms ease;
}

.whyus-woodcut__card:hover .whyus-woodcut__card-decor {
    filter: blur(0);
}

.whyus-woodcut__card:hover .whyus-woodcut__card-fg {
    transform: scale(1.05);
}

/* Run-in heading — keeps the h2 riding the paragraph's baseline so it reads as one flow */
.whyus-woodcut__runin-heading {
    margin: 0;
    vertical-align: baseline;
}

@media (prefers-reduced-motion: reduce) {
    .whyus-woodcut__hero,
    .whyus-woodcut__ecg-path,
    .whyus-woodcut__card-decor,
    .whyus-woodcut__card-fg {
        animation: none;
        transition: none;
    }
}

