/* Glam & Fab — cinematic cover hero.
   Layers, back to front, all locked to one "stage" box that keeps the photo's
   aspect ratio, so the type and frames stay pinned to the models at any size:
     1. hx-photo   the campaign trio (full photo, extended pink sky on top)
     2. hx-wash    the pink/gold marble texture, soft, only on the empty sky
     3. hx-back    thin gold vector frames that sit BEHIND the models
     4. hx-mast    the bold SELF-CARE masthead, also behind the models
     5. hx-cut     the same photo with the models cut out (alpha), on top
     6. hx-front   the part of the gold frame that crosses IN FRONT of the models
   Then outside the stage: the bottom fade into the cream page and the copy.
   Palette and fonts stay on the site tokens (rose, deep, gold, cream;
   Cormorant Garamond + Jost). */

.hx{
  --hx-sky:#edd4cd;           /* the photo's own backdrop tone */
  --hx-navh:90px;
  --hp:0;                     /* scroll progress 0 → 1, written by gnf-hero.js */
  position:relative;height:100vh;height:100svh;min-height:640px;max-height:1200px;padding:0;
  overflow:hidden;isolation:isolate;
  background:var(--hx-sky);
}
.hx-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ---------- the stage ---------- */
.hx-stage{
  position:absolute;right:0;bottom:0;
  height:calc(100% - var(--hx-navh));aspect-ratio:2560/1829;
  container-type:inline-size;
  transform:translate3d(0,calc(var(--hp) * 7%),0);
  scale:1;transform-origin:62% 40%;
  animation:hx-push 2.8s cubic-bezier(.2,.7,.1,1) both;
}
.hx-photo,.hx-cut{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;user-select:none;-webkit-user-drag:none}
.hx-photo{z-index:1;
  /* fade the photo's left edge into the hero backdrop on wide screens */
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 9%);mask-image:linear-gradient(to right,transparent 0,#000 9%);
}
.hx-cut{z-index:5;pointer-events:none}

