/* JavaScript applies the site's explicit on/off setting; without it, text stays visible. */
.js-motion .reveal:not(.review-card) {
  opacity: 1;
  transform: none;
  transition: none;
}

.motion-enabled .reveal.motion-pending:not(.review-card) {
  opacity: 0;
  transform: translateY(36px);
  animation: none;
}

.motion-enabled .reveal.motion-visible:not(.review-card) {
  animation: section-arrive 850ms cubic-bezier(.16, 1, .3, 1) var(--reveal-delay, 0ms) both;
}

.motion-enabled .reveal.motion-immediate:not(.review-card) {
  opacity: 1;
  transform: none;
  animation: none;
}

.motion-enabled .hero-copy > .eyebrow {
  animation: headline-arrive 750ms cubic-bezier(.16, 1, .3, 1) 60ms both;
}

.motion-enabled .hero h1 {
  animation: headline-arrive 1000ms cubic-bezier(.16, 1, .3, 1) 140ms both;
}

.motion-enabled .hero h1 em {
  display: inline-block;
  max-width: 100%;
  animation: emphasis-unveil 1100ms cubic-bezier(.22, 1, .36, 1) 360ms both;
}

.motion-enabled .hero-description {
  animation: headline-arrive 850ms cubic-bezier(.16, 1, .3, 1) 320ms both;
}

.motion-enabled .hero-actions {
  animation: headline-arrive 850ms cubic-bezier(.16, 1, .3, 1) 460ms both;
}

.motion-enabled .location-line {
  animation: headline-arrive 850ms cubic-bezier(.16, 1, .3, 1) 580ms both;
}

.motion-enabled .hero-visual {
  animation: photograph-arrive 1100ms cubic-bezier(.16, 1, .3, 1) 220ms both;
}

/* Individual translate leaves the existing -3deg / +4deg rotations intact. */
.motion-enabled .hero-collage-photo {
  animation: photograph-float 7s ease-in-out infinite;
  transition: box-shadow 350ms ease;
}

.motion-enabled .hero-collage-photo:nth-child(2) {
  animation: photograph-float 7s ease-in-out -3.5s infinite;
}

.motion-enabled .gallery-card img {
  transition: transform 550ms cubic-bezier(.2, .7, .3, 1), box-shadow 550ms ease;
}

.motion-enabled .button,
.motion-enabled .nav-cta {
  transition: transform 260ms cubic-bezier(.2, .7, .3, 1), background 260ms ease,
    color 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.motion-enabled nav a:not(.nav-cta)::after {
  transition: right 350ms cubic-bezier(.2, .7, .3, 1);
}

.motion-enabled .text-link,
.motion-enabled .contact-direct a,
.motion-enabled .footer-phone {
  transition: color 240ms ease, border-color 240ms ease;
}

.motion-enabled .menu-toggle span,
.motion-enabled summary span {
  transition: transform 300ms cubic-bezier(.2, .7, .3, 1);
}

.motion-enabled input,
.motion-enabled textarea,
.motion-enabled select {
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.motion-enabled input:focus,
.motion-enabled textarea:focus,
.motion-enabled select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

#motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  min-height: 28px;
}

#motion-toggle::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
}

#motion-toggle[aria-pressed='true']::before {
  background: #52724b;
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .motion-enabled .hero-collage-photo:hover {
    animation-play-state: paused;
    box-shadow: 0 22px 46px #233d4d24;
  }

  .motion-enabled .gallery-card:hover img {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 30px #233d4d20;
  }

  .motion-enabled .button:hover,
  .motion-enabled .nav-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px #162d4218;
  }
}

@keyframes headline-arrive {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes emphasis-unveil {
  from { clip-path: inset(0 100% 0 0); translate: 14px 0; }
  to { clip-path: inset(0 -3% 0 -3%); translate: 0 0; }
}

@keyframes photograph-arrive {
  from { opacity: 0; transform: translateY(32px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes photograph-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

@keyframes section-arrive {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}

/* The toggle also stops animations supplied by components, including reviews. */
html[data-motion='off'] {
  scroll-behavior: auto;
}

html[data-motion='off'] *,
html[data-motion='off'] *::before,
html[data-motion='off'] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html[data-motion='off'] .reveal {
  opacity: 1 !important;
  transform: none !important;
}

html[data-motion='off'] .hero-collage-photo,
html[data-motion='off'] .hero-collage-photo:hover,
html[data-motion='off'] .hero h1 em {
  translate: none !important;
  clip-path: none !important;
}

html[data-motion='off'] .gallery-card img,
html[data-motion='off'] .gallery-card:hover img,
html[data-motion='off'] .button:hover,
html[data-motion='off'] .nav-cta:hover,
html[data-motion='off'] .swatch:hover,
html[data-motion='off'] .review-card-surface {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion='on']) { scroll-behavior: auto; }
  html:not([data-motion='on']) *,
  html:not([data-motion='on']) *::before,
  html:not([data-motion='on']) *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html:not([data-motion='on']) .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  html:not([data-motion='on']) .hero-collage-photo,
  html:not([data-motion='on']) .hero-collage-photo:hover,
  html:not([data-motion='on']) .hero h1 em {
    translate: none !important;
    clip-path: none !important;
  }
  html:not([data-motion='on']) .gallery-card img,
  html:not([data-motion='on']) .gallery-card:hover img,
  html:not([data-motion='on']) .button:hover,
  html:not([data-motion='on']) .nav-cta:hover,
  html:not([data-motion='on']) .swatch:hover,
  html:not([data-motion='on']) .review-card-surface {
    transform: none !important;
  }
}
