/* Soft Luxury Motion (v3.8.6, owner-approved Nov 24): a small,
 * purposeful animation system — transform + opacity ONLY, no new
 * colours (the one shadow value is the existing tile-hover token
 * from home-v4.css), no new requests, no layout changes. Every
 * rule below is covered by the prefers-reduced-motion block at
 * the end of this file. */

/* 1. Fade-and-rise reveals (selected homepage sections, once, on
 * viewport entry). Sections render VISIBLE by default — the hidden
 * state exists only while the script's .sunrise-motion-hidden
 * class is present, so no-JS, no-IntersectionObserver, a script
 * failure, or reduced motion all mean fully visible content.
 * The sticky bar, header, hero and booking buttons never carry
 * the reveal class (see inc/home-v4.php). */
.sunrise-motion-reveal { transition:opacity .6s ease, transform .6s ease; }
.sunrise-motion-reveal.sunrise-motion-hidden { opacity:0; transform:translateY(12px); }
.sunrise-motion-reveal.sunrise-motion-visible { opacity:1; transform:translateY(0); }

/* 5. Hero entrance (subtle). No hidden initial state, no delay:
 * the hero starts at opacity .9 — visible from the first paint —
 * and settles to full opacity over .5s. Interaction is never
 * blocked (no pointer-events changes). */
@keyframes sunrise-hero-enter { from { opacity:.9; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.home .sunrise-v4-hero { animation:sunrise-hero-enter .5s ease; }

/* 2. Hover + press feedback (booking buttons + interactive
 * controls). Extends the existing transitions — the hero Book
 * button keeps its own higher-specificity treatment in
 * home-v4.css. Hover lift is hover-capable pointers only (no
 * sticky hover on touch); press feedback works everywhere. */
.wp-block-button__link, .sunrise-button, .sunrise-menu-toggle, .sunrise-hero-video-toggle, .sunrise-v380-booking-cta a { transition:transform .2s ease, box-shadow .2s ease; }
@media (hover:hover) and (pointer:fine) {
 .wp-block-button__link:hover, .sunrise-button:hover, .sunrise-menu-toggle:hover, .sunrise-hero-video-toggle:hover, .sunrise-v380-booking-cta a:hover { transform:translateY(-1px); box-shadow:0 15px 30px #302A2718; }
}
.wp-block-button__link:active, .sunrise-button:active, .sunrise-menu-toggle:active, .sunrise-hero-video-toggle:active, .sunrise-v380-booking-cta a:active { transform:scale(.98); }
/* Reviews slider controls: the centring translateY(-50%) is part
 * of the base transform, so hover/press compose with it instead
 * of replacing it. */
.sunrise-reviews-prev, .sunrise-reviews-next { transition:transform .2s ease, box-shadow .2s ease; }
@media (hover:hover) and (pointer:fine) {
 .sunrise-reviews-prev:hover, .sunrise-reviews-next:hover { transform:translateY(-50%) scale(1.06); box-shadow:0 15px 30px #302A2718; }
}
.sunrise-reviews-prev:active, .sunrise-reviews-next:active { transform:translateY(-50%) scale(.96); }

/* 3. Subtle image zoom (desktop gallery + service photographs).
 * Desktop hover-capable pointers only — no zoom on touch. Every
 * zoomed img sits inside an overflow:hidden container (the
 * .sunrise-site-photo base rule clips the site-photo figures;
 * the gallery grid figure gets its clip here). Transform only —
 * no layout shift, ever. Popular tile imgs already zoom in
 * home-v4.css and are untouched here. */
@media (hover:hover) and (min-width:1024px) {
 .sunrise-gallery-grid .wp-block-image { overflow:hidden; }
 .sunrise-gallery-grid .wp-block-image img, .sunrise-gallery-preview .sunrise-site-photo img, .sunrise-guide-french-strip .sunrise-site-photo img, .sunrise-page-hero .sunrise-site-photo img, .sunrise-prices-category-body .sunrise-site-photo img { transition:transform .45s ease; }
 .sunrise-gallery-grid .wp-block-image:hover img, .sunrise-gallery-preview .sunrise-site-photo:hover img, .sunrise-guide-french-strip .sunrise-site-photo:hover img, .sunrise-page-hero .sunrise-site-photo:hover img, .sunrise-prices-category-body .sunrise-site-photo:hover img { transform:scale(1.04); }
}

/* 4. Dropdown fade (navigation submenus, e.g. Service Guides).
 * WordPress core already toggles opacity + visibility on
 * hover/focus-within (and on click for open-on-click submenus
 * like Service Guides); this only changes the fade. The selector
 * matches core's own transition rule (.wp-block-navigation
 * .has-child .wp-block-navigation__submenu-container, 0,3,0,
 * inside @media not (prefers-reduced-motion)) exactly, so the tie
 * breaks by cascade order — the theme stylesheet loads after
 * core's inline styles. No transition-delay: the submenu is
 * interactive the moment it opens (visibility flips to visible at
 * the start of the transition; it flips to hidden only after the
 * fade-out). */
.wp-block-navigation .has-child .wp-block-navigation__submenu-container { transition:opacity .15s ease, visibility .15s; }

/* All motion OFF under prefers-reduced-motion. The reveal rules
 * force visible (opacity 1, no offset) even if the script added
 * the hidden class; everything else loses its transition or
 * animation outright. */
@media (prefers-reduced-motion:reduce) {
 .sunrise-motion-reveal, .sunrise-motion-reveal.sunrise-motion-hidden, .sunrise-motion-reveal.sunrise-motion-visible { opacity:1 !important; transform:none !important; transition:none !important; animation:none !important; }
 .home .sunrise-v4-hero { animation:none !important; }
 .wp-block-button__link, .sunrise-button, .sunrise-menu-toggle, .sunrise-hero-video-toggle, .sunrise-v380-booking-cta a, .sunrise-reviews-prev, .sunrise-reviews-next { transition:none !important; }
 .sunrise-gallery-grid .wp-block-image img, .sunrise-gallery-preview .sunrise-site-photo img, .sunrise-guide-french-strip .sunrise-site-photo img, .sunrise-page-hero .sunrise-site-photo img, .sunrise-prices-category-body .sunrise-site-photo img { transition:none !important; }
 .wp-block-navigation .has-child .wp-block-navigation__submenu-container { transition:none !important; }
}
