/**
 * Physiotherapy & OT pages — cinematic motion layer
 * Scope: .trc-therapy-page
 * Respects prefers-reduced-motion
 */

/* Ambient stage behind hero */
.trc-therapy-page .trc-therapy-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.trc-therapy-page .trc-therapy-hero__ambient {
  position: absolute;
  inset: -12% -8%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.trc-therapy-page .trc-therapy-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.42;
  will-change: transform;
}

.trc-therapy-page .trc-therapy-hero__orb--a {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, rgba(239, 36, 40, 0.35) 0%, transparent 70%);
  animation: trcTherapyOrbDriftA 14s ease-in-out infinite alternate;
}

.trc-therapy-page .trc-therapy-hero__orb--b {
  width: min(36vw, 320px);
  height: min(36vw, 320px);
  right: -4%;
  bottom: -10%;
  background: radial-gradient(circle, rgba(116, 19, 29, 0.28) 0%, transparent 70%);
  animation: trcTherapyOrbDriftB 18s ease-in-out infinite alternate;
}

.trc-therapy-page .trc-therapy-hero__orb--c {
  width: min(28vw, 240px);
  height: min(28vw, 240px);
  top: 38%;
  left: 48%;
  background: radial-gradient(circle, rgba(239, 36, 40, 0.16) 0%, transparent 70%);
  animation: trcTherapyOrbDriftC 12s ease-in-out infinite alternate;
}

.trc-therapy-page .trc-therapy-hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.trc-therapy-page .trc-therapy-hero > .container {
  position: relative;
  z-index: 1;
}

@keyframes trcTherapyOrbDriftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(36px, 28px, 0) scale(1.08); }
}

@keyframes trcTherapyOrbDriftB {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-42px, -24px, 0) scale(1.12); }
}

@keyframes trcTherapyOrbDriftC {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-28px, 34px, 0); }
}

/* Hero cinematic entrance */
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero__media {
  opacity: 0;
  transform: translate3d(-40px, 24px, 0) scale(1.06);
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero__media.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-therapy-page .trc-therapy-hero__media {
  position: relative;
}

.trc-therapy-page .trc-therapy-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 2;
}

