/* PATCH / SITE-WIDE MOTION
 * Decorative layers only. Loaded after styles.css and nav-motion.css.
 * No text, image or control depends on an animation becoming visible.
 */
:root { --motion-ease: cubic-bezier(.22,1,.36,1); }
.motion-scene { position: relative; }

/* Soft moving colour belongs to the panels, not just the hero. */
.motion-wash-host { position: relative; isolation: isolate; }
.motion-wash { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: -1; pointer-events: none; }
.motion-wash::before, .motion-wash::after {
  content: ''; position: absolute; width: 65%; height: 160%; top: -30%;
  opacity: 0; border-radius: 50%; pointer-events: none;
}
.motion-wash::before { left: -18%; background: radial-gradient(ellipse, #55e3bb24, transparent 67%); }
.motion-wash::after { right: -16%; background: radial-gradient(ellipse, #ff4b4518, transparent 66%); }
html[data-motion="on"] .motion-wash::before,
html[data-motion="on"] .motion-wash::after { opacity: 1; animation: patch-panel-glow 12s ease-in-out infinite alternate; animation-play-state: paused; }
html[data-motion="on"] .motion-wash::after { animation-delay: -6s; animation-direction: alternate-reverse; }
html[data-motion="on"] .motion-in-view > .motion-wash::before,
html[data-motion="on"] .motion-in-view > .motion-wash::after { animation-play-state: running; }
@keyframes patch-panel-glow { from { transform: translate3d(-5%, -3%, 0) scale(.86); } to { transform: translate3d(27%, 8%, 0) scale(1.13); } }

/* Category photographs gently come alive in sequence. Their labels stay still. */
.category-card, .wide-category-grid > article { --cycle-time: 3200ms; }
.category-card .category-icon, .wide-category-grid .category-icon {
  transition: box-shadow .45s ease, background-color .45s ease;
}
html[data-motion="on"] .category-card .category-image img {
  transition: transform 1.8s var(--motion-ease);
}
html[data-motion="on"] .category-card.is-motion-active .category-image img { transform: scale(1.075); }
html[data-motion="on"] .category-card.is-motion-active .category-icon,
html[data-motion="on"] .wide-category-grid > .is-motion-active .category-icon { box-shadow: 0 0 0 7px #ffffff45, 0 5px 20px #162d2112; }
html[data-motion="on"] .is-motion-active .category-icon .icon { animation: patch-icon-wave 1s var(--motion-ease) both; }
@keyframes patch-icon-wave { 0% { rotate: -10deg; scale: .9; } 55% { rotate: 7deg; scale: 1.12; } 100% { rotate: 0deg; scale: 1; } }

/* The booking journey loops: Follow -> Get pinged -> Book. Not a live status. */
.steps-grid { position: relative; }
.step-card { position: relative; overflow: hidden; --cycle-time: 2800ms; }
.step-card::after { content: ''; position: absolute; left: 26px; right: 26px; bottom: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--coral), var(--mint)); transform: scaleX(0); transform-origin: left; }
.step-icon { position: relative; }
.step-icon::before { content: ''; position: absolute; inset: -5px; border: 1px solid #55e3bb; border-radius: 50%; opacity: 0; pointer-events: none; }
html[data-motion="on"] .step-card.is-motion-active { border-color: #d6efe5; box-shadow: 0 12px 32px #24392f0c; }
html[data-motion="on"] .step-card.is-motion-active::after { animation: patch-journey-progress var(--cycle-time) linear both; }
html[data-motion="on"] .step-card.is-motion-active .step-icon::before { animation: patch-soft-ring 1.6s ease-out both; }
html[data-motion="on"] .step-card.is-motion-active .step-icon .icon { animation: patch-icon-wave .8s var(--motion-ease) both; }
html[data-motion="on"] .step-card:nth-child(2).is-motion-active .step-icon .icon { animation: patch-bell-ring 1s ease-in-out both; transform-origin: 50% 18%; }
@keyframes patch-journey-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes patch-soft-ring { 0% { opacity: .5; scale: .82; } 100% { opacity: 0; scale: 1.4; } }
@keyframes patch-bell-ring { 0%,100% { rotate: 0deg; } 15% { rotate: -16deg; } 30% { rotate: 13deg; } 46% { rotate: -9deg; } 64% { rotate: 6deg; } 82% { rotate: -3deg; } }
.motion-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: -1; }
.motion-path path { stroke: #d3e8e0; stroke-width: 1.5; stroke-dasharray: 3 6; fill: none; }
.motion-path .path-flow { stroke: var(--mint); stroke-width: 2.5; stroke-dasharray: 12 160; opacity: 0; }
html[data-motion="on"] .motion-in-view .motion-path .path-flow { opacity: .9; animation: patch-flow 6s linear infinite; }
@keyframes patch-flow { to { stroke-dashoffset: -344; } }

/* Portal and offer framing: no made-up live metrics or altered screenshots. */
.portal-image, .offer-card { position: relative; }
.portal-image::after { content: ''; position: absolute; inset: 0; pointer-events: none; border: 2px solid transparent; border-radius: inherit; }
html[data-motion="on"] .portal-image.motion-in-view::after { animation: patch-frame-breathe 7s ease-in-out infinite; }
@keyframes patch-frame-breathe { 0%,100% { border-color: #55e3bb08; } 50% { border-color: #55e3bb70; } }
.check-list li span { flex-shrink: 0; }
html[data-motion="on"] .check-list li.motion-checked span { background: #c4f6e6; }
html[data-motion="on"] .portal-tabs button { transition: color .2s ease, background-color .25s ease, transform .25s var(--motion-ease), box-shadow .25s ease; }
html[data-motion="on"] .portal-tabs button:hover { transform: translateY(-3px); box-shadow: 0 6px 16px #0f11150c; }

/* Integration accents cycle without implying the integrations are connected. */
.integration-card { position: relative; --cycle-time: 2400ms; }
.integration-card::after { content: ''; position: absolute; left: 27px; right: 27px; top: 0; height: 3px; border-radius: 4px; background: linear-gradient(90deg, var(--mint), #9af0d6); transform: scaleX(0); transform-origin: left; pointer-events: none; }
html[data-motion="on"] .integration-card.is-motion-active { border-color: #9ddfca; box-shadow: 0 9px 26px #244b3c09; }
html[data-motion="on"] .integration-card.is-motion-active::after { animation: patch-journey-progress var(--cycle-time) ease-in-out both; }
html[data-motion="on"] .integration-card.is-motion-active .provider-brand { animation: patch-logo-lift .9s var(--motion-ease) both; }
@keyframes patch-logo-lift { 0%,100% { translate: 0 0; } 45% { translate: 0 -4px; } }
html[data-motion="on"] .integration-card-action .icon { transition: translate .3s var(--motion-ease); }
html[data-motion="on"] .integration-card:hover .integration-card-action .icon { translate: 4px 0; }

/* Benefits, offers and the example-plan carousel. */
.benefit-grid > article { position: relative; }
.round-icon { position: relative; }
.round-icon::after { content: ''; position: absolute; inset: -7px; border: 1px solid #93e7cb; border-radius: 50%; opacity: 0; pointer-events: none; }
html[data-motion="on"] .benefit-grid > .is-motion-active .round-icon::after { animation: patch-soft-ring 1.8s ease-out both; }
html[data-motion="on"] .benefit-grid > .is-motion-active .round-icon .icon { animation: patch-icon-wave .95s var(--motion-ease) both; }
html[data-motion="on"] .offer-card.motion-in-view .small-badge { animation: patch-offer-cue 6s ease-in-out infinite; }
@keyframes patch-offer-cue { 0%,25%,100% { box-shadow: 0 0 0 0 #55e3bb00; } 48% { box-shadow: 0 0 0 7px #55e3bb25; } 72% { box-shadow: 0 0 0 12px #55e3bb00; } }
.story-card { position: relative; }
html[data-motion="on"] .story-card:hover { box-shadow: 0 14px 28px #24362a10; }
html[data-motion="on"] .carousel-controls .round-button { transition: transform .28s var(--motion-ease), background-color .2s ease; }
html[data-motion="on"] .carousel-controls .round-button:not(:disabled):hover { transform: scale(1.09); }

/* Small scroll-linked depth on large artwork, never on text or form inputs. */
html[data-motion="on"] .motion-depth { translate: 0 var(--depth-y, 0px); }
.motion-rule { display: block; width: 72px; height: 3px; margin-top: 22px; background: linear-gradient(90deg, var(--coral), var(--mint)); border-radius: 4px; transform-origin: left; }

/* Angled closing phone and colour shapes stay alive while the CTA is on screen. */
html[data-motion="on"] .final-panel .final-phone-wrap { animation: patch-cta-phone 7s ease-in-out infinite; animation-play-state: paused; }
html[data-motion="on"] .final-panel.motion-in-view .final-phone-wrap { animation-play-state: running; }
html[data-motion="on"] .final-panel .final-blob { animation: patch-cta-blob 11s ease-in-out infinite alternate; animation-play-state: paused; }
html[data-motion="on"] .final-panel .final-blob.mint { animation-delay: -6s; animation-direction: alternate-reverse; }
html[data-motion="on"] .final-panel.motion-in-view .final-blob { animation-play-state: running; }
@keyframes patch-cta-phone { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -12px; rotate: -1.4deg; } }
@keyframes patch-cta-blob { from { translate: -8px 0; scale: .94; } to { translate: 10px -16px; scale: 1.06; } }
html[data-motion="on"] .final-panel.motion-in-view .platform-button .icon { animation: patch-cta-arrow 4s ease-in-out infinite; }
@keyframes patch-cta-arrow { 0%,35%,100% { translate: 0 0; } 48%,66% { translate: 3px 0; } 57% { translate: 0 0; } }

/* FAQ / form micro-interactions. No automatic opening, submission or focus changes. */
.faq-group details { overflow: visible; }
html[data-motion="on"] .faq-group details { transition: border-color .25s ease; }
.faq-group details[open] { border-color: #8bdcbe; }
html[data-motion="on"] .faq-group summary .icon { transition: transform .35s var(--motion-ease), color .2s ease; }
html[data-motion="on"] .form-grid input,
html[data-motion="on"] .form-grid select { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.form-grid input:focus, .form-grid select:focus { border-color: #23866a; box-shadow: 0 0 0 4px #55e3bb1a; }
html[data-motion="on"] .join-type-switch button { transition: background-color .25s ease, color .2s ease, box-shadow .25s ease; }
html[data-motion="on"] .join-art .device { animation: patch-join-phone 9s ease-in-out infinite; animation-play-state: paused; }
html[data-motion="on"] .join-art.motion-in-view .device { animation-play-state: running; }
@keyframes patch-join-phone { 0%,100% { translate: 0 0; } 50% { translate: 0 -9px; } }

/* Optional pointer tilt on contained images, not text, links or touch screens. */
@media (hover: hover) and (pointer: fine) {
 html[data-motion="on"] .motion-tilt { transition: rotate .55s var(--motion-ease); }
 html[data-motion="on"] .motion-tilt.is-tilting { rotate: var(--tilt-angle, 0deg); }
 html[data-motion="on"] .price-card:hover .small-badge { box-shadow: 0 0 0 5px #55e3bb25; }
}
@media (max-width: 600px) {
 .motion-path { display: none; }
 .motion-rule { width: 51px; margin-top: 15px; }
 html[data-motion="on"] .motion-depth { translate: none; }
 @keyframes patch-cta-phone { 0%,100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -6px; rotate: -.6deg; } }
}

/* Paused, background tab, system reduced motion and print are all static. */
html[data-page-hidden="true"] .motion-wash::before,
html[data-page-hidden="true"] .motion-wash::after,
html[data-page-hidden="true"] .motion-path .path-flow { animation-play-state: paused !important; }
html[data-motion="off"] .motion-depth { translate: none; }
html[data-motion="off"] .motion-rule { transform: none; }
html[data-motion="off"] .motion-path .path-flow,
html[data-motion="off"] .motion-wash::before,
html[data-motion="off"] .motion-wash::after { opacity: 0; }
html[data-motion="off"] .is-motion-active::after { transform: scaleX(0); }
@media (prefers-reduced-motion: reduce) {
 .motion-depth { translate: none !important; }
 .motion-path .path-flow, .motion-wash::before, .motion-wash::after { opacity: 0 !important; }
}
@media print {
 .motion-wash, .motion-path, .motion-rule { display: none !important; }
 .motion-depth { translate: none !important; }
}

html[data-motion="off"]::view-transition-old(root),
html[data-motion="off"]::view-transition-new(root) { animation: none !important; }
