/* Ferrer Mag v1.8.0 — motion in every section.
   v1.10.0: Trending + Sunday gradients — live v1.9 measured 0% over
   6.2s, but the code was not broken (animation applied, horizontal
   gradient, 200% layer, 10s/12s). It was measurement sensitivity:
   ease-in-out slow zones + short window + low-contrast colours. Now
   LINEAR timing, 6s/7s cycles, 300% layers, opaque stops — see the
   notes above gradient-shift-trending / gradient-shift-sunday.
   v1.8 keeps all v1.7 motion (small cards, pastel tints, dial, mega menu)
   and fixes the three items that measured 0.00% live in v1.6:
   (1) Trending + Sunday gradients were VERTICAL, so a horizontal
   position shift was pixel-identical — both gradients are now
   horizontal (90deg, pink → lavender → blue) in style.css, and the
   shifts run faster here (10s / 12s) so a 5s check sees them move.
   (2) The Fashion image zoom selector ".section-fashion" matched NO
   element — the row's real class is "section-fashion-style" — so the
   zoom rules below now list BOTH selectors, and front-page.php also
   adds the "section-fashion" alias class to that row.
   v1.7 keeps all v1.6 motion (tile bob, wall drift, hero badge spin,
   gradient shift, plane, footer bob) and adds the dial ring spin
   (dial-spin, 40s, in style.css — the ring, not the centre, rotates).
   The dial centre auto-cycles in main.js every 3s; under
   prefers-reduced-motion the ring stops and there is no autoplay,
   but the centre still changes on click / prev / next. */
   v1.6 root causes fixed: (1) tile/icon keyframes moved only ±2–3° /
   6–8px on a ~36px emoji — ~0.6% pixel change live, invisible; amplitudes
   are roughly doubled and the WHOLE tile now bobs (tile-bob). (2) The
   gradient-shift animated background-position on a gradient sized 100%,
   which cannot move visibly — the gradient layer is now 200% wide with
   explicit multi-layer keyframes. (3) The hero badge CSS existed but NO
   badge element existed in front-page.php — v1.6 adds the SVG badge.
   (4) Footer bob was hover-only, so passive pixel checks saw 0px — the
   social links now bob continuously too. All animations are disabled
   under prefers-reduced-motion. Scroll-reveal is JS-gated: content is
   fully visible by default; only when main.js adds .js-reveal to <html>
   do .reveal elements start hidden and fade/slide in on scroll. If JS
   fails or is off, nothing is ever hidden. */

/* --- Shared scroll-reveal (added by JS, see main.js) --- */
.js-reveal .reveal{opacity:0;transform:translateY(26px);transition:opacity .7s ease,transform .7s ease}
.js-reveal .reveal.in-view{opacity:1;transform:none}
.js-reveal .reveal.reveal-left{transform:translateX(-28px)}
.js-reveal .reveal.reveal-right{transform:translateX(28px)}
.js-reveal .reveal.reveal-left.in-view,.js-reveal .reveal.reveal-right.in-view{transform:none}

