/* Motion layer — marketing pages only (home, services, team, contact).
   Booking and the staff view never load this.

   This site's choreography is deliberately not the house recipe:
   no smooth scroll, no fade-up on sections. One orchestrated moment
   (the hero headline), the price list settling in row by row the
   first time it's scrolled to, and small honest transitions on the
   interactive pieces. Everything else is still. */

/* ---------- header stays put ---------- */
/* The phone number and the Book button stay one glance away however
   far down the page someone has read. */
#site-header { position: sticky; top: 0; z-index: 55; }
#reviews { scroll-margin-top: 130px; }

/* hero headline line masks — the spans are built by motion.js;
   without JS these classes never appear and the h1 is plain text */
.w-word { display: inline-block; }
.w-mask {
  display: block; overflow: hidden;
  padding-bottom: 0.09em; margin-bottom: -0.09em;
}
.w-inner {
  display: block; will-change: transform;
  transition: transform 0.95s cubic-bezier(0.23, 1, 0.32, 1);
}
.w-inner.risen { transform: none !important; }

/* ---------- the ledger settles in as a list ---------- */
/* Rows start hidden only when JS is on AND the visitor hasn't asked
   for reduced motion — the .js class is set by an inline script in
   the head, and motion.js adds .inview when the list first arrives. */
@media (prefers-reduced-motion: no-preference) {
  .js .ledger-list .ledger-item { opacity: 0; transform: translateY(10px); }
  .js .ledger-list.inview .ledger-item {
    opacity: 1; transform: none;
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1), transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transition-delay: calc(var(--i, 0) * 60ms);
  }
}

/* ---------- micro-interactions ---------- */

.mainnav a:not(.btn) { position: relative; }
.mainnav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 2px; background: var(--pine);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1);
}
.mainnav a:not(.btn):hover::after,
.mainnav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.mainnav a:hover, .mainnav a[aria-current="page"] { text-decoration: none; }

.btn { transition: background-color 0.2s cubic-bezier(0.23, 1, 0.32, 1), transform 0.15s cubic-bezier(0.23, 1, 0.32, 1); }
.btn:active { transform: scale(0.97); }

.doc-row { transition: background-color 0.2s cubic-bezier(0.23, 1, 0.32, 1); }
table.prices tr { transition: background-color 0.2s cubic-bezier(0.23, 1, 0.32, 1); }
table.prices tr:hover { background: #fffdf8; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .w-inner, .btn, .mainnav a::after, .doc-row,
  table.prices tr, .quote-text, .ledger-detail { transition: none !important; }
}
