/*
  motion.css
  Clean, fresh, polished, light. Everything that hides content is scoped to
  html.motion-ready (added by js/motion.js only when motion is allowed). Load after main.css.
*/

:root { --m-ease: cubic-bezier(0.22, 1, 0.36, 1); --m-wipe: cubic-bezier(0.65, 0, 0.25, 1); }

/* Anchor jumps land below the fixed nav. */
section[id], main [id] { scroll-margin-top: calc(var(--nav-height, 72px) + 12px); }

/* A backdrop blur on the nav makes it the containing block of the fixed phone
   menu panel and collapses it, so phones skip the blur. */
@media (max-width: 768px) {
  .site-nav.nav--scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ===== Scroll reveal: fade, rise 24px, blur to sharp ===== */
@keyframes m-rise { from { opacity: 0; transform: translate3d(0, 24px, 0); filter: blur(6px); } }

html.motion-ready .animate-in { transform: none; transition: none; }
html.motion-ready .animate-in:not(.is-visible),
html.motion-ready .m-r:not(.m-in) { opacity: 0; }
html.motion-ready .animate-in.is-visible,
html.motion-ready .m-r.m-in { animation: m-rise 1s var(--m-ease) var(--m-d, var(--animation-delay, 0ms)) backwards; }

/* ===== Headlines: words rise out of a mask, line by line ===== */
@keyframes m-line { from { transform: translate3d(0, 130%, 0); } }

html.motion-ready main h1 { opacity: 0; }
html.motion-ready main h1.m-split { opacity: 1; }
html.motion-ready main h1.animate-in.m-split { opacity: 1; animation: none; }
html.motion-ready .animate-in h1 { opacity: 1; }
html.motion-ready .m-w { display: inline-block; margin: -0.08em -0.1em -0.22em; overflow: hidden; padding: 0.08em 0.1em 0.22em; vertical-align: top; }
html.motion-ready .m-wi { display: inline-block; }
html.motion-ready h1.m-split:not(.m-go) .m-wi { transform: translate3d(0, 130%, 0); }
html.motion-ready h1.m-go .m-wi { animation: m-line 1.15s var(--m-ease) calc(var(--m-base, 60ms) + var(--m-l, 0) * 150ms) backwards; }

/* ===== Hero: focus pull, one pass of light, drifting specks ===== */
@keyframes m-focus { from { filter: blur(14px); transform: scale(1.06); } }
@keyframes m-glint {
  0% { opacity: 0; transform: translate3d(-130%, 0, 0) skewX(-18deg); }
  14%, 86% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(330%, 0, 0) skewX(-18deg); }
}
@keyframes m-twinkle {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.4); }
  40% { opacity: 0.9; transform: translate3d(calc(var(--dx) * 0.5), calc(var(--dy) * 0.5), 0) scale(1); }
  100% { opacity: 0; transform: translate3d(var(--dx), var(--dy), 0) scale(0.6); }
}

html.motion-ready .hero:not(.m-hero-go) :is(.hero__video, .hero__image) { filter: blur(14px); transform: scale(1.06); }
html.motion-ready .hero.m-hero-go :is(.hero__video, .hero__image) { animation: m-focus 2.2s var(--m-ease) 0.1s backwards; }

.m-glint { inset: 0; overflow: hidden; pointer-events: none; position: absolute; z-index: 2; }
.m-glint i { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.34) 50%, transparent); bottom: -10%; left: 0; opacity: 0; position: absolute; top: -10%; width: 38%; }
html.motion-ready .m-hero-go .m-glint i { animation: m-glint 1.8s cubic-bezier(0.5, 0, 0.2, 1) 1.1s 1 both; }