.hx-wash{position:absolute;z-index:2;left:0;top:0;width:70%;height:70%;
  background:url('/assets/hero/marble-gold.webp') center/cover no-repeat;
  mix-blend-mode:multiply;opacity:.5;
  -webkit-mask-image:radial-gradient(ellipse 50% 50% at 50% 45%,#000 30%,transparent 100%);
          mask-image:radial-gradient(ellipse 50% 50% at 50% 45%,#000 30%,transparent 100%);
  pointer-events:none;
}

/* ---------- masthead (behind the models) ---------- */
.hx-mast{
  /* start the masthead on the same left edge as the copy ("isn't Selfish."),
     even though the stage itself begins further right on wide screens */
  --hx-ml:calc(clamp(1.5rem,5.5vw,6rem) - (100vw - 100cqw));
  position:absolute;z-index:4;left:3.5%;left:var(--hx-ml);right:3%;top:13%;margin:0;
  display:flex;justify-content:space-between;
  font-family:'Cormorant Garamond',serif;font-weight:600;
  font-size:15.2vw;font-size:calc((97cqw - var(--hx-ml)) * .15);line-height:.8;letter-spacing:-.01em;text-transform:uppercase;
  color:var(--rose,#c4736a);
  translate:0 calc(var(--hp) * -35%);
  clip-path:inset(-5% -2% -12% -2%);
}
.hx-mast span{display:inline-block;
  /* rose marble with gold veins: the texture multiplied over a rose → deep ramp */
  background:linear-gradient(170deg,rgba(196,115,106,.92) 0%,rgba(168,92,84,.95) 55%,rgba(42,26,24,.9) 130%),url('/assets/hero/marble-gold.webp') center/cover;
  background-blend-mode:multiply;background-size:100% 100%,900% 160%;
  background-position:0 0,calc(var(--i) * 12.5%) 40%;
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  animation:hx-rise 1.15s cubic-bezier(.2,.75,.15,1) both;animation-delay:calc(.25s + var(--i) * .06s);
}
.hx-mast .hx-dash{font-weight:300}

/* ---------- vector frames ---------- */
.hx-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.hx-lines--back{z-index:3}
.hx-lines--front{z-index:6}
.hx-lines path,.hx-lines line,.hx-lines rect,.hx-lines circle{fill:none;stroke:var(--gold,#c9a96e);stroke-width:1.25;vector-effect:non-scaling-stroke;
  stroke-dasharray:1;stroke-dashoffset:0;animation:hx-draw 2.4s cubic-bezier(.55,.1,.2,1) both;animation-delay:.7s}
.hx-lines .hx-thin{stroke-width:.9;opacity:.75}
.hx-lines .hx-star{fill:var(--gold,#c9a96e);stroke:none;animation:hx-fade 1s ease both;animation-delay:2.2s}

/* ---------- blend into the page ---------- */
.hx-fade{position:absolute;z-index:7;left:0;right:0;bottom:0;height:20%;pointer-events:none;
  background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,.6) 55%,#fff 100%)}
.hx-veil{position:absolute;z-index:7;inset:0;pointer-events:none;
  background:radial-gradient(ellipse 38% 46% at 10% 80%,rgba(253,248,245,.85) 0%,rgba(253,248,245,.5) 45%,rgba(253,248,245,0) 78%)}

/* ---------- copy (in front) ---------- */
.hx-copy{position:absolute;z-index:8;left:clamp(1.5rem,5.5vw,6rem);bottom:clamp(2rem,7vh,5rem);max-width:min(40rem,60vw);
  translate:0 calc(var(--hp) * -12%);opacity:calc(1 - var(--hp) * 1.4)}
/* gold logo: fills the open space between the masthead and the copy */
.hx-logo{display:block;width:clamp(8.5rem,13vw,13rem);height:auto;margin:0 0 clamp(1.2rem,4vh,2.6rem) -.4rem;
  filter:drop-shadow(0 10px 18px rgba(42,26,24,.12));animation:hx-up 1.1s ease both;animation-delay:.8s}
@media (max-height:780px) and (min-width:821px){.hx-logo{display:none}}
.hx-eyebrow{font-size:.7rem;letter-spacing:.3em;text-transform:uppercase;color:var(--rose,#c4736a);font-weight:500;margin:0 0 .6rem;
  display:flex;align-items:center;gap:.9rem;animation:hx-up 1s ease both;animation-delay:.9s}
.hx-eyebrow::before{content:"";width:2.6rem;height:1px;background:var(--gold,#c9a96e)}
.hx-line{font-family:'Cormorant Garamond',serif;font-weight:300;font-style:italic;color:var(--deep,#2a1a18);
  font-size:clamp(3.2rem,7.4vw,8.4rem);line-height:.95;letter-spacing:-.01em;margin:0 0 1.3rem;white-space:nowrap;
  animation:hx-up 1.2s cubic-bezier(.2,.75,.15,1) both;animation-delay:1s}
.hx-line em{color:var(--rose,#c4736a)}
.hx-sub{font-size:.95rem;line-height:1.8;color:var(--muted,#9e8480);max-width:26rem;margin:0 0 2rem;font-weight:300;animation:hx-up 1s ease both;animation-delay:1.15s}
.hx-btns{display:flex;gap:1rem;flex-wrap:wrap;animation:hx-up 1s ease both;animation-delay:1.3s}

.hx-side{position:absolute;z-index:8;left:clamp(.6rem,1.6vw,1.6rem);top:50%;margin:0;
  writing-mode:vertical-rl;rotate:180deg;translate:0 -50%;
  font-size:.62rem;letter-spacing:.42em;text-transform:uppercase;color:rgba(42,26,24,.45);white-space:nowrap;
  display:flex;align-items:center;gap:1rem;animation:hx-fade 1.4s ease both;animation-delay:1.6s}
.hx-side::after{content:"";width:1px;height:3.5rem;background:var(--gold,#c9a96e)}
.hx-scroll{position:absolute;z-index:8;right:clamp(1.2rem,3vw,3rem);bottom:clamp(1.6rem,5vh,3rem);margin:0;
  font-size:.62rem;letter-spacing:.38em;text-transform:uppercase;color:var(--deep,#2a1a18);
  display:flex;align-items:center;gap:.8rem;animation:hx-fade 1.4s ease both;animation-delay:2s}
.hx-scroll::after{content:"";width:1px;height:2.8rem;background:linear-gradient(var(--gold,#c9a96e),transparent);animation:hx-drip 2.4s ease-in-out infinite}

/* ---------- motion ---------- */
@keyframes hx-push{from{scale:1.07}to{scale:1}}
@keyframes hx-rise{from{transform:translateY(108%)}to{transform:none}}
@keyframes hx-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes hx-fade{from{opacity:0}to{opacity:1}}
@keyframes hx-up{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes hx-drip{0%,100%{transform:scaleY(.35);transform-origin:top}50%{transform:scaleY(1);transform-origin:top}}

/* ---------- tablet portrait + phones: photo on top, copy below ---------- */
@media (max-width:820px),(orientation:portrait) and (max-width:1100px){
  .hx{--hx-navh:72px;height:auto;min-height:0;max-height:none;padding:var(--hx-navh) 0 0;background:#fff}
  /* show the trio edge to edge: the models span x 22%–100% of the photo */
  .hx-stage{position:relative;right:auto;bottom:auto;height:auto;width:128.5vw;margin-left:-28.5vw;transform:translate3d(0,calc(var(--hp) * 5%),0)}
  .hx-photo{-webkit-mask-image:none;mask-image:none}
  .hx-wash{left:18%;width:60%;height:50%;opacity:.55}
  .hx-mast{left:23.5%;right:2.5%;top:18%;font-size:11.4vw;font-size:11.4cqw}
  .hx-stage::after{content:"";position:absolute;z-index:7;left:0;right:0;bottom:-1px;height:30%;
    background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 92%)}
  .hx-fade,.hx-veil,.hx-side,.hx-scroll,.hx-logo{display:none}
  .hx-copy{position:relative;left:auto;bottom:auto;max-width:none;margin-top:-9vw;padding:0 1.5rem 3rem;translate:none;opacity:1;display:flex;flex-direction:column}
  .hx-line{order:-1}
  .hx-line{font-size:clamp(2.9rem,14vw,5.5rem);margin-bottom:1rem}
  .hx-sub{max-width:34rem}
}
/* small laptops / tablet landscape: keep the copy compact so it sits beside the trio */
@media (min-width:821px) and (max-width:1180px){
  .hx-copy{max-width:25rem;bottom:clamp(1.5rem,5vh,3rem)}
  .hx-line{font-size:clamp(3rem,6.4vw,4.6rem)}
  .hx-sub{font-size:.88rem;line-height:1.7;margin-bottom:1.4rem;max-width:22rem}
  .hx-btns{flex-direction:column;align-items:flex-start;gap:.7rem}
}
@media (max-width:480px){
  .hx-copy{padding:0 1.15rem 2.6rem}
  .hx-eyebrow{font-size:.62rem;letter-spacing:.24em}
  .hx-btns{flex-direction:column}
  .hx-btns a{text-align:center}
}

@media (prefers-reduced-motion:reduce){
  .hx-stage,.hx-mast span,.hx-lines *,.hx-logo,.hx-eyebrow,.hx-line,.hx-sub,.hx-btns,.hx-side,.hx-scroll,.hx-scroll::after{animation:none !important}
  .hx-stage,.hx-mast,.hx-copy{transform:none !important;translate:none !important}
  .hx-copy{opacity:1 !important}
}
