/* =========================================================
   John Doe — artist site
   5-color palette per album (semantic roles):
     --c-bg      section background
     --c-panel   inner card / description surface (subtle depth)
     --c-heading album name and section headers
     --c-text    body text on the album
     --c-accent  download button, arrows, hover flashes
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --c-bg:      #0a0a0a;
  --c-panel:   #141414;
  --c-heading: #f5f0e8;
  --c-text:    #c9c3b6;
  --c-accent:  #c9a961;

  --fg-dim:    rgba(245, 240, 232, 0.62);
  --fg-faint:  rgba(245, 240, 232, 0.14);

  --radius:    14px;
  --radius-sm: 8px;
  --serif:     'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans:      'Inter', system-ui, -apple-system, sans-serif;
  --page-max:  1180px;
  --ease:      cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-heading);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  width: 100%;
  min-height: 78vh;
  background: #0a0a0a center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding: clamp(20px, 4vw, 40px);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.35) 0%,
    rgba(0,0,0,0)   30%,
    rgba(0,0,0,0)   55%,
    var(--c-bg)     100%);
  pointer-events: none;
}
.hero__name {
  position: relative;
  z-index: 2;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--c-heading);
  max-width: 12ch;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}
.hero__name em { font-style: normal; font-weight: 400; }
.hero__socials {
  position: absolute;
  top: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  z-index: 3;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: #a8a8a8;
  border: 3px solid;
  border-top-color:    #ffffff;
  border-left-color:   #ffffff;
  border-right-color:  #4a4a4a;
  border-bottom-color: #4a4a4a;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.social-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  background: #d8d8d8;
  color: #111;
  border: 2px solid;
  border-top-color:    #ffffff;
  border-left-color:   #ffffff;
  border-right-color:  #666666;
  border-bottom-color: #666666;
  transition: background 0.15s var(--ease), transform 0.06s var(--ease);
}
.social-btn:hover {
  background: #ececec;
}
.social-btn:active {
  transform: translate(1px, 1px);
  border-top-color:    #666666;
  border-left-color:   #666666;
  border-right-color:  #ffffff;
  border-bottom-color: #ffffff;
}
.social-btn svg { width: 20px; height: 20px; }
.patreon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #F96854;
  color: #ffffff;
  font-family: "Arial Black", "Impact", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border: 3px solid;
  border-top-color:    #ffb4a8;   /* lighter than base — bevel highlight */
  border-left-color:   #ffb4a8;
  border-right-color:  #a83a2c;   /* darker than base — bevel shadow */
  border-bottom-color: #a83a2c;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  transition: filter 0.08s, transform 0.08s, box-shadow 0.08s, border-color 0.08s;
  white-space: nowrap;
  user-select: none;
}
.patreon-btn:hover  { filter: brightness(1.08); }
.patreon-btn:active {
  /* invert the bevel — looks pressed */
  border-top-color:    #a83a2c;
  border-left-color:   #a83a2c;
  border-right-color:  #ffb4a8;
  border-bottom-color: #ffb4a8;
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}
.patreon-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
/* ---------- discography section ---------- */
.discography {
  padding: clamp(60px, 8vw, 100px) 0 clamp(40px, 6vw, 80px);
}
.section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 auto 32px;
  max-width: var(--page-max);
  padding: 0 clamp(16px, 3vw, 32px);
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--fg-faint);
}

/* ---------- album card (full-bleed edge-to-edge bars) ---------- */
.album-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.album {
  background: var(--c-bg);
  color: var(--c-text);
  border-radius: 0;
  border: 0;
  overflow: hidden;
  transition: transform 0.4s var(--ease);
}
.album__header {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(14px, 2.5vw, 20px) clamp(16px, 3vw, 32px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
}
.album__cover {
  width: clamp(78px, 12vw, 118px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  padding: 4px;
  background: #d8d8d8;
  border: 2px solid;
  border-top-color:    #ffffff;
  border-left-color:   #ffffff;
  border-right-color:  #666666;
  border-bottom-color: #666666;
  border-radius: 0;
  box-sizing: content-box;
  box-shadow: none;
}
.album__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-width: 0;
}
.album__name {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1.5rem, 4.2vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--c-heading);
}
.album__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-heading);
  opacity: 0.6;
  padding: 4px 8px;
  border-radius: 6px;
  transition: opacity 0.2s var(--ease);
}
.album__toggle:hover { opacity: 1; }
.album__toggle-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.35s var(--ease);
}
.album[data-open="true"] .album__toggle-chevron { transform: rotate(180deg); }
.album__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--c-accent);
  color: #111;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
  white-space: nowrap;
}
.album__download:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.album__download svg { width: 15px; height: 15px; }

