/* Button pass (November 2026): one material, one motion, on every button.
   Material: a fine grain over a gently top-lit fill, a soft rim and a quiet shadow. Three surfaces:
   - Cobalt: every primary action (hero, header, sticky header, footer, drawer, inner pages).
   - Glass: quiet actions on dark grounds (call, email, close, expertise link).
   - Paper: quiet actions on light grounds, and the white/cream buttons on cobalt or ink.
   Motion, the only two on any button: a sheen of light crosses once on hover, and the arrow nudges 2px.
   Pressing darkens the fill slightly. Hover motion is for pointer devices only.
   Loaded last on every page. Selectors carry a never-matching id (#btn) inside :is() so this layer
   outranks the older per-section button rules without !important. */

/* Icons are Phosphor (phosphoricons.com, MIT), Regular weight, pasted inline as SVG.
   .ph-icon sizes an inline icon to the text it replaces (the ↗ arrows in links and cards). */
.ph-icon { display: inline-block; width: 1em; height: 1em; flex-shrink: 0; vertical-align: -.125em; }

:root {
  --btn-ease: cubic-bezier(.22, 1, .36, 1);
  --btn-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --btn-grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ---------- Shared shape ---------- */
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .menu-contact > a, .site-btn,
    .drawer-cta, .site-sticky-contact, .hero-phone, .drawer-action, .side-info-close, .home-pill-link,
    .home-service-consult .home-service-link, .drawer-directions) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform: none;
  transition: background-color .3s ease, box-shadow .3s ease;
}
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .menu-contact > a, .site-btn,
    .drawer-cta, .site-sticky-contact, .hero-phone, .drawer-action, .side-info-close, .home-pill-link,
    .home-service-consult .home-service-link, .drawer-directions):is(:hover, :active, :focus) { transform: none; }

/* The theme's label roll and rising fill are retired: one still label. */
:is(#btn, .rr-btn) .btn-wrap .text-one,
:is(#btn, .rr-btn):is(:hover, :focus) .btn-wrap .text-one { transform: none; transition: none; }
:is(#btn, .rr-btn) .btn-wrap .text-two { display: none; }
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button)::before { display: none; }

/* ---------- Motion 1: the sheen ---------- */
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .site-btn,
    .drawer-cta, .site-sticky-contact, .hero-phone, .drawer-action, .side-info-close, .home-pill-link,
    .home-service-consult .home-service-link, .drawer-directions)::after,
:is(#btn, .menu-contact > a)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: auto;
  height: auto;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .2) 50%, transparent 68%);
  transform: translateX(-130%);
  pointer-events: none;
  -webkit-mask: none;
  mask: none;
}
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .site-btn, .drawer-cta, .site-sticky-contact,
    .drawer-action, .home-pill-link, .home-service-consult .home-service-link, .drawer-directions) > * { position: relative; z-index: 1; }

