/* ═══════════════════════════════════════════════
   Musical Beings Backstage — Shared Styles
   ═══════════════════════════════════════════════ */

/* Fonts — self-hosted */
@font-face {
  font-family: 'Jokker';
  src: url('/fonts/jokkertrial-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Jokker';
  src: url('/fonts/jokkertrial-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Haffer Mono';
  src: url('/fonts/hafferxhmono-trial-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --color-primary-brown: #513B27;
  --color-cream: #E8E1D4;
  --color-tan: #B3A594;
  --color-caramel: #C5AC92;
  --color-forest: #324D39;
  --color-dark: #261E16;
  --color-off-white: #F5F5F5;
  --font-display: 'Jokker', sans-serif;
  --font-body: 'Haffer Mono', monospace;
}

/* ── Navigation ── */
.tab-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(38, 30, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: none;
  box-shadow: none;
  transition: background 0.4s ease;
}

/* Pages with video heroes: nav starts transparent */
.tab-nav.transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.tab-nav.transparent.scrolled,
.tab-nav.scrolled {
  background: rgba(38, 30, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tab-nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
  height: 60px;
}

.tab-nav-brand {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.tab-nav-brand img {
  height: 18px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.tab-nav-brand:hover img {
  opacity: 0.8;
}

.tab-nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tab-nav-links::-webkit-scrollbar {
  display: none;
}

.tab-nav-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 225, 212, 0.55);
  text-decoration: none;
  padding: 0.5rem 1rem;
  position: relative;
  transition: color 0.3s ease, background 0.3s ease;
  white-space: nowrap;
  border-radius: 6px;
}

.tab-nav-link:hover {
  color: var(--color-cream);
  background: rgba(255, 255, 255, 0.08);
}

.tab-nav-link.active {
  color: var(--color-cream);
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .tab-nav-inner {
    padding: 0 1rem;
  }
  .tab-nav-brand {
    display: none;
  }
  .tab-nav-links {
    margin: 0 auto;
    justify-content: center;
  }
  .tab-nav-link {
    font-size: 0.65rem;
    padding: 0.4rem 0.6rem;
  }
}

/* ── Footer ── */
.footer {
  background: var(--color-dark);
  padding: 2rem 2rem;
  text-align: center;
}

.footer-logo {
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(232, 225, 212, 0.4);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--color-cream);
}

/* ── Scroll-triggered animations ──
   Based on story.musicalbeings.com cascade system.
   Each element starts invisible + offset, animates in
   when parent gets .visible class from IntersectionObserver.
   Staggered delays create the cascade feel.
*/

/* Base: any element that should animate */
.anim {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Titles get more travel distance */
.anim-title {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

/* Body text */
.anim-text {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

/* Heavier elements: images, cards */
.anim-media {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

/* Quote blocks */
.anim-quote {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

/* When parent section gets .visible */
.visible .anim,
.visible .anim-title,
.visible .anim-text,
.visible .anim-media,
.visible .anim-quote {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered grid children (stats, gallery, cards) */
.visible .anim-stagger > *:nth-child(1) { transition-delay: 0.2s; }
.visible .anim-stagger > *:nth-child(2) { transition-delay: 0.3s; }
.visible .anim-stagger > *:nth-child(3) { transition-delay: 0.4s; }
.visible .anim-stagger > *:nth-child(4) { transition-delay: 0.5s; }
.visible .anim-stagger > *:nth-child(5) { transition-delay: 0.6s; }
.visible .anim-stagger > *:nth-child(6) { transition-delay: 0.7s; }
.visible .anim-stagger > *:nth-child(7) { transition-delay: 0.8s; }
.visible .anim-stagger > *:nth-child(8) { transition-delay: 0.9s; }

.anim-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.visible .anim-stagger > * {
  opacity: 1;
  transform: translateY(0);
}

/* Individual card animation — each card observed independently */
.anim-card {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Legacy .fade-in still works */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible, .visible .fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Smooth image hover ── */
img {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Smooth links ── */
a {
  transition: color 0.25s ease, opacity 0.25s ease;
}

/* ── Global mobile fixes ── */
@media (max-width: 480px) {
  body { font-size: 14px; }
  .footer-links { gap: 1.2rem; }
  .footer-links a { font-size: 0.65rem; }
}

/* ── Selection color ── */
::selection {
  background: var(--color-caramel);
  color: var(--color-dark);
}