/* Expandable body — CSS Grid trick for smooth height transition */
.album__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.album[data-open="true"] .album__body { grid-template-rows: 1fr; }
.album__body-inner { min-height: 0; overflow: hidden; }
.album__body-content {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px) clamp(18px, 3vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* The description now lives on a --panel-colored inset — subtle depth from 5th color */
.album__description {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #111;
  margin: 0;
  max-width: 62ch;
  background: #d8d8d8;
  padding: 12px 16px;
  border: 2px solid;
  border-top-color:    #666666;
  border-left-color:   #666666;
  border-right-color:  #ffffff;
  border-bottom-color: #ffffff;
  border-radius: 0;
}

/* Song list also on a --panel surface for hierarchy */
.song-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--c-panel);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.song-item { border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.song-item:last-child { border-bottom: 0; }
.song-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  color: #111;
  background: #d8d8d8;
  border: 2px solid;
  border-top-color:    #ffffff;
  border-left-color:   #ffffff;
  border-right-color:  #666666;
  border-bottom-color: #666666;
  transition: background 0.1s ease, transform 0.05s ease;
}
.song-link:hover {
  background: #e5e5e5;
}
.song-link:active {
  background: #d0d0d0;
  border-top-color:    #666666;
  border-left-color:   #666666;
  border-right-color:  #ffffff;
  border-bottom-color: #ffffff;
  transform: translate(1px, 1px);
}
.song-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: #555;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  letter-spacing: 0.04em;
}
.song-arrow {
  width: 18px;
  height: 18px;
  color: #333;
  opacity: 0.7;
  transition: opacity 0.1s ease;
}
.song-link:hover .song-arrow {
  opacity: 1;
}
.song-name {
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--fg-faint);
  padding: clamp(40px, 6vw, 60px) clamp(16px, 3vw, 32px) clamp(28px, 4vw, 40px);
  max-width: var(--page-max);
  margin: clamp(40px, 6vw, 80px) auto 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer__credits {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  line-height: 1.35;
  max-width: 42ch;
  margin: 0;
  color: var(--c-heading);
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.footer__copyright {
  font-size: 0.78rem;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  margin: 0;
}
.footer__socials {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: #a8a8a8;
  border: 3px solid;
  border-top-color:    #ffffff;
  border-left-color:   #ffffff;
  border-right-color:  #4a4a4a;
  border-bottom-color: #4a4a4a;
}

/* ---------- responsive ---------- */
@media (max-width: 620px) {
  .hero { min-height: 68vh; }
  .album__header {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "cover meta"
      "download download";
    gap: 14px 16px;
  }
  .album__cover  { grid-area: cover; }
  .album__meta   { grid-area: meta; align-items: flex-start; text-align: left; }
  .album__download {
    grid-area: download;
    justify-content: center;
    width: 100%;
    padding: 12px;
  }
  .song-name { font-size: 1.1rem; }
  .social-btn { width: 34px; height: 34px; }
  .social-btn svg { width: 18px; height: 18px; }
}

/* =========================================================
   SONG PAGE (song.html)
   ========================================================= */
.song-page {
  min-height: 100vh;
  color: var(--c-text);
}
.song-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 18px clamp(16px, 3vw, 32px);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: color-mix(in srgb, var(--c-bg) 78%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-heading);
  opacity: 0.75;
  transition: opacity 0.2s var(--ease);
}
.back-link:hover { opacity: 1; }
.back-link svg { width: 14px; height: 14px; }

