/* One entrance sequence on every page load; no permanent idle animation. */
.hero-main {
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-image {
  -webkit-user-drag: none;
}
.motion-enabled .hero-media {
  transform: translate3d(var(--hero-x, 0px), var(--hero-y, 0px), 0) scale(1.055);
}
.motion-enabled .hero-image {
  animation: hero-room-in 1.65s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.motion-enabled .hero-main.is-motion-active .hero-media {
  will-change: transform;
}
.motion-enabled .hero-content > * {
  animation: hero-copy-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.motion-enabled .hero-content > :nth-child(1) {
  animation-delay: 0.08s;
}
.motion-enabled .hero-content > :nth-child(2) {
  animation-delay: 0.2s;
}
.motion-enabled .hero-content > :nth-child(3) {
  animation-delay: 0.34s;
}
.motion-enabled .hero-content > :nth-child(4) {
  animation-delay: 0.48s;
}
.motion-enabled .stat {
  animation: hero-fact-in 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.motion-enabled .stat:nth-child(1) {
  animation-delay: 0.55s;
}
.motion-enabled .stat:nth-child(2) {
  animation-delay: 0.62s;
}
.motion-enabled .stat:nth-child(3) {
  animation-delay: 0.69s;
}
.motion-enabled .stat:nth-child(4) {
  animation-delay: 0.76s;
}
.motion-enabled .stat:nth-child(5) {
  animation-delay: 0.83s;
}
@keyframes hero-room-in {
  from {
    opacity: 0.45;
    transform: scale(1.06);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes hero-fact-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.motion-enabled .motion-reveal:not(.is-revealed) {
  opacity: 0;
  transform: translateY(28px);
}
.button .icon,
.text-link .icon {
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.button:hover .icon,
.text-link:hover .icon {
  transform: translateX(5px);
}
.navigation a {
  position: relative;
}
.navigation a::after {
  content: "";
  position: absolute;
  inset: auto 0 -6px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.navigation a:hover::after,
.navigation a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.photo-card,
.service-card,
.review {
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s ease;
}
@media (hover: hover) and (pointer: fine) {
  .photo-card:hover,
  .service-card:hover {
    transform: translateY(-4px);
  }
  .photo-card:hover .reference-photo {
    transform: scale(1.055);
  }
  .review:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(61, 47, 33, 0.08);
  }
}
@media (max-width: 800px) {
  .navigation a::after {
    bottom: 7px;
  }
}
/* The touch hero container stays stable; its image and text retain their
   one-time entrance animations. */
@media (hover: none), (pointer: coarse) {
  .motion-enabled .hero-media,
  .photo-card:hover,
  .photo-card:hover .reference-photo {
    transform: none;
    animation: none;
    will-change: auto;
  }
  .header {
    background: var(--paper);
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-enabled .hero-image,
  .motion-enabled .hero-media,
  .motion-enabled .hero-content,
  .motion-enabled .hero-content > *,
  .motion-enabled .stat,
  .motion-enabled .motion-reveal:not(.is-revealed) {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .photo-card:hover,
  .service-card:hover,
  .review:hover,
  .photo-card:hover .reference-photo {
    transform: none;
  }
}

/* Shared interaction timing connects the landing, catalogue and detail views. */
.button,
.scene-option,
.dialog-list-button,
.dialog-back,
.contact-details > a,
.contact-details > button,
.back-to-top {
  transition:
    transform 0.45s var(--ease-out),
    color 0.25s,
    background-color 0.25s,
    border-color 0.25s,
    box-shadow 0.35s,
    opacity 0.35s,
    visibility 0.35s;
}
.button:hover {
  box-shadow: 0 8px 24px #b71c221f;
}
.button:active {
  transform: translateY(1px) scale(0.985);
}
.button .icon,
.text-link .icon,
.category > span .icon,
.catalog-choice .icon {
  transition: transform 0.5s var(--ease-out);
}
.photo-card .reference-photo {
  transition: transform 0.85s var(--ease-out);
}
.feature-icon {
  transition: transform 0.6s var(--ease-out);
}
.service-image {
  transition:
    transform 0.6s var(--ease-out),
    border-radius 0.6s var(--ease-out);
}
.scene-option img {
  transition:
    transform 0.6s var(--ease-out),
    opacity 0.3s;
}
.detail-dialog[open] {
  animation: panel-in 0.45s var(--ease-out);
}
.detail-dialog[open]::backdrop,
.image-viewer[open]::backdrop {
  animation: backdrop-in 0.35s ease-out;
}
.image-viewer[open] {
  animation: panel-in 0.35s var(--ease-out);
}
.navigation.is-open {
  animation: menu-in 0.4s var(--ease-out);
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .photo-card:hover {
    transform: none;
    box-shadow: 0 15px 35px #272e1912;
  }
  .photo-card:hover .reference-photo {
    transform: translate3d(var(--photo-x, 0px), var(--photo-y, 0px), 0)
      scale(1.065);
  }
  .catalog-choice:hover .icon {
    transform: translateX(5px);
  }
  .benefit:hover .feature-icon {
    transform: translateY(-5px) rotate(-5deg);
  }
  .service-card:hover {
    transform: translateY(-6px);
  }
  .service-card:hover .service-image {
    transform: scale(0.965);
    border-radius: 12px;
  }
  .scene-option:hover img {
    transform: translateY(-4px);
  }
  .dialog-list-button:hover {
    transform: translateX(4px);
  }
  .contact-details > a:hover,
  .contact-details > button:hover {
    transform: translateX(4px);
  }
  .back-to-top:hover {
    transform: translateY(-4px);
    background: var(--red);
    color: white;
  }
}

/* Native timelines stop with scrolling. Browsers without timeline support
   retain the fully visible, static layout and observer-based reveals. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .showroom > img.reference-photo {
      animation: room-depth linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .process-step::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: -1px;
      height: 2px;
      background: var(--red);
      transform-origin: left;
      animation: step-progress linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    .header::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -1px;
      height: 2px;
      background: var(--red);
      transform-origin: left;
      animation: step-progress linear both;
      animation-timeline: scroll(root block);
    }
  }
}
@keyframes room-depth {
  from {
    transform: scale(1.09) translateY(-2%);
  }
  to {
    transform: scale(1.09) translateY(2%);
  }
}
@keyframes step-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .detail-dialog::backdrop,
  .image-viewer::backdrop {
    animation: none !important;
  }
  .motion-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-media,
  .hero-image,
  .photo-card,
  .reference-photo,
  .service-card,
  .service-image,
  .review,
  .button,
  .scene-option img {
    transform: none !important;
  }
}
