/* ==========================================================================
   Motion layer: scroll reveals, hero entrance, hover/press feedback.
   Loaded on every page. The reveal classes are added by effects.js, so a page
   without JS (or with reduced motion) simply shows everything as normal.
   ========================================================================== */

:root { --fx-ease: cubic-bezier(.22, .8, .24, 1); }
html { scroll-behavior: smooth; }
::selection { background: var(--c-red); color: #fff; }
:focus-visible { outline: 2px solid var(--c-red); outline-offset: 3px; }

/* ---------- Scroll reveal ---------- */
.fx { opacity: 0; transition: opacity .9s var(--fx-ease), transform .9s var(--fx-ease); transition-delay: calc(var(--fx-d, 0) * 85ms); }
.fx-up { transform: translateY(34px); }
.fx-left { transform: translateX(-44px); }
.fx-right { transform: translateX(44px); }
.fx-zoom { transform: scale(.94); }
.fx.fx-in { opacity: 1; transform: none; }

/* ---------- Hero entrance (plays once on load) ---------- */
.fx-hero { animation: fx-hero .95s var(--fx-ease) backwards; animation-delay: calc(var(--fx-d, 0) * 90ms + .12s); }
@keyframes fx-hero { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* slow "breathing" zoom on the big hero photos */
.hero__bg, .mf-hero__photo, .ct-hero__photo { animation: fx-breathe 22s ease-in-out infinite alternate; transform-origin: 60% 50%; }
@keyframes fx-breathe { from { transform: scale(1); } to { transform: scale(1.06); } }

/* ---------- Scroll progress bar + back-to-top ---------- */
.fx-progress { position: fixed; left: 0; top: 0; z-index: 3000; width: 100%; height: 3px; background: linear-gradient(90deg, var(--c-red), #ff6b7a); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.fx-top { position: fixed; right: 24px; bottom: 24px; z-index: 900; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--c-red); color: #fff; box-shadow: 0 10px 28px rgba(196, 32, 48, .4); opacity: 0; transform: translateY(18px) scale(.9); pointer-events: none; transition: opacity .35s, transform .35s var(--fx-ease), background-color .2s; }
.fx-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fx-top:hover { background: #a91a28; transform: translateY(-4px); }
.fx-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons: lift + light sweep + arrow nudge ---------- */
.btn, .mf-btn, .ct-office__btn, .pill { position: relative; overflow: hidden; isolation: isolate; transition: background-color .25s, color .25s, box-shadow .3s, transform .3s var(--fx-ease); }
.btn::before, .mf-btn::before, .ct-office__btn::before, .pill::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -70%; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent); transform: skewX(-20deg); transition: left .75s var(--fx-ease); pointer-events: none; }
.btn img, .mf-btn img, .pill img, .text-link img { transition: transform .3s var(--fx-ease); }
.btn:active, .mf-btn:active, .ct-office__btn:active, .pill:active { transform: translateY(0) scale(.98); }
@media (hover: hover) {
    .btn:hover::before, .mf-btn:hover::before, .ct-office__btn:hover::before, .pill:hover::before { left: 125%; }
    .btn:hover, .mf-btn:hover, .ct-office__btn:hover, .pill:hover { transform: translateY(-2px); }
    .btn:not(.btn--ghost):not(.btn--stroke):hover, .mf-btn--red:hover, .ct-office__btn--red:hover { box-shadow: 0 12px 26px rgba(196, 32, 48, .38); }
    .btn:hover img, .mf-btn:hover img, .pill:hover img { transform: translateX(4px); }
}

/* ---------- Cards: lift + soft shadow ---------- */
.domain-card, .reason, .process-card, .outsource-card, .model, .post, .pillar, .whitelabel, .office,
.seo-why__card, .mg-why__card, .td-benefit, .cl-why__card, .pk-why__card, .pp-why__card, .mf-card, .ct-card, .acc--faq .acc-item {
    transition: transform .5s var(--fx-ease), box-shadow .5s var(--fx-ease), border-color .3s;
}
@media (hover: hover) {
    .domain-card:hover, .process-card:hover, .outsource-card:hover, .model:hover, .pillar:hover, .office:hover,
    .seo-why__card:hover, .mg-why__card:hover, .td-benefit:hover, .cl-why__card:hover, .pk-why__card:hover, .pp-why__card:hover, .mf-card:hover { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(17, 17, 17, .14); }
    .reason:hover { transform: translateY(-8px); border-color: var(--c-red); box-shadow: 0 20px 46px rgba(196, 32, 48, .24); }
    .acc--faq .acc-item:hover { border-color: #c4c4c9; box-shadow: 0 10px 24px rgba(0, 0, 0, .07); }
}

/* ---------- Images inside clipped frames: slow zoom on hover ---------- */
.industry img, .mg-tile img, .cl-tile img, .pk-tile img, .showcase-card__img, .pillar__img, .cl-why__bg, .pk-why__bg, .process-card__bg, .model__img, .pp-step img, .td-gallery__tile img, .seo-gallery__tile img, .ppt-gallery__tile img {
    transition: transform .9s var(--fx-ease);
}
.process-card__bg { transition: transform .9s var(--fx-ease); }
@media (hover: hover) {
    .industry:hover img, .mg-tile:hover img, .cl-tile:hover img, .pk-tile:hover img, .showcase-card:hover .showcase-card__img, .pillar:hover .pillar__img,
    .cl-why__card:hover .cl-why__bg, .pk-why__card:hover .pk-why__bg, .process-card:hover .process-card__bg, .model:hover .model__img, .pp-step:hover img { transform: scale(1.06); }
    .pk-tile:hover { box-shadow: 0 22px 46px rgba(0, 0, 0, .16); }
}
@media (hover: hover) { .post:hover { transform: translateY(-6px); } }   /* lift only, no box-shadow */
.offer-card__img { transition: transform .8s var(--fx-ease); }
.offer-card:hover .offer-card__img { transform: translateY(-8px) scale(1.03); }
.wstep__art, .seo-step__art, .pk-step__art, .metric__icon, .step > img { transition: transform .5s var(--fx-ease); }
@media (hover: hover) {
    .wstep:hover .wstep__art, .pk-step:hover .pk-step__art { transform: translateY(-6px) scale(1.04); }
    .seo-step:hover .seo-step__art, .step:hover > img { transform: translateY(-6px); }
    .metric:hover .metric__icon { transform: rotate(-8deg) scale(1.1); }
}

/* ---------- Pills, tabs, tools ---------- */
.filter-tab, .tab, .dots__dot, .round-arrow { transition: background-color .2s, color .2s, transform .3s var(--fx-ease), box-shadow .3s, border-color .2s, width .3s, height .3s; }
@media (hover: hover) {
    .filter-tab:hover { transform: translateY(-2px); }
    .round-arrow:hover { transform: scale(1.08); }
    .ve-tool, .mg-tool, .seo-tool { transition: transform .4s var(--fx-ease); }
    .ve-tool:hover, .mg-tool:hover, .seo-tool:hover { transform: translateX(6px); }
    .domain-card__list li { transition: transform .3s var(--fx-ease); }
    .domain-card__list li:hover { transform: translateX(6px); }
}
.acc--services .acc-head:hover .acc-icons { transform: scale(1.08); }
.acc-icons { transition: transform .3s var(--fx-ease); }

/* ---------- Forms ---------- */
.lead-form, .ct-card { transition: box-shadow .4s, border-color .4s, transform .5s var(--fx-ease); }
.lead-form:focus-within { border-color: rgba(196, 32, 48, .55); box-shadow: 0 0 48px rgba(196, 32, 48, .25); }
.ct-card:focus-within { border-color: rgba(196, 32, 48, .45); box-shadow: 0 18px 50px rgba(196, 32, 48, .14); }

/* ---------- Header + footer links ---------- */
.logo img { transition: transform .4s var(--fx-ease); }
.logo:hover img { transform: scale(1.04); }
.menu-toggle img { transition: transform .4s var(--fx-ease); }
.menu-toggle:hover img { transform: rotate(90deg); }
.subnav__btn { position: relative; }
.subnav__btn::after { content: ""; position: absolute; left: 0; right: 14px; bottom: 10px; height: 2px; background: var(--c-red); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--fx-ease); }
.subnav__btn:hover::after, .subnav__item.is-open .subnav__btn::after { transform: scaleX(1); }
.footer-col__list a { position: relative; display: inline-block; transition: color .25s, transform .3s var(--fx-ease); }
.footer-col__list a::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--fx-ease); }
.footer-col__list a:hover { transform: translateX(5px); }
.footer-col__list a:hover::after { transform: scaleX(1); }
.footer-social a { display: inline-block; transition: transform .35s var(--fx-ease); }
.footer-social a:hover { transform: translateY(-4px) rotate(-6deg); }
.bottom-bar__links a { transition: color .2s; }
.bottom-bar__links a:hover { color: var(--c-red); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fx, .fx-hero { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
    .hero__bg, .mf-hero__photo, .ct-hero__photo { animation: none; }
    .btn::before, .mf-btn::before, .ct-office__btn::before, .pill::before { display: none; }
}

/* ---------- Price seal ("Starting @ $10/hr"): always-on, gentle motion ---------- */
.price-badge { filter: drop-shadow(0 0 16px rgba(196, 32, 48, .55)); }
.price-badge::before, .price-badge::after { content: ""; position: absolute; inset: 8px; border: 2px solid rgba(255, 255, 255, .45); border-radius: 50%; opacity: 0; pointer-events: none; animation: pb-ring 3.8s ease-out infinite; }
.price-badge::after { animation-delay: 1.9s; }
@keyframes pb-ring { 0% { transform: scale(.88); opacity: .65; } 100% { transform: scale(1.28); opacity: 0; } }
.pbadge { display: block; width: 100%; height: 100%; overflow: visible; }
.pbadge__float { transform-origin: 95px 95px; animation: pb-float 4.4s ease-in-out infinite; }
@keyframes pb-float { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-7px) rotate(2.5deg); } }
.pbadge__seal { transform-origin: 95px 95px; animation: pb-spin 26s linear infinite; }
@keyframes pb-spin { to { transform: rotate(360deg); } }
.pbadge__dash { animation: pb-dash 1.2s linear infinite; }
@keyframes pb-dash { to { stroke-dashoffset: -8.08; } }
.pbadge__star { transform-box: fill-box; transform-origin: center; animation: pb-twinkle 2.2s ease-in-out infinite; }
@keyframes pb-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.7) rotate(72deg); opacity: .65; } }
.pbadge__price { transform-box: fill-box; transform-origin: center; animation: pb-pop 4.4s ease-in-out infinite; }
@keyframes pb-pop { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.06); } 90% { transform: scale(1); } }
.pbadge__shine { animation: pb-shine 4.4s ease-in-out infinite; }
@keyframes pb-shine { 0%, 40% { transform: translateX(0) skewX(-18deg); } 85%, 100% { transform: translateX(300px) skewX(-18deg); } }
@media (prefers-reduced-motion: reduce) {
    .pbadge *, .price-badge::before, .price-badge::after { animation: none !important; }
}