.trc-therapy-page .trc-therapy-hero__media img {
  transform: scale(1.08);
  transition: transform 8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.trc-therapy-page .trc-therapy-hero__media.is-in img {
  transform: scale(1);
}

.trc-therapy-page .trc-therapy-hero__media:hover img {
  transform: scale(1.05);
  transition-duration: 1.4s;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-about-kicker,
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__title,
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__lead,
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__text,
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__cta {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  filter: blur(6px);
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-about-kicker.is-in,
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__title.is-in,
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__lead.is-in,
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__text.is-in,
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__cta.is-in {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Title underline draw */
.trc-therapy-page .trc-therapy-block__title,
.trc-therapy-page .trc-therapy-hero__title {
  position: relative;
  display: inline-block;
}

.trc-therapy-page .trc-therapy-block__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--trc-therapy-accent), rgba(239, 36, 40, 0.05));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-therapy-page .trc-therapy-block.is-revealed .trc-therapy-block__title::after {
  transform: scaleX(1);
}

/* Section scroll reveal */
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-block {
  opacity: 0;
  transform: translate3d(0, 48px, 0);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-block.is-revealed {
  opacity: 1;
  transform: none;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-block--alt.is-revealed {
  animation: trcTherapySoftWash 1.2s ease both;
}

@keyframes trcTherapySoftWash {
  from { box-shadow: inset 0 0 0 0 rgba(116, 19, 29, 0); }
  to { box-shadow: inset 0 0 0 0 rgba(116, 19, 29, 0); }
}

/* Checklist cascade */
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-checklist li {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.98);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-checklist.is-staggered li.is-in {
  opacity: 1;
  transform: none;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-checklist.is-staggered li.is-in:hover {
  border-color: rgba(239, 36, 40, 0.28);
  box-shadow: 0 14px 28px -18px rgba(116, 19, 29, 0.35);
  transform: translateY(-2px);
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-fund li {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.98);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-fund.is-staggered li.is-in {
  opacity: 1;
  transform: none;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-fund.is-staggered li.is-in:hover {
  border-color: rgba(239, 36, 40, 0.28);
  box-shadow: 0 14px 28px -18px rgba(116, 19, 29, 0.35);
  transform: translateY(-2px);
}

.trc-therapy-page .trc-therapy-next.is-revealed .trc-therapy-block__title::after {
  transform: scaleX(1);
}

.trc-therapy-page .trc-therapy-checklist li i {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
}

.trc-therapy-page .trc-therapy-checklist li:hover i {
  transform: scale(1.2) rotate(-8deg);
  color: var(--trc-therapy-primary);
}

/* Jump nav cinematic */
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-jump {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-jump.is-in {
  opacity: 1;
  transform: none;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-jump__list li {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-jump.is-in .trc-therapy-jump__list li {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-therapy-page .trc-therapy-jump__list a {
  position: relative;
  overflow: hidden;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease,
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
}

.trc-therapy-page .trc-therapy-jump__list a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.45) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.trc-therapy-page .trc-therapy-jump__list a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -14px rgba(116, 19, 29, 0.45);
}

.trc-therapy-page .trc-therapy-jump__list a:hover::before {
  transform: translateX(120%);
}

.trc-therapy-page .trc-therapy-jump__list a.is-active {
  color: #fff;
  background: var(--trc-therapy-primary);
  border-color: var(--trc-therapy-primary);
}

/* CTA button pulse glow */
.trc-therapy-page .trc-therapy-join {
  position: relative;
  overflow: hidden;
}

.trc-therapy-page .trc-therapy-join::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-130%);
  transition: transform 0.7s ease;
}

.trc-therapy-page .trc-therapy-join:hover::after {
  transform: translateX(130%);
}

.trc-therapy-page .trc-therapy-join.is-pulse {
  animation: trcTherapyCtaPulse 2.8s ease-in-out infinite;
}

@keyframes trcTherapyCtaPulse {
  0%, 100% { box-shadow: 0 5px 18px rgba(239, 36, 40, 0.35); }
  50% { box-shadow: 0 8px 28px rgba(239, 36, 40, 0.55); }
}

/* Dividers draw in */
.trc-therapy-page.trc-therapy-js-ready .trc-ihc-story-divider {
  opacity: 0;
  transform: scaleX(0.4);
  transform-origin: center;
  transition: opacity 0.7s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-therapy-page.trc-therapy-js-ready .trc-ihc-story-divider.is-in {
  opacity: 1;
  transform: scaleX(1);
}

/* Prose line reveal */
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-prose p {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-block.is-revealed .trc-therapy-prose p {
  opacity: 1;
  transform: none;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-block.is-revealed .trc-therapy-prose p:nth-child(2) {
  transition-delay: 0.08s;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-block.is-revealed .trc-therapy-prose p:nth-child(3) {
  transition-delay: 0.16s;
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-block.is-revealed .trc-therapy-prose p:nth-child(4) {
  transition-delay: 0.24s;
}

/* Form / CTA section */
.trc-therapy-page.trc-therapy-js-ready .trc-ihc-story-cta {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.85s ease, transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-therapy-page.trc-therapy-js-ready .trc-ihc-story-cta.is-revealed {
  opacity: 1;
  transform: none;
}

.trc-therapy-page .trc-ihc-lead-form {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.trc-therapy-page .trc-ihc-lead-form:hover {
  transform: translateY(-4px);
}

/* Contact note float-in */
.trc-therapy-page.trc-therapy-js-ready .trc-therapy-contact-note {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-therapy-page.trc-therapy-js-ready .trc-therapy-block.is-revealed .trc-therapy-contact-note {
  opacity: 1;
  transform: none;
  transition-delay: 0.2s;
}

/* Breadcrumb fade */
.trc-therapy-page.trc-therapy-js-ready .breatcome-section {
  animation: trcTherapyBreadcrumbIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes trcTherapyBreadcrumbIn {
  from {
    opacity: 0;
    transform: translate3d(0, -18px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .trc-therapy-page .trc-therapy-hero__orb,
  .trc-therapy-page .trc-therapy-join.is-pulse {
    animation: none !important;
  }

  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero__media,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-about-kicker,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__title,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__lead,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__text,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-hero .trc-therapy-hero__cta,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-block,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-checklist li,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-fund li,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-jump,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-jump__list li,
  .trc-therapy-page.trc-therapy-js-ready .trc-ihc-story-divider,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-prose p,
  .trc-therapy-page.trc-therapy-js-ready .trc-ihc-story-cta,
  .trc-therapy-page.trc-therapy-js-ready .trc-therapy-contact-note,
  .trc-therapy-page.trc-therapy-js-ready .breatcome-section {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }

  .trc-therapy-page .trc-therapy-hero__media img {
    transform: none !important;
    transition: none !important;
  }
}
