/* ============================================================
   1. GLOBAL RESET & MOBILE SAFETY
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; /* Stops iPhone sideways scroll */
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
}

:root {
  --bg: #f5efe6;
  --ink: #111111;
  --muted: #5f5f5f;
  --pad: 1rem;
  --radius: 12px;
  --brand: #f07f2f;
  --maxw: 1100px;
}

body.dark {
  --bg: #111111;
  --ink: #f5efe6;
  --muted: #cccccc;
}

/* ============================================================
   2. LAYOUT & CENTERED WRAPPERS
   ============================================================ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--pad);
  width: 100%;
}

.site-header {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  max-width: var(--maxw); 
  margin: 0 auto; 
  padding: 1rem var(--pad);
  width: 100%;
}

.brand { 
  font-weight: 700; 
  font-size: 1.4rem; 
  text-decoration: none;
  color: var(--ink);
}

.nav { display: flex; align-items: center; }
.nav a { margin-left: 1.2rem; text-decoration: none; color: var(--ink); }

/* ============================================================
   3. CONTENT BLOCKS (Index & Hero)
   ============================================================ */
.hero {
  display: grid; 
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem; 
  align-items: start;
  margin-bottom: 2rem;
}

.hero-copy {
  max-width: 550px; /* Keeps text from stretching too wide on desktop */
}

.hero-photo {
  width: 100%;
  border-radius: var(--radius);
  max-height: 550px;
  object-fit: cover;
  display: block;
}

.hero-media { display: flex; flex-direction: column; }

.hero-photo-caption {
  text-align: center;
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.card {
  background: #fff; 
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius); 
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
  margin-bottom: 1.5rem;
}

body.dark .card { background: #1b1b1b; border-color: #2c2c2c; }

.feature { 
  display: grid; 
  grid-template-columns: 100px 1fr; 
  gap: 1.2rem; 
  align-items: center; 
  margin: 1.5rem 0;
}

.feature-art { 
  width: 100px; 
  height: 100px; 
  border-radius: 8px; 
  object-fit: cover;
}

/* ============================================================
   4. BUTTONS & PLATFORM COLORS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  padding: .6rem 1rem; 
  border-radius: 8px; 
  border: 1px solid var(--ink);
  background: var(--ink); 
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn.outline { background: transparent; color: var(--ink); }
.btn.spotify { background: #1DB954; border-color: #1DB954; color: #fff; }
.btn.apple { background: #FA233B; border-color: #FA233B; color: #fff; }
.btn.bandcamp { background: #629AA9; border-color: #629AA9; color: #fff; }

.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* ============================================================
   5. MUSIC PAGE & EP STYLING
   ============================================================ */
.ep-card { text-align: center; }

.ep-artwork {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid #eee;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.ep-player { margin: 1rem auto 1.5rem; max-width: 500px; }

.ep-divider {
  border: 0; height: 1px; margin: 1.5rem 0;
  background: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.18), rgba(0,0,0,0));
}

.ep-notes { text-align: left; }

/* ============================================================
   6. LYRICS MODAL (The Floating Pop-up Fix)
   ============================================================ */
.lyrics-modal {
  position: fixed; 
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); 
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; 
  padding: 1rem;
}

.lyrics-box {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto; 
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

body.dark .lyrics-box {
  background: #1b1b1b;
  color: #f5efe6;
}

.lyrics-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  color: var(--ink);
}

pre {
  white-space: pre-wrap; 
  font-family: inherit;
  font-size: 1.1rem;
}

/* Important: This handles the showing/hiding */
.hide { display: none !important; }

/* ============================================================
   7. GALLERY & MOBILE RESPONSIVENESS
   ============================================================ */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.photo-grid img { width: 100%; border-radius: 10px; border: 1px solid #eee; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; gap: 1rem; text-align: center; }
  .nav { justify-content: center; margin-top: 0.5rem; }
  .nav a { margin: 0 0.6rem; }
}

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: 1fr; }
}
/* Add space between the last nav link and the Dark Mode button */
#theme-toggle {
  margin-left: 2rem; /* This creates the gap you need */
}

/* On small screens, keep it centered */
@media (max-width: 900px) {
  #theme-toggle {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
/* Better mobile navigation spacing */
@media (max-width: 600px) {
  .site-header {
    flex-direction: column; /* Stacks brand above nav */
    gap: 1.5rem;
    padding-top: 2rem;
  }

  .nav {
    flex-wrap: wrap; /* Allows links to wrap to a new line if needed */
    justify-content: center;
    gap: 1rem;
    margin-left: 0;
  }

  .nav a {
    margin: 0; /* Clears that 1.2rem margin that pushes things lopsided */
    font-size: 0.95rem;
  }

  #theme-toggle {
    margin-left: 0; /* Centers the button on mobile */
    width: 100%; /* Makes the button a nice full-width tap target */
    max-width: 140px;
    margin-top: 0.5rem;
  }
}