/* ══════════════════════════════════════════
   HERITAGE SUBLAYER — heritage.css v2
   Loaded by index.html before </head>
   Depends on: sublayer.css, nav.css
   Bison already loaded; Barlow in sublayer.css
══════════════════════════════════════════ */

/* ── HERITAGE PANEL ── */
#heritagePnl {
  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);
}
#heritagePnl::before {
  content: '';
  position: fixed; inset: 0;
  background: rgba(8,8,8,0);
  pointer-events: none;
  z-index: 0;
}
#heritagePnl.h-open {
  opacity: 1;
  pointer-events: all;
}

/* ── HERITAGE NAV BAR — 52px, not obstructing title ── */
#heritageNav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 60px);
  background: rgba(8,8,8,0.92);
  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);
}
#heritageNav.h-open {
  opacity: 1;
  pointer-events: all;
}

/* ── TOGGLE — always one skewed dash "−", never "×" ── */
.h-toggle {
  background: none; border: none; padding: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.h-toggle svg { width: 30px; height: 30px; overflow: visible; }
.h-toggle svg line {
  stroke: #C9A84C;
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 18px 18px;
}
.h-toggle svg .tgl-h { transform: rotate(-14deg); }
.h-toggle svg .tgl-v { display: none; }

/* ── NAV POINTS ── */
.h-points {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.6vw, 56px);
}
.h-point {
  font-family: 'Bison', 'Barlow Condensed', sans-serif;
  font-size: clamp(0.82rem, 1.15vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  cursor: pointer; white-space: nowrap;
  display: inline-block; position: relative;
  transition: color 0.3s ease;
}
.h-point::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0; height: 1px;
  background: #C9A84C;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s ease;
}
.h-point:hover { color: rgba(255,255,255,0.72); }
.h-point:hover::after { transform: scaleX(1); transform-origin: left; }

/* ══════════════════════════════════════════
   HERITAGE SCENE — film strips container
══════════════════════════════════════════ */
.heritage-scene {
  position: absolute; inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
}

/* ── FILM STRIP ── */
.film-strip {
  width: 160vw;
  overflow: hidden;
  background: #080808;
  border-top: 1px solid rgba(201,168,76,0.09);
  border-bottom: 1px solid rgba(201,168,76,0.09);
  flex-shrink: 0;
}
.strip-upper {
  transform: rotate(-8deg) translateY(-18px);
  margin-bottom: -18px;
}
.strip-lower {
  transform: rotate(8deg) translateY(18px);
  margin-top: -18px;
}

/* ── SPROCKET ROWS ── */
.sprocket { width: 100%; }

/* ── FILM TRACK ──
   Pause is now class-driven only — no inline style conflicts,
   no jump on resume.
── */
.film-track {
  display: inline-flex;
  flex-shrink: 0;
  gap: 0;
  will-change: transform;
  white-space: nowrap;
}
.strip-upper .film-track {
  animation: scrollRight 38s linear infinite;
}
.strip-lower .film-track {
  animation: scrollLeft 44s linear infinite;
}

/* Single class on body pauses all tracks cleanly */
body.strips-paused .film-track {
  animation-play-state: paused;
}

