/*
  Shared site styles for What's Buried Beneath the Pines / Family Tradition.
  Used by both index.html and family-tradition.html so the CSS is fetched
  and cached once instead of being duplicated inline on every page.
*/

body {
  background: #020706;
  color: #e6dfc8;
  font-family: 'Inter', sans-serif;
}

.font-body {
  font-family: 'Inter', sans-serif !important;
}

.font-display {
  font-family: 'Cormorant Garamond', serif !important;
}

.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .11;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 80%, rgba(255,255,255,.05) 0 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  mix-blend-mode: overlay;
}

.vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 0%, rgba(2,7,6,.18) 48%, rgba(2,7,6,.82) 100%),
    linear-gradient(to bottom, rgba(2,7,6,.12), rgba(2,7,6,.60) 86%, #020706);
}

.fade-up {
  animation: fadeUp 1.1s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slow-float {
  animation: slowFloat 8s ease-in-out infinite;
}

@keyframes slowFloat {
  0%, 100% {
    transform: translateY(0);
    opacity: .70;
  }

  50% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.menu-open {
  overflow: hidden;
}

/*
  Used for feature-flagged sections/nav items/buttons (e.g. the Proof of
  Concept section, the trailer nav/section/button) that are off by default.
  Uses !important so it reliably wins regardless of what other display
  utility classes (inline-flex, flex, etc.) are also present on the element,
  and JS removes this class to reveal the element when a flag is enabled.
*/
.is-feature-hidden {
  display: none !important;
}

.hamburger-lines {
  position: relative;
  display: block;
  width: 20px;
  height: 16px;
}

.hamburger-lines span {
  position: absolute;
  left: 0;
  display: block;
  width: 20px;
  height: 1px;
  background: #e6dfc8;
  border-radius: 999px;
  opacity: 1;
  transform-origin: center;
  transition: transform 220ms ease, opacity 220ms ease;
}

.hamburger-lines span:nth-child(1) {
  top: 0;
}

.hamburger-lines span:nth-child(2) {
  top: 7px;
}

.hamburger-lines span:nth-child(3) {
  top: 14px;
}

.hamburger-button.is-open .hamburger-lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-button.is-open .hamburger-lines span:nth-child(2) {
  opacity: 0;
}

.hamburger-button.is-open .hamburger-lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-header-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header-brand {
  position: relative;
  z-index: 2;
}

.site-header-menu {
  display: none;
}

@media (min-width: 1024px) {
  .site-header-nav {
    display: grid;
    grid-template-columns: minmax(220px, .9fr) auto minmax(max-content, 1.1fr);
    align-items: center;
    gap: clamp(1rem, 1.6vw, 2rem);
  }

  .site-header-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(.75rem, 1.15vw, 1.5rem);
    min-width: max-content;
  }
}

/* DESKTOP RESPONSIVE AUDIO PLAYER */
.family-header-audio-root {
  display: none;
}

@media (min-width: 1024px) {
  .family-header-audio-root {
    display: flex;
    justify-content: center;
    min-width: 42px;
  }
}

.family-header-player {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 36px;
  gap: 10px;
  pointer-events: auto;
}

.family-header-track {
  display: none;
  min-width: 0;
  flex: 1;
}

.family-header-play-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(182, 139, 76, .55);
  background: rgba(182, 139, 76, .09);
  color: #e6dfc8;
  font-size: 11px;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.family-header-play-button:hover {
  border-color: rgba(182, 139, 76, .95);
  background: rgba(182, 139, 76, .16);
  color: #e6dfc8;
}

.family-header-play-button:active {
  transform: scale(.96);
}

.family-header-play-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(182, 139, 76, .55);
}

.family-header-marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .17em;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(230, 223, 200, .52);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%);
}

.family-header-marquee span {
  display: inline-block;
  min-width: max-content;
  padding-left: 100%;
  animation: familyHeaderMarquee 58s linear infinite;
}

.family-header-seek {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  width: 100%;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(230, 223, 200, .13);
  outline: none;
  cursor: pointer;
}

.family-header-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #b68b4c;
  border: 1px solid rgba(230, 223, 200, .55);
  box-shadow: 0 0 12px rgba(182, 139, 76, .35);
}

.family-header-seek::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #b68b4c;
  border: 1px solid rgba(230, 223, 200, .55);
  box-shadow: 0 0 12px rgba(182, 139, 76, .35);
}

/* Laptop: play button only */
@media (min-width: 1024px) and (max-width: 1199px) {
  .family-header-player {
    width: 42px;
  }

  .family-header-track {
    display: none;
  }
}

/* Wider desktop: play button + scrolling song title */
@media (min-width: 1200px) {
  .family-header-player {
    justify-content: flex-start;
    width: clamp(210px, 22vw, 300px);
  }

  .family-header-track {
    display: block;
  }
}

/* Large desktop: add scrub control */
@media (min-width: 1400px) {
  .family-header-player {
    width: clamp(315px, 26vw, 420px);
  }

  .family-header-seek {
    display: block;
  }
}

/* MOBILE AUDIO PLAYER: BOTTOM LEFT */
.family-mobile-bottom-player {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 92;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 6.75rem);
  pointer-events: auto;
}

.family-mobile-bottom-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(230, 223, 200, .20);
  background: rgba(2, 7, 6, .78);
  color: #e6dfc8;
  font-size: 13px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  backdrop-filter: blur(10px);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.family-mobile-bottom-button:hover {
  border-color: rgba(182, 139, 76, .95);
  background: rgba(182, 139, 76, .16);
}

.family-mobile-bottom-button:active {
  transform: scale(.96);
}

.family-mobile-bottom-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(182, 139, 76, .55);
}

.family-mobile-bottom-marquee {
  width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid rgba(230, 223, 200, .12);
  border-radius: 999px;
  background: rgba(2, 7, 6, .76);
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(230, 223, 200, .58);
  backdrop-filter: blur(10px);
  transition:
    width 220ms ease,
    max-width 220ms ease,
    opacity 220ms ease,
    padding 220ms ease;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%);
}

.family-mobile-bottom-marquee span {
  display: inline-block;
  min-width: max-content;
  padding-left: 100%;
  animation: familyMobileMarquee 48s linear infinite;
}

body.menu-open .family-mobile-bottom-player {
  display: none;
}

#familyMobileAudioPlayer.is-playing .family-mobile-bottom-button {
  border-color: rgba(182, 139, 76, .70);
  background: rgba(182, 139, 76, .12);
}

#familyMobileAudioPlayer.is-playing .family-mobile-bottom-marquee {
  width: min(48vw, 190px);
  max-width: min(48vw, 190px);
  opacity: 1;
  padding: 12px 14px;
}

@media (max-width: 380px) {
  .family-mobile-bottom-player {
    left: .85rem;
    bottom: .85rem;
    max-width: calc(100vw - 6.25rem);
  }

  .family-mobile-bottom-button {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }

  #familyMobileAudioPlayer.is-playing .family-mobile-bottom-marquee {
    width: 150px;
    max-width: 150px;
  }
}

@keyframes familyHeaderMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

@keyframes familyMobileMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}
