/* ============================================================================
   MON GR20 — Immersive scroll-expansion hero (homepage only)
   ----------------------------------------------------------------------------
   Vanilla CSS, no framework. A panoramic local background + a central local
   photo that expands gently while the stage is briefly pinned with native CSS
   sticky (the page keeps scrolling normally — no wheel/touch hijack).
   Progress is exposed as --p (0 → 1), set by scroll-hero.js.
   Content is the in-flow element (never clipped); the photo layers sit behind.
   Fallback: without JS it is a normal full-height hero, fully visible.
   prefers-reduced-motion disables all movement.
   ============================================================================ */

.xhero {
  position: relative;
  min-height: 100svh;
  background: var(--gr20-bg, #0b0c0b);
  isolation: isolate;
}
/* JS adds .is-scroll only when motion is allowed → gives the pin its travel */
.xhero.is-scroll { height: 165vh; }

.xhero__stage {
  position: sticky;
  top: 0;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4.5rem, 10vh, 7rem) clamp(1.2rem, 5vw, 2.5rem) clamp(4rem, 9vh, 6rem);
}

/* --- panoramic background photo (layer 0) ----------------------------- */
.xhero__bg { position: absolute; inset: 0; z-index: 0; }
.xhero__bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
  filter: saturate(.82) contrast(1.04) brightness(.58);
  transform: scale(calc(1.05 + var(--p, 0) * 0.07));
  transform-origin: center 42%;
}
.xhero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(125% 80% at 50% 16%, transparent, rgba(11,12,11,.5) 80%),
    linear-gradient(180deg, rgba(11,12,11,.55) 0%, rgba(11,12,11,.26) 34%, rgba(11,12,11,.72) 86%, rgba(11,12,11,.96) 100%);
}

/* --- expanding central media (layer 1, absolutely centred) ------------ */
.xhero__media {
  position: absolute; z-index: 1; margin: 0;
  top: 50%; left: 50%;
  width: min(1120px, 92vw);
  height: min(74svh, 700px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(233,231,223,.14);
  box-shadow: 0 50px 120px -34px rgba(0,0,0,.82), inset 0 1px 0 rgba(255,255,255,.06);
  transform: translate(-50%, -50%) scale(calc(0.9 + var(--p, 0) * 0.16));   /* 0.90 → 1.06 */
}
.xhero__media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 36%;
  filter: saturate(.94) contrast(1.03) brightness(.82);
}
.xhero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,12,11,.18) 0%, rgba(11,12,11,.05) 28%, rgba(11,12,11,.5) 76%, rgba(11,12,11,.86) 100%);
}

/* --- content (layer 2, in-flow → drives height, never clipped) -------- */
.xhero__content {
  position: relative; z-index: 2;
  max-width: min(900px, 94vw);
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  gap: clamp(.85rem, 2vw, 1.3rem);
  padding: clamp(1rem, 3vw, 2rem);
  /* soft dark halo guarantees text contrast over any part of the photo */
  background: radial-gradient(120% 76% at 50% 50%, rgba(11,12,11,.62), rgba(11,12,11,.12) 66%, transparent 80%);
}
.xhero__eyebrow {
  margin: 0;
  font-family: var(--font-mono, monospace);
  color: var(--gr20-accent, #e2603f);
  font-size: clamp(.62rem, 1.4vw, .74rem);
  letter-spacing: .22em; text-transform: uppercase;
  text-shadow: 0 1px 10px rgba(0,0,0,.7);
}
.xhero__title {
  margin: 0; color: #e9e7df;
  font-family: var(--font-disp, sans-serif);
  font-weight: 800; line-height: .92; letter-spacing: -.035em;
  font-size: clamp(2.5rem, 8.4vw, 6.6rem);
  text-shadow: 0 6px 44px rgba(0,0,0,.6);
}
.xhero__title em {
  display: block; font-style: italic; font-weight: 700;
  color: var(--gr20-accent, #e2603f);
}
.xhero__lead {
  margin: .2rem 0 0; max-width: 48ch;
  color: rgba(233,231,223,.95);
  font-size: clamp(1rem, .72rem + 1vw, 1.28rem); line-height: 1.5;
  text-shadow: 0 2px 18px rgba(0,0,0,.7);
}
.xhero__actions {
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center;
  margin-top: .5rem;
}

/* stat chips — the real numbers from the original hero, preserved */
.xhero__stats {
  display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center;
  margin-top: .75rem;
}
.xhero__stat {
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .5rem .8rem;
  border: 1px solid rgba(233,231,223,.15);
  border-radius: 4px;
  background: rgba(11,12,11,.46);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.xhero__stat small {
  font-family: var(--font-mono, monospace);
  font-size: .58rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(233,231,223,.7);
}
.xhero__stat strong {
  font-family: var(--font-disp, sans-serif); font-weight: 800;
  font-size: clamp(.9rem, 1.4vw, 1.08rem); line-height: 1;
  color: var(--gr20-accent, #e2603f);
}

/* scroll cue */
.xhero__cue {
  position: absolute; z-index: 3; left: 50%; bottom: clamp(.9rem, 2.6vh, 1.8rem);
  transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: .5rem;
  font-family: var(--font-mono, monospace); font-size: .6rem; letter-spacing: .22em;
  text-transform: uppercase; color: rgba(233,231,223,.62);
  opacity: calc(1 - var(--p, 0) * 1.8);
}
.xhero__cue span {
  width: 1px; height: 36px;
  background: linear-gradient(rgba(233,231,223,.75), transparent);
  animation: xh-cue 2.4s cubic-bezier(.16,1,.3,1) infinite;
  transform-origin: top;
}
@keyframes xh-cue { 0%,100% { transform: scaleY(.35); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* --- gentle entrance (only after JS adds .is-ready) ------------------- */
.xhero.is-ready .xhero__content > * { animation: xh-rise .9s cubic-bezier(.16,1,.3,1) both; }
.xhero.is-ready .xhero__eyebrow { animation-delay: .05s; }
.xhero.is-ready .xhero__title   { animation-delay: .12s; }
.xhero.is-ready .xhero__lead    { animation-delay: .22s; }
.xhero.is-ready .xhero__actions { animation-delay: .32s; }
.xhero.is-ready .xhero__stats   { animation-delay: .42s; }
@keyframes xh-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* --- responsive ------------------------------------------------------- */
@media (max-width: 760px) {
  .xhero.is-scroll { height: 152vh; }
  .xhero__media { width: 94vw; height: min(68svh, 560px); border-radius: 10px; }
  .xhero__stage { padding-top: clamp(4rem, 9vh, 5.5rem); }
}

/* --- accessibility: reduced motion → calm static hero ----------------- */
@media (prefers-reduced-motion: reduce) {
  .xhero { height: auto !important; min-height: 100svh; }
  .xhero__media { transform: translate(-50%, -50%) scale(1) !important; }
  .xhero__bg img { transform: scale(1.05) !important; }
  .xhero *, .xhero.is-ready .xhero__content > * { animation: none !important; }
  .xhero__cue { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .xhero__stat { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(11,12,11,.72); }
}
