/* ============================================================
   Commander James Band — Custom Site
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:     #f5f0e8;
  --warm-off:  #ede8df;
  --ink:       #1a1612;
  --ink-light: #3d3530;
  --rust:      #b84c2a;
  --rust-dark: #8f3a1f;
  --sand:      #c9b99a;
  --sand-light:#e0d5c4;
  --section-dark: #1e1a16;
  --section-mid:  #f9f6f1;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --nav-h: 68px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ---------- Utility ---------- */
.container {
  width: min(var(--max-w), 100%);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 0.75rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--rust);
  color: #fff;
  border-color: var(--rust);
}
.btn-primary:hover { background: var(--rust-dark); border-color: var(--rust-dark); }

.btn-ghost {
  background: #2b4a7f;
  color: #fff;
  border-color: #2b4a7f;
}
.btn-ghost:hover { background: #1e3a6a; border-color: #1e3a6a; }

/* ---------- Header / Nav ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(26, 22, 18, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 42px;
  width: auto;
  display: block;
  /* Logo has a light background — invert so it looks good on dark nav */
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(245,240,232,0.8);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--cream); }

.nav-socials {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.15);
}
.nav-socials a { color: rgba(245,240,232,0.6); transition: color 0.2s; }
.nav-socials a:hover { color: var(--cream); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background-image: url('../images/front.jpg');
  background-size: cover;
  background-position: center top;
  background-color: #1a1612;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.24) 0%, rgba(0,0,0,0.09) 50%, rgba(0,0,0,0.34) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem clamp(2rem, 6vw, 4rem);
  max-width: 780px;
  margin-bottom: 5rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.hero-artwork {
  display: block;
  width: min(480px, 75vw);
  margin: 0 auto 1.75rem;
  border-radius: 6px;
  filter: drop-shadow(0 6px 32px rgba(0,0,0,0.6));
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.05;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--sand);
}

.hero-tagline {
  font-family: 'Righteous', cursive;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 2.5rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  animation: bounce 2s ease-in-out infinite;
  z-index: 1;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ---------- About ---------- */
.about {
  background: var(--section-mid);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.about-image-wrap {
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
}

.about-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.about-text p {
  color: var(--ink-light);
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.75;
}

.about-invite {
  margin-top: 1.5rem;
  font-family: var(--font-serif);
  font-size: 1.3rem !important;
  color: var(--rust) !important;
}

/* ---------- Events ---------- */
.events {
  background: var(--section-dark);
  color: var(--cream);
}

.events h2 { color: var(--cream); }
.events .section-label { color: var(--sand); }

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.event-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}
.event-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  background: var(--rust);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  min-width: 52px;
  text-align: center;
}

.event-month {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}

.event-day {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}

.event-info h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.event-meta {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--sand);
  margin-bottom: 0.6rem;
}

.event-desc {
  font-size: 0.9rem;
  color: rgba(245,240,232,0.65);
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.event-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--sand);
}

.events-contact {
  font-size: 0.9rem;
  color: rgba(245,240,232,0.5);
}
.events-contact a {
  color: var(--sand);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.events-contact a:hover { border-color: var(--sand); }

/* ---------- Music ---------- */
.music {
  background: var(--section-dark);
}

.music .container {
  width: 100%;
  max-width: none;
  padding-inline: clamp(2rem, 3vw, 4rem);
}

.music h2 { color: var(--cream); }
.music .section-label { color: var(--sand); }

.video-player-wrap {
  display: flex;
  margin: 0 clamp(1rem, 2vw, 3rem) 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.video-embed {
  flex: 1;
  min-width: 0;
  position: relative;
  background: #000;
}

.video-embed::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 */
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-playlist {
  width: 280px;
  flex-shrink: 0;
  overflow-y: auto;
  background: #0f0d0b;
  border-left: 1px solid rgba(255,255,255,0.06);
}

.video-playlist-header {
  padding: 0.85rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  background: #0f0d0b;
  z-index: 1;
}

.video-playlist::-webkit-scrollbar { width: 3px; }
.video-playlist::-webkit-scrollbar-track { background: transparent; }
.video-playlist::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

.playlist-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.playlist-item:hover {
  background: rgba(255,255,255,0.05);
}
.playlist-item.active {
  background: rgba(184, 76, 42, 0.15);
}

.playlist-num {
  font-size: 0.7rem;
  color: rgba(245,240,232,0.3);
  width: 1.2rem;
  text-align: center;
  flex-shrink: 0;
}
.playlist-item.active .playlist-num {
  color: var(--rust);
}

.playlist-thumb {
  width: 60px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  border-radius: 2px;
  overflow: hidden;
  background: #111;
}
.playlist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.playlist-title {
  font-size: 0.75rem;
  color: rgba(245,240,232,0.6);
  line-height: 1.3;
}
.playlist-item.active .playlist-title {
  color: var(--cream);
  font-weight: 500;
}

@media (max-width: 768px) {
  .video-player-wrap {
    flex-direction: column;
  }
  .video-playlist {
    width: 100%;
    flex-direction: row;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 0.5rem;
    gap: 0.5rem;
  }
  .video-playlist-header { display: none; }
  .playlist-item {
    flex-direction: column;
    min-width: 120px;
    flex-shrink: 0;
    border-bottom: none;
    padding: 0.5rem;
  }
  .playlist-num { display: none; }
  .playlist-thumb { width: 100%; }
}


/* ---------- Contact ---------- */
.contact {
  background: var(--section-mid);
}

.contact-inner {
  max-width: 640px;
}

.contact-intro {
  color: var(--ink-light);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.signup-form {
  margin-bottom: 3rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.form-row input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border: 1.5px solid var(--sand-light);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s;
  outline: none;
}
.form-row input:focus { border-color: var(--rust); }
.form-row input::placeholder { color: #aaa; }

.form-note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--rust);
  min-height: 1.4em;
}

.contact-direct {
  margin-bottom: 2rem;
}
.contact-direct p {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 0.5rem;
}
.contact-direct a {
  display: block;
  font-size: 1rem;
  color: var(--ink-light);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  width: fit-content;
  margin-bottom: 0.25rem;
}
.contact-direct a:hover { color: var(--rust); border-color: var(--rust); }

.contact-socials {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  transition: color 0.2s;
}
.social-link:hover { color: var(--rust); }

/* ---------- Gallery ---------- */
.gallery {
  background: var(--section-dark);
  padding-bottom: 0;
}

.gallery h2 { color: var(--cream); }
.gallery .section-label { color: var(--sand); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.gallery-item {
  display: block;
  overflow: hidden;
  aspect-ratio: 1;
  background: #111;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s;
  opacity: 0.85;
}

.gallery-item:hover img {
  transform: scale(1.05);
  opacity: 1;
}

/* Make first item span 2 columns for visual interest */
.gallery-item:first-child {
  grid-column: span 2;
  aspect-ratio: 2/1;
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item:first-child {
    grid-column: span 2;
  }
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: rgba(245,240,232,0.35);
  text-align: center;
  padding: 1.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(26, 22, 18, 0.98);
    padding: 2rem;
    gap: 1.5rem;
    align-items: flex-start;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-socials {
    padding-left: 0;
    border-left: none;
    flex-direction: row;
    margin-left: 0;
  }
  .nav-toggle { display: block; }

  .two-col {
    grid-template-columns: 1fr;
  }
  .about-image-wrap {
    aspect-ratio: 16/9;
    order: -1;
  }

  .track {
    grid-template-columns: 2.5rem 1fr;
  }
  .track-links { grid-column: 2; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.5rem); }
}
