/* MultiPro — finishing layer (2026-08-26). Loaded after site.css on every page.
 *   1. Motion: one signature move per section (D4), magnetic CTAs (D3; the custom cursor was removed 2026-08-27, native pointer only).
 *   2. Form: real states (sending / sent / failed), honeypot, consent row.
 *   3. Privacy page and 404 furniture.
 * The motion rules key off html.mo / html.fine, which motion.js sets and which it refuses
 * to set under prefers-reduced-motion. The block at the end is belt and braces.
 */

/* ---------- cascade: one index per card, the stagger follows it ----------
   site.css staggers with nth-child rules of the same specificity; [style] wins the tie
   and only matches elements motion.js actually indexed. */
html.js.mo .svc-grid > .rv[style],
html.js.mo .ba-grid > .rv[style],
html.js.mo .steps > .rv[style],
html.js.mo .tgrid > .rv[style] { animation-delay: calc(var(--i, 0) * 95ms); }

/* ---------- hero depth (desktop, fine pointer) ----------
   `translate` composes with the drift animation's `transform`, so the two never fight.
   Applied to img and video alike so the film and the still stay pixel-aligned; the extra
   scale keeps the picture's edges covered while it moves. */
html.mo.fine .hero-bg > img,
html.mo.fine .hero-bg > video { scale: 1.08; translate: 0 var(--py, 0px); }

/* ---------- before/after: the handle sweeps itself, then hands over ---------- */
.ba .ba-handle::after { transition: transform .35s, background .35s, color .35s; }
.ba.sweeping .ba-handle { box-shadow: 0 0 0 4px rgba(1,145,1,.32), 0 0 22px rgba(1,145,1,.6); }
.ba.sweeping .ba-handle::after { background: var(--green-fill); color: #fff; transform: translate(-50%,-50%) scale(1.12); }

/* ---------- process: the line draws across, the nodes light in sequence ----------
   The line sits under the cards and shows only in the gaps between them, which reads as
   the cards being joined rather than a bar drawn over them. */
html.mo .steps { position: relative; }
html.mo .steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 65px; height: 2px; z-index: 0;
  border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--green));
  transform: scaleX(0); transform-origin: left center; transition: transform 1.5s cubic-bezier(.65,0,.35,1); }
html.mo .steps.draw::before { transform: scaleX(1); }
html.mo .step { z-index: 1; }
html.mo .step-num { transition: box-shadow .5s, background .5s, color .5s, transform .5s; }
html.mo .step-num.lit { background: var(--green-fill); color: #fff; transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(1,145,1,.16), 0 10px 26px rgba(1,145,1,.28); }
@media (max-width: 860px) { html.mo .steps::before { display: none; } }

/* ---------- service cards: the corner draws, the title slides ---------- */
html.mo .svc { position: relative; }
html.mo .svc::after { content: ""; position: absolute; top: 0; right: 0; width: 54px; height: 54px; z-index: 3; pointer-events: none;
  border-top: 2px solid var(--green); border-right: 2px solid var(--green); border-top-right-radius: var(--r);
  opacity: 0; transform: scale(.7); transform-origin: top right;
  transition: opacity .35s, transform .45s cubic-bezier(.2,.6,.2,1); }
html.mo .svc:hover::after { opacity: 1; transform: scale(1); }
.svc .svc-body h3 { transition: transform .35s cubic-bezier(.2,.6,.2,1), color .3s; }
.svc:hover .svc-body h3 { transform: translateX(4px); color: var(--green-deep); }
.svc .more { position: relative; display: inline-block; }
.svc .more::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.2,.6,.2,1); }
.svc:hover .more::after { transform: scaleX(1); }

/* ---------- marquee: pauses under the hand ---------- */
html.js .mq:hover .mq-track { animation-play-state: paused; }

/* ---------- testimonial: the quote mark settles in behind the words ---------- */
html.mo .testi-teaser blockquote { position: relative; }
html.mo .testi-teaser blockquote::before { content: "\201C"; position: absolute; left: -.5em; top: -.4em; pointer-events: none;
  font-family: var(--display); font-style: italic; font-size: 4.2em; line-height: 1; color: var(--green);
  opacity: 0; transform: translateY(12px) scale(.8);
  transition: opacity .8s .3s, transform .8s .3s cubic-bezier(.2,.6,.2,1); }
