/* MOTION LAYER. Zero dependencies, transform and opacity only.
   Loaded after style.css so it can lift the static system without
   editing it. Three rules govern everything here:

   1. Nothing hides unless JS is running. The boot snippet in <head>
      sets html.js; every hiding rule is scoped to it, so a page with
      broken or blocked JS renders fully visible.
   2. Nothing moves for a reader who asked it not to. html.reduced and
      a plain media query both neutralise the layer, independently.
   3. Transform and opacity only, so every animation stays on the
      compositor and off the layout thread.

   Character: springy. This is a groomer's site, so the curve overshoots
   a little and the decor never sits completely still. */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --rev-dur: 0.7s;
}

/* ---------- Scroll reveal ---------- */

html.js:not(.reduced) [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity var(--rev-dur) var(--ease-out), transform var(--rev-dur) var(--ease-spring);
  transition-delay: var(--d, 0ms);
}
html.js:not(.reduced) [data-reveal="left"] { transform: translate3d(-34px, 0, 0); }
html.js:not(.reduced) [data-reveal="right"] { transform: translate3d(34px, 0, 0); }
html.js:not(.reduced) [data-reveal="pop"] { transform: translate3d(0, 20px, 0) scale(0.88); }
html.js:not(.reduced) [data-reveal="zoom"] { transform: scale(0.93); }
html.js:not(.reduced) [data-reveal="tilt"] { transform: translate3d(0, 30px, 0) rotate(-3deg); }

html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Failsafe: anything reached by keyboard shows itself, revealed or not. */
html.js [data-reveal]:focus-within { opacity: 1; transform: none; }

/* ---------- Word-by-word heading reveal ---------- */

.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.12em; margin-bottom: -0.12em; }
html.js:not(.reduced) .wi { display: inline-block; transform: translateY(115%); transition: transform 0.85s var(--ease-out); transition-delay: var(--d, 0ms); }
html.js .is-in .wi, html.js .split-in .wi { transform: none; }

/* ---------- Page arrival and departure ---------- */

html.js:not(.reduced) main { animation: page-in 0.6s var(--ease-out) both; }
@keyframes page-in { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
html.js body { transition: opacity 0.22s ease; }
html.js body.is-leaving { opacity: 0; }

/* ---------- Header: shrink, and a reading-progress hairline ---------- */

header { transition: box-shadow 0.3s ease, background-color 0.3s ease; }
header.is-stuck { box-shadow: 0 6px 22px rgba(59, 42, 31, 0.09); }
header.is-stuck .header-in { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.header-in { transition: padding 0.3s var(--ease-out); }
.header-in .logo-sub { transition: opacity 0.3s ease, max-height 0.3s ease; }
header.is-stuck .logo-sub { opacity: 0; max-height: 0; }

.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--orange-bright));
  transform: scaleX(0); transform-origin: 0 50%;
}

nav a:not(.nav-cta)::before {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 3px; width: 100%;
  border-radius: 2px; background: var(--orange-bright);
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform 0.32s var(--ease-out);
}
nav a:not(.nav-cta):hover::before { transform: scaleX(1); transform-origin: 0 50%; }

/* ---------- Buttons: sheen sweep, springy press, wagging paw ---------- */

.btn { position: relative; overflow: hidden; transition: background 0.2s ease, transform 0.25s var(--ease-spring), box-shadow 0.25s ease; }
.btn > * { position: relative; z-index: 1; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.38) 50%, transparent 66%);
  transform: translateX(-130%);
}
html.js:not(.reduced) .btn:hover::after { transform: translateX(130%); transition: transform 0.75s var(--ease-out); }
/* These carry an html.js prefix so they outrank the reveal rule above and
   a revealed button still lifts on hover. Same trick on the cards below. */
