/* ==========================================================================
   IntoMines Hero Engine — v0.4
   ========================================================================== */

.im-hero {
  --im-hero-header-space: 92px;
  --im-hero-overlay: .28;
  position: relative;
  overflow: clip;
  background:
    radial-gradient(circle at 81% 28%, rgba(46, 94, 124, .17), transparent 32rem),
    radial-gradient(circle at 22% 88%, rgba(165, 138, 97, .08), transparent 25rem),
    linear-gradient(135deg, #031827 0%, var(--im-archive-navy) 48%, #061726 100%);
  color: var(--im-museum-ivory);
  isolation: isolate;
}

.im-hero:not(.im-hero--scroll-video) {
  min-height: max(780px, 100svh);
}

.im-hero::before,
.im-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.im-hero::before {
  inset: 0;
  opacity: .10;
  background-image:
    linear-gradient(rgba(242,239,234,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,239,234,.14) 1px, transparent 1px);
  background-size: min(8.333vw, 160px) min(8.333vw, 160px);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 18%, #000 100%);
}

.im-hero::after {
  width: min(54vw, 920px);
  aspect-ratio: 1;
  right: -15vw;
  top: -27vw;
  border: 1px solid rgba(242, 239, 234, .08);
  border-radius: 50%;
  box-shadow:
    0 0 0 9vw rgba(242,239,234,.018),
    0 0 0 18vw rgba(242,239,234,.012);
}

.im-hero__ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.08), transparent 28%, transparent 76%, rgba(0,0,0,.16));
}

.im-hero__inner {
  position: relative;
  z-index: 2;
  min-height: max(690px, calc(100svh - 74px));
  padding-top: calc(var(--im-hero-header-space) + clamp(58px, 7vh, 94px));
  padding-bottom: clamp(108px, 14vh, 158px);
}

.im-hero__inner--split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  gap: 24px;
}

.im-hero__copy {
  grid-column: 1 / span 7;
  position: relative;
  z-index: 3;
  padding-right: clamp(0px, 3vw, 48px);
  will-change: transform;
}

.im-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 clamp(26px, 4vh, 46px);
  color: var(--im-antique-brass);
  font-family: var(--im-font-functional);
  font-size: clamp(.62rem, .65vw, .72rem);
  font-weight: 600;
  letter-spacing: .19em;
  line-height: 1.3;
  text-transform: uppercase;
}

.im-hero__eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

.im-hero__title {
  max-width: 9.2ch;
  margin: 0;
  color: var(--im-museum-ivory);
  font-size: clamp(4.4rem, 7.75vw, 9.3rem);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .83;
  text-wrap: balance;
}

.im-hero__support {
  width: min(100%, 690px);
  margin-top: clamp(38px, 5.5vh, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(28px, 4vw, 66px);
}

.im-hero__body {
  max-width: 47ch;
  margin: 0;
  color: rgba(242, 239, 234, .69);
  font-size: clamp(.92rem, 1vw, 1.08rem);
  line-height: 1.72;
}

.im-hero__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  padding: 8px 0 10px;
  color: var(--im-museum-ivory);
  font-family: var(--im-font-functional);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .145em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.im-hero__cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--im-antique-brass);
  transform-origin: left center;
  transition: transform 420ms var(--im-ease-out);
}

.im-hero__cta-arrow {
  font-size: .9rem;
  transform: translate3d(0, -1px, 0);
  transition: transform 420ms var(--im-ease-out);
}

.im-hero__cta:hover::after,
.im-hero__cta:focus-visible::after { transform: scaleX(.67); }

.im-hero__cta:hover .im-hero__cta-arrow,
.im-hero__cta:focus-visible .im-hero__cta-arrow { transform: translate3d(4px, 4px, 0); }

/* Split-frame media modes: editorial image + cinematic video */
.im-hero__media-wrap {
  grid-column: 8 / -1;
  position: relative;
  align-self: stretch;
  min-height: 570px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  will-change: transform;
}

.im-hero__media-topline,
.im-hero__media-caption,
.im-hero__rail,
.im-hero__fullscreen-meta,
.im-hero__scroll-note,
.im-hero__minimal-meta {
  font-family: var(--im-font-functional);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .14em;
  line-height: 1.45;
  text-transform: uppercase;
}