@keyframes scrollRight {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0%); }
}
@keyframes scrollLeft {
  from { transform: translateX(0%); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════
   CARD TYPES
══════════════════════════════════════════ */
.film-card {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

/* ── PHOTO CARD ── */
.film-photo { width: 300px; }
.film-photo .card-inner {
  width: 300px; height: 216px;
  background: #181818;
  border: 1px dashed rgba(201,168,76,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}

/* ── ERA / LOGO CARD ── */
.film-logo { width: 300px; }
.film-logo .card-inner {
  width: 300px; height: 216px;
  background: #121212;
  border: 1px dashed rgba(201,168,76,0.42);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.logo-badge {
  position: absolute;
  top: 8px;
  font-family: Bison,'Barlow Condensed',sans-serif;
  font-size: 7px;
  letter-spacing: 0.25em;
  color: rgba(201,168,76,0.5);
  border: 1px solid rgba(201,168,76,0.22);
  padding: 2px 10px;
  text-transform: uppercase;
}

/* ── TEXT / DESCRIPTION CARD ── */
.film-text { width: 180px; }
.film-text .card-inner-text {
  width: 180px; height: 180px;
  background: #0f0f0f;
  border-left: 2px solid rgba(201,168,76,0.35);
  border-top: 1px solid rgba(201,168,76,0.1);
  border-bottom: 1px solid rgba(201,168,76,0.1);
  border-right: 1px solid rgba(201,168,76,0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 13px 10px;
  gap: 4px;
  cursor: default;
  transition: border-left-color 0.25s;
}
.film-text:hover .card-inner-text {
  border-left-color: rgba(201,168,76,0.7);
}
.text-headline {
  font-family: Bison,'Barlow Condensed',sans-serif;
  font-size: clamp(0.62rem,0.85vw,0.78rem);
  letter-spacing: 0.08em;
  color: rgba(201,168,76,0.9);
  line-height: 1.25;
}
.text-era-period {
  font-family: monospace;
  font-size: 7px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.12em;
  margin-top: 2px;
}
.text-era-venue {
  font-family: Bison,'Barlow Condensed',sans-serif;
  font-size: clamp(0.58rem,0.78vw,0.72rem);
  letter-spacing: 0.1em;
  color: rgba(201,168,76,0.42);
  text-transform: uppercase;
  line-height: 1.3;
  margin-top: 2px;
}
.text-more {
  font-family: monospace;
  font-size: 9px;
  color: rgba(201,168,76,0.3);
  margin-top: auto;
  letter-spacing: 0.05em;
}

/* ── Shared card labels ── */
.card-id {
  font-family: Bison,'Barlow Condensed',sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: rgba(201,168,76,0.5);
  line-height: 1;
}
.card-year {
  font-family: monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.card-dim {
  font-family: monospace;
  font-size: 8px;
  color: rgba(255,255,255,0.1);
  position: absolute;
  bottom: 7px;
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════════
   HERITAGE INTRO BLOCK — top-left
   top offset accounts for 52px nav + 20px gap
══════════════════════════════════════════ */
.heritage-intro {
  position: fixed;
  top: 72px;
  left: clamp(28px, 4vw, 60px);
  z-index: 2;
  width: clamp(210px, 22vw, 310px);
  max-height: 58px;
  overflow: hidden;
  cursor: pointer;
  transition:
    max-height 0.58s cubic-bezier(0.22,1,0.36,1),
    background 0.45s ease,
    box-shadow 0.45s ease;
  border-left: 2px solid rgba(201,168,76,0.22);
  padding: 0 0 0 16px;
}
.intro-title {
  font-family: 'Bison', 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.88);
  line-height: 1;
  transition: font-size 0.55s cubic-bezier(0.22,1,0.36,1),
              color 0.4s ease;
}
.intro-subtitle {
  font-family: 'Bison', 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.45);
  margin-top: 3px;
  line-height: 1.2;
  transition: font-size 0.55s cubic-bezier(0.22,1,0.36,1);
}
.intro-divider {
  width: 24px; height: 1px;
  background: rgba(201,168,76,0.5);
  margin: 10px 0 12px;
  opacity: 0;
  transition: opacity 0.35s ease 0.2s;
}
.intro-body {
  font-family: Barlow, 'Barlow Condensed', sans-serif;
  font-size: clamp(0.78rem,0.95vw,0.88rem);
  font-weight: 400;
  color: rgba(255,255,255,0.72);
  line-height: 1.85;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.45s ease 0.28s;
  overflow-y: auto;
  max-height: calc(85vh - 200px);
  scrollbar-width: none;
}
.intro-body::-webkit-scrollbar { display: none; }
.intro-body p { margin: 0 0 0.9em; }
.intro-body p:last-child { margin-bottom: 0; }

.intro-overlay {
  position: fixed; inset: 0;
  z-index: 1;
  background: rgba(8,8,8,0);
  pointer-events: none;
  transition: background 0.45s ease;
}
.intro-overlay.active {
  background: rgba(8,8,8,0.55);
  pointer-events: all;
}

.heritage-intro.expanded {
  max-height: 85vh;
  background: rgba(8,8,8,0.88);
  box-shadow: 0 0 80px rgba(0,0,0,0.6);
  padding-bottom: 20px;
  cursor: default;
}
.heritage-intro.expanded .intro-title {
  font-size: clamp(2.2rem, 3.8vw, 3.6rem);
  color: #fff;
}
.heritage-intro.expanded .intro-subtitle {
  font-size: 0.82rem;
}
.heritage-intro.expanded .intro-divider { opacity: 1; }
.heritage-intro.expanded .intro-body { opacity: 1; }

/* ══════════════════════════════════════════
   ERA POPUP — bottom-left
══════════════════════════════════════════ */
.era-popup {
  position: fixed;
  bottom: 48px;
  left: clamp(28px, 4vw, 60px);
  z-index: 2;
  width: clamp(240px, 26vw, 360px);
  max-height: 0;
  overflow: hidden;
  background: rgba(8,8,8,0.9);
  border-left: 2px solid rgba(201,168,76,0.4);
  padding: 0 20px 0 18px;
  transition: max-height 0.5s cubic-bezier(0.22,1,0.36,1),
              padding 0.5s cubic-bezier(0.22,1,0.36,1);
}
.era-popup.active {
  max-height: 65vh;
  padding: 22px 20px 28px 18px;
}
.ep-period {
  font-family: monospace;
  font-size: 8px;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ep-venue {
  font-family: Bison,'Barlow Condensed',sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.52);
  margin-bottom: 8px;
}
.ep-heading {
  font-family: Bison,'Barlow Condensed',sans-serif;
  font-size: clamp(1.8rem,2.8vw,2.6rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1;
}
.ep-divider {
  width: 24px; height: 1px;
  background: rgba(201,168,76,0.5);
  margin: 12px 0;
}
.ep-body {
  font-family: Barlow, 'Barlow Condensed', sans-serif;
  font-size: clamp(0.78rem,0.95vw,0.88rem);
  font-weight: 400;
  color: rgba(255,255,255,0.72);
  line-height: 1.85;
  letter-spacing: 0.03em;
  overflow-y: auto;
  scrollbar-width: none;
}
.ep-body::-webkit-scrollbar { display: none; }

.era-popup-overlay {
  position: fixed; inset: 0;
  z-index: 1;
  background: rgba(8,8,8,0);
  pointer-events: none;
  transition: background 0.4s ease;
}
.era-popup-overlay.active {
  background: rgba(8,8,8,0.45);
  pointer-events: all;
}

/* ══════════════════════════════════════════
   PORTRAIT MOBILE
══════════════════════════════════════════ */
@media (orientation: portrait) {
  #heritageNav { height: 48px; padding: 0 16px 0 20px; }
  .h-points { gap: 16px; }
  .h-point { font-size: clamp(0.68rem, 3vw, 0.82rem); }
  .heritage-intro { top: 64px; }
  #heritagePnl { background-color: #080808; }
}

/* ══════════════════════════════════════════
   LANDSCAPE MOBILE
══════════════════════════════════════════ */
@media (max-width: 1024px) and (orientation: landscape) {
  #heritageNav { height: 48px; padding: 0 20px 0 24px; }
  .h-points { gap: 20px; }
  .h-point { font-size: clamp(0.76rem, 1.4vw, 0.92rem); }
}