html.js .btn:hover { transform: translateY(-3px); }
html.js .btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.08s; }
.btn.ghost::after { background: linear-gradient(105deg, transparent 34%, rgba(59, 42, 31, 0.1) 50%, transparent 66%); }
html.js:not(.reduced) .btn:hover .cta-paw { animation: paw-wag 0.55s var(--ease-spring); }
@keyframes paw-wag { 0% { transform: rotate(0); } 35% { transform: rotate(-22deg) scale(1.15); } 70% { transform: rotate(14deg) scale(1.1); } 100% { transform: rotate(0); } }

/* ---------- Cards: lift, photo push-in, icon kick ---------- */

.card, .service-card { transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease; }
.card-photo img { transition: transform 0.7s var(--ease-out); }
.service-card:hover .card-photo img { transform: scale(1.07) translateY(-6px); }
.icon-dot { transition: transform 0.4s var(--ease-spring); }
.service-card:hover .icon-dot { transform: rotate(-9deg) scale(1.1); }
html.js .service-card:hover, html.js .card:hover { transform: translateY(-8px); }
.card .text-link, .service-card .text-link { position: relative; display: inline-block; }
.text-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.3s var(--ease-out);
}
.text-link:hover::after { transform: scaleX(1); }

/* Pointer-tilt is applied by JS as --rx/--ry on a wrapper-free element. */
html.js .tilt { transform-style: preserve-3d; }
html.js .tilt.is-tilting { transition: transform 0.12s linear; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-8px); }

/* ---------- Products: shelf lift ---------- */

.product { transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease; }
html.js .product:hover { transform: translateY(-6px); }
.product-img { transition: transform 0.55s var(--ease-spring); }
.product:hover .product-img { transform: translateY(-12px) rotate(-3deg) scale(1.04); }

/* ---------- Decor: nothing sits perfectly still ---------- */

html.js:not(.reduced) .hero-heart { animation: heart-bob 4.4s ease-in-out infinite; }
@keyframes heart-bob { 0%, 100% { transform: rotate(-14deg) translateY(0) scale(1); } 50% { transform: rotate(-21deg) translateY(-13px) scale(1.06); } }

html.js:not(.reduced) .bubbles { animation: bubble-drift 7s ease-in-out infinite; }
@keyframes bubble-drift { 0%, 100% { transform: translateY(0) rotate(0); opacity: 1; } 50% { transform: translateY(-22px) rotate(5deg); opacity: 0.82; } }

html.js:not(.reduced) .hero-doodle { animation: doodle-spin 9s ease-in-out infinite; }
@keyframes doodle-spin { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(12deg) translateY(-8px); } }

html.js:not(.reduced) .badge { animation: badge-wag 3.6s var(--ease-spring) infinite; transform-origin: 60% 20%; }
@keyframes badge-wag { 0%, 62%, 100% { transform: rotate(-10deg); } 74% { transform: rotate(-2deg) scale(1.04); } 86% { transform: rotate(-14deg); } }

html.js:not(.reduced) .blob-back { animation: blob-a 16s ease-in-out infinite; }
html.js:not(.reduced) .blob-front { animation: blob-b 13s ease-in-out infinite; }
@keyframes blob-a { 0%, 100% { transform: rotate(16deg) scale(1); } 50% { transform: rotate(23deg) scale(1.05); } }
@keyframes blob-b { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(-2deg) scale(0.96) translateY(10px); } }

/* The art block fades in on load; its transform belongs to the parallax
   rule, so the entrance only touches opacity. */
html.js:not(.reduced) .hero-art { animation: art-in 0.9s var(--ease-out) 0.2s both; }
@keyframes art-in { from { opacity: 0; } to { opacity: 1; } }

html.js:not(.reduced) .hero-dog-img { animation: dog-breathe 6.5s ease-in-out infinite; }
@keyframes dog-breathe { 0%, 100% { transform: translateX(-52%) translateY(0); } 50% { transform: translateX(-52%) translateY(-10px); } }

html.js:not(.reduced) .paw-bg { animation: paw-drift 24s ease-in-out infinite; }
@keyframes paw-drift { 0%, 100% { transform: rotate(-18deg) translate(0, 0); } 50% { transform: rotate(-11deg) translate(-24px, 18px); } }