.im-hero__media-topline,
.im-hero__media-caption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: rgba(242, 239, 234, .49);
}

.im-hero__media {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(242, 239, 234, .16);
  background: rgba(1, 10, 18, .48);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .20);
}

.im-hero__image,
.im-hero__video {
  width: 100%;
  height: 100%;
  min-height: 500px;
  object-fit: cover;
  object-position: center;
}

.im-hero__image {
  filter: saturate(.92) contrast(1.02);
  transform: scale(1.018);
}

.im-hero__video { background: #020b12; }

.im-hero__media-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(2, 14, 24, .02), rgba(2, 14, 24, .04) 60%, rgba(2, 14, 24, .28)),
    linear-gradient(90deg, rgba(2, 14, 24, .15), transparent 26%);
}

.im-hero__media::before,
.im-hero__media::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 46px;
  height: 46px;
  pointer-events: none;
}

.im-hero__media::before {
  top: 14px;
  left: 14px;
  border-top: 1px solid rgba(242,239,234,.55);
  border-left: 1px solid rgba(242,239,234,.55);
}

.im-hero__media::after {
  right: 14px;
  bottom: 14px;
  border-right: 1px solid rgba(242,239,234,.55);
  border-bottom: 1px solid rgba(242,239,234,.55);
}

/* Visual fallback until real media is selected. */
.im-hero__placeholder {
  position: relative;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
  background:
    radial-gradient(circle at 53% 48%, rgba(63, 99, 119, .32), transparent 25%),
    radial-gradient(circle at 58% 58%, rgba(165, 138, 97, .13), transparent 25%),
    linear-gradient(145deg, #020a10 0%, #071c2c 54%, #03111c 100%);
}

.im-hero__placeholder::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(242,239,234,.07);
  transform: rotate(-5deg);
}

.im-hero__placeholder::after {
  content: "IM";
  position: absolute;
  right: -2%;
  bottom: -14%;
  color: rgba(242,239,234,.035);
  font-family: var(--im-font-editorial);
  font-size: clamp(14rem, 25vw, 30rem);
  letter-spacing: -.08em;
  line-height: .8;
}

.im-hero__crystal {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform-origin: 50% 100%;
  background:
    linear-gradient(136deg, rgba(242,239,234,.06), rgba(242,239,234,.25) 44%, rgba(165,138,97,.08) 69%, rgba(2,14,24,.32));
  border: 1px solid rgba(242,239,234,.15);
  box-shadow:
    inset 14px 0 25px rgba(255,255,255,.035),
    inset -18px -18px 34px rgba(0,0,0,.19),
    0 30px 50px rgba(0,0,0,.20);
  clip-path: polygon(50% 0, 91% 28%, 78% 100%, 20% 100%, 8% 28%);
}

.im-hero__crystal--a { width: 25%; height: 53%; transform: translateX(-50%) rotate(4deg); }
.im-hero__crystal--b { width: 18%; height: 37%; left: 35%; bottom: 13%; transform: rotate(-16deg); opacity: .7; }
.im-hero__crystal--c { width: 16%; height: 31%; left: 64%; bottom: 14%; transform: rotate(17deg); opacity: .62; }

.im-hero__placeholder-label {
  position: absolute;
  left: 28px;
  bottom: 25px;
  z-index: 4;
  display: grid;
  gap: 5px;
  color: rgba(242, 239, 234, .56);
  font-family: var(--im-font-functional);
  font-size: .57rem;
  font-weight: 500;
  letter-spacing: .13em;
  line-height: 1.45;
  text-transform: uppercase;
}

.im-hero__placeholder-label span:first-child { color: var(--im-antique-brass); }

/* Shared bottom editorial rail */
.im-hero__rail {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 5;
  transform: translateX(-50%);
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  color: rgba(242, 239, 234, .48);
  border-top: 1px solid rgba(242, 239, 234, .14);
}

.im-hero__rail-center { text-align: center; color: rgba(242, 239, 234, .38); }

.im-hero__scroll {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(242, 239, 234, .64);
  text-decoration: none;
}

