/* ═══════════════════════════════════════════════════════════
   MSJ Hero Scroll Sections  (prefix msjhero-)   Heritage Luxe
   Full viewport sections. Only transform / opacity are animated (GPU friendly).
   Desktop sizes follow the 1597px mockup, mobile follows the mobile mockup.
   ═══════════════════════════════════════════════════════════ */
.msjhero {
  --msjhero-serif: 'Playfair Display', 'Times New Roman', serif;
  --msjhero-sans: 'Lato', 'Poppins', system-ui, sans-serif;
  --msjhero-btn: 'Poppins', 'Raleway', system-ui, sans-serif;
  --msjhero-spd: var(--msjhero-speed, 1100ms);
  --msjhero-ease: cubic-bezier(.77, 0, .18, 1);
  --msjhero-out: cubic-bezier(.16, 1, .3, 1);
  --msjhero-reserve: 150px;
  --msjhero-pad: clamp(1.4rem, 9.3vw, 11rem);
  position: relative; isolation: isolate; overflow: hidden; width: 100%;
  height: 100vh; height: 100svh; min-height: var(--msjhero-min, 640px);
  background: var(--msjhero-ink, #0a0806); color: var(--msjh-cream, #faf7f0);
  font-family: var(--msjhero-sans); font-weight: 300; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.msjhero, .msjhero *, .msjhero *::before, .msjhero *::after { box-sizing: border-box; }
html body .msjhero a { text-decoration: none; box-shadow: none; }
html body .msjhero p, html body .msjhero h1, html body .msjhero h2 { margin: 0; padding: 0; }
html body .msjhero ul { margin: 0 !important; padding: 0 !important; list-style: none !important; }
html body .msjhero li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
html body .msjhero img { max-width: none; border: 0; border-radius: 0; box-shadow: none; }
html body .msjhero i { font-style: normal; }

/* ── stage + slides ── */
.msjhero-stage { position: absolute; inset: 0; z-index: 1; }
.msjhero-slide { position: absolute; inset: 0; z-index: 0; overflow: hidden; visibility: hidden; transform: translate3d(0, 0, 0); will-change: auto; }
.msjhero-slide.is-active { visibility: visible; z-index: 3; transition: transform var(--msjhero-spd) var(--msjhero-ease); will-change: transform; }
.msjhero-slide.is-leaving { visibility: visible; z-index: 2; transition: transform var(--msjhero-spd) var(--msjhero-ease), opacity var(--msjhero-spd) var(--msjhero-ease); will-change: transform; }
.msjhero-slide.pre-next { transform: translate3d(0, 100%, 0); transition: none; visibility: visible; z-index: 3; }
.msjhero-slide.pre-prev { transform: translate3d(0, -100%, 0); transition: none; visibility: visible; z-index: 3; }
.msjhero-slide.leave-next { transform: translate3d(0, -26%, 0); opacity: .35; }
.msjhero-slide.leave-prev { transform: translate3d(0, 26%, 0); opacity: .35; }

/* media (counter-moves so the picture wipes in without sliding) */
.msjhero-media { position: absolute; inset: 0; transition: transform var(--msjhero-spd) var(--msjhero-ease); }
.msjhero-slide.pre-next .msjhero-media { transform: translate3d(0, -100%, 0); transition: none; }
.msjhero-slide.pre-prev .msjhero-media { transform: translate3d(0, 100%, 0); transition: none; }
.msjhero-img { position: absolute; inset: 0; transform: scale(1.16); transform-origin: 65% 40%; transition: transform 2.8s var(--msjhero-out); will-change: transform; }
.msjhero-slide.is-active .msjhero-img { transform: scale(1); }
.msjhero-img picture, .msjhero-img img { display: block; width: 100%; height: 100%; }
html body .msjhero .msjhero-img img { object-fit: cover !important; object-position: var(--pos, 70% 30%) !important; width: 100% !important; height: 100% !important; }
.msjhero-ph { display: block; width: 100%; height: 100%; background: radial-gradient(60% 70% at 78% 30%, rgba(201,168,76,.28), transparent 70%), radial-gradient(40% 50% at 20% 90%, rgba(201,168,76,.12), transparent 70%), #0d0a07; }
.msjhero-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8,6,4,var(--msjhero-shade,.78)) 0%, rgba(8,6,4,calc(var(--msjhero-shade,.78) * .62)) 34%, rgba(8,6,4,0) 62%),
              linear-gradient(0deg, rgba(8,6,4,.72) 0%, rgba(8,6,4,0) 32%),
              linear-gradient(180deg, rgba(8,6,4,.6) 0%, rgba(8,6,4,0) 22%); }

