/* Notes - carlcnotes.sanchezchengroup.com
   One stylesheet for both pages. Dark by default because that is how people listen. */

:root {
  color-scheme: dark;
  --bg: #100e14;
  --bg-soft: #17151d;
  --card: #1c1a24;
  --ink: #f2eeea;
  --muted: #a29aa8;
  --line: #2c2936;
  --accent: #e0a458;
  --accent-soft: rgba(224, 164, 88, 0.14);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 120px; /* room for the fixed player */
}

/* ---- hero ------------------------------------------------------------------------ */

.hero {
  max-width: 940px;
  margin: 0 auto;
  padding: 72px 16px 40px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.9rem, 9vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lede {
  margin: 16px 0 0;
  max-width: 34em;
  font-size: 1.05rem;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.nav a,
.cta,
.back {
  display: inline-block;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--bg-soft);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.nav a:hover,
.cta:hover,
.back:hover { border-color: var(--accent); color: var(--accent); }

.back { margin-top: 24px; }

/* ---- collections ----------------------------------------------------------------- */

main { max-width: 940px; margin: 0 auto; padding: 0 16px; }

.collection {
  padding: 52px 0 8px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
}

.collection:last-of-type { border-bottom: 0; }

.collection h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.4vw, 2.3rem);
  letter-spacing: -0.015em;
}

.blurb { margin: 10px 0 26px; max-width: 40em; color: var(--muted); }

.group {
  margin: 34px 0 12px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.group:first-of-type { margin-top: 8px; }

/* ---- track rows ------------------------------------------------------------------ */

.tracks { list-style: none; margin: 0; padding: 0; }

.track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.15s;
}

.track:hover { background: var(--bg-soft); }
.track.is-current { background: var(--accent-soft); }

.play {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
}

.art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.art-empty {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(140deg, #2a2733, #1c1a24);
}

/* The triangle / bars are drawn in CSS so there is no icon file to load. */
.play-icon {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 14, 0.5);
  opacity: 0;
  transition: opacity 0.15s;
}

.play-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-42%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}

.track:hover .play-icon,
.play:focus-visible .play-icon { opacity: 1; }

.track.is-current .play-icon { opacity: 1; }

.track.is-playing .play-icon::before {
  transform: translate(-50%, -50%);
  border: 0;
  width: 11px;
  height: 13px;
  background: #fff;
  -webkit-clip-path: polygon(0 0, 36% 0, 36% 100%, 0 100%, 0 0, 64% 0, 100% 0, 100% 100%, 64% 100%, 64% 0);
  clip-path: polygon(0 0, 36% 0, 36% 100%, 0 100%, 0 0, 64% 0, 100% 0, 100% 100%, 64% 100%, 64% 0);
}

.meta {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track.is-current .name { color: var(--accent); }

.dur {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.vid {
  flex: 0 0 auto;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 500 0.74rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.vid:hover { border-color: var(--accent); color: var(--accent); }

/* ---- private teaser -------------------------------------------------------------- */

.collection.private .cta { margin-top: 4px; }

/* ---- footer ---------------------------------------------------------------------- */

.foot {
  max-width: 940px;
  margin: 0 auto;
  padding: 44px 16px 60px;
  color: var(--muted);
  font-size: 0.85rem;
}

.foot p { max-width: 42em; margin: 0; }

/* ---- the player bar -------------------------------------------------------------- */

.player {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 40;
  width: calc(100% - 24px);
  max-width: 660px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(28, 26, 36, 0.93);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.player[hidden] { display: none; }

.p-art {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--card);
}

.p-mid { flex: 1 1 auto; min-width: 0; }

.p-title {
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

#p-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  margin: 7px 0 3px;
  border-radius: 2px;
  background: var(--line);
  cursor: pointer;
}

#p-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

#p-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}

.p-btn {
  flex: 0 0 auto;
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.p-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 12px;
  background: #17151d;
  -webkit-clip-path: polygon(0 0, 36% 0, 36% 100%, 0 100%, 0 0, 64% 0, 100% 0, 100% 100%, 64% 100%, 64% 0);
  clip-path: polygon(0 0, 36% 0, 36% 100%, 0 100%, 0 0, 64% 0, 100% 0, 100% 100%, 64% 100%, 64% 0);
}

.p-btn.is-paused::before {
  width: 0;
  height: 0;
  clip-path: none;
  -webkit-clip-path: none;
  background: transparent;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #17151d;
  transform: translate(-38%, -50%);
}

.p-close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.p-close:hover { color: var(--ink); }

/* ---- video modal ----------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 7, 11, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal[hidden] { display: none; }

.m-inner { position: relative; width: 100%; max-width: 420px; }

.m-inner video {
  width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  background: #000;
  box-shadow: var(--shadow);
}

.m-title {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.m-close {
  position: absolute;
  top: -42px;
  right: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---- small screens --------------------------------------------------------------- */

@media (max-width: 560px) {
  .hero { padding-top: 52px; }
  /* Keep the duration on the title's line: letting it wrap put a lone "2:38" under an
     already-ellipsised title, which read like a second track. */
  .meta { flex-wrap: nowrap; gap: 10px; }
  .dur { font-size: 0.8rem; }
  .vid { padding: 5px 9px; font-size: 0.68rem; }
  .p-close { display: none; }
  /* Netlify's free-tier "Powered by Netlify" badge is pinned bottom-right on the custom
     domain too, and at phone width it sits directly on top of the play/pause button.
     Lift the bar clear of it. Remove this if the site ever moves to a paid plan. */
  .player { bottom: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
