/* ==========================================================================
   site.css - KC Phillips Music
   Professional dark theme with enhanced readability
   Mobile-first, clean, and maintainable
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (easy to adjust colors/sizes in one place)
   -------------------------------------------------------------------------- */
:root {
  /* Light theme — sunburnt orange */
  --bg-primary: #f5e6d0;
  --bg-secondary: #eedcc2;
  --bg-card: #fff3e4;
  --bg-hover: #fde8d0;

  /* Text colors — dark browns for readability on warm backgrounds */
  --text-primary: #2c1a08;
  --text-secondary: #5c3d1e;
  --text-muted: #8a6844;

  /* Accent colors — sunburnt orange */
  --accent: #c85a1e;
  --accent-hover: #e06820;
  --accent-subtle: rgba(200, 90, 30, 0.12);

  /* Borders */
  --border-color: rgba(120, 60, 20, 0.15);
  --border-light: rgba(120, 60, 20, 0.08);

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-size-base: 18px;
  --font-size-sm: 16px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 42px;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows — softer for light background */
  --shadow-sm: 0 2px 8px rgba(100, 50, 20, 0.1);
  --shadow-md: 0 4px 16px rgba(100, 50, 20, 0.15);
  --shadow-lg: 0 8px 32px rgba(100, 50, 20, 0.2);
}

/* --------------------------------------------------------------------------
   Base Reset & Defaults
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary) url('/assets/banner/kc-background.png') no-repeat center top;
  background-size: cover;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-sm);
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
}

h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
}

h3 {
  font-size: var(--font-size-xl);
}

p {
  margin: 0 0 var(--space-md);
  color: var(--text-secondary);
}

ul {
  margin: 0;
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: min(1200px, 90vw);
  margin: 0 auto;
  padding: var(--space-lg) 0 var(--space-xl);
}

.muted {
  color: #b0a090;
  font-size: var(--font-size-sm);
}

.spacer {
  height: var(--space-md);
}

/* --------------------------------------------------------------------------
   Page Heading (readable over background image)
   -------------------------------------------------------------------------- */
.page-heading {
  background: rgba(40, 22, 8, 0.8);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  display: inline-block;
}

.page-heading h1 {
  color: #fff;
  margin-bottom: var(--space-xs);
}

.page-heading .muted {
  color: #ccc;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
  font-weight: 600;
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #111;
}

.btn.secondary {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn.secondary:hover {
  background: var(--accent-subtle);
  color: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: rgba(40, 22, 8, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
  color: #f0e8e0;
}

.card h2 {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.card p,
.card li {
  color: #ddd;
}

/* --------------------------------------------------------------------------
   Header / Banner
   -------------------------------------------------------------------------- */
.site-banner {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

/* Full-width banner image across the top */
.banner-image-wrap {
  width: 100%;
  overflow: hidden;
  background: var(--bg-primary);
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Nav bar below the banner image */
.banner-nav {
  background: rgba(40, 22, 8, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.banner-nav-inner {
  width: min(1200px, 90vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  flex-wrap: wrap;
}

.brand-link {
  font-size: var(--font-size-lg);
  color: #fff;
  text-decoration: none;
}

.brand-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.nav a {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  color: #ccc;
  font-weight: 500;
  font-size: var(--font-size-sm);
  transition: all 0.2s ease;
}

/* Larger nav links on desktop so they aren't tiny */
@media (min-width: 768px) {
  .nav a {
    font-size: var(--font-size-lg);
    padding: var(--space-sm) var(--space-md);
  }
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav a.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* --------------------------------------------------------------------------
   Hamburger Menu Toggle (mobile only)
   -------------------------------------------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-xs);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all 0.2s ease;
}

/* Show hamburger, hide nav on small screens */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding: var(--space-sm) 0;
  }

  .nav.nav-open {
    display: flex;
  }

  .nav a {
    padding: var(--space-sm) var(--space-md);
    border-radius: 0;
    border-bottom: 1px solid var(--border-light);
  }

  .banner-nav-inner {
    flex-wrap: wrap;
  }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: rgba(40, 22, 8, 0.75);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
}

.hero-left h1 {
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-3xl);
  color: #fff;
}

.hero-left p {
  font-size: var(--font-size-lg);
  color: #ddd;
  max-width: 540px;
}

.hero-right {
  display: flex;
  justify-content: center;
}

.profile-photo {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 6px rgba(200, 90, 30, 0.25);
}

.cta-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

/* --------------------------------------------------------------------------
   Album Grid
   -------------------------------------------------------------------------- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.album-tile {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.album-tile:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.album-tile-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle), var(--shadow-md);
}

.album-tile img {
  border-radius: var(--radius-md);
  aspect-ratio: 1;
  object-fit: cover;
}

.album-title {
  margin: var(--space-sm) 0 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   Album Detail
   -------------------------------------------------------------------------- */
.album-detail {
  display: grid;
  gap: var(--space-lg);
}

.album-covers {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

.album-covers img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   Track List
   -------------------------------------------------------------------------- */
.tracklist {
  display: grid;
  gap: var(--space-sm);
}

.track-row {
  background: rgba(30, 15, 5, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.2s ease;
}

.track-row:hover {
  border-color: rgba(200, 90, 30, 0.3);
  background: rgba(30, 15, 5, 0.75);
}

.track-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.track-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: #f0e8e0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.track-name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.track-actions {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.track-actions .btn {
  padding: var(--space-xs) var(--space-sm);
  font-size: 14px;
}

.preview-area {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   Media Section
   -------------------------------------------------------------------------- */
.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.video-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

/* --------------------------------------------------------------------------
   Link Cards
   -------------------------------------------------------------------------- */
.link-cards {
  display: grid;
  gap: var(--space-md);
}

.link-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.2s ease;
}

.link-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.link-card .title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: var(--text-primary);
}

.link-card p {
  margin: 0;
  font-size: var(--font-size-sm);
}

/* Ensure note text is readable on the light link-card background */
.link-card .muted {
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Featured List (homepage tracks)
   -------------------------------------------------------------------------- */
.featured-list {
  display: grid;
  gap: var(--space-sm);
}

/* Album cover thumbnail shown beside featured tracks on homepage */
.featured-album-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

/* Group the track name and album subtitle so they flow vertically */
.featured-track-info {
  flex: 1;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Social Links Row
   -------------------------------------------------------------------------- */
.social-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.social-row .btn {
  padding: var(--space-sm) var(--space-md);
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.social-btn svg {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: rgba(40, 22, 8, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg) 0;
  margin-top: var(--space-xl);
  color: #ddd;
  backdrop-filter: blur(6px);
}

.footer-inner {
  width: min(1200px, 90vw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

/* Tablet and up */
@media (min-width: 768px) {
  .hero {
    grid-template-columns: 1.5fr 1fr;
    text-align: left;
  }

  .hero-right {
    justify-content: flex-end;
  }

  .album-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .album-covers {
    grid-template-columns: 1fr 1fr;
  }

  .media-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .album-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .profile-photo {
    width: 280px;
    height: 280px;
  }
}

/* Large screens */
@media (min-width: 1280px) {
  :root {
    --font-size-base: 19px;
  }
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* --------------------------------------------------------------------------
   Loading State
   -------------------------------------------------------------------------- */
.loading {
  color: var(--text-muted);
  font-style: italic;
}

/* Smooth fade-in for dynamic content */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}
