:root {
  --uw-primary: #111214;
  --uw-accent: #caa86a;
  --uw-muted: #6c757d;
  --uw-card-radius: 16px;
  --uw-pill-radius: 999px;
  --nav-h: 78px;
  /* Computed by nav-offset.js */
}

html {
  scroll-behavior: smooth;
}

body {
  background: #0b0c0e;
  color: #e9ecef;
  padding-top: calc(var(--nav-h, 78px) + env(safe-area-inset-top));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

a {
  color: var(--uw-accent);
}

.navbar {
  background: rgba(11, 12, 14, .95) !important;
  backdrop-filter: saturate(140%) blur(8px);
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* HERO */
.hero {
  padding-top: 110px;
  padding-bottom: 20px;
  display: flex;
  align-items: center;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(202, 168, 106, .2), transparent),
    radial-gradient(1000px 600px at 120% 110%, rgba(202, 168, 106, .15), transparent);
}

.hero h1 {
  font-weight: 800;
  letter-spacing: .3px;
  max-width: 25ch;
}

.hero video {
  object-fit: cover;
  z-index: 1;
}

.hero .z-2 {
  z-index: 2;
}

.hero .z-3 {
  z-index: 3;
}

.section-pad {
  padding: 5rem 0;
}

.band-pill {
  border: 1px solid rgba(202, 168, 106, .3);
  color: #f8f9fa;
  border-radius: var(--uw-pill-radius);
}

.brand-heart {
  border-top: 3px solid #e56e6e;
}

.brand-mind {
  border-top: 3px solid #81a1ff;
}

.brand-soul {
  border-top: 3px solid #f5a623;
}

.brand-reason {
  border-top: 3px solid #57d2a3;
}

.card {
  background: #111214;
  border: 1px solid #1c1e22;
  border-radius: var(--uw-card-radius);
  transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover,
.card:focus-within {
  box-shadow: 0 8px 24px rgba(202, 168, 106, 0.15);
}

.card img {
  border-bottom: 1px solid #1c1e22;
  border-radius: var(--uw-card-radius) var(--uw-card-radius) 0 0;
}

.card-title {
  color: #fefefe;
}

.btn-outline-light {
  --bs-btn-hover-bg: #f8f9fa;
  --bs-btn-hover-color: #000;
}

.bg-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

.footer {
  border-top: 1px solid #1f2227;
  color: #adb5bd;
  padding-bottom: env(safe-area-inset-bottom);
}

.badge-tag {
  background: rgba(202, 168, 106, .15);
  border: 1px solid rgba(202, 168, 106, .35);
}

.smallcaps {
  font-variant: small-caps;
  letter-spacing: .6px;
}

/* Lyrics mode */
.lyrics {
  display: none;
  white-space: pre-wrap;
  line-height: 1.55;
}

#music.lyrics-mode .card .media-wrap,
#music.lyrics-mode .card .meta-wrap,
#music.lyrics-mode .card .actions-wrap {
  display: none !important;
}

#music.lyrics-mode .card .lyrics {
  display: block !important;
}

.lyrics-toggle {
  cursor: pointer;
  user-select: none;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.form-switch .form-check-input {
  cursor: pointer;
  min-width: 44px;
  min-height: 24px;
}

/* Sticky tabs with horizontal scroll */
#music .nav {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

#music .nav .nav-link {
  white-space: nowrap;
  scroll-snap-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--uw-pill-radius);
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
}

#music .nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--uw-accent);
  border-radius: 999px;
  animation: slideIn 200ms ease-out;
}

@keyframes slideIn {
  from {
    width: 0;
    left: 50%;
  }

  to {
    width: 100%;
    left: 0;
  }
}

@media (max-width: 992px) {
  #music .nav {
    position: sticky;
    top: 72px;
    z-index: 5;
    background: rgba(11, 12, 14, .98);
    padding: .5rem 0;
    padding-left: calc(0.5rem + env(safe-area-inset-left));
    padding-right: calc(0.5rem + env(safe-area-inset-right));
    margin-left: -0.5rem;
    margin-right: -0.5rem;

    /* Enable horizontal scrolling */
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start !important;

    /* Smooth scrolling */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    /* Snap scrolling for better UX */
    scroll-snap-type: x proximity;

    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
  }

  #music .nav::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
  }

  #music .nav-item {
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  #music .nav-link {
    white-space: nowrap;
  }
}

/* Back to Top button */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 200ms ease-out;
  padding: 0.75rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--uw-pill-radius);
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 576px) {
  #backToTop {
    bottom: 1rem;
    right: 0.5rem;
  }

  .btn,
  .form-control {
    min-height: 44px;
  }

  .card-body {
    padding: 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .section-pad {
    padding: 3rem 0;
  }
}

/* Mobile: use image fallback when video hidden */
@media (max-width: 768px) {
  #heroVideo {
    display: none;
  }

  .hero {
    background-image: url('imgs/hero-fallback.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #heroVideo {
    display: none !important;
  }
}

/* Respect Save-Data */
@media (prefers-reduced-data: reduce) {
  #heroVideo {
    display: none !important;
  }

  img {
    background-color: #1c1e22;
  }
}

/* Skip to Content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--uw-accent);
  color: #000;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* === HOVER EFFECTS === */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* === CONTENT WRAPPER === */
.content-wrapper {
  min-height: 100vh;
  padding-bottom: 80px;
  /* Space for mini-player if present */
}

.section-pad {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  .section-pad {
    padding: 3rem 0;
  }
}

/* === BRAND CARDS === */
.band-cards-strip .band-card {
  border-radius: var(--uw-pill-radius);
}

/* === COMING SOON BADGE === */
.badge.bg-secondary {
  opacity: 0.85;
  font-size: 0.875rem;
}

/* === FAQ PAGE LAYOUT === */
.faq-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
}

@media (max-width: 991.98px) {
  .faq-layout {
    grid-template-columns: 1fr;
  }
}

.filters-panel {
  position: sticky;
  top: calc(var(--nav-h, 78px) + 12px);
  max-height: calc(100vh - var(--nav-h, 78px) - 24px);
  overflow-y: auto;
  padding-right: 4px;
}

/* Nicer scrollbar for dark theme */
.filters-panel::-webkit-scrollbar {
  width: 8px;
}

.filters-panel::-webkit-scrollbar-track {
  background: transparent;
}

.filters-panel::-webkit-scrollbar-thumb {
  background: rgba(202, 168, 106, 0.4);
  border-radius: 4px;
}

.filters-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(202, 168, 106, 0.6);
}

/* Firefox scrollbar */
.filters-panel {
  scrollbar-color: rgba(202, 168, 106, 0.4) transparent;
  scrollbar-width: thin;
}

/* === FAQ CARD SPACING === */
.faq-card {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* === FAQ CATEGORY FILTER LIST === */
#faq-categories {
  background: transparent;
  border: none;
}

#faq-categories .list-group-item {
  background: transparent;
  border: 1px solid rgba(202, 168, 106, 0.2);
  color: #e9ecef;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

#faq-categories .list-group-item:hover {
  background: rgba(202, 168, 106, 0.08);
  border-color: rgba(202, 168, 106, 0.4);
}

#faq-categories .list-group-item.active {
  background: rgba(202, 168, 106, 0.15);
  border-color: var(--uw-accent);
  color: var(--uw-accent);
  font-weight: 600;
}

/* === VERSE LINKS === */
.verse-link {
  color: var(--uw-accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--uw-accent);
  transition: opacity 0.2s ease;
}

.verse-link:hover {
  opacity: 0.8;
  border-bottom-style: solid;
}