/* Shared motion is progressively added by motion.js; all content is visible without JS. */
:root {
  --lb-ease-out: cubic-bezier(.22, 1, .36, 1);
  --lb-ease-soft: cubic-bezier(.4, 0, .2, 1);
  --lb-motion-feedback: 180ms;
  --lb-motion-control: 240ms;
  --lb-motion-panel: 320ms;
  --lb-motion-reveal: 420ms;
}
html { scroll-behavior: smooth; }
body.site-chrome main [id] { scroll-margin-top: 100px; }
.lb-motion-ready [data-lb-reveal="waiting"] { opacity: 0; }

/* Retire the previous endless atmosphere and heading effects on the light site. */
body.premium-site:not(.admin-page)::before,
body.premium-site:not(.admin-page)::after,
body.premium-site:not(.admin-page) .tone-word::after {
  content: none !important;
  animation: none !important;
  will-change: auto !important;
}
body.premium-site:not(.admin-page) .tone-word {
  animation: none !important;
  color: inherit;
}
.direction-arrow svg, .featured-arrow svg { display: block; width: 22px; height: 22px; }
.form-back-link svg { width: 22px; height: 22px; }
.premium-text-link > svg { width: 20px; height: 20px; vertical-align: middle; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: lb-page-out 240ms var(--lb-ease-soft) both; }
::view-transition-new(root) { animation: lb-page-in 240ms var(--lb-ease-soft) both; }
@keyframes lb-page-out { to { opacity: 0; } }
@keyframes lb-page-in { from { opacity: 0; } to { opacity: 1; } }

body.premium-site .catalog-service[data-disclosure-expanded="false"] .catalog-service-expand svg,
body.premium-site.seo-service-page:not(.admin-page) .service-detail-faq details[data-disclosure-expanded="false"] summary svg {
  transform: rotate(0deg);
}
body.premium-site :is(.catalog-service-expand, .premium-faq summary) svg {
  transition-duration: var(--lb-motion-panel);
  transition-timing-function: var(--lb-ease-out);
}

/* Feedback never animates dimensions, typography or the expensive glass blur. */
body.site-chrome :is(.button, .premium-button, .direction, .featured-service, [data-catalog-category], .review-control) {
  transition-property: background-color, border-color, color, opacity, transform;
  transition-duration: var(--lb-motion-control);
  transition-timing-function: var(--lb-ease-out);
}
body.site-chrome :is(.direction-arrow, .featured-arrow, .premium-text-link) > svg {
  transition: transform var(--lb-motion-control) var(--lb-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  body.site-chrome :is(.direction, .featured-service):hover :is(.direction-arrow, .featured-arrow) > svg,
  body.site-chrome .premium-text-link:hover > svg { transform: translateX(3px); }
}
@media (hover: none) {
  :is(.button, .premium-button, .direction, .featured-service):active { transform: scale(.985); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  body.site-chrome *, body.site-chrome *::before, body.site-chrome *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .lb-motion-ready [data-lb-reveal="waiting"] { opacity: 1; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
@media print {
  [data-lb-reveal] { opacity: 1 !important; transform: none !important; }
}

/* Catalogue disclosure: native details semantics, the body row animates 0fr -> 1fr.
   services-catalog.js adds .catalog-disclosure-animatable only where grid rows transition;
   without it the page stays on the instant native behaviour. */
body.premium-site.service-directory-page .catalog-service {
  transition: none;
  transform: none;
}
body.premium-site.service-directory-page .catalog-service summary {
  touch-action: manipulation;
}
body.premium-site.service-directory-page .catalog-service-expand svg {
  transition: transform 120ms var(--lb-ease-out);
}
body.premium-site.service-directory-page { overflow-anchor: none; }
html.catalog-disclosure-animatable body.premium-site.service-directory-page .catalog-service-body {
  padding: 0;
  display: grid;
  grid-template-columns: none;
  grid-template-rows: 0fr;
  gap: 0;
  align-items: stretch;
  transition: grid-template-rows var(--lb-motion-control) var(--lb-ease-out);
}
html.catalog-disclosure-animatable body.premium-site.service-directory-page .catalog-service.catalog-open .catalog-service-body {
  grid-template-rows: 1fr;
}
html.catalog-disclosure-animatable body.premium-site.service-directory-page .catalog-service-disclosure {
  min-height: 0;
  overflow: clip;
  opacity: 0;
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
  transition: opacity var(--lb-motion-feedback) var(--lb-ease-soft);
}
html.catalog-disclosure-animatable body.premium-site.service-directory-page .catalog-service.catalog-open .catalog-service-disclosure {
  opacity: 1;
}
@media (max-width: 760px) {
  html.catalog-disclosure-animatable body.premium-site.service-directory-page .catalog-service-disclosure {
    padding: 0 12px 16px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 18px;
  }
}