/* ── content ── */
.msjhero-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: calc(var(--msjh-bar-h, 100px) + 1rem) var(--msjhero-pad) calc(var(--msjhero-reserve) + 1rem); }
.msjhero-eyebrow { display: flex; align-items: center; gap: 1rem; margin-bottom: clamp(1rem, 2.4vh, 1.8rem) !important; font-family: var(--msjhero-sans); font-size: clamp(.72rem, 1vw, .98rem); font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--msjh-gold-l); }
.msjhero-orn { position: relative; flex: none; width: clamp(40px, 3.9vw, 62px); height: 1px; background: linear-gradient(90deg, transparent, var(--msjh-gold)); }
.msjhero-orn::after { content: ''; position: absolute; right: -1px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border: 1px solid var(--msjh-gold-l); transform: rotate(45deg); background: var(--msjhero-ink, #0a0806); }
.msjhero-title { font-family: var(--msjhero-serif); font-weight: 400; font-size: clamp(2.5rem, 4.6vw, 6.2rem); line-height: 1.06; letter-spacing: -.01em; color: #fff; text-shadow: 0 4px 40px rgba(0,0,0,.35); }
.msjhero-line { display: block; overflow: hidden; padding: .06em .04em .14em 0; margin-bottom: -.14em; }
.msjhero-line-in { display: block; transform: translate3d(0, 112%, 0); transition: transform 0s; will-change: transform; }
.msjhero-line-gold .msjhero-line-in { font-style: italic; color: var(--msjh-gold-l); background: linear-gradient(100deg, #f3d9a2, #e8c97a 45%, #d8aa5c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-right: .08em; }
.msjhero-text { max-width: clamp(18rem, 25vw, 30rem); margin-top: clamp(1rem, 2.6vh, 2rem) !important; font-size: clamp(.98rem, 1.18vw, 1.3rem); line-height: 1.58; font-weight: 300; color: rgba(250,247,240,.93); }
.msjhero-btns { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: clamp(1.4rem, 3.6vh, 2.6rem); }

/* animated bits: hidden until the slide is active (and the section is ready) */
.msjhero-a { opacity: 0; transform: translate3d(0, 38px, 0); transition: opacity .35s ease, transform .35s ease; }
.msjhero.is-ready .msjhero-slide.is-active .msjhero-a { opacity: 1; transform: none; transition: opacity .9s ease, transform 1.15s var(--msjhero-out); transition-delay: calc(.52s + var(--i, 0) * .1s); }
.msjhero.is-ready .msjhero-slide.is-active .msjhero-line-in { transform: none; transition: transform 1.2s var(--msjhero-out); transition-delay: calc(.5s + var(--i, 1) * .11s); }
.msjhero-slide.is-leaving .msjhero-a { opacity: 0; transition: opacity .4s ease; }
.msjhero-slide.is-leaving .msjhero-line-in { transform: translate3d(0, -40%, 0); transition: transform .6s ease; }

/* ── buttons (same language as the header / mega menu pills) ── */
html body .msjh-ui a.msjh-pill.msjhero-btn { gap: 1.2rem; padding: .42rem .42rem .42rem 1.7rem; font-family: var(--msjhero-btn); font-size: clamp(.58rem, .72vw, .72rem); letter-spacing: .17em; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
html body .msjh-ui a.msjh-pill.msjhero-btn-solid { border-color: transparent; color: #130e07; background: linear-gradient(135deg, #f5d9a0, var(--msjh-gold-l) 45%, var(--msjh-gold)); box-shadow: 0 10px 30px rgba(201,168,76,.28), inset 0 1px 0 rgba(255,255,255,.4); }
html body .msjh-ui a.msjh-pill.msjhero-btn-solid .msjh-arr { background: #130e07; color: var(--msjh-gold-l); }
html body .msjh-ui a.msjh-pill.msjhero-btn-solid:hover { background: linear-gradient(135deg, #fff1cc, #f5d9a0 45%, var(--msjh-gold-l)); box-shadow: 0 14px 40px rgba(232,201,122,.5); color: #130e07; }
html body .msjh-ui a.msjh-pill.msjhero-btn-solid:hover .msjh-arr { background: #130e07; color: #fff1cc; transform: translateX(3px); }
html body .msjh-ui a.msjh-pill.msjhero-btn-ghost { background: rgba(8,6,4,.38); border-color: rgba(250,247,240,.38); color: var(--msjh-cream); }
html body .msjh-ui a.msjh-pill.msjhero-btn-ghost .msjh-arr { background: transparent; border: 1px solid var(--msjh-gold); color: var(--msjh-gold-l); font-size: .6rem; padding-left: 2px; }
html body .msjh-ui a.msjh-pill.msjhero-btn-ghost:hover { border-color: var(--msjh-gold-l); color: #130e07; background: linear-gradient(135deg, var(--msjh-gold-l), var(--msjh-gold) 60%, #B08A33); box-shadow: 0 12px 34px rgba(201,168,76,.4); }
html body .msjh-ui a.msjh-pill.msjhero-btn-ghost:hover .msjh-arr { background: #130e07; border-color: #130e07; color: var(--msjh-gold-l); transform: scale(1.06); }

/* ── side numbers ── */
.msjhero-nums { position: absolute; z-index: 6; left: clamp(.9rem, 2.7vw, 3.4rem); top: 35%; display: flex; flex-direction: column; align-items: center; gap: .9rem; font-family: var(--msjhero-sans); font-size: .78rem; letter-spacing: .12em; color: rgba(250,247,240,.9); }
.msjhero-cur { display: block; height: 1.2em; overflow: hidden; line-height: 1.2em; }
.msjhero-cur-in { display: block; transition: transform .6s var(--msjhero-out), opacity .6s ease; }
.msjhero-cur-in.is-out { transform: translate3d(0, -80%, 0); opacity: 0; }
.msjhero-cur-in.is-pre { transform: translate3d(0, 80%, 0); opacity: 0; transition: none; }
.msjhero-tot { color: rgba(250,247,240,.75); }
.msjhero-track { position: relative; display: block; width: 1px; height: clamp(70px, 11vh, 110px); background: rgba(250,247,240,.28); }
.msjhero-fill { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--msjh-gold-l); transition: height var(--msjhero-spd) var(--msjhero-ease); }
html body .msjhero button.msjhero-dot { position: absolute; left: 50%; top: var(--p, 0%); width: 16px; height: 16px; margin: -8px 0 0 -8px; display: block; cursor: pointer; }
.msjhero-dot::before { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; border: 1px solid rgba(250,247,240,.7); background: var(--msjhero-ink, #0a0806); transition: background .4s, border-color .4s, transform .4s; }
.msjhero-dot:hover::before { transform: scale(1.35); border-color: var(--msjh-gold-l); }
.msjhero-dot.is-active::before, .msjhero-dot.is-done::before { background: var(--msjh-gold-l); border-color: var(--msjh-gold-l); }

/* ── fixed layer (badges + cards): stays still while slides change ── */
.msjhero-fixed { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; pointer-events: none; padding: 0 clamp(1.2rem, 5.6vw, 7rem) clamp(1.4rem, 10.8vh, 6rem) var(--msjhero-pad); }
.msjhero-fixed-in { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.msjhero-fixed a { pointer-events: auto; }
.msjhero-badges { display: flex; margin-left: -1rem !important; }
.msjhero-badges li { display: flex; flex-direction: column; align-items: center; gap: .55rem; width: clamp(110px, 9.6vw, 160px); padding: .2rem .4rem !important; text-align: center; font-size: clamp(.74rem, .88vw, .92rem); line-height: 1.3; font-weight: 300; color: rgba(250,247,240,.95); text-wrap: balance; }
.msjhero-badges li + li { border-left: 1px solid rgba(201,168,76,.32); }
.msjhero-badges i { font-size: clamp(1.25rem, 1.7vw, 1.8rem); color: var(--msjh-gold-l); transition: transform .5s var(--msjhero-out); }
.msjhero-badges li:hover i { transform: translateY(-3px) scale(1.08); }

.msjhero-appt { display: flex; align-items: center; gap: 1.1rem; width: clamp(300px, 28.8vw, 480px); padding: 1.15rem 1.25rem; border: 1px solid rgba(201,168,76,.26); border-radius: 18px; background: rgba(10,8,6,.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.4); color: var(--msjh-cream); transition: border-color .4s, transform .5s var(--msjhero-out), box-shadow .4s; }
.msjhero-appt:hover { border-color: var(--msjh-gold); transform: translateY(-4px); box-shadow: 0 26px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(201,168,76,.2); }
.msjhero-appt-ico { flex: none; font-size: 1.7rem; color: var(--msjh-gold-l); }
.msjhero-appt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.msjhero-appt-t b { font-family: var(--msjhero-serif); font-weight: 400; font-size: clamp(1rem, 1.3vw, 1.35rem); line-height: 1.2; color: var(--msjh-cream); }
.msjhero-appt-t small { font-size: clamp(.7rem, .8vw, .82rem); color: rgba(250,247,240,.72); }
.msjhero-appt-go { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: .9rem; background: linear-gradient(135deg, var(--msjh-gold-l), var(--msjh-gold)); color: #130e07; transition: transform .5s var(--msjhero-out), box-shadow .4s; }
.msjhero-appt:hover .msjhero-appt-go { transform: translateX(4px) scale(1.06); box-shadow: 0 8px 22px rgba(201,168,76,.5); }
.msjhero-mcard { display: none; }

.msjhero-deco { position: absolute; z-index: 4; left: 0; bottom: 0; width: clamp(240px, 36vw, 620px); height: auto; pointer-events: none; opacity: .95; -webkit-mask-image: linear-gradient(to right, #000 60%, transparent); mask-image: linear-gradient(to right, #000 60%, transparent); }
.msjhero-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ═══ Tablet ═══ */
@media (max-width: 1024px) {
  .msjhero { --msjhero-pad: clamp(1.4rem, 6vw, 4rem); }
  .msjhero-fixed { padding-right: var(--msjhero-pad); }
  .msjhero-appt { width: clamp(280px, 40vw, 400px); }
  .msjhero-badges li { width: clamp(100px, 14vw, 140px); }
}

/* ═══ Mobile (matches the mobile mockup) ═══ */
@media (max-width: 767px) {
  .msjhero { --msjhero-pad: 1.25rem; }
  html body .msjhero .msjhero-img img { object-position: var(--pos-m, 62% 12%) !important; }
  .msjhero-shade { background: linear-gradient(0deg, rgba(8,6,4,.98) 0%, rgba(8,6,4,.92) 34%, rgba(8,6,4,.45) 58%, rgba(8,6,4,0) 78%), linear-gradient(180deg, rgba(8,6,4,.7) 0%, rgba(8,6,4,0) 22%); }
  .msjhero-content { justify-content: flex-end; padding: calc(var(--msjh-bar-h, 72px) + .5rem) var(--msjhero-pad) calc(var(--msjhero-reserve) + .6rem); }
  .msjhero-eyebrow { font-size: .62rem; letter-spacing: .2em; gap: .7rem; margin-bottom: .7rem !important; }
  .msjhero-orn { width: 34px; }
  .msjhero-title { font-size: clamp(1.75rem, 8vw, 2.4rem); line-height: 1.12; }
  .msjhero-line-gold .msjhero-line-in { font-style: normal; background: none; -webkit-text-fill-color: #fff; color: #fff; }
  .msjhero-text { max-width: 30rem; margin-top: .8rem !important; font-size: .86rem; line-height: 1.55; color: rgba(250,247,240,.9); }
  .msjhero-btns { margin-top: 1.1rem; }
  .msjhero-btn-ghost { display: none !important; }
  html body .msjh-ui a.msjh-pill.msjhero-btn-solid { padding: .38rem .38rem .38rem 1.4rem; font-size: .66rem; letter-spacing: .12em; text-transform: none; font-weight: 500; }
  html body .msjh-ui a.msjh-pill.msjhero-btn .msjh-arr { width: 30px; height: 30px; }

  .msjhero-fixed { padding: 0 var(--msjhero-pad) calc(.8rem + env(safe-area-inset-bottom)); }
  body.msjh-has-tabs .msjhero-fixed { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .msjhero-fixed-in { flex-direction: column; align-items: stretch; gap: .9rem; }
  .msjhero-appt { display: none; }
  .msjhero-badges { margin: 0 !important; justify-content: space-between; }
  .msjhero-badges li { width: 33.33%; gap: .4rem; font-size: .7rem; }
  .msjhero-badges i { font-size: 1.35rem; }
  .msjhero-mcard { pointer-events: auto; display: flex; align-items: center; gap: .9rem; overflow: hidden; min-height: 78px; border: 1px solid rgba(201,168,76,.3); border-radius: 16px; background: rgba(10,8,6,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--msjh-cream); transition: border-color .4s; }
  .msjhero-mcard:hover { border-color: var(--msjh-gold); }
  .msjhero-mcard-img { flex: none; align-self: stretch; width: 38%; background-size: cover; background-position: center; -webkit-mask-image: linear-gradient(to right, #000 70%, transparent); mask-image: linear-gradient(to right, #000 70%, transparent); }
  .msjhero-mcard-t { display: flex; flex-direction: column; gap: .3rem; padding: .7rem .9rem; }
  .msjhero-mcard-t em { font-family: var(--msjhero-serif); font-style: italic; font-size: 1.05rem; line-height: 1.2; color: var(--msjh-gold-p, #f5e6b8); }
  .msjhero-mcard-t small { font-size: .52rem; letter-spacing: .18em; color: rgba(250,247,240,.7); }

  /* numbers become tiny dots on the right edge */
  .msjhero-nums { left: auto; right: .7rem; top: 50%; transform: translateY(-50%); gap: 0; }
  .msjhero-cur, .msjhero-tot { display: none; }
  .msjhero-track { height: 64px; }
}
@media (max-width: 767px) and (max-height: 720px) { .msjhero-mcard { display: none; } }
@media (max-width: 767px) and (max-height: 600px) { .msjhero-badges, .msjhero-text { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .msjhero *, .msjhero *::before, .msjhero *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; }
  .msjhero-a, .msjhero-line-in { opacity: 1 !important; transform: none !important; }
  .msjhero-img { transform: none !important; }
}