.im-hero__scroll span:last-child {
  color: var(--im-antique-brass);
  transition: transform var(--im-duration-fast) var(--im-ease-out);
}



/* Full-screen video */
.im-hero--fullscreen-video {
  min-height: max(780px, 100svh);
  background: #020b12;
}

.im-hero__fullscreen-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--im-deep-navy);
}

.im-hero__fullscreen-media > .im-hero__video,
.im-hero__fullscreen-media > .im-hero__image,
.im-hero__fullscreen-media > .im-hero__placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.im-hero__fullscreen-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2,11,18,.86) 0%, rgba(2,11,18,.61) 35%, rgba(2,11,18,.15) 72%, rgba(2,11,18,.23) 100%),
    linear-gradient(to bottom, rgba(2,11,18,.28), rgba(2,11,18,.05) 48%, rgba(2,11,18,.48)),
    rgba(4,32,56,var(--im-hero-overlay));
}

.im-hero__fullscreen-content {
  position: relative;
  z-index: 3;
  min-height: max(780px, 100svh);
  padding-top: calc(var(--im-hero-header-space) + 88px);
  padding-bottom: 120px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  align-content: center;
  gap: 24px;
}

.im-hero__copy--overlay {
  grid-column: 1 / span 7;
  text-shadow: 0 14px 44px rgba(0,0,0,.18);
}

.im-hero__fullscreen-meta {
  grid-column: 10 / -1;
  align-self: end;
  display: grid;
  gap: 7px;
  justify-items: end;
  color: rgba(242,239,234,.5);
  text-align: right;
}

/* Scroll-controlled video */
.im-hero--scroll-video {
  height: var(--im-scroll-length, 440vh);
  overflow: visible;
  background: #020b12;
}

.im-hero--scroll-video::before,
.im-hero--scroll-video::after { display: none; }

.im-hero__sticky {
  position: sticky;
  top: 0;
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
  background: #020b12;
}

body.admin-bar .im-hero__sticky {
  top: 32px;
  height: calc(100svh - 32px);
  min-height: calc(100svh - 32px);
}

.im-hero__scroll-content {
  position: relative;
  z-index: 3;
  height: 100%;
  padding-top: calc(var(--im-hero-header-space) + 78px);
  padding-bottom: 105px;
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  align-content: center;
  gap: 24px;
}

.im-hero__scroll-content .im-hero__copy {
  grid-column: 1 / span 7;
}

.im-hero__scroll-note {
  grid-column: 10 / -1;
  align-self: end;
  display: grid;
  justify-items: end;
  gap: 7px;
  color: rgba(242,239,234,.47);
  text-align: right;
}

.im-hero__progress-track {
  width: clamp(130px, 18vw, 280px);
  height: 1px;
  overflow: hidden;
  background: rgba(242,239,234,.18);
}

.im-hero__progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--im-antique-brass);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* Minimal editorial */
.im-hero--minimal {
  min-height: max(780px, 100svh);
}

.im-hero__minimal-inner {
  min-height: max(780px, 100svh);
  padding-top: calc(var(--im-hero-header-space) + 78px);
  padding-bottom: 112px;
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  align-content: center;
  gap: 24px;
}

.im-hero__copy--minimal {
  grid-column: 1 / span 8;
  z-index: 3;
}

.im-hero__copy--minimal .im-hero__title {
  max-width: 10.8ch;
  font-size: clamp(5rem, 9.5vw, 11rem);
}

.im-hero__minimal-mark {
  position: absolute;
  right: -4vw;
  top: 50%;
  display: flex;
  transform: translateY(-50%);
  color: rgba(242,239,234,.035);
  font-family: var(--im-font-editorial);
  font-size: clamp(20rem, 40vw, 48rem);
  letter-spacing: -.14em;
  line-height: .7;
  user-select: none;
}

.im-hero__minimal-meta {
  position: absolute;
  right: var(--im-gutter);
  bottom: 104px;
  z-index: 3;
  display: grid;
  justify-items: end;
  gap: 6px;
  color: rgba(242,239,234,.45);
}

/* Content after hero */
.im-after-hero { scroll-margin-top: 86px; }
.im-front-content { position: relative; z-index: 2; background: var(--im-museum-ivory); }

