:root {
  --bg: #ffffff;
  --bg-alt: #f6f3f0;
  --bg-card: #fbfafa;
  --text: #2a2422;
  --text-dim: #6b6260;
  --red: #850000;
  --red-dark: #5e0000;
  --orange: #cf7200;
  --orange-light: #b35f00;
  --border: #e3dcd6;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  overflow-x: hidden;
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--orange); text-decoration: underline; }

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

h1, h2, h3 { font-weight: 700; letter-spacing: 0.01em; }

h2.section-title {
  font-size: 1.8rem;
  color: var(--text);
  border-left: 5px solid var(--red);
  padding-left: 14px;
  margin: 0 0 28px;
}
h2.section-title span { color: var(--orange); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Header */
header.site-header {
  position: -webkit-sticky; /* Safari/iOS fallback for prefixed sticky support */
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo-link img { height: 48px; }
nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.main-nav a {
  color: var(--text);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
nav.main-nav a:hover { color: var(--red); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 780px) {
  nav.main-nav { display: none; width: 100%; }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; gap: 12px; padding: 16px 0; }
  .nav-toggle { display: block; }
  .nav-wrap { flex-wrap: wrap; }
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.75) 55%, #ffffff 100%),
              url('../assets/images/slider4.jpg') center 30%/cover no-repeat;
  padding: 80px 0 60px;
  text-align: center;
  border-bottom: 3px solid var(--red);
}
.hero img.hero-logo {
  width: 420px;
  max-width: 100%;
  margin: 0 auto 22px;
  background: rgba(255,255,255,0.85);
  padding: 14px 22px;
  border-radius: 8px;
  box-sizing: border-box;
}
.hero p.tagline {
  color: var(--text);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255,255,255,0.55);
  padding: 8px 18px;
  border-radius: 6px;
}
.hero .cd-badge {
  display: inline-block;
  margin-top: 26px;
  background: var(--red);
  color: #fff;
  padding: 10px 22px;
  border-radius: 3px;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}
.hero .cd-badge:hover { background: var(--orange); color: #fff; text-decoration: none; }

/* Sections */
section { padding: 70px 0; }
section.alt { background: var(--bg-alt); }

.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: start;
}
.about-grid img { border-radius: 4px; border: 3px solid var(--red); }
.about-photo-wrap { text-align: center; }
.about-photo-wrap img { cursor: pointer; transition: opacity 0.15s; }
.about-photo-wrap img:hover, .about-photo-wrap img:focus-visible { opacity: 0.85; }
.about-hint {
  display: block;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
}
@media (max-width: 700px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid img { max-width: 220px; margin: 0 auto; }
  /* essay-body images carry fixed inline max-width (300/400px) for desktop;
     cap them to the container on narrow screens so they can't force
     horizontal overflow/scroll. */
  .track-essay .essay-body img { max-width: 100% !important; height: auto; }
}

/* CD intro */
.cd-intro {
  display: flex;
  gap: 30px;
  margin-bottom: 36px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.cd-intro img { width: 260px; border: 3px solid var(--red); border-radius: 4px; flex-shrink: 0; }
.cd-intro .cd-meta h3 { margin-top: 0; color: var(--red); }

/* Player */
.player {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.player .now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.player .now-playing img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 4px;
  border: 2px solid var(--red);
  flex-shrink: 0;
}
.player .now-playing .info { min-width: 0; }
.player .now-playing .info .track-title { font-weight: 700; color: var(--text); }
.player .now-playing .info .track-sub { color: var(--text-dim); font-size: 0.85rem; }

.player .controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.player .controls button {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  flex-shrink: 0;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.player .controls button:hover { background: var(--orange); }
.player .controls button.play-btn { width: 52px; height: 52px; font-size: 1.3rem; }

.player .seek-row { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.player .time { font-size: 0.78rem; color: var(--text-dim); min-width: 38px; text-align: center; flex-shrink: 0; }
.player input[type=range] {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
}
.player input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
}
.player input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
}
.player .vol-row { display: flex; align-items: center; gap: 8px; color: var(--text-dim); }
.player .vol-row input[type=range] { width: 90px; flex: none; }

.tracklist { list-style: none; margin: 0; padding: 0; }
.tracklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.tracklist li:last-child { border-bottom: none; }
.tracklist li:hover { background: rgba(207,114,0,0.08); }
.tracklist li.playing { background: rgba(133,0,0,0.10); }
.tracklist li.playing .tnum { color: var(--red); }
.tracklist .tnum { width: 24px; color: var(--text-dim); font-size: 0.85rem; text-align: right; flex-shrink: 0; }
.tracklist img.tthumb {
  width: 42px; height: 42px; object-fit: cover; border-radius: 4px; flex-shrink: 0;
}
.tracklist .ttitle { flex: 1; min-width: 0; }
.tracklist .tdur { color: var(--text-dim); font-size: 0.8rem; flex-shrink: 0; }

/* Track essay / lyrics (expandable) */
.track-essay {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: 6px;
  margin-bottom: 14px;
  padding: 4px 18px;
}
.track-essay summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--red);
  padding: 12px 0;
}
.track-essay .essay-body {
  padding-bottom: 16px;
  color: var(--text);
  font-size: 0.95rem;
}
.track-essay .essay-body p { margin: 0 0 14px; }
.track-essay .essay-body img { margin: 10px 0; border-radius: 4px; }

/* Essays / refs */
.refs-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.refs-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
}
.refs-list img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.refs-list .ref-note { color: var(--text-dim); font-size: 0.85rem; margin-top: 4px; }

/* Video */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 380px));
  justify-content: start;
  gap: 24px;
}
.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border: 2px solid var(--red);
  border-radius: 6px;
  overflow: hidden;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame {
  display: block;
  background-size: cover;
  background-position: center;
  background-color: #000;
}
.video-frame .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  background: rgba(0,0,0,0.25);
  transition: background 0.15s;
}
.video-frame:hover .play-overlay { background: rgba(133,0,0,0.45); }
.video-cap { color: var(--text-dim); font-size: 0.85rem; margin-top: 10px; }

/* Contact */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  padding: 24px 28px;
  max-width: 480px;
}
.contact-box p { margin: 6px 0; }

/* Footer */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
footer a { margin: 0 10px; color: var(--text); }
footer a:hover { color: var(--red); }
footer .powered img { display: inline-block; margin: 14px auto 0; max-height: 28px; }

.legal-page main { padding-top: 50px; padding-bottom: 60px; }
.legal-page h1 { color: var(--red); border-bottom: 2px solid var(--red); padding-bottom: 12px; }
.legal-page h2 { color: var(--orange); margin-top: 30px; }

/* Lightbox (click-to-enlarge) */
img.zoomable { cursor: zoom-in; }
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 14, 0.92);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