html.mo .testi-teaser.rv.in blockquote::before { opacity: .2; transform: none; }
@media (max-width: 860px) { html.mo .testi-teaser blockquote::before { left: 0; } }

/* ---------- nav: the underline slides to the link ---------- */
.nav-links a:not(.nav-cta) { position: relative; }
.nav-links a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
  background: var(--green); transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.2,.6,.2,1); }
.nav-links a:not(.nav-cta):hover::after,
.nav-links a.on::after { transform: scaleX(1); transform-origin: left; }

/* ---------- magnetic CTAs (transform is driven inline by motion.js) ---------- */
html.fine .btn.mag { transition: transform .18s ease-out, background .2s, color .2s, box-shadow .3s; }
html.fine .btn-green.mag.near { box-shadow: 0 14px 30px rgba(1,145,1,.24); }

/* ---------- form: real states ---------- */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.field.consent { margin-top: 4px; }
.field.consent label.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  font-size: .9rem; line-height: 1.5; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; margin: 0; }
.field.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--green); }
.field.consent a { color: var(--green-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.field.consent.err label.check { color: #B4552E; }
#quoteForm .btn-busy { display: none; }
#quoteForm.sending .btn-busy { display: inline; }
#quoteForm.sending .btn-txt { display: none; }
#quoteForm.sending button[type=submit] { opacity: .75; cursor: progress; }
#quoteForm.sent button[type=submit] { display: none; }
.form-err { display: none; background: rgba(180,85,46,.08); border: 1px solid rgba(180,85,46,.35); border-radius: 14px;
  padding: 18px 20px; font-size: .95rem; margin-top: 6px; }
.form-err.show { display: block; }
.form-err a { color: var(--green-deep); font-weight: 600; }
html.js .form-ok.show { animation: rvIn .6s cubic-bezier(.2,.6,.2,1) both; }

/* ---------- footer: the privacy link where the demo label used to be ---------- */
.foot-bottom a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.18); transition: color .2s, border-color .2s; }
.foot-bottom a:hover { color: #fff; border-color: #fff; }

/* ---------- legal pages ---------- */
.legal { max-width: 76ch; margin: 0 auto; }
.legal h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); margin: 44px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--muted); font-size: 1.02rem; line-height: 1.65; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px 20px; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--ink); }
.legal a { color: var(--green-deep); font-weight: 600; }
.legal .meta { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line-soft); margin-top: 44px; padding-top: 18px; }
mark.fill { background: #FFF1B8; color: #5C4600; padding: 1px 6px; border-radius: 6px; font-weight: 600; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 30px 0 20px; }
.nf .nf-num { font-family: var(--display); font-style: italic; font-weight: 300; font-size: clamp(6rem, 18vw, 12rem); line-height: 1; color: var(--green); opacity: .16; }
.nf h1 { margin: -28px 0 14px; }
.nf p { color: var(--muted); max-width: 46ch; margin: 0 auto 28px; }
.nf .acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 600px) { .nf { padding: 24px 20px 16px; } }

/* ---------- reduced motion: everything above stands down ---------- */
/* Eyebrow that wraps (the hero line at phone width): keep the dot on the FIRST line
   instead of floating between the two. `lh` centres it on the line box; the em value
   is the fallback for engines without the unit. */
@media (max-width: 600px) {
  .hero .eyebrow { align-items: flex-start; }
  .hero .eyebrow::before { margin-top: .45em; margin-top: calc((1lh - 7px) / 2); }
}

@media (prefers-reduced-motion: reduce) {
  html.mo .steps::before { transition: none; transform: scaleX(1); }
  html.mo .step-num, html.fine .btn.mag, .svc .svc-body h3, .svc .more::after, html.mo .svc::after,
  .nav-links a::after, .ba .ba-handle::after, html.mo .testi-teaser blockquote::before { transition: none; }
  html.mo.fine .hero-bg > img, html.mo.fine .hero-bg > video { translate: 0 0; scale: 1; }
  html.mo .testi-teaser blockquote::before { opacity: .2; transform: none; }
  html.js .form-ok.show { animation: none; }
}
