/* ==========================================================================
   Velvet Eve — polish layer (v38)
   Loaded last on every public page. Three parts:
   1. Fixes: image frames, alignment and stray borders.
   2. Interaction: hover and focus refinements.
   3. Motion: entrance, scroll-reveal and ambient animation.
   The scroll reveals are driven by /motion.js, which only hides elements it
   is about to animate. Without JavaScript, and for visitors who prefer
   reduced motion, every element renders in its final state.
   ========================================================================== */

:root{
  --vx-gold:var(--pv-gold,var(--ve-gold,var(--shop-gold,#9a7b45)));
  --vx-ink:var(--pv-ink,var(--ve-ink,var(--shop-ink,#30271f)));
  --vx-out:cubic-bezier(.16,1,.3,1);
  --vx-soft:cubic-bezier(.4,0,.2,1);
}

/* ---------- 1. FIXES ------------------------------------------------------ */

/* Hero: a clean arch. The picture now fills the frame instead of sitting
   inside a tan mat with a gold keyline. */
html[data-theme] body.ve-home .hero-photo .hero-arch{display:block;position:relative;overflow:hidden;aspect-ratio:5/6;border-radius:999px 999px 3px 3px;box-shadow:0 44px 80px -48px rgba(60,40,15,.5);transform:translateZ(0)}
html[data-theme] body.ve-home .hero-photo .hero-arch img{display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:cover;object-position:50% 62%;border:0;padding:0;background:none;border-radius:0;box-shadow:none}
html[data-theme="dark"] body.ve-home .hero-photo .hero-arch{box-shadow:0 44px 90px -50px rgba(0,0,0,.8)}

/* Department thumbnails: fill the tile, no beige bands above and below. */
html body .ve-department-tile img{object-fit:cover;background:none;border-radius:2px}

/* Product cards: square frames that the photograph fills edge to edge. */
html body .ve-product-card .ve-product-image{aspect-ratio:1;box-shadow:none;border-radius:2px}
html body .ve-product-card .ve-product-image img{object-fit:cover}
html body .ve-product-card .ve-product-image img[src*="cartridge.webp"],
html body .ve-product-card .ve-product-image img[src$="/signature-room-diffuser.webp"]{object-fit:contain;padding:9%}
html body.ve-home .ve-ritual-image{gap:2px;background:transparent}

/* Product cards: actions line up along the bottom of each row. */
html body .ve-compact-grid .ve-product-card{display:flex;flex-direction:column}
html body .ve-compact-grid .ve-product-card>p{flex:1 0 auto}
html body .ve-compact-grid .ve-product-card .ve-product-actions{margin-top:auto}

/* Collection, discovery and format cards: frames clip their own zoom. */
html body :is(.ve-edit-media,.ve-format-media,.card-media,.card-image,.stay-photo,.gallery-stage){overflow:hidden}
html[data-theme] .card-image img{object-fit:cover}

/* "Every property has a signature": picture fills its half, calmer shadow. */
html[data-theme] .stay-edit{box-shadow:0 40px 80px -64px rgba(40,25,10,.38)}
html[data-theme] .stay-photo{background:none}
html[data-theme] .stay-photo img{object-fit:cover}

/* Diffuser stage: remove the inner keyline the caption was sitting on. */
html body .ve-diffuser-scene::before{content:none}

/* Property brief: four buttons on one baseline at one height. */
html[data-theme] .brief-buttons{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px}
html[data-theme] .brief-buttons>:is(button,a){margin:0;display:inline-flex;align-items:center;justify-content:center;min-height:46px}

/* Storefront header: the cart count had lost its spacing ("CART0"). */
.quote-link [data-plan-count]{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:8px;padding:0 5px;border:1px solid currentColor;border-radius:999px;font-size:9px;line-height:1;letter-spacing:0}

/* Suite scene: soften the heavy drop shadow under the photograph. */
html[data-theme] .pv-suite-scene img{box-shadow:0 44px 80px -56px rgba(40,25,10,.45)}

/* ---------- 2. INTERACTION ------------------------------------------------ */

@media (hover:hover){
  html body :is(.ve-product-image,.ve-edit-media,.ve-format-media,.card-media,.card-image) img{transition:transform 1.5s var(--vx-out),filter 1.5s var(--vx-out)}
  html body :is(.ve-product-card,.ve-edit,.ve-format-cards>a,.card,.edit-card):hover :is(.ve-product-image,.ve-edit-media,.ve-format-media,.card-media,.card-image) img{transform:scale(1.06)}
  html body.ve-home .ve-format-cards a:hover img{transform:scale(1.06)}

  html body :is(.ve-product-card,.card,.edit-card) h3 a,
  html body :is(.ve-edit,.ve-format-cards>a) :is(h3,strong){transition:color .5s var(--vx-soft)}
  html body :is(.ve-product-card,.card):hover h3 a,
  html body :is(.ve-edit,.ve-format-cards>a):hover :is(h3,strong){color:var(--vx-gold)}

  html body .ve-department-tile{transition:transform .7s var(--vx-out)}
  html body .ve-department-tile img{transition:transform .9s var(--vx-out),box-shadow .9s var(--vx-out)}
  html body .ve-department-tile span{transition:letter-spacing .7s var(--vx-out),color .5s var(--vx-soft)}
  html body .ve-department-tile:hover{transform:translateX(4px)}
  html body .ve-department-tile:hover img{transform:scale(1.08);box-shadow:0 14px 26px -16px rgba(60,40,15,.55)}
  html body .ve-department-tile:hover span{color:var(--vx-gold)}

  html body .ve-save{transition:transform .5s var(--vx-out),background-color .4s var(--vx-soft),color .4s var(--vx-soft)}
  html body .ve-save:hover{transform:scale(1.1)}

  html body :is(.quick-add,.plan-add){transition:transform .6s var(--vx-out),color .4s var(--vx-soft),background-color .4s var(--vx-soft)}
  html body :is(.quick-add,.plan-add):hover{transform:rotate(90deg)}

  html[data-theme] .pv-texture{transition:transform 1.4s var(--vx-out),box-shadow 1.4s var(--vx-out)}
  html[data-theme] .pv-swatch:hover .pv-texture{transform:translateY(-8px) scale(1.02)}
}

/* ---------- 3. MOTION ----------------------------------------------------- */

/* Scroll progress hairline (element is added by motion.js). */
.vx-progress{position:fixed;top:0;left:0;right:0;height:2px;z-index:2147483000;pointer-events:none;transform-origin:0 50%;transform:scaleX(var(--vx-progress,0));background:linear-gradient(90deg,color-mix(in srgb,var(--vx-gold) 55%,transparent),var(--vx-gold));opacity:.9}

@media (prefers-reduced-motion:no-preference){

  /* Smooth cross-fade between pages in browsers that support it. */
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:vxPageOut .28s var(--vx-soft) both}
  ::view-transition-new(root){animation:vxPageIn .55s var(--vx-out) both}

  /* ----- Scroll reveals: states set by motion.js ----- */
  [data-vx]{transition-property:opacity,transform,clip-path,filter;transition-duration:1.25s;transition-timing-function:var(--vx-out);transition-delay:var(--vx-delay,0s);will-change:opacity,transform}
  [data-vx="rise"]:not(.vx-in){opacity:0;transform:translate3d(0,46px,0)}
  [data-vx="fade"]:not(.vx-in){opacity:0}
  [data-vx="head"]{transition-duration:1.4s}
  [data-vx="head"]:not(.vx-in){opacity:0;transform:translate3d(0,.42em,0);clip-path:inset(0 -4% 100% -4%)}
  [data-vx="head"].vx-in{clip-path:inset(-12% -4% -22% -4%)}
  [data-vx="label"]{transition-property:opacity,transform,letter-spacing;transition-duration:1.5s}
  [data-vx="label"]:not(.vx-in){opacity:0;transform:translate3d(0,10px,0)}
  /* Picture frames: the photograph wipes in from the top while it settles. */
  html body [data-vx="media"] img{transition:clip-path 1.25s cubic-bezier(.5,0,.1,1),transform 2.1s var(--vx-out);transition-delay:var(--vx-delay,0s);clip-path:inset(0 0 0 0)}
  html body [data-vx="media"]:not(.vx-in) img{clip-path:inset(0 0 100% 0);transform:scale(1.22)}
  html body [data-vx="media"] :is(.ve-concept,span){transition:opacity .9s var(--vx-soft);transition-delay:calc(var(--vx-delay,0s) + .9s)}
  html body [data-vx="media"]:not(.vx-in) :is(.ve-concept,span){opacity:0}
  [data-vx="scale"]{transition-duration:1.8s}
  [data-vx="scale"]:not(.vx-in){opacity:0;transform:scale(.88);filter:blur(10px)}

  /* ----- Homepage hero: entrance on load ----- */
  html[data-theme] body.ve-home header{animation:vxDrop 1.1s var(--vx-out) both}
  html[data-theme] body.ve-home .announcement{animation:vxFade 1.2s var(--vx-soft) .15s both}
  html[data-theme] body.ve-home .hero-content>.eyebrow{animation:vxLabel 1.5s var(--vx-out) .25s both}
  html[data-theme] body.ve-home .hero h1{animation:vxHead 1.5s var(--vx-out) .4s both}
  html[data-theme] body.ve-home .hero h1 em{display:inline-block;animation:vxRise 1.5s var(--vx-out) .7s both}
  html[data-theme] body.ve-home .hero .copy{animation:vxRise 1.3s var(--vx-out) .95s both}
  html[data-theme] body.ve-home .hero-actions{animation:vxRise 1.3s var(--vx-out) 1.1s both}
  html[data-theme] body.ve-home .hero-availability{animation:vxFade 1.4s var(--vx-soft) 1.45s both}
  html[data-theme] body.ve-home .hero-photo{animation:none}
  html[data-theme] body.ve-home .hero-photo .hero-arch{animation:vxArch 1.9s cubic-bezier(.65,0,.15,1) .3s both}
  html[data-theme] body.ve-home .hero-photo .hero-arch img{animation:vxSettle 2.8s var(--vx-out) .3s both;transform:translate3d(0,var(--vx-par,0px),0) scale(1.08)}
  html[data-theme] body.ve-home .hero-photo figcaption{animation:vxFade 1.4s var(--vx-soft) 1.6s both}
  /* A slow band of light crosses the arch once it has opened. */
  html[data-theme] body.ve-home .hero-photo .hero-arch::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(112deg,transparent 38%,rgba(255,244,220,.38) 50%,transparent 62%);background-size:260% 100%;background-position:130% 0;animation:vxSheen 9s var(--vx-soft) 2.2s infinite}
  /* Soft light that follows the pointer across the hero (set by home-flow.js). */
  html[data-theme] body.ve-home .hero{position:relative}
  html[data-theme] body.ve-home .hero::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:var(--vx-glow,0);transition:opacity 1.2s var(--vx-soft);background:radial-gradient(520px circle at var(--vx-mx,70%) var(--vx-my,40%),color-mix(in srgb,var(--vx-gold) 16%,transparent),transparent 70%)}
  html[data-theme] body.ve-home .hero>*{position:relative;z-index:1}

  /* ----- Inner pages: entrance on load ----- */
  :is(.ve-hero,.catalog-hero,.program-hero)>div>*,.ve-intro>*,.enquiry-intro>:not(figure),.product-copy>:is(.eyebrow,h1,p,.status-row){animation:vxRise 1.2s var(--vx-out) both}
  :is(.ve-hero,.catalog-hero,.program-hero)>div>:is(h1),.ve-intro>h1,.enquiry-intro>h1,.product-copy>h1{animation:vxHead 1.5s var(--vx-out) both}
  :is(.ve-hero,.catalog-hero,.program-hero)>div>:nth-child(1),.ve-intro>:nth-child(1),.enquiry-intro>:nth-child(1),.product-copy>:nth-child(1){animation-delay:.1s}
  :is(.ve-hero,.catalog-hero,.program-hero)>div>:nth-child(2),.ve-intro>:nth-child(2),.enquiry-intro>:nth-child(2),.product-copy>:nth-child(2){animation-delay:.22s}
  :is(.ve-hero,.catalog-hero,.program-hero)>div>:nth-child(3),.ve-intro>:nth-child(3),.enquiry-intro>:nth-child(3),.product-copy>:nth-child(3){animation-delay:.4s}
  :is(.ve-hero,.catalog-hero,.program-hero)>div>:nth-child(4),.ve-intro>:nth-child(4),.enquiry-intro>:nth-child(4),.product-copy>:nth-child(4){animation-delay:.55s}
  :is(.ve-hero,.catalog-hero,.program-hero)>div>:nth-child(n+5),.ve-intro>:nth-child(n+5){animation-delay:.68s}
  :is(.ve-hero,.program-hero)>figure,.enquiry-intro>figure,.gallery-stage{animation:vxWipe 1.6s cubic-bezier(.65,0,.15,1) .15s both}
  :is(.ve-hero,.program-hero)>figure img,.enquiry-intro>figure img{animation:vxSettle 2.6s var(--vx-out) .15s both}
  :is(.ve-hero,.program-hero)>figure,.enquiry-intro>figure{overflow:hidden}
  .catalog-proof{animation:vxRise 1.3s var(--vx-out) .5s both}

  /* ----- Homepage ambient details ----- */
  /* Wordmark: letters rise one by one (letters are split by home-flow.js). */
  .wordmark-band .vx-letter{display:inline-block;transition:transform 1.5s var(--vx-out),opacity 1.5s var(--vx-out);transition-delay:calc(var(--i) * 70ms)}
  .wordmark-band.vx-armed .vx-letter{transform:translate3d(0,62%,0);opacity:0}
  .wordmark-band span{display:inline-block;transform:translate3d(var(--vx-drift,0px),0,0)}
  html[data-theme] .wordmark-band span:last-child{margin-right:-.12em}
  .wordmark-band i{display:inline-block;transition:transform 2s var(--vx-out) .4s,opacity 1.2s var(--vx-soft) .4s}
  .wordmark-band.vx-armed i{transform:rotate(-180deg) scale(.2);opacity:0}
  .wordmark-band.vx-live i{animation:vxTwinkle 5s ease-in-out 2.6s infinite}

  /* Golden emblem: gentle float and a passing sheen across the metal. */
  html[data-theme] .signature-emblem{position:relative}
  html[data-theme] .signature-emblem img{animation:vxFloat 9s ease-in-out infinite alternate}
  html[data-theme] .signature-emblem::after{content:"";position:absolute;top:0;left:50%;width:clamp(250px,32vw,400px);max-width:100%;aspect-ratio:1;transform:translateX(-50%);pointer-events:none;-webkit-mask:url(/assets/velvet-eve-golden-emblem.png) center/contain no-repeat;mask:url(/assets/velvet-eve-golden-emblem.png) center/contain no-repeat;background:linear-gradient(115deg,transparent 42%,rgba(255,250,235,.55) 50%,transparent 58%);background-size:300% 100%;background-position:150% 0;animation:vxSheen 7s var(--vx-soft) 1.5s infinite,vxFloat 9s ease-in-out infinite alternate;mix-blend-mode:screen}

  /* Timeline: the line draws and the steps arrive when the list is in view. */
  html[data-theme] .pv-road-list::after{animation-play-state:paused}
  html[data-theme] .pv-road-list.vx-live::after{animation-play-state:running}
  html[data-theme] .pv-road-dot{transition:transform 1s var(--vx-out);transition-delay:var(--vx-delay,0s)}
  html[data-theme] .pv-road-list li[data-vx]:not(.vx-in) .pv-road-dot{transform:scale(0)}

  /* Suite: the gold points arrive after the room has been revealed. */
  html[data-theme] .pv-suite-scene[data-vx] .pv-spot-dot{transition:transform 1s var(--vx-out),opacity .8s var(--vx-soft);transition-delay:calc(.7s + var(--k,0) * .12s)}
  html[data-theme] .pv-suite-scene[data-vx]:not(.vx-in) .pv-spot-dot{transform:scale(0);opacity:0}

  /* Phone preview: slow hover in place. */
  html[data-theme] .mobile-preview .mobile-phone{animation:vxFloat 8s ease-in-out infinite alternate}

  /* Step numbers and short rules draw in with their block. */
  html body .ve-steps-inline>div::after{transition:transform 1.2s var(--vx-out) .35s;transform-origin:0 50%}
  html body .ve-steps-inline>div[data-vx]:not(.vx-in)::after{transform:scaleX(0)}
}

@keyframes vxRise{from{opacity:0;transform:translate3d(0,34px,0)}to{opacity:1;transform:none}}
@keyframes vxFade{from{opacity:0}to{opacity:1}}
@keyframes vxDrop{from{opacity:0;transform:translate3d(0,-18px,0)}to{opacity:1;transform:none}}
@keyframes vxLabel{from{opacity:0;letter-spacing:.6em}to{opacity:1}}
@keyframes vxHead{from{opacity:0;transform:translate3d(0,.4em,0);clip-path:inset(0 -4% 100% -4%)}to{opacity:1;transform:none;clip-path:inset(-12% -4% -22% -4%)}}
@keyframes vxArch{from{clip-path:inset(100% 0 0 0 round 999px 999px 3px 3px)}to{clip-path:inset(0 0 0 0 round 999px 999px 3px 3px)}}
@keyframes vxWipe{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0 0 0 0)}}
@keyframes vxSettle{from{transform:scale(1.3)}}
@keyframes vxSheen{0%{background-position:130% 0}32%,100%{background-position:-60% 0}}
@keyframes vxFloat{from{translate:0 -7px}to{translate:0 9px}}
@keyframes vxTwinkle{0%,100%{transform:rotate(0) scale(1)}50%{transform:rotate(90deg) scale(1.25)}}
@keyframes vxPageOut{to{opacity:0}}
@keyframes vxPageIn{from{opacity:0;transform:translate3d(0,10px,0)}}

@media print{[data-vx]{opacity:1!important;transform:none!important;clip-path:none!important;filter:none!important}.vx-progress{display:none}}

/* ---------- 1b. FIXES found on inner pages --------------------------------- */

/* Catalogue: the help link slid over the department list while scrolling.
   The whole sidebar now sticks as one block. */
@media(min-width:761px){
  html body .ve-catalog-sidebar{position:sticky;top:85px;align-self:start}
  html body .ve-catalog-sidebar>details{position:static}
}

/* Product page: a square stage for square photography, so there are no
   empty bands either side of the picture. */
html body .gallery-stage{aspect-ratio:1;max-height:none}
@media(min-width:761px){html body .gallery-stage{width:min(100%,max(340px,calc(100vh - 300px)));margin-inline:auto}}

/* Phones: the suite photograph sits in a swipe strip that cut its shadow into a grey band. */
@media(max-width:760px){html[data-theme] .pv-suite-scene img{box-shadow:none}}