/* Tablet */
@media (max-width: 1180px) {
  .im-hero { --im-hero-header-space: 78px; }

  .im-hero__inner {
    min-height: max(720px, 100svh);
    padding-top: calc(var(--im-hero-header-space) + 70px);
  }

  .im-hero__inner--split {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .im-hero__copy { grid-column: 1 / span 5; }

  .im-hero__title {
    font-size: clamp(4rem, 8.6vw, 7.2rem);
    max-width: 9.5ch;
  }

  .im-hero__support {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 26px;
  }

  .im-hero__media-wrap {
    grid-column: 6 / -1;
    min-height: 520px;
  }

  .im-hero__rail-center { display: none; }
  .im-hero__rail { grid-template-columns: 1fr 1fr; }

  .im-hero__fullscreen-content,
  .im-hero__scroll-content,
  .im-hero__minimal-inner {
    grid-template-columns: repeat(8,minmax(0,1fr));
  }

  .im-hero__copy--overlay,
  .im-hero__scroll-content .im-hero__copy {
    grid-column: 1 / span 5;
  }

  .im-hero__fullscreen-meta,
  .im-hero__scroll-note {
    grid-column: 6 / -1;
  }

  .im-hero__copy--minimal {
    grid-column: 1 / span 6;
  }
}

/* Mobile */


/* WP admin bar while developing */
@media (max-width: 782px) {
  body.admin-bar .im-hero__sticky {
    top: 46px;
    height: calc(100svh - 46px);
    min-height: calc(100svh - 46px);
  }
}

/* Reduced motion: no drift, no animated scroll hint. */
@media (prefers-reduced-motion: reduce) {
  .im-hero__scroll span:last-child { animation: none; }
}


/* ==========================================================================
   v0.6 Production Mine Film Hero
   ========================================================================== */
.im-hero--mine-film {
  --im-hero-progress: 0;
  background: #020609;
}

.im-hero--mine-film::before,
.im-hero--mine-film::after { display: none; }

.im-hero--mine-film .im-hero__sticky {
  background: #020609;
}

.im-hero--mine-film .im-hero__fullscreen-media > .im-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  background: #020609;
  filter: saturate(.94) contrast(1.055) brightness(.94);
  transform: scale(1.012);
}

.im-hero__mine-grade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 54% 48%, transparent 0 26%, rgba(0,0,0,.03) 52%, rgba(0,0,0,.34) 100%),
    linear-gradient(90deg, rgba(1,5,8,.52) 0%, rgba(1,5,8,.14) 38%, rgba(1,5,8,.03) 66%, rgba(1,5,8,.20) 100%);
}

.im-hero--mine-film .im-hero__fullscreen-overlay {
  z-index: 2;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.19), transparent 28%, transparent 62%, rgba(0,0,0,.30)),
    rgba(4,32,56, calc(var(--im-hero-overlay) * (1 - (var(--im-hero-progress) * .62))));
}

.im-hero__story-layer {
  position: relative;
  z-index: 4;
  height: 100%;
  pointer-events: none;
}

.im-hero__story-copy {
  position: absolute;
  left: 0;
  width: min(720px, 50vw);
  will-change: transform, opacity;
  text-shadow: 0 3px 28px rgba(0,0,0,.34);
}

.im-hero__story-copy--opening {
  top: 50%;
  transform: translateY(-50%);
}

.im-hero__story-copy--discovery {
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
}

.im-hero--mine-film .im-hero__eyebrow {
  margin-bottom: 28px;
  color: #d0b27d;
}

.im-hero--mine-film .im-hero__title {
  max-width: 8.4ch;
  color: #fffdf7;
  font-size: clamp(4.6rem, 8.35vw, 9.9rem);
  line-height: .82;
  white-space: pre-line;
}

.im-hero__story-copy--discovery .im-hero__title {
  max-width: 7.6ch;
  font-size: clamp(4.25rem, 7.6vw, 8.8rem);
}

.im-hero__story-body {
  max-width: 36ch;
  margin: 34px 0 0 54px;
  color: rgba(255,253,247,.70);
  font-family: var(--im-font-functional);
  font-size: clamp(.79rem, .9vw, .98rem);
  line-height: 1.65;
  white-space: pre-line;
}

