/* ------------------------------------------------------------------
   Everhaven polish layer (Nov 2026)
   One motion language for the whole page, taken from the hero:
   things arrive softly out of the mist, once, and then stay put.
   Nothing here changes words, layout, or colours.
   ------------------------------------------------------------------ */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* --- Sections arrive as you reach them ------------------------------ */
/* The .rv class is only ever added by polish.js, so with no script
   (or with reduced motion) everything is simply visible. */
.rv {
  transition: opacity .9s ease, transform 1.2s var(--ease-out), filter .9s ease;
  transition-delay: var(--rv-delay, 0ms);
}
.rv:not(.rv-in) {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  filter: blur(6px);
}

/* Cards already rise in (motion.css); give them the same easing. */
.motion-card.is-revealed { animation-duration: 1s; animation-timing-function: var(--ease-out); }

/* --- Header: glides in when it pins, with the page faintly behind --- */
.navbar.is-fixed {
  background: rgba(250, 251, 249, .9);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
          backdrop-filter: saturate(1.2) blur(14px);
  box-shadow: 0 1px 0 rgba(59, 63, 58, .1), 0 12px 30px -22px rgba(47, 66, 45, .45);
  animation: nav-settle .55s var(--ease-out) both;
}
@keyframes nav-settle {
  from { transform: translate3d(0, -100%, 0); }
  to   { transform: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .navbar.is-fixed { background: var(--cream); }
}

/* --- Buttons and links: one crisp, quiet response -------------------- */
.btn, .btn-white, .nav-cta {
  transition: transform .35s var(--ease-out), box-shadow .35s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}
.btn:active, .btn-white:active, .nav-cta:active { transform: translateY(0) scale(.985); transition-duration: .08s; }
.nav-cta:hover { background: var(--charcoal); }

/* --- The forest returns, faintly, where the page ends ---------------- */
.contact-section { position: relative; isolation: isolate; }
.contact-section::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: min(560px, 75%);
  background: url("assets/hero/far-960.webp") center 18% / cover no-repeat;
  mix-blend-mode: multiply;
  opacity: .8;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0));
          mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0));
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .rv, .rv:not(.rv-in) { opacity: 1; transform: none; filter: none; transition: none; }
  .navbar.is-fixed { animation: none; }
  .btn, .btn-white, .nav-cta { transition: background-color .2s ease, color .2s ease; }
}
@media (forced-colors: active) {
  .contact-section::before { display: none; }
}
@media print {
  .rv, .rv:not(.rv-in) { opacity: 1; transform: none; filter: none; }
  .contact-section::before { display: none; }
}