.m-specks, .m-progress { display: none; }
html.motion-ready .m-specks { display: block; inset: 0; opacity: 0; overflow: hidden; pointer-events: none; position: absolute; z-index: 2; }
html.motion-ready .m-hero-go .m-specks { opacity: 1; transition: opacity 1.6s ease 1.2s; }
.m-specks span {
  animation: m-twinkle var(--t, 7s) ease-in-out var(--w, 0s) infinite;
  background: radial-gradient(circle, #fff8dc 0, rgba(233, 215, 155, 0.85) 35%, rgba(201, 168, 76, 0) 72%);
  border-radius: 50%; height: var(--s, 3px); left: var(--x); opacity: 0; position: absolute; top: var(--y); width: var(--s, 3px);
}
.m-specks .m-star { background: none; border-radius: 0; height: 12px; width: 12px; }
.m-specks .m-star::before, .m-specks .m-star::after { content: ""; left: 50%; position: absolute; top: 50%; transform: translate(-50%, -50%); }
.m-specks .m-star::before { background: linear-gradient(90deg, transparent, #fff4cf, transparent); height: 1px; width: 100%; }
.m-specks .m-star::after { background: linear-gradient(180deg, transparent, #fff4cf, transparent); height: 100%; width: 1px; }
.m-specks.m-paused span, html.m-away .m-specks span { animation-play-state: paused; }

@media (max-width: 719px) { html.motion-ready .m-specks { display: none; } }
@media (min-width: 1025px) { html.motion-ready .hero__media-inner { will-change: transform; } }

/* ===== Service photos: squeegee wipe, then a slow settle ===== */
@keyframes m-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes m-blade { from { opacity: 1; transform: translate3d(-101%, 0, 0); } 90% { opacity: 1; } to { opacity: 0; transform: translate3d(0, 0, 0); } }
@keyframes m-settle { from { scale: 1.15; } }

html.motion-ready .service-card.animate-in .service-card__media { clip-path: inset(0 100% 0 0); }
html.motion-ready .service-card.animate-in .service-card__media::after {
  background: linear-gradient(90deg, transparent calc(100% - 40px), rgba(255, 255, 255, 0.22) calc(100% - 3px), rgba(255, 255, 255, 0.75) calc(100% - 1px), transparent);
  content: ""; inset: 0; opacity: 0; pointer-events: none; position: absolute; transform: translate3d(-101%, 0, 0); z-index: 1;
}
html.motion-ready .service-card.is-visible .service-card__media { animation: m-wipe 1.1s var(--m-wipe) calc(var(--m-d, var(--animation-delay, 0ms)) + 180ms) both; }
html.motion-ready .service-card.is-visible .service-card__media::after { animation: m-blade 1.1s var(--m-wipe) calc(var(--m-d, var(--animation-delay, 0ms)) + 180ms) both; }
html.motion-ready .service-card.is-visible .service-card__image { animation: m-settle 1.8s var(--m-ease) calc(var(--m-d, var(--animation-delay, 0ms)) + 180ms) backwards; }

/* ===== Cards: soft lift ===== */
html.motion-ready :is(.service-card, .review-card, .feature, .worker-proof__item, .pricing-card, .founder-value) {
  transition: transform 0.5s var(--m-ease), box-shadow 0.5s var(--m-ease), border-color 0.4s ease;
}
html.motion-ready :is(.service-card, .review-card, .feature, .worker-proof__item, .pricing-card, .founder-value):hover,
html.motion-ready .service-card:focus-within { box-shadow: 0 22px 44px -18px rgba(14, 28, 21, 0.3); transform: translate3d(0, -6px, 0); }

/* ===== Buttons: fill sweep and a 2px lift ===== */
html.motion-ready .button {
  isolation: isolate; overflow: hidden; position: relative;
  transition: transform 0.35s var(--m-ease), box-shadow 0.35s ease, border-color 0.3s ease, color 0.3s ease, filter 0.3s ease;
}
html.motion-ready .button::before {
  background: linear-gradient(100deg, #f3e6b8, #e4c673); content: ""; inset: 0; position: absolute;
  transform: translate3d(-101%, 0, 0); transition: transform 0.55s var(--m-ease); z-index: -1;
}
html.motion-ready .button--secondary::before { background: rgba(201, 168, 76, 0.16); }
html.motion-ready .button:hover::before { transform: translate3d(0, 0, 0); }
html.motion-ready .button:hover { transform: translate3d(0, -2px, 0); }
html.motion-ready .button:active { transform: translate3d(0, 0, 0); }
html.motion-ready .button--primary:hover { box-shadow: 0 10px 20px -14px rgba(14, 28, 21, 0.55); filter: none; }

/* The pricing card button stretches an ::after over the whole card, so it must
   not become a clipping box or a transformed containing block. */
html.motion-ready .pricing-card > .button { isolation: auto; overflow: visible; position: static; }
html.motion-ready .pricing-card > .button::before { display: none; }
html.motion-ready .pricing-card > .button:hover, html.motion-ready .pricing-card > .button:active { transform: none; }

/* ===== Text links: underline draws in ===== */
html.motion-ready :is(.section-link, .nav__phone) {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--m-ease), color 0.3s ease;
}
html.motion-ready :is(.section-link, .nav__phone):hover { background-size: 100% 1px; }
html.motion-ready .footer__link { transition: color 0.3s ease, transform 0.4s var(--m-ease); }
html.motion-ready .footer__link:hover { transform: translate3d(4px, 0, 0); }

/* Italic accent words get a hairline that draws under them once revealed. */
html.motion-ready :is(.section-title, .why__title, .footer-cta__title) em { position: relative; }
html.motion-ready :is(.section-title, .why__title, .footer-cta__title) em::after {
  background: currentColor; bottom: 0.04em; content: ""; height: 1px; left: 0; opacity: 0.55; position: absolute; right: 0;
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--m-ease) 0.5s;
}
html.motion-ready :is(.is-visible, .m-in, .m-go) :is(.section-title, .why__title, .footer-cta__title) em::after,
html.motion-ready :is(.section-title, .why__title, .footer-cta__title):is(.is-visible, .m-in, .m-go) em::after { transform: scaleX(1); }

/* ===== Nav: blur and compact after 40px (desktop height change only) ===== */
html.motion-ready .site-nav { transition: height 0.4s var(--m-ease), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease; }
html.motion-ready .site-nav.m-compact {
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  background: rgba(14, 28, 21, 0.84); box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.7);
}
@media (min-width: 769px) { html.motion-ready .site-nav.m-compact { height: 62px; } }
@media (max-width: 768px) { html.motion-ready .site-nav.m-compact { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--color-deep, #0e1c15); } }

/* ===== Scroll progress line ===== */
html.motion-ready .m-progress {
  background: linear-gradient(90deg, var(--color-gold-ink, #7d6626), var(--color-gold, #c9a84c) 60%, #e9d79b);
  display: block; height: 2px; left: 0; opacity: 0; pointer-events: none; position: fixed; right: 0; top: 0;
  transform: scaleX(0); transform-origin: 0 50%; transition: opacity 0.4s ease; z-index: 40;
}
html.motion-ready .m-progress.m-on { opacity: 1; }

/* ===== Click sparkle on primary buttons ===== */
@keyframes m-burst {
  from { opacity: 1; transform: translate3d(0, 0, 0) rotate(45deg) scale(1); }
  to { opacity: 0; transform: translate3d(var(--bx), var(--by), 0) rotate(45deg) scale(0.2); }
}
.m-burst { animation: m-burst 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; background: var(--color-gold, #c9a84c); height: 5px; margin: -2.5px 0 0 -2.5px; pointer-events: none; position: fixed; width: 5px; z-index: 70; }
.m-b2 { background: #fff2c4; }

@media (prefers-reduced-motion: reduce) { .m-specks, .m-glint, .m-progress, .m-burst { display: none !important; } }

/* Keep the ambient specks to plain soft dots (no 4-point sparkle shapes). */
.m-specks .m-star { background: rgba(255, 244, 207, 0.9); border-radius: 50%; height: 4px; width: 4px; }
.m-specks .m-star::before, .m-specks .m-star::after { display: none; }