.im-hero__mine-coordinate {
  position: absolute;
  z-index: 5;
  top: calc(var(--im-hero-header-space) + 36px);
  right: var(--im-gutter);
  display: grid;
  justify-items: end;
  gap: 5px;
  color: rgba(255,253,247,.45);
  font-family: var(--im-font-functional);
  font-size: .50rem;
  font-weight: 600;
  letter-spacing: .15em;
  line-height: 1.4;
  text-transform: uppercase;
}

.im-hero__mine-coordinate span:last-child { color: rgba(255,253,247,.75); }

.im-hero__rail--mine {
  grid-template-columns: 1fr minmax(150px, 290px) 1fr;
  color: rgba(255,253,247,.48);
  border-top-color: rgba(255,253,247,.18);
}

.im-hero__rail--mine .im-hero__progress-track {
  justify-self: center;
  width: 100%;
  background: rgba(255,253,247,.20);
}

.im-hero__rail--mine .im-hero__progress-fill { background: #d0b27d; }

@media (max-width: 1180px) {
  .im-hero__story-copy { width: min(680px, 62vw); }
  .im-hero--mine-film .im-hero__title { font-size: clamp(4.2rem, 9vw, 7.8rem); }
}






/* ==========================================================================
   v0.6.1 Mine Hero — speed / placement / performance refinement
   ========================================================================== */

/* Avoid GPU-heavy full-screen video filters. Grade with simple overlays instead. */
.im-hero--mine-film .im-hero__fullscreen-media > .im-hero__video {
  filter: none;
  transform: none;
  object-position: 50% 50%;
}

.im-hero__mine-grade {
  background:
    linear-gradient(90deg, rgba(1,5,8,.46) 0%, rgba(1,5,8,.16) 34%, rgba(1,5,8,.02) 66%, rgba(1,5,8,.11) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.12), transparent 34%, transparent 72%, rgba(0,0,0,.24));
}

/*
 * Opening copy now sits in the lower-left editorial safe area.
 * This preserves the central mine tunnel as the visual focal point.
 */
.im-hero__story-copy--opening {
  top: auto;
  bottom: clamp(112px, 15vh, 166px);
  width: min(620px, 43vw);
  transform: none;
}

.im-hero--mine-film .im-hero__story-copy--opening .im-hero__title {
  max-width: 8.2ch;
  font-size: clamp(3.9rem, 6.4vw, 7.55rem);
  line-height: .86;
}

/*
 * Discovery copy uses the darker upper-left rock area near the final frames,
 * keeping the specimen itself visually unobstructed.
 */
.im-hero__story-copy--discovery {
  top: clamp(136px, 18vh, 210px);
  bottom: auto;
  width: min(560px, 39vw);
  transform: none;
}

.im-hero__story-copy--discovery .im-hero__title {
  max-width: 8.4ch;
  font-size: clamp(3.45rem, 5.5vw, 6.7rem);
  line-height: .87;
}

.im-hero__story-body {
  max-width: 34ch;
  margin: 24px 0 0 0;
  font-size: clamp(.76rem, .82vw, .91rem);
  line-height: 1.58;
}

/* Reduce compositor pressure from unnecessary will-change declarations. */
.im-hero__story-copy {
  will-change: opacity, transform;
}

.im-hero--mine-film .im-hero__fullscreen-media,
.im-hero--mine-film .im-hero__video {
  backface-visibility: hidden;
}

/* Quieter, smaller peripheral UI so the film and title dominate. */
.im-hero__mine-coordinate {
  opacity: .78;
}

.im-hero__rail--mine {
  min-height: 62px;
}

/* Desktop: keep title away from the central tunnel opening. */
@media (min-width: 1181px) {
  .im-hero__story-layer {
    padding-left: max(0px, 1vw);
  }
}

