/* =====================================================
   FurryCorner — shared motion
   Loaded by every customer-facing page (after the page's own <style>).
   1. Page-to-page transitions (cross-document View Transitions)
   2. Scroll reveals for sections and cards (see transitions.js)
   3. Softer, consistent hover / open / step transitions
   Everything here is disabled for prefers-reduced-motion.
===================================================== */

:root{
  --ease-out: cubic-bezier(.22,.8,.3,1);
  --ease-in:  cubic-bezier(.4,0,1,1);
}

@keyframes fc-fade { from{ opacity:0; } }
@keyframes fc-drop { from{ opacity:0; transform:translateY(-10px) scale(.985); } }
@keyframes fc-rise { from{ opacity:0; transform:translateY(16px); } }

/* ---------- 1. Page-to-page ---------- */

@view-transition{ navigation:auto; }

/* The navbar stays put while the page underneath changes */
.navbar{ view-transition-name:site-nav; }
::view-transition-group(site-nav){ animation:none; }
::view-transition-old(site-nav){ display:none; }
::view-transition-new(site-nav){ animation:none; }

::view-transition-old(root){ animation:fc-page-out .5s var(--ease-in) both; }
::view-transition-new(root){ animation:fc-page-in 1s var(--ease-out) both; }

@keyframes fc-page-out{ to{ opacity:0; } }
@keyframes fc-page-in{ from{ opacity:0; transform:translateY(18px); } }

/* Browsers without View Transitions: a simple fade-in on load */
@supports not (view-transition-name:none){
  body{ animation:fc-fade .8s var(--ease-out) both; }
}

/* ---------- 2. Scroll reveals ---------- */

html.fc-motion .fc-reveal{
  opacity:0;
  transform:translate3d(0,22px,0);
  transition:
    opacity 1.1s var(--ease-out),
    transform 1.3s var(--ease-out);
  transition-delay:var(--fc-delay,0ms);
}
html.fc-motion .fc-reveal.fc-in{
  opacity:1;
  transform:none;
}

/* ---------- 3. Interaction transitions ---------- */

.btn,.btn-outline,.hero-btn,.card-btn,
.card,.team-card,.value-card,.service-card,.promise-item,
.cart-drawer-close,.nav-search-btn{
  transition-property:background-color,color,border-color,box-shadow,transform,opacity;
  transition-duration:.45s;
  transition-timing-function:var(--ease-out);
}

/* Search overlay, search results and notification panel ease in */
.search-overlay.open{ animation:fc-fade .4s var(--ease-out) both; }
.search-overlay.open .search-box{ animation:fc-drop .55s var(--ease-out) both; }
.fc-search .fc-dd.open,
.fc-notif-panel.open{
  animation:fc-drop .4s var(--ease-out) both;
  transform-origin:top right;
}

/* Cart: each checkout step glides in instead of snapping */
.checkout-section.active{ animation:fc-rise .85s var(--ease-out) both; }

/* ---------- Opt-outs ---------- */

@media print{
  html.fc-motion .fc-reveal{ opacity:1 !important; transform:none !important; }
}

@media (prefers-reduced-motion:reduce){
  @view-transition{ navigation:none; }
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-delay:0s !important;
    transition-duration:.001ms !important;
    transition-delay:0s !important;
  }
  html.fc-motion .fc-reveal{ opacity:1; transform:none; }
}