/* ---------- Enquiry forms (CMS): result line, honeypot, no-JS flash ---------- */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.form-status { margin: 0; font-size: 15px; line-height: 22px; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.is-ok { color: #4cd08f; }
.form-status.is-error { color: #ff7b86; }
.ct-card .form-status.is-ok { color: #138a5b; }
.ct-card .form-status.is-error { color: #C42030; }
[data-inquiry-form] [aria-invalid="true"] { border-color: #C42030 !important; box-shadow: 0 0 0 3px rgba(196, 32, 48, .2) !important; }
.iw-field-error { display: block; margin-top: 6px; font: 500 13px/18px Inter, sans-serif; color: #ff4d5e; }
.iw-toasts { position: fixed; z-index: 99999; top: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.iw-toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px 14px 18px; font: 500 15px/22px Inter, sans-serif; color: #fff; background: #138a5b; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); pointer-events: auto; animation: iw-toast-in .3s ease; transition: opacity .25s, transform .25s; }
.iw-toast.is-error { background: #C42030; }
.iw-toast span { flex: 1; }
.iw-toast button { flex: none; padding: 0 2px; font-size: 22px; line-height: 20px; color: #fff; background: none; border: 0; opacity: .8; cursor: pointer; }
.iw-toast button:hover { opacity: 1; }
.iw-toast.is-leaving { opacity: 0; transform: translateX(24px); }
@keyframes iw-toast-in { from { opacity: 0; transform: translateX(24px); } }
.form-flash { position: fixed; z-index: 99998; left: 50%; bottom: 24px; max-width: min(560px, calc(100vw - 32px)); padding: 14px 22px; transform: translateX(-50%); font: 500 16px/24px Inter, sans-serif; color: #fff; background: #138a5b; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.form-flash.is-error { background: #C42030; }

/* ---------- Products: "Key Capabilities" modal (the description lives in .feature-panel, which is only a data source now) ---------- */
.feature-panel { display: none; }
.feature[aria-haspopup] { cursor: pointer; }
.cap-modal { position: fixed; inset: 0; z-index: 99990; display: grid; place-items: center; padding: 20px; }
.cap-modal[hidden] { display: none; }
.cap-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 12, .72); backdrop-filter: blur(3px); animation: cap-fade .25s ease; }
.cap-modal__box { position: relative; width: min(520px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 34px 34px 30px; background: #fff; border-top: 6px solid #C42030; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); outline: 0; animation: cap-pop .3s cubic-bezier(.22, .8, .24, 1); }
.cap-modal__x { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; font-size: 28px; line-height: 32px; color: #666; background: none; border: 0; border-radius: 50%; cursor: pointer; transition: background .2s, color .2s; }
.cap-modal__x:hover { color: #fff; background: #C42030; }
.cap-modal__eyebrow { margin: 0 0 6px; font: 600 13px/18px Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #C42030; }
.cap-modal__eyebrow:empty { display: none; }
.cap-modal__title { margin: 0 0 14px; padding-right: 36px; font: 600 26px/32px Inter, sans-serif; color: #111; }
.cap-modal__text { margin: 0 0 22px; font: 400 16px/26px Inter, sans-serif; color: #555; }
.cap-modal__link { display: inline-block; padding: 12px 22px; font: 600 15px/20px Inter, sans-serif; color: #fff; background: #C42030; border-radius: 6px; transition: background .2s, transform .2s; }
.cap-modal__link:hover { color: #fff; background: #a91a28; transform: translateX(3px); }
html.cap-modal-open { overflow: hidden; }
@keyframes cap-fade { from { opacity: 0; } }
@keyframes cap-pop { from { opacity: 0; transform: translateY(18px) scale(.97); } }

/* ---------- Phone numbers, e-mail addresses and addresses are links; they keep the surrounding look ---------- */
.office__phone a, .office__info a, .ct-office__block a, .ct-office__note a { color: inherit; text-decoration: none; transition: color .2s, text-decoration-color .2s; }
.office__phone a:hover, .office__info a:hover, .ct-office__block a:hover, .ct-office__note a:hover { color: #ff7b86; text-decoration: underline; text-underline-offset: 3px; }
.ct-card .ct-office__block a:hover, .ct-office--light a:hover { color: #C42030; }

/* ---------- Lists typed in the admin ("Formatted" paragraph boxes): the site resets list styles globally ---------- */
ul.rt, ol.rt { margin: 8px 0 0; padding-left: 1.25em; text-align: left; }
ul.rt { list-style: disc; }
ol.rt { list-style: decimal; }
ul.rt li, ol.rt li { display: list-item; margin: 0 0 4px; padding: 0; }
ul.rt li::before, ol.rt li::before { content: none; }

/* ---------- Counters: digits keep a constant width and always start at the left edge ---------- */
[data-count] { font-variant-numeric: tabular-nums; text-align: left; }
.metric__value { justify-content: flex-start; }