@media (max-width: 1180px) and (min-width: 761px) {
  .im-hero__story-copy--opening {
    bottom: 118px;
    width: min(560px, 54vw);
  }

  .im-hero__story-copy--discovery {
    top: 150px;
    width: min(500px, 48vw);
  }

  .im-hero--mine-film .im-hero__story-copy--opening .im-hero__title {
    font-size: clamp(3.8rem, 7.8vw, 6.7rem);
  }

  .im-hero__story-copy--discovery .im-hero__title {
    font-size: clamp(3.4rem, 6.8vw, 5.9rem);
  }
}




/* ==========================================================================
   v0.6.2 — Mine frame-sequence engine
   ========================================================================== */

.im-hero__sequence-picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020b12;
}

.im-hero__sequence-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  user-select: none;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.im-hero--scroll-film .im-hero__fullscreen-media {
  background: #020b12;
}






/* ==========================================================================
   v0.6.3 — Cinematic copy choreography
   Three editorial text moments in one scroll-controlled Hero.
   ========================================================================== */

/* The story stage owns its own safe margins. */
.im-hero--scroll-film .im-hero__story-layer {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Shared: compact enough to let the mine remain the protagonist. */
.im-hero--scroll-film .im-hero__story-copy {
  left: auto;
  right: auto;
  margin: 0;
  text-shadow: 0 3px 24px rgba(0,0,0,.54);
  will-change: opacity, transform;
}

.im-hero--scroll-film .im-hero__story-copy::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -44px -70px -44px -70px;
  pointer-events: none;
  background: radial-gradient(ellipse at 36% 50%, rgba(1,5,8,.34), rgba(1,5,8,.12) 46%, transparent 72%);
}

/* 01 — Opening.
   Lower-left, but comfortably inside the frame rather than touching the viewport.
   Wider measure prevents the five-line stack visible in v0.6.2. */
.im-hero--scroll-film .im-hero__story-copy--opening {
  left: clamp(54px, 6vw, 116px);
  bottom: clamp(118px, 15vh, 158px);
  top: auto;
  width: min(680px, 48vw);
}