.song-nav__album {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--c-heading);
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Song page gets the same atmospheric wash as an album card,
   so the album's palette breathes across the whole background. */
.song-page {
  background:
    var(--c-bg);
  background-attachment: fixed;
}

.song-hero {
  padding: clamp(48px, 8vw, 90px) clamp(20px, 4vw, 40px) clamp(32px, 5vw, 60px);
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 4vw, 44px);
  align-items: end;
}
.song-hero__cover {
  width: clamp(120px, 22vw, 220px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  padding: 6px;
  background: #d8d8d8;
  border: 3px solid;
  border-top-color:    #ffffff;
  border-left-color:   #ffffff;
  border-right-color:  #666666;
  border-bottom-color: #666666;
  border-radius: 0;
  box-sizing: content-box;
  box-shadow: none;
}
.song-hero__text { min-width: 0; }
.song-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-panel);
  opacity: 0.75;
  margin: 0 0 12px;
}
.song-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--c-heading);
}
.song-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--c-accent);
  color: #111;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
}
.song-download:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.song-download svg { width: 15px; height: 15px; }

.song-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px) clamp(60px, 8vw, 100px);
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 5vw, 56px);
}
.song-section-label {
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  background: #000080;
  padding: 4px 10px;
  margin: 0;
}

.song-description {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  line-height: 1.4;
  margin: 0;
  color: #111;
  background: #d8d8d8;
  padding: 14px 18px;
  border: 2px solid;
  border-top-color:    #666666;
  border-left-color:   #666666;
  border-right-color:  #ffffff;
  border-bottom-color: #ffffff;
}
.song-lyrics {
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.85;
  white-space: pre-wrap;
  color: #111;
  background: #d8d8d8;
  margin: 0;
  padding: 14px 18px;
  border: 2px solid;
  border-top-color:    #666666;
  border-left-color:   #666666;
  border-right-color:  #ffffff;
  border-bottom-color: #ffffff;
}

.song-error {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 20px;
}
.song-error h1 {
  font-family: var(--serif);
  font-size: 2rem;
  margin: 0 0 12px;
  color: var(--c-heading);
}
.song-error a { color: var(--c-accent); text-decoration: underline; }

@media (max-width: 620px) {
  .song-hero {
    grid-template-columns: 1fr;
    text-align: left;
    align-items: start;
  }
  .song-hero__cover {
    width: 45%;
    min-width: 130px;
  }
  .song-nav__album { display: none; }
}

/* ---------- Record player ---------- */
.record-player {
  background: #d8d8d8;
  padding: 22px;
  border: 2px solid;
  border-top-color:    #666666;
  border-left-color:   #666666;
  border-right-color:  #ffffff;
  border-bottom-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.record {
  width: clamp(160px, 30vw, 200px);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}
.record svg {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transform: rotate(var(--spin-angle, 0deg));
}
.record[data-playing="true"] svg {
  animation: recordSpin 3s linear infinite;
  animation-delay: calc(var(--spin-angle, 0deg) / 360deg * -3s);
}
@keyframes recordSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.record-player__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #d8d8d8;
  color: #111;
  padding: 6px 20px;
  font-family: "Arial", "Helvetica", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  border: 2px solid;
  border-top-color:    #ffffff;
  border-left-color:   #ffffff;
  border-right-color:  #666666;
  border-bottom-color: #666666;
  cursor: pointer;
  min-width: 120px;
  justify-content: center;
  transition: background 0.1s;
}
.record-player__toggle:hover  { background: #e5e5e5; }
.record-player__toggle:active {
  background: #d0d0d0;
  border-top-color:    #666666;
  border-left-color:   #666666;
  border-right-color:  #ffffff;
  border-bottom-color: #ffffff;
  transform: translate(1px, 1px);
}
.record-player__toggle svg { width: 14px; height: 14px; }

/* Hidden YouTube iframe — audio only */
#yt-player {
  position: fixed;
  bottom: 0;
  left: -1000px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .record[data-playing="true"] svg { animation: none; }
}
