/* ============================================
   JUDAH HALE — Main Stylesheet
   ============================================
   
   STRUCTURE:
   1. CSS Variables (colors, fonts, spacing)
   2. Reset & Base
   3. Typography
   4. Layout & Navigation
   5. Hero Section
   6. Featured Track Section
   7. Streaming Links
   8. Music Page
   9. Contact Page
   10. Footer
   11. Animations
   12. Responsive / Mobile
   
   To customize:
   - Change colors in :root variables
   - Swap fonts in the @import and :root
   - Replace placeholder images in the HTML
   ============================================ */

/* ---------- 1. CSS Variables ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  /* Colors — change these to rebrand */
  --color-bg:        #0a0a0c;
  --color-bg-alt:    #111114;
  --color-surface:   #1a1a1f;
  --color-border:    #2a2a30;
  --color-text:      #e8e6e1;
  --color-text-muted:#8a8880;
  --color-accent:    #c9a84c;
  --color-accent-dim:#c9a84c33;
  --color-white:     #ffffff;

  /* Fonts */
  --font-display: 'Cormorant Garamond', serif;
  --font-body:    'Outfit', sans-serif;

  /* Spacing */
  --nav-height: 72px;
  --section-pad: 80px;
  --container-max: 1100px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul { list-style: none; }

/* ---------- 3. Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ---------- 4. Layout & Navigation ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s var(--ease);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 32px;
}

.nav__logo img {
  height: 42px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 32px;
}

.nav__links a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.3s var(--ease);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--color-text);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s var(--ease);
}

/* ---------- 5. Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.99;
}

/* Gradient overlay */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, 
      rgba(10,10,12,0.4) 0%, 
      rgba(10,10,12,0.1) 40%, 
      rgba(10,10,12,0.7) 80%, 
      rgba(10,10,12,1) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 32px;
  animation: fadeUp 1s var(--ease) both;
}

.hero__logo {
  width: 60%;
  margin: 0 auto 24px;
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* ---------- 6. Featured Track Section ---------- */
.featured {
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
}

.featured__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.featured__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.featured__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,12,0.8) 0%,
    rgba(10,10,12,0.5) 50%,
    rgba(10,10,12,0.8) 100%
  );
}

.featured .container {
  position: relative;
  z-index: 1;
}

.featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--color-accent);
}

.featured__inner {
  display: flex;
  align-items: center;
  gap: 48px;
  animation: fadeUp 0.8s var(--ease) 0.2s both;
}

.featured__artwork {
  flex-shrink: 0;
  width: 400px;
  height: 400px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.featured__artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured__info {
  flex: 1;
}

.featured__info .label {
  margin-bottom: 12px;
  display: block;
}

.featured__info h2 {
  margin-bottom: 6px;
  color: var(--color-white);
}

.featured__info .featuring {
  font-size: 0.9rem;
  margin-top: -15px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* Audio Player */
.audio-player {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 16px 0;
  margin-bottom: 24px;
}

.audio-player audio {
  width: 100%;
  height: 36px;
  outline: none;
}

/* Streaming buttons */
.stream-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stream-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-text);
  transition: all 0.3s var(--ease);
}

.stream-links a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-dim);
}

.stream-links a img {
  height: 18px;
  width: auto;
}

/* ---------- 7. Music Page ---------- */
.page-section {
  background-image: url('../images/bg6.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: calc(var(--nav-height) + var(--section-pad));
  padding-bottom: var(--section-pad);
  min-height: 70vh;
}

.page-section__header {
  text-align: center;
  margin-bottom: 48px;
}

.page-section__header h1 {
  color: var(--color-white);
  margin-bottom: 8px;
}

.page-section__header p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Music grid for future releases */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.music-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.music-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.music-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.music-card__info {
  padding: 16px;
}

.music-card__info h3 {
  color: var(--color-white);
  margin-bottom: 4px;
}

.music-card__info p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* Coming soon state */
.coming-soon {
  text-align: center;
  padding: 80px 0;
}

.coming-soon h2 {
  color: var(--color-text-muted);
  font-style: italic;
}

/* ---------- 8. Contact Page ---------- */
.contact-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--color-accent);
  padding: 16px 32px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-top: 24px;
  transition: all 0.3s var(--ease);
}

.contact-email:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-dim);
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.contact-socials a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  transition: all 0.3s var(--ease);
}

.contact-socials a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.contact-socials a svg {
  width: 18px;
  height: 18px;
}

/* ---------- 9. Footer ---------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  text-align: center;
}

.footer p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
}

/* ---------- 10. Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Scroll-triggered fade-in class (activated by JS) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Custom Audio Player ---------- */
.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 0px solid var(--color-border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.ap-play,
.ap-mute {
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s var(--ease);
}

.ap-play:hover,
.ap-mute:hover {
  color: var(--color-accent);
}

.ap-play svg {
  width: 22px;
  height: 22px;
}

.ap-mute svg {
  width: 18px;
  height: 18px;
}

.ap-time {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  min-width: 36px;
  text-align: center;
  user-select: none;
}

.ap-progress {
  flex: 1;
  height: 4px;
  background: var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.ap-progress:hover {
  height: 6px;
}

.ap-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  border-radius: 4px;
  transition: width 0.1s linear;
}

/* ---------- 11. Responsive / Mobile ---------- */
@media (max-width: 768px) {
  :root {
    --section-pad: 56px;
  }

  /* Mobile nav */
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: rgba(10, 10, 12, 0.97);
    backdrop-filter: blur(20px);
    padding: 16px 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s var(--ease);
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav__links a {
    padding: 14px 0;
    font-size: 0.85rem;
  }

  /* Featured section stacks */
  .featured__inner {
    flex-direction: column;
    text-align: center;
  }

  .featured__artwork {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
  }

  .stream-links {
    justify-content: center;
  }

  .hero__logo {
    width: 200px;
  }
}

@media (max-width: 480px) {
  .stream-links {
    flex-direction: column;
  }

  .stream-links a {
    justify-content: center;
  }
}

.hero__icons {
  position: absolute;
  bottom: 32px;
  left: 32px;
  width: 40px;
  z-index: 1;
  opacity: 0.9;
}