/* ==========================================================================
   Round 8 Polish (Version 09)
   Optional layer on top of site.css. Remove it by setting POLISH = False in
   _build/build.py (this file and polish.js stop loading). Nothing in
   site.css depends on it.
   ========================================================================== */

/* 1. Page-to-page cross-fade (Chrome, Edge, Safari 18.2+; others just load) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
.site-header { view-transition-name: site-header; }

/* 2. Brand-red text selection */
::selection { background: var(--red); color: #fff; }

/* 3. Tidier paragraphs: no single-word last lines */
p { text-wrap: pretty; }

/* 4. Scroll progress: hairline in brand red along the bottom of the nav */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--red); transform: scaleX(var(--scroll, 0)); transform-origin: left;
  opacity: 0; transition: opacity .3s;
}
.site-header.is-solid::after { opacity: .9; }

/* 5. Nav tucks away while you scroll down, returns the moment you scroll up */
.site-header { transition: background .3s var(--ease), transform .45s cubic-bezier(.2, .7, .2, 1); }
.site-header.is-tucked { transform: translateY(-100%); }
.menu-open .site-header.is-tucked { transform: none; }

/* 6. Hero entrance: media settles in, copy rises line by line */
@keyframes p-settle { from { transform: scale(1.04); } to { transform: none; } }
@keyframes p-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes p-fade { from { opacity: 0; } to { opacity: 1; } }
.hero .slides { animation: p-settle 1.8s cubic-bezier(.2, .7, .2, 1) both; }
.hero .eyebrow { animation: p-rise .9s .15s cubic-bezier(.2, .7, .2, 1) both; }
.hero .display { animation: p-rise 1s .3s cubic-bezier(.2, .7, .2, 1) both; }
.hero .thumbs, .hero .hero-controls { animation: p-fade .9s .7s ease both; }

/* 8. Pause / play for the hero slideshow (accessibility: WCAG 2.2.2) */
.hero-controls { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.hero-controls .thumb-caption { margin: 0; }
.hero-toggle {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .35); color: #fff; background: rgba(0, 0, 0, .25);
  transition: border-color .2s, background .2s;
}
.hero-toggle:hover { border-color: var(--red); background: rgba(255, 47, 1, .2); }
.hero-toggle svg { width: 12px; height: 12px; fill: currentColor; }

/* 9. Gallery and tiles: images ease in instead of popping */
.masonry .shot img, .tile img { transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .6s ease; }

@media (prefers-reduced-motion: reduce) {
  .hero .slides, .hero .eyebrow, .hero .display, .hero .thumbs, .hero .hero-controls { animation: none; }
  .site-header.is-tucked { transform: none; }
  @view-transition { navigation: none; }
}