/* ---------- Motion 2: the arrow nudge (one distance, one timing, everywhere) ---------- */
:is(#btn, .hero-contact, .home-appointment, .home-service-link, .home-pill-link) > :is(.home-button-arrow, span[aria-hidden]),
:is(#btn, .site-btn) > .site-btn-icon,
:is(#btn, .drawer-cta) > .drawer-arrow,
:is(#btn, .site-sticky-contact) > span,
:is(#btn, .menu-contact > a)::after { transform: none; transition: transform .45s var(--btn-ease); animation: none; }

@media (hover: hover) and (pointer: fine) {
  :is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .site-btn,
      .drawer-cta, .site-sticky-contact, .hero-phone, .drawer-action, .side-info-close, .home-pill-link,
      .home-service-consult .home-service-link, .drawer-directions):hover::after,
  :is(#btn, .menu-contact > a):hover::before {
    transform: translateX(130%);
    transition: transform 1s var(--btn-ease);
  }
  /* Every arrow is a → (↓ for scroll cues) and nudges 2px along its direction. */
  :is(#btn, .hero-contact, .home-appointment, .home-service-link, .home-pill-link):hover > :is(.home-button-arrow, span[aria-hidden]),
  :is(#btn, .site-btn):hover > .site-btn-icon,
  :is(#btn, .drawer-cta):hover > .drawer-arrow,
  :is(#btn, .site-sticky-contact):hover > span,
  :is(#btn, .menu-contact > a):hover::after { transform: translateX(2px); }
  :is(#btn, .site-btn):hover > .site-btn-icon--down { transform: translateY(2px); }
}

/* ---------- Cobalt ---------- */
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .menu-contact > a, .site-btn--primary,
    .drawer-cta, .site-sticky-contact) {
  border: 0;
  background-color: #0605a8;
  background-image: var(--btn-grain), linear-gradient(180deg, #1210bd 0%, #0605a8 60%, #05049c 100%);
  background-size: 140px 140px, 100% 100%;
  color: #fff;
  text-shadow: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 0 0 1px rgba(255, 255, 255, .05),
    0 1px 2px rgba(3, 2, 90, .22),
    0 4px 10px -6px rgba(5, 4, 170, .4);
}
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .menu-contact > a, .site-btn--primary,
    .drawer-cta, .site-sticky-contact):is(:hover, :focus-visible) {
  background-color: #0807b0;
  background-image: var(--btn-grain), linear-gradient(180deg, #1714c4 0%, #0807b0 60%, #0605a2 100%);
  color: #fff;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    0 1px 2px rgba(3, 2, 90, .22),
    0 8px 18px -8px rgba(5, 4, 170, .5);
}
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .menu-contact > a, .site-btn--primary,
    .drawer-cta, .site-sticky-contact):active {
  background-color: #05049a;
  background-image: var(--btn-grain), linear-gradient(180deg, #05049a 0%, #0605a6 100%);
  box-shadow: inset 0 1px 3px rgba(1, 0, 50, .35), 0 1px 1px rgba(3, 2, 90, .2);
}
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button) .btn-wrap .text-one { color: #fff; }
/* These arrows are masked shapes painted with currentColor. */
:is(#btn, .hero-contact, .home-appointment) > .home-button-arrow { color: #fff; background: currentColor; }

/* ---------- Glass (on ink and photographs) ---------- */
:is(#btn, .hero-phone, .drawer-action, .side-info-close, .home-pill-link) {
  border: 0;
  background-color: rgba(255, 253, 245, .07);
  background-image: var(--btn-grain), linear-gradient(180deg, rgba(255, 253, 245, .09) 0%, rgba(255, 253, 245, .03) 100%);
  background-size: 140px 140px, 100% 100%;
  color: #fffdf5;
  box-shadow: inset 0 1px 0 rgba(255, 253, 245, .1), inset 0 0 0 1px rgba(255, 253, 245, .1);
}
:is(#btn, .hero-phone, .drawer-action, .side-info-close, .home-pill-link):is(:hover, :focus-visible) {
  background-color: rgba(255, 253, 245, .11);
  color: #fffdf5;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 253, 245, .14), inset 0 0 0 1px rgba(255, 253, 245, .16);
}
:is(#btn, .hero-phone, .drawer-action, .side-info-close, .home-pill-link):active { background-color: rgba(255, 253, 245, .05); }
:is(#btn, .hero-phone, .drawer-action, .side-info-close, .home-pill-link)::after {
  background: linear-gradient(105deg, transparent 32%, rgba(255, 253, 245, .12) 50%, transparent 68%);
}

/* ---------- Paper (light grounds, and white or cream on colour) ---------- */
:is(#btn, .site-btn--quiet, .home-service-consult .home-service-link, .drawer-directions) {
  border: 0;
  background-color: #f2efe9;
  background-image: var(--btn-grain-dark), linear-gradient(180deg, #faf8f4 0%, #f0ede6 100%);
  background-size: 140px 140px, 100% 100%;
  color: var(--polish-ink, #17161b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 0 0 1px rgba(23, 22, 27, .07),
    0 1px 2px rgba(23, 22, 27, .08);
}
:is(#btn, .site-btn--quiet, .home-service-consult .home-service-link, .drawer-directions):is(:hover, :focus-visible) {
  background-color: #f7f5f0;
  background-image: var(--btn-grain-dark), linear-gradient(180deg, #ffffff 0%, #f4f1eb 100%);
  color: var(--polish-ink, #17161b);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 1px rgba(23, 22, 27, .09),
    0 4px 12px -6px rgba(23, 22, 27, .2);
}
:is(#btn, .site-btn--quiet, .home-service-consult .home-service-link, .drawer-directions):active {
  background-image: var(--btn-grain-dark), linear-gradient(180deg, #ebe8e1 0%, #f0ede6 100%);
  box-shadow: inset 0 1px 2px rgba(23, 22, 27, .1), inset 0 0 0 1px rgba(23, 22, 27, .09);
}
:is(#btn, .site-btn--quiet, .home-service-consult .home-service-link, .drawer-directions)::after {
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .65) 50%, transparent 68%);
}

/* Focus stays obvious on every surface. */
:is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .menu-contact > a, .site-btn, .drawer-cta,
    .site-sticky-contact, .hero-phone, .drawer-action, .side-info-close, .home-pill-link,
    .home-service-consult .home-service-link, .drawer-directions):focus-visible { outline: 2px solid var(--cobalt, #0504aa); outline-offset: 3px; }
:is(#btn, .boutique-hero, .footer-area, .side-info, .home-practice-chapter, .home-service-consult) :is(a, button):focus-visible { outline-color: #fffdf5; }

@media (prefers-reduced-motion: reduce) {
  :is(#btn, .hero-contact, .home-appointment, .header-contact.home-button, .site-btn,
      .drawer-cta, .site-sticky-contact, .hero-phone, .drawer-action, .side-info-close, .home-pill-link,
      .home-service-consult .home-service-link, .drawer-directions)::after,
  :is(#btn, .menu-contact > a)::before { display: none; }
  :is(#btn, .hero-contact, .home-appointment, .home-service-link, .home-pill-link) > :is(.home-button-arrow, span[aria-hidden]),
  :is(#btn, .site-btn) > .site-btn-icon,
  :is(#btn, .drawer-cta) > .drawer-arrow,
  :is(#btn, .site-sticky-contact) > span,
  :is(#btn, .menu-contact > a)::after { transition: none; transform: none; }
}

/* ---------- Back to top (site-top.js) ----------
   Textured ink at rest, textured cobalt once it widens into "Back to top". The arrow holds still,
   centred on the label's line; the sheen is its only motion besides the widening. */
:is(#btn, .site-top) {
  border: 0;
  background-color: #1f1e24;
  background-image: var(--btn-grain), linear-gradient(180deg, #2a2930 0%, #1c1b21 100%);
  background-size: 140px 140px, 100% 100%;
  box-shadow:
    inset 0 1px 0 rgba(255, 253, 245, .08),
    inset 0 0 0 1px rgba(255, 253, 245, .1),
    0 10px 26px rgba(23, 22, 27, .24);
}
:is(#btn, .site-top)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .18) 50%, transparent 68%);
  transform: translateX(-130%);
  pointer-events: none;
}
:is(#btn, .site-top):is(:hover, :focus-visible) {
  border: 0;
  background-color: #0807b0;
  background-image: var(--btn-grain), linear-gradient(180deg, #1714c4 0%, #0807b0 60%, #0605a2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    0 8px 18px -8px rgba(5, 4, 170, .5);
}
:is(#btn, .site-top) .site-top-inner { z-index: 1; }
:is(#btn, .site-top) .site-top-label { display: flex; align-items: center; height: 100%; }
:is(#btn, .site-top):hover .site-top-arrow::before { transform: none; }
@media (hover: hover) and (pointer: fine) {
  :is(#btn, .site-top):hover::after { transform: translateX(130%); transition: transform 1s var(--btn-ease); }
}
@media (prefers-reduced-motion: reduce) {
  :is(#btn, .site-top)::after { display: none; }
}
