/* ══════════════════════════════════════════
   HERITAGE MOBILE — heritage-mobile.css v3
   One era per 100vh panel, vertical scroll-snap
   Horizontal photo carousel with gesture isolation
   MPE signature gold breathing line (right edge)
══════════════════════════════════════════ */

/* ── MOBILE PANEL ── */
#heritagePnlM {
  position: fixed; inset: 0;
  z-index: 450;
  background-color: #080808;
  background-image: url('./Background_Webpage.png');
  background-size: cover;
  background-position: center center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1);
}
#heritagePnlM.h-open {
  opacity: 1;
  pointer-events: all;
}

/* ── MOBILE NAV BAR ── */
#heritageNavM {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  z-index: 600;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: rgba(8,8,8,0.94);
  border-bottom: 1px solid rgba(201,168,76,0.10);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.22,1,0.36,1);
}
#heritageNavM.h-open {
  opacity: 1;
  pointer-events: all;
}
.h-toggle-m {
  background: none; border: none; padding: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.h-toggle-m svg { width: 28px; height: 28px; overflow: visible; }
.h-toggle-m svg line {
  stroke: #C9A84C;
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 18px 18px;
  transform: rotate(-14deg);
}

/* ══════════════════════════════════════════
   SCROLL CONTAINER — vertical scroll-snap (LOOSE)
   proximity (not mandatory) keeps the snap suggestive
   instead of aggressive, letting horizontal swipes
   inside photo carousels work without fighting
══════════════════════════════════════════ */
.heritage-scroll-m {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.heritage-scroll-m::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════
   ERA PANEL — one per screen
══════════════════════════════════════════ */
.era-panel-m {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding: 68px 22px 40px;
  box-sizing: border-box;
  position: relative;
}

/* ── ERA HEAD: numeral + period + venue ── */
.era-head-m {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.era-numeral-m {
  font-family: 'Bison', 'Barlow Condensed', sans-serif;
  font-size: 4.4rem;
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: rgba(201,168,76,0.9);
  flex-shrink: 0;
}
.era-meta-m {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 10px;
  min-height: 64px;
}
.era-hairline-m {
  width: 28px; height: 1px;
  background: rgba(201,168,76,0.55);
  margin-bottom: 10px;
}
.era-period-m {
  font-family: monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.34);
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 5px;
}
.era-venue-m {
  font-family: 'Bison', 'Barlow Condensed', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.62);
  line-height: 1.15;
}

/* ── ERA LOGO CARD ── */
.era-logo-m {
  width: 280px;
  height: 202px;
  background: #f4f2ee;
  margin: 0 auto 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.era-logo-m img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── HEADLINE + BODY ── */
.era-headline-m {
  font-family: 'Bison', 'Barlow Condensed', sans-serif;
  font-size: 1.55rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 12px;
}
.era-body-m {
  font-family: 'Barlow', 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  max-height: 130px;
  overflow-y: auto;
  scrollbar-width: none;
  padding-right: 4px;
}
.era-body-m::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════
   PHOTO CAROUSEL — horizontal scroll-snap
   CRITICAL: touch-action: pan-x isolates gesture
   so vertical swipes outside cards still work
══════════════════════════════════════════ */
.photo-carousel-m {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.photo-track-m {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  padding-bottom: 2px;
}
.photo-track-m::-webkit-scrollbar { display: none; }
.photo-card-m {
  flex: 0 0 calc(100vw - 44px);
  max-width: 420px;
  aspect-ratio: 300 / 216;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: #0d0d0d;
  border: 1px solid rgba(201,168,76,0.28);
  padding: 5px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.photo-card-m img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05) brightness(0.92);
}

/* ── DOT INDICATORS ── */
.photo-dots-m {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  flex-shrink: 0;
}
.photo-dot-m {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background 0.3s ease, transform 0.3s ease;
}
.photo-dot-m.active {
  background: rgba(201,168,76,0.85);
  transform: scale(1.25);
}

/* ══════════════════════════════════════════
   HERITAGE INTRO PANEL (first screen)
══════════════════════════════════════════ */
.heritage-intro-m {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 22px;
  box-sizing: border-box;
}
.intro-title-m {
  font-family: 'Bison', 'Barlow Condensed', sans-serif;
  font-size: clamp(3rem, 13vw, 4.8rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.92);
  line-height: 0.95;
  margin-bottom: 16px;
}
.intro-hairline-m {
  width: 40px; height: 1px;
  background: rgba(201,168,76,0.6);
  margin-bottom: 18px;
}
.intro-tagline-m {
  font-family: 'Bison', 'Barlow Condensed', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  max-width: 26ch;
}

/* ══════════════════════════════════════════
   MPE SIGNATURE BREATHING LINE — vertical, right edge
   Matches footer.css gold gradient line, rotated 90°
══════════════════════════════════════════ */
.breathe-bar-m {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 2px;
  height: 90px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(192,154,72,0.25) 15%,
    #c09a48 50%,
    rgba(192,154,72,0.25) 85%,
    transparent 100%
  );
  z-index: 550;
  pointer-events: none;
  animation: mobileBreathe 3s ease-in-out infinite;
  transition: opacity 0.35s ease;
}
.breathe-bar-m.scrolling {
  opacity: 0 !important;
  animation-play-state: paused;
}
@keyframes mobileBreathe {
  0%   { opacity: 1;    }
  50%  { opacity: 0.25; }
  100% { opacity: 1;    }
}

/* ══════════════════════════════════════════
   LANDSCAPE PHONE — compact (fixed overflow)
══════════════════════════════════════════ */
@media (orientation: landscape) and (max-width: 1024px) {
  #heritageNavM { height: 42px; }

  /* Panel must be exact viewport height, not min-height, so flex children
     fit within bounds and cannot overflow the snap boundary. */
  .era-panel-m {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 52px 22px 22px;
    flex-direction: row;
    gap: 20px;
    overflow: hidden;
  }

  .era-head-m {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    flex: 0 0 28%;
    max-width: 28%;
  }
  .era-numeral-m { font-size: 3rem; }
  .era-meta-m { min-height: auto; padding-top: 0; }

  /* Logo sits inside head column, compact */
  .era-logo-m {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 300 / 216;
    margin: 10px 0 0;
  }

  /* Content column takes remaining space and constrains children */
  .era-content-m {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .era-headline-m { font-size: 1.15rem; margin-bottom: 5px; }
  .era-body-m {
    font-size: 0.76rem;
    line-height: 1.55;
    max-height: 60px;
    margin-bottom: 10px;
  }

  /* Carousel grows to fill remaining height. Cards size by HEIGHT,
     width follows the 300:216 aspect ratio. This prevents any overflow. */
  .photo-carousel-m {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .photo-track-m {
    height: 100%;
    gap: 10px;
  }
  .photo-card-m {
    flex: 0 0 auto;
    height: 100%;
    width: auto;
    max-width: none;
    aspect-ratio: 300 / 216;
  }

  .photo-dots-m { margin-top: 6px; }

  .intro-title-m { font-size: clamp(2.4rem, 9vw, 3.8rem); }
}