html.js:not(.reduced) .t-heart-1 { animation: heart-bob 5.2s ease-in-out infinite; }
html.js:not(.reduced) .t-heart-2 { animation: heart-bob 6.1s ease-in-out infinite 0.8s; }

/* Steps: the dotted trail draws itself in when the row arrives. */
html.js:not(.reduced) .step-arrow { clip-path: inset(0 100% 0 0); transition: clip-path 0.9s var(--ease-out) 0.35s; }
html.js .steps.is-in .step-arrow { clip-path: inset(0 0 0 0); }

/* ---------- Scroll cue under the hero copy ---------- */

.cue { display: inline-flex; align-items: center; gap: 0.55rem; margin-top: 2rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.cue:hover { color: var(--accent); }
.cue .cue-dot { width: 26px; height: 40px; border: 2px solid currentColor; border-radius: 999px; position: relative; flex: none; }
.cue .cue-dot::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; border-radius: 2px; margin-left: -2px; background: currentColor; }
html.js:not(.reduced) .cue .cue-dot::after { animation: cue-fall 1.9s var(--ease-out) infinite; }
@keyframes cue-fall { 0% { transform: translateY(0); opacity: 0; } 22% { opacity: 1; } 70% { transform: translateY(15px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Marquee ribbon ---------- */

.ribbon { overflow: hidden; background: var(--sage-soft); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.9rem 0; }
.ribbon-track { display: flex; width: max-content; }
html.js:not(.reduced) .ribbon-track { animation: ribbon 38s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes ribbon { to { transform: translateX(-50%); } }
.ribbon-item { display: inline-flex; align-items: center; gap: 1.25rem; padding: 0 1.25rem; font-family: var(--font-display); font-weight: 800; font-size: clamp(1rem, 2.4vw, 1.35rem); color: var(--ink); white-space: nowrap; }
.ribbon-item img { width: 20px; opacity: 0.55; }

/* ---------- CTA band: rising bubbles ---------- */

.cta-band { position: relative; overflow: hidden; }
.cta-band .wrap { position: relative; z-index: 2; }
.fizz { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fizz b { position: absolute; bottom: -60px; display: block; border-radius: 50%; background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.3); }
html.js:not(.reduced) .fizz b { animation: fizz-up var(--t, 14s) linear var(--dl, 0s) infinite; }
@keyframes fizz-up { 0% { transform: translateY(0) scale(0.6); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 0.7; } 100% { transform: translateY(-52vh) scale(1.15); opacity: 0; } }

/* ---------- Cursor paw trail (fine pointers only, added by JS) ---------- */

.paw-trail { position: fixed; z-index: 900; width: 24px; pointer-events: none; margin: -12px 0 0 -12px; opacity: 0; }
@keyframes paw-pop { 0% { opacity: 0; transform: rotate(var(--r, 0deg)) scale(0.35); } 20% { opacity: 0.45; } 100% { opacity: 0; transform: rotate(var(--r, 0deg)) scale(1.15) translateY(14px); } }

/* ---------- Mobile booking dock ---------- */

.dock {
  position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 999px;
  padding: 0.5rem 0.6rem 0.5rem 1.1rem; box-shadow: var(--shadow-lift);
  transform: translateY(160%); transition: transform 0.45s var(--ease-spring);
}
.dock.is-up { transform: translateY(0); }
.dock p { font-size: 0.88rem; font-weight: 700; }
.dock .btn { padding: 0.62rem 1.15rem; font-size: 0.9rem; flex: none; }
@media (min-width: 760px) { .dock { display: none; } }

/* ---------- Parallax hooks ---------- */

html.js:not(.reduced) [data-parallax] { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }

/* ---------- The escape hatch ---------- */

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
  html.js .wi { transform: none !important; }
  html.js .step-arrow { clip-path: none !important; }
  html.js .dock { transition: none; }
  .paw-trail, .fizz { display: none !important; }
}
