/* Promote only the text currently animated inside a visible scene. */
.scroll-moving { will-change: transform, opacity; }
/* A static shade avoids repainting the full viewport during text reveals. */
.hero-shade { opacity: 1; }
/* Contain image hover scaling within the existing card bounds. */
.path-image { contain: paint; }
.hero-loader-track::after { will-change: transform; }
.hero-loader.is-leaving .hero-loader-track::after { animation: none; will-change: auto; }
@media (prefers-reduced-motion: reduce) {
  .scroll-moving, .hero-loader-track::after { will-change: auto; }
}
/* Lightweight scenes use normal playback without scroll seeks. */
.performance-light .doors-message { visibility: hidden; opacity: 0; transform: none; }
.performance-light .doors.doors-copy-ready .doors-message { visibility: visible; opacity: 1; }
.performance-light .doors-intro { display: none; }
.performance-light .hero-shade { opacity: 1; }
.performance-light .doors-pause { display: block; z-index: 3; }
.performance-light .doors { height: auto; min-height: 650px; }
.performance-light .doors-message { position: relative; min-height: 650px; padding-bottom: 100px; }
.performance-light .path-image img { transition: none; }
@media (max-width: 700px) {
  .performance-light .doors,
  .performance-light .doors-message { min-height: 580px; }
}

/* Hero playback is independent of the scroll controller in every mode. */
.hero .hero-in { visibility: hidden; opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.hero.hero-copy-ready .hero-in { visibility: visible; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero .hero-in { transition: none; transform: none; }
}

/* Reveal the destination in reading order once door playback finishes. */
.performance-light .doors-message > * {
  opacity: 0;
  transform: translateY(18px);
  transition: none;
}
.performance-light .doors.doors-copy-ready .doors-message > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1100ms cubic-bezier(.22, .61, .36, 1), transform 1100ms cubic-bezier(.22, .61, .36, 1);
}
.performance-light .doors.doors-copy-ready .doors-message > :nth-child(1) { transition-delay: 0ms; }
.performance-light .doors.doors-copy-ready .doors-message > :nth-child(2) { transition-delay: 180ms; }
.performance-light .doors.doors-copy-ready .doors-message > :nth-child(3) { transition-delay: 360ms; }
.performance-light .doors.doors-copy-ready .doors-message > :nth-child(4) { transition-delay: 540ms; }
.performance-light .doors.doors-copy-ready .doors-message > :nth-child(5) { transition-delay: 720ms; }
@media (prefers-reduced-motion: reduce) {
  .performance-light .doors.doors-copy-ready .doors-message > * {
    transform: none;
    transition: opacity 150ms ease;
    transition-delay: 0ms;
  }
}

/* Direct contact actions, using the existing site typography and buttons. */
.contacts { background: #f4f1e9; color: #102d35; }
.contacts h2 { margin-bottom: 32px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.contact-actions .button { min-width: 170px; justify-content: space-between; }
.contact-details { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 24px; }
.contact-details a { color: inherit; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contacts a:focus-visible { outline: 3px solid #a86b38; outline-offset: 5px; }
@media (max-width: 600px) {
  .contact-actions .button { width: 100%; }
  .contact-details { flex-direction: column; gap: 12px; }
}

/* Foto aggiuntiva nella storia: conserva l’intera inquadratura. */
.about-extra-photo { grid-column: 1 / -1; width: 100%; margin: 0; }
.about-extra-photo img { display: block; width: 100%; height: auto; }