.im-hero--scroll-film .im-hero__story-copy--opening .im-hero__title {
  max-width: 11.8ch;
  font-size: clamp(3.65rem, 5.25vw, 6.6rem);
  line-height: .88;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.im-hero--scroll-film .im-hero__story-copy--opening .im-hero__eyebrow {
  margin-bottom: 21px;
}

.im-hero--scroll-film .im-hero__story-copy--opening .im-hero__story-body {
  position: relative;
  max-width: 30ch;
  margin-top: 22px;
  padding-left: 38px;
  color: rgba(255,253,247,.68);
  font-size: clamp(.70rem, .76vw, .84rem);
}

.im-hero--scroll-film .im-hero__story-copy--opening .im-hero__story-body::before {
  content: "";
  position: absolute;
  left: 0;
  top: .75em;
  width: 25px;
  height: 1px;
  background: #d0b27d;
}

/* 02 — Middle.
   A centered statement gives the tunnel a cinematic narrative beat
   without covering the right-side mineral emergence. */
.im-hero--scroll-film .im-hero__story-copy--middle {
  left: 50%;
  top: 52%;
  bottom: auto;
  width: min(720px, 56vw);
  margin-left: 0;
  opacity: 0;
  text-align: center;
  transform: translate3d(-50%, 16px, 0);
}

.im-hero--scroll-film .im-hero__story-copy--middle::after {
  inset: -58px -110px;
  background: radial-gradient(ellipse at center, rgba(1,5,8,.42), rgba(1,5,8,.12) 50%, transparent 74%);
}

.im-hero--scroll-film .im-hero__story-copy--middle .im-hero__eyebrow {
  justify-content: center;
  margin-bottom: 18px;
}

.im-hero--scroll-film .im-hero__story-copy--middle .im-hero__eyebrow::before {
  display: none;
}

.im-hero--scroll-film .im-hero__story-copy--middle .im-hero__title {
  max-width: 12ch;
  margin-inline: auto;
  font-size: clamp(3.2rem, 4.7vw, 5.85rem);
  line-height: .89;
  letter-spacing: -.042em;
  text-wrap: balance;
}

.im-hero--scroll-film .im-hero__story-copy--middle .im-hero__story-body {
  max-width: 32ch;
  margin: 18px auto 0;
  color: rgba(255,253,247,.62);
  font-size: clamp(.68rem, .72vw, .80rem);
}

/* 03 — Discovery.
   Upper-left, leaving the final Vanadinite cluster unobstructed. */
.im-hero--scroll-film .im-hero__story-copy--discovery {
  left: clamp(54px, 6vw, 116px);
  top: clamp(142px, 18vh, 190px);
  right: auto;
  bottom: auto;
  width: min(610px, 43vw);
}

.im-hero--scroll-film .im-hero__story-copy--discovery .im-hero__title {
  max-width: 10.6ch;
  font-size: clamp(3.25rem, 4.75vw, 5.95rem);
  line-height: .88;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.im-hero--scroll-film .im-hero__story-copy--discovery .im-hero__eyebrow {
  margin-bottom: 18px;
}

.im-hero--scroll-film .im-hero__story-copy--discovery .im-hero__story-body {
  max-width: 34ch;
  margin-top: 20px;
  font-size: clamp(.70rem, .76vw, .84rem);
}

/* Keep technical UI secondary. */
.im-hero--scroll-film .im-hero__mine-coordinate {
  top: calc(var(--im-hero-header-space) + 30px);
  opacity: .62;
}

.im-hero--scroll-film .im-hero__rail--mine {
  min-height: 60px;
  background: linear-gradient(to top, rgba(1,5,8,.18), transparent);
}

/* Tablet */
@media (max-width: 1180px) and (min-width: 761px) {
  .im-hero--scroll-film .im-hero__story-copy--opening {
    left: clamp(38px, 5vw, 72px);
    width: min(620px, 58vw);
    bottom: 112px;
  }

  .im-hero--scroll-film .im-hero__story-copy--opening .im-hero__title {
    max-width: 11ch;
    font-size: clamp(3.4rem, 6.6vw, 5.65rem);
  }

  .im-hero--scroll-film .im-hero__story-copy--middle {
    width: min(650px, 66vw);
  }

  .im-hero--scroll-film .im-hero__story-copy--middle .im-hero__title {
    font-size: clamp(3rem, 5.7vw, 5rem);
  }

  .im-hero--scroll-film .im-hero__story-copy--discovery {
    left: clamp(38px, 5vw, 72px);
    top: 142px;
    width: min(560px, 54vw);
  }

  .im-hero--scroll-film .im-hero__story-copy--discovery .im-hero__title {
    font-size: clamp(3rem, 5.8vw, 5.1rem);
  }
}

/* Mobile has its own choreography.
   No desktop positioning is inherited into the portrait composition. */





/* ==========================================================================
   v0.7.4 — mobile hero reliability + journey refinement support
   ========================================================================== */

.im-hero--scroll-film .im-hero__sequence-frame {
  opacity: 1;
}




/* ==========================================================================
   v0.8.0 — Mobile frame-sequence reliability
   ========================================================================== */

.im-hero--scroll-film .im-hero__sequence-frame {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 760px) {
  .im-hero {
    --im-hero-header-space: 70px;
  }

  .im-hero--scroll-video {
    height: max(var(--im-scroll-length), 240svh);
    min-height: 240svh;
    background: #020b12;
  }

  .im-hero--scroll-video .im-hero__sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    background: #020b12;
  }

  body.admin-bar .im-hero--scroll-video .im-hero__sticky {
    top: 46px;
    height: calc(100svh - 46px);
    min-height: calc(100svh - 46px);
  }

  .im-hero--scroll-film .im-hero__sequence-picture {
    z-index: 1;
  }

  .im-hero--scroll-film .im-hero__sequence-frame {
    display: block;
    object-fit: cover;
    object-position: 50% 50%;
    visibility: visible;
    opacity: 1;
  }

  

  .im-hero--scroll-film .im-hero__story-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .im-hero--scroll-film .im-hero__story-copy {
    left: 24px;
    right: 24px;
    width: auto;
    margin: 0;
    text-align: left;
    text-shadow: 0 3px 22px rgba(0,0,0,.48);
  }

  .im-hero--scroll-film .im-hero__story-copy::after {
    display: none;
  }

  .im-hero--scroll-film .im-hero__story-copy--opening {
    top: auto;
    bottom: 92px;
  }

  .im-hero--scroll-film .im-hero__story-copy--opening .im-hero__title {
    max-width: 9.2ch;
    font-size: clamp(3rem, 13vw, 4.4rem);
    line-height: .88;
  }

  .im-hero--scroll-film .im-hero__story-copy--middle {
    top: 44%;
    bottom: auto;
  }

  .im-hero--scroll-film .im-hero__story-copy--middle .im-hero__title {
    max-width: 9.5ch;
    font-size: clamp(2.7rem, 11.8vw, 3.9rem);
    line-height: .89;
  }

  .im-hero--scroll-film .im-hero__story-copy--discovery {
    top: calc(var(--im-hero-header-space) + 46px);
    bottom: auto;
  }

  .im-hero--scroll-film .im-hero__story-copy--discovery .im-hero__title {
    max-width: 9.2ch;
    font-size: clamp(2.75rem, 12vw, 4rem);
    line-height: .89;
  }

  .im-hero--scroll-film .im-hero__eyebrow {
    margin-bottom: 13px;
    font-size: .48rem;
  }

  .im-hero--scroll-film .im-hero__story-body {
    max-width: 29ch;
    margin-top: 14px;
    font-size: .68rem;
    line-height: 1.5;
  }

  .im-hero--scroll-film .im-hero__mine-coordinate {
    display: none;
  }

  .im-hero--scroll-film .im-hero__rail--mine {
    min-height: 56px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .im-hero--scroll-film .im-hero__rail--mine > span:first-child {
    display: none;
  }

  .im-hero--scroll-film .im-hero__rail--mine .im-hero__progress-track {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 390px) {
  .im-hero--scroll-film .im-hero__story-copy {
    left: 22px;
    right: 22px;
  }

  .im-hero--scroll-film .im-hero__story-copy--opening .im-hero__title {
    font-size: clamp(2.8rem, 12.4vw, 3.7rem);
  }
}

@media (min-width: 431px) and (max-width: 760px) {
  .im-hero--scroll-film .im-hero__story-copy {
    left: 28px;
    right: 28px;
  }

  .im-hero--scroll-film .im-hero__story-copy--opening {
    bottom: 100px;
  }
}

/* Production video: the matching first frame stays underneath until decoding succeeds. */
.im-hero__scrub-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;pointer-events:none}
.im-hero.is-video-ready .im-hero__scrub-video{opacity:1}
.im-hero--scroll-film .im-hero__sequence-picture{z-index:0}
.im-hero--scroll-film .im-hero__scrub-video{z-index:0}
.im-hero__scroll{min-height:44px}
.im-hero__scroll:hover span:last-child{transform:translateY(4px)}
.im-hero--scroll-film .im-hero__story-body{font-size:clamp(.875rem,1vw,1rem)!important;line-height:1.6}
.im-hero--scroll-film .im-hero__eyebrow{font-size:.6875rem}
@media(prefers-reduced-motion:reduce){
 .im-hero--scroll-film{height:auto!important;min-height:100svh}
 .im-hero--scroll-film .im-hero__sticky{position:relative!important;top:0!important;height:auto!important;min-height:100svh}
 .im-hero--scroll-film .im-hero__story-layer{position:relative;padding:130px var(--im-gutter) 100px}
 .im-hero--scroll-film .im-hero__story-copy{position:relative;inset:auto;width:100%;margin:0 0 48px;opacity:1!important;transform:none!important;text-align:left}
 .im-hero--scroll-film .im-hero__story-copy .im-hero__title{margin-inline:0}
 .im-hero--scroll-film .im-hero__story-copy .im-hero__eyebrow{justify-content:start}
 .im-hero--scroll-film .im-hero__story-body{margin-inline:0}
 .im-hero__scrub-video{display:none}
}

/* Header remains over the film; reserve only the visible WordPress admin bar. */
body.admin-bar .im-hero--scroll-video:not(.is-static) .im-hero__sticky{top:var(--im-admin-offset);height:calc(100svh - var(--im-admin-offset));min-height:calc(100svh - var(--im-admin-offset))}
.im-after-hero{scroll-margin-top:calc(var(--im-header-height) + var(--im-admin-offset))}