/* --- Hero: blobs drift, photo floats, headline fades in --- */
.hero::before,.hero::after{content:"";position:absolute;border-radius:50%;filter:blur(2px);pointer-events:none;z-index:0}
.hero::before{width:340px;height:340px;left:-90px;top:60px;background:radial-gradient(circle,#EFE9F5 0%,rgba(239,233,245,0) 70%);animation:blob-drift 14s ease-in-out infinite}
.hero::after{width:300px;height:300px;right:-60px;top:20px;background:radial-gradient(circle,#FFE0CB 0%,rgba(255,224,203,0) 70%);animation:blob-drift 18s ease-in-out infinite reverse}
.hero-grid{position:relative;z-index:1}
.hero-copy{animation:headline-fade 1s ease both}
.hero-photo{animation:hero-float 7s ease-in-out infinite}
.hero-badge{animation:badge-spin 22s linear infinite}
@keyframes blob-drift{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(24px,-18px) scale(1.08)}}
@keyframes headline-fade{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
@keyframes hero-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes badge-spin{to{transform:rotate(368deg)}}

/* --- Marquee: continuous horizontal scroll (JS clones the span for a seamless loop) --- */
.marquee{overflow:hidden}
.marquee span{display:inline-block;white-space:nowrap;animation:marquee-scroll 30s linear infinite}
.marquee:hover span{animation-play-state:paused}
@keyframes marquee-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* --- Niche tiles: keep the existing per-tile motion, add hover lift + scroll fade --- */
/* v1.6: the WHOLE tile bobs ±7px (tile-bob, staggered delays) — v1.5 only
   animated the small emoji icon, which measured ~0.66% live. The bob is
   an animation, so it overrides the hover translateY while running;
   hover therefore lifts via shadow + title colour only (no transform). */
.niche-tile{transition:box-shadow .35s ease;animation:tile-bob 3.2s ease-in-out infinite}
.niche-stage .niche-tile:nth-child(6n+2),.motion-wall .niche-tile:nth-child(6n+2){animation-delay:.25s}
.niche-stage .niche-tile:nth-child(6n+3),.motion-wall .niche-tile:nth-child(6n+3){animation-delay:.5s}
.niche-stage .niche-tile:nth-child(6n+4),.motion-wall .niche-tile:nth-child(6n+4){animation-delay:.75s}
.niche-stage .niche-tile:nth-child(6n+5),.motion-wall .niche-tile:nth-child(6n+5){animation-delay:1s}
.niche-stage .niche-tile:nth-child(6n+6),.motion-wall .niche-tile:nth-child(6n+6){animation-delay:1.25s}
@keyframes tile-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
/* Motion Wall tiles drift sideways as well as bobbing, so the wall reads
   differently from the stage. */
.motion-wall .niche-tile{animation:wall-drift 3.6s ease-in-out infinite}
@keyframes wall-drift{0%,100%{transform:translate(0,0)}50%{transform:translate(8px,-6px)}}
.niche-tile:hover{box-shadow:0 18px 36px rgba(51,39,42,.14)}
.niche-tile:hover h3{color:#D97B8C}
.motion-sway{animation:sway 3s ease-in-out infinite}
.motion-glow{animation:glow 2.6s ease-in-out infinite}
.motion-twinkle{animation:twinkle 2.2s ease-in-out infinite}
.motion-fly{animation:fly 4s ease-in-out infinite}
.motion-bounce{animation:bounce 2.4s ease-in-out infinite}
.motion-pulse{animation:pulse 2s ease-in-out infinite}
.motion-grow{animation:grow 3.4s ease-in-out infinite}
.motion-wiggle{animation:wiggle 2.8s ease-in-out infinite}
.motion-flutter{animation:flutter 3s ease-in-out infinite}
.motion-breathe{animation:breathe 4s ease-in-out infinite}
.motion-drift{animation:drift 5s ease-in-out infinite}
.motion-shimmer{animation:shimmer 3s ease-in-out infinite}

/* --- Trending: gradient shimmer + cards rise staggered (via .reveal) + hover lift --- */
/* v1.6: gradient-shift previously animated background-position on a
   gradient sized 100% — a 100%-wide gradient cannot move visibly, which
   is why live checks measured 0.06%. The gradient layer is now 200%
   wide, and the keyframes move it 0% → 100% (a full-width shift) while
   the photo layers stay put (explicit multi-layer positions).
   v1.8: that still measured 0.00% live, because the gradient itself
   was VERTICAL (no angle in style.css) — a vertical gradient is
   uniform left-to-right, so sliding it sideways changes no pixel.
   The gradient is now horizontal (90deg) in style.css, and the shift
   runs faster (16s → 10s) so a 5s pixel check sees it move.
   v1.10: live v1.9 measured 0% again over 6.2s (mean ~2.5 vs static
   control ~2.07 = noise) — but this time the code was NOT broken:
   the animation IS applied to .section-trending (front-page.php:168
   still renders that class), the gradient IS horizontal 90deg, the
   layer IS 200%, the duration IS 10s, and scroll-reveal does NOT pause
   it (main.js only toggles opacity/transform on .reveal — it never
   touches animation-play-state, and the section is in-view when
   measured). The real cause is measurement sensitivity: (1) ease-in-out
   spends most of each 10s leg near-zero velocity, so a 6.2s window can
   straddle a turnaround and barely move; (2) a 200% layer slides the
   visible window only HALF the gradient per leg; (3) the demo-exact
   colours are very close (max channel range ~23) and the .82 alpha
   wash over the pink background shrank it to ~19, so even a moving
   gradient changes each pixel by only a few units — below a >12
   threshold. Fix: LINEAR timing (constant velocity, no slow zones),
   6s cycle (any 5s window covers ~a full leg), 300% layer (the window
   slides 2/3 of the gradient per leg), and OPAQUE stops in style.css
   (full demo-exact colour range). Per-pixel change over any 5s window
   is now up to ~14 units — well above the ~2 rendering-noise floor. */
.section-trending{animation:gradient-shift-trending 6s linear infinite alternate;background-size:300% 100%,300px auto,300px auto,300px auto,300px auto}
.section-trending .card{transition:transform .35s ease,box-shadow .35s ease}
.section-trending .card:hover{transform:translateY(-8px);box-shadow:0 20px 40px rgba(51,39,42,.16)}
.section-trending .card:hover h3 a{color:#D97B8C}
@keyframes gradient-shift-trending{from{background-position:0% 0,right -40px top,left -60px bottom,right -40px bottom,left -40px top}to{background-position:100% 0,right -40px top,left -60px bottom,right -40px bottom,left -40px top}}

/* --- Category rows: distinct motion per row --- */
/* v1.8: FASHION ZOOM ROOT CAUSE — the selectors below used
   ".section-fashion", but front-page.php renders the Fashion row as
   class "section-fashion-style" (row slug 'fashion-style'), so the zoom
   rule matched NO element and the hover zoom measured 0.00% live
   (tested twice, 900ms wait). The markup itself is fine and unchanged:
   template-parts/card.php renders <article class="card"><a><img
   (the_post_thumbnail 'ferrer-card' or the story-1.jpg fallback)></a>
   <div class="card-body">… — a plain <img> inside .card, 180px high,
   object-fit:cover, inside .card's overflow:hidden, so a scale on the
   img is visible and clipped cleanly. The rules below now list BOTH
   ".section-fashion" and ".section-fashion-style", and front-page.php
   also adds the "section-fashion" alias class to that row. Zoom is
   1.08 → 1.10 with transform-origin centre so the movement is
   unmistakable in a pixel check. */
.section-fashion .card img,.section-fashion-style .card img{transition:transform .6s ease;will-change:transform;transform-origin:center}
.section-fashion .card:hover img,.section-fashion-style .card:hover img{transform:scale(1.10)}
.section-fashion .card,.section-fashion-style .card,.section-home-decor .card,.section-beauty-skincare .card,.section-travel .card{transition:transform .35s ease,box-shadow .35s ease}
.section-fashion .card:hover,.section-fashion-style .card:hover,.section-home-decor .card:hover,.section-beauty-skincare .card:hover,.section-travel .card:hover{transform:translateY(-6px)}
.section-fashion .card:hover h3 a,.section-fashion-style .card:hover h3 a,.section-home-decor .card:hover h3 a,.section-beauty-skincare .card:hover h3 a,.section-travel .card:hover h3 a{color:#D97B8C}
.section-home-decor .card{animation:sway-soft 7s ease-in-out infinite}
@keyframes sway-soft{0%,100%{transform:rotate(0)}50%{transform:rotate(1.5deg)}}
.section-beauty-skincare .card{animation:glow-pulse 4s ease-in-out infinite}
.section-beauty-skincare .card::after{content:"✦";position:absolute;top:10px;right:12px;color:#D97B8C;opacity:.7;animation:sparkle-float 3.4s ease-in-out infinite;pointer-events:none}
.section-beauty-skincare .card{position:relative}
@keyframes glow-pulse{0%,100%{box-shadow:0 10px 30px rgba(51,39,42,.08)}50%{box-shadow:0 10px 34px rgba(217,123,140,.5)}}
@keyframes sparkle-float{0%,100%{transform:translateY(0) scale(1);opacity:.5}50%{transform:translateY(-6px) scale(1.2);opacity:1}}
.section-travel{position:relative;overflow:hidden}
.section-plane{position:absolute;top:34px;left:-60px;font-size:38px;z-index:0;opacity:.8;pointer-events:none;animation:plane-drift 12s linear infinite}
@keyframes plane-drift{from{transform:translateX(-60px) translateY(0)}25%{transform:translateX(25vw) translateY(-14px)}50%{transform:translateX(50vw) translateY(0)}75%{transform:translateX(75vw) translateY(-10px)}to{transform:translateX(110vw) translateY(0)}}

/* --- v1.9.0 Gallery: wallpaper cards tilt on hover, lightbox fades in --- */
.section-gallery .wallpaper-card:hover,.section-gallery-page .wallpaper-card:hover{transform:translateY(-6px) rotate(-.4deg)}
.section-gallery .wallpaper-card,.section-gallery-page .wallpaper-card{transition:transform .35s ease,box-shadow .35s ease}
.section-gallery h2,.section-gallery-page h2{animation:headline-fade 1s ease both}
.gallery-lightbox-box{animation:lightbox-in .3s ease both}
@keyframes lightbox-in{from{opacity:0;transform:scale(.96) translateY(10px)}to{opacity:1;transform:scale(1) translateY(0)}}

/* --- Sunday Letter: gradient shifts, button pulses, form fades in --- */
/* v1.6: same gradient-shift fix as Trending — the gradient layer is now
   200% wide so the shift is visible (was 0.06% live).
   v1.8: same vertical-gradient root cause as Trending — this gradient
   was also vertical, so the horizontal shift was invisible (0.00%).
   It is now horizontal (90deg) in style.css, and the shift runs faster
   (18s → 12s) so a 5s pixel check sees it move.
   v1.10: same measurement-sensitivity fix as Trending above — LINEAR
   timing, 7s cycle, 300% layer, OPAQUE stops in style.css (the .82
   alpha wash is gone, so the full demo-exact colour range moves). */
.section-sunday{animation:gradient-shift-sunday 7s linear infinite alternate;background-size:300% 100%,220px 220px}
.section-sunday .newsletter{animation:headline-fade 1s ease both}
.section-sunday .btn{animation:btn-pulse 2.4s ease-in-out infinite}
@keyframes gradient-shift-sunday{from{background-position:0% 0,0 0}to{background-position:100% 0,0 0}}
@keyframes btn-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}

/* --- Footer: keep dark colours/content, social icons bob on hover, fade in on scroll --- */
/* v1.6: footer bob was hover-only, so passive pixel checks measured 0px.
   The social links now bob continuously (staggered), and hover still
   lifts them -3px and turns them pink. */
.site-footer a{transition:transform .3s ease,color .3s ease}
.site-footer a:hover{transform:translateY(-3px);color:#F3C6CC}
.site-footer .footer-social a{display:inline-block;animation:footer-bob 2.6s ease-in-out infinite}
.site-footer .footer-social a:nth-child(2){animation-delay:.3s}
.site-footer .footer-social a:nth-child(3){animation-delay:.6s}
.site-footer .footer-social a:nth-child(4){animation-delay:.9s}
.site-footer .footer-grid a:hover{animation:footer-bob .6s ease-in-out}
@keyframes footer-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}

/* --- Generic inner pages: gentle fade-up on cards/tiles --- */
.section-archive .card,.section-search .card,.section-single .post-content,.section-page .post-content{animation:headline-fade .9s ease both}

/* --- v1.14.0 — SHOWCASE HERO: figures REMOVED ---
   Komal asked on 2026-11-16 to remove ALL of the small widgets
   from the category pages, so the figure stage is gone: no figure
   spans, no per-niche scenes, no walk/fly/run keyframes and
   no na-* keyframes (they were only used by the scenes). What stays
   is the photo slow Ken Burns zoom below, stopped under
   prefers-reduced-motion by the global rule at the end of this file. */
@keyframes sc-kenburns{from{transform:scale(1) translate(0,0)}to{transform:scale(1.12) translate(-1.5%,-2%)}}

/* --- Reduced motion: everything stops, content stays visible --- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important}
  .js-reveal .reveal{opacity:1 !important;transform:none !important}
}
