/* Motion is progressive: all content is visible until the observer is ready. */
:root {
  --motion-ease: cubic-bezier(.2, .65, .3, 1);
  --photo-ease: cubic-bezier(.22, .61, .36, 1);
}

.reveal {
  transition: opacity 600ms var(--motion-ease), transform 600ms var(--motion-ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-pending { opacity: 0; transform: translateY(18px); }
.reveal:focus-within { opacity: 1; transform: none; transition: none; }

/* The hero settles outwards once; text enters in a short, staggered sequence. */
.hero-content { animation: none; }
.hero-photo { animation-name: hero-settle; }
@keyframes hero-settle { from { transform: scale(1.04); } to { transform: scale(1); } }

/* Each image owns a stacking context. The small photo always stays in front,
   even while the rear photo is enlarged beyond its original bounds. */
.about-images { isolation: isolate; overflow: visible; }
.about-main { position: relative; z-index: 1; }
.about-small { z-index: 3; }
.image-stamp { z-index: 4; pointer-events: none; }
.about-main img,
.about-small,
.portrait-slot.has-portrait {
  transform: scale(1);
  transform-origin: center;
  transition: transform 600ms var(--photo-ease);
}
.about-main img { position: relative; }
.about-small { transform-origin: center bottom; }
.portrait-slot.has-portrait { overflow: visible; }
.portrait-slot.has-portrait img {
  transform: none;
  transition: none;
}
.portrait-slot.has-portrait:hover img { transform: none; }

/* Hover transforms live on the entire portrait frame, not its cropped image.
   Touch devices retain a stable composition and do not get sticky hover. */
@media (hover: hover) and (pointer: fine) {
  .about-main:hover img { transform: scale(1.035); }
  .about-small:hover { transform: scale(1.035); }
  .portrait-slot.has-portrait:hover { transform: scale(1.025); }
  .button:hover { transform: translateY(-2px); }
  .button:hover svg { transform: translateX(4px); }
  .video-play:hover svg { transform: scale(1.06); }
}

.button {
  transition: color 240ms ease, background 240ms ease, border-color 240ms ease,
    transform 300ms var(--motion-ease);
}
.button svg { transition: transform 300ms var(--motion-ease); }
.video-play svg { transition: transform 350ms var(--motion-ease), background 240ms ease; }
.field input, .field select, .field textarea {
  transition: border-color 240ms ease, background-color 240ms ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink);
  background-color: rgba(250, 246, 238, .45);
}

.mobile-nav:not([hidden]) { animation: menu-enter 300ms var(--motion-ease) both; }
.lightbox[open] .lightbox-body { animation: menu-enter 300ms var(--motion-ease) both; }
@keyframes menu-enter {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-pending { opacity: 1; transform: none; transition: none; }
  .hero-photo, .hero-content, .mobile-nav, .lightbox[open] .lightbox-body { animation: none; }
  .about-main:hover img, .about-small:hover, .portrait-slot.has-portrait:hover,
  .button:hover, .button:hover svg, .video-play:hover svg { transform: none; }
}
