/* Harvesters Songs. Tokens match hrtn-site (hrtn-about/DESIGN-SPEC.md): chalk / ink / flame,
   Bricolage Grotesque + Instrument Sans, radius 0 for images, pill for buttons. One light theme. */
:root {
  --chalk: #F7F6F3;
  --chalk-2: #EEEDE8;
  --ink: #0F1A2E;
  --ink-2: #1B2A4A;
  --muted: #5B6472;
  --flame: #CC3F27;
  --flame-bright: #FF7A5C;
  --line: rgba(15, 26, 46, .12);
  --line-dark: rgba(247, 246, 243, .16);
  --gutter: clamp(16px, 4.5vw, 64px);
  --max: 1360px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Film grain over the whole page, fixed so it never repaints on scroll. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--body); letter-spacing: .01em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn i { font-size: 18px; }
.btn:active { transform: scale(.97); }
.btn-flame { background: var(--flame); color: #fff; }
.btn-flame:hover { background: #b53620; }
.btn-ink { background: var(--ink); color: var(--chalk); }
.btn-ink:hover { background: var(--ink-2); }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-sm i { font-size: 16px; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; }

.round {
  display: inline-grid; place-items: center;
  border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--ink);
  transition: transform .25s var(--ease), background-color .2s;
}
.round:active { transform: scale(.92); }
.round-sm { width: 40px; height: 40px; font-size: 18px; }
.round-sm:hover { background: var(--chalk-2); }
.round-md { width: 44px; height: 44px; font-size: 18px; background: var(--chalk); color: var(--ink); }
.round-lg { width: 60px; height: 60px; font-size: 24px; background: var(--flame); color: #fff; box-shadow: 0 10px 30px -12px rgba(204, 63, 39, .7); }
.round-lg:hover { background: #b53620; }

/* Top */
.top { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.brand img { height: 46px; width: auto; }

/* Hero */
.hero { padding-top: clamp(28px, 6vw, 72px); padding-bottom: clamp(36px, 5vw, 64px); }
.display {
  margin: 0;
  font: 800 clamp(58px, 11.5vw, 172px)/.9 var(--display);
  font-variation-settings: 'opsz' 96;
  letter-spacing: -.035em;
}
.display span { color: var(--flame); }
.lede { max-width: 34ch; margin: 22px 0 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; color: var(--muted); }
.hero-cta { display: flex; align-items: center; gap: 18px; margin-top: 30px; flex-wrap: wrap; }
.meta { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Entrance: content rises in once on load. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* Film strip: the Vision film stills, drifting like a reel. */
.strip {
  position: relative;
  background: var(--ink);
  padding: 22px 0;
  overflow: hidden;
}
.strip::before, .strip::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 8px;
  background: repeating-linear-gradient(90deg, rgba(247, 246, 243, .22) 0 12px, transparent 12px 28px);
}
.strip::before { top: 7px; }
.strip::after { bottom: 7px; }
.strip-track { display: flex; gap: 8px; width: max-content; }
.strip-track img {
  height: clamp(120px, 15vw, 210px);
  aspect-ratio: 640 / 262;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}
@media (prefers-reduced-motion: no-preference) {
  .strip-track { animation: reel 110s linear infinite; }
  .strip:hover .strip-track { animation-play-state: paused; }
  @keyframes reel { to { transform: translateX(-50%); } }
}

/* Library: sticky stage on the left, song list on the right. */
.library {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 4.5vw, 72px);
  align-items: start;
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: 96px;
}
.stage { position: sticky; top: 24px; }
.stage-frame {
  position: relative;
  aspect-ratio: 640 / 262;
  overflow: hidden;
  background: var(--ink);
}
.stage-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s var(--ease);
  transform-origin: 60% 50%;
}
.stage-img.is-on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  body.is-playing .stage-img.is-on { animation: drift 24s ease-in-out infinite alternate; }
  @keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translateX(-2%); } }
}
.stage-frame::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 26, 46, .55), rgba(15, 26, 46, 0) 55%);
  pointer-events: none;
}
.spectrum { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46%; z-index: 1; pointer-events: none; }

.stage-body { padding-top: 22px; }
.stage-title {
  margin: 0;
  font: 800 clamp(30px, 3vw, 44px)/1.02 var(--display);
  letter-spacing: -.03em;
  min-height: 1em;
}
.stage-sub { margin: 8px 0 0; color: var(--muted); font-size: 15px; min-height: 1.4em; }
.scrub { display: block; width: 100%; height: 56px; margin-top: 18px; cursor: pointer; touch-action: none; }
.stage-time { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stage-controls { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.grow { flex: 1; }

/* Song list */
.songs { list-style: none; margin: 0; padding: 0; }
.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 40px 40px;
  align-items: center;
  gap: 14px;
  padding: 12px 12px 12px 8px;
  border-top: 1px solid var(--line);
  transition: background-color .3s;
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row:hover { background: rgba(238, 237, 232, .6); }
.row.is-current { background: var(--chalk-2); }
@media (prefers-reduced-motion: no-preference) {
  .row { opacity: 0; transform: translateY(14px); }
  .row.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease), background-color .3s; transition-delay: calc(var(--i) * 40ms); }
}
.row.flash { animation: flash 1.6s var(--ease) 2; }
@keyframes flash { 50% { background: rgba(204, 63, 39, .14); } }

.row-main {
  display: grid; grid-template-columns: 30px 112px minmax(0, 1fr); align-items: center; gap: 14px;
  min-width: 0; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
}
.num { font: 600 13px/1 var(--body); color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.thumb-wrap { position: relative; width: 112px; aspect-ratio: 640 / 262; overflow: hidden; background: var(--ink); }
.thumb { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.row:hover .thumb { transform: scale(1.08); }
.thumb-ico {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 22px; color: #fff;
  background: rgba(15, 26, 46, .38);
  opacity: 0; transition: opacity .2s;
}
.thumb-ico .ph-pause { display: none; }
.row:hover .thumb-ico, .row-main:focus-visible .thumb-ico, .row.is-live .thumb-ico { opacity: 1; }
.row.is-live .thumb-ico .ph-play { display: none; }
.row.is-live .thumb-ico .ph-pause { display: block; }
.title-wrap { min-width: 0; }
.title {
  display: block;
  font: 700 19px/1.15 var(--display);
  letter-spacing: -.015em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row.is-current .title { color: var(--flame); }
.sub { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Equalizer replaces the number on the song that is playing. */
.eq { display: none; height: 14px; justify-content: flex-end; align-items: flex-end; gap: 2px; }
.eq b { width: 3px; height: 100%; background: var(--flame); transform-origin: bottom; transform: scaleY(.35); }
.row.is-current .num-n { display: none; }
.row.is-current .eq { display: flex; }
@media (prefers-reduced-motion: no-preference) {
  .row.is-live .eq b { animation: eq .9s ease-in-out infinite alternate; }
  .row.is-live .eq b:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
  .row.is-live .eq b:nth-child(3) { animation-duration: 1.1s; animation-delay: -.6s; }
  @keyframes eq { 0% { transform: scaleY(.25); } 100% { transform: scaleY(1); } }
}

/* Row waveform: phones only, on the current song (desktop scrubs on the stage). */
.wave { display: none; grid-column: 1 / -1; grid-row: 2; width: 100%; height: 34px; cursor: pointer; touch-action: none; }
.dur { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid transparent; background: none; color: var(--ink);
  font-size: 18px; cursor: pointer; text-decoration: none;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease);
}
.icon:hover { background: var(--chalk); border-color: var(--line); }
.icon:active { transform: scale(.92); }

/* Footer */
.foot {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding-top: 40px; padding-bottom: 140px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.foot img { height: 40px; width: auto; }
.foot p { margin: 0; flex: 1; min-width: 200px; }
.link { color: var(--ink); font-weight: 600; text-underline-offset: 4px; }
.link:hover { color: var(--flame); }

/* Mini player (phones and narrow screens) */
.mini {
  position: fixed; left: 10px; right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
  display: none;
  grid-template-columns: 64px minmax(0, 1fr) 44px 40px;
  align-items: center; gap: 12px;
  padding: 10px;
  background: var(--ink); color: var(--chalk);
  border-radius: 18px;
  box-shadow: 0 18px 50px -18px rgba(15, 26, 46, .7);
  transform: translateY(140%);
  transition: transform .6s var(--ease);
  overflow: hidden;
}
.mini.show { transform: none; }
.mini-bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line-dark); }
.mini-bar span { display: block; height: 100%; background: var(--flame-bright); transform-origin: left; transform: scaleX(0); }
.mini-thumb { width: 64px; aspect-ratio: 640 / 262; object-fit: cover; border-radius: 6px; }
.mini-meta { min-width: 0; display: flex; flex-direction: column; }
.mini-meta strong { font: 700 15px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-meta span { font-size: 12px; color: rgba(247, 246, 243, .65); font-variant-numeric: tabular-nums; }
.mini .ghost { color: var(--chalk); }
.mini .ghost:hover { background: var(--ink-2); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom));
  z-index: 60;
  padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--chalk);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Narrow screens: list only, mini player docks at the bottom. */
@media (max-width: 999px) {
  .library { grid-template-columns: 1fr; padding-top: 32px; }
  .stage { display: none; }
  .mini { display: grid; }
  .row { grid-template-columns: minmax(0, 1fr) 44px 40px 40px; gap: 6px; padding: 10px 2px; }
  .row.is-current .wave { display: block; margin-top: 4px; }
  .row-main { grid-template-columns: 22px 92px minmax(0, 1fr); gap: 12px; }
  .thumb-wrap { width: 92px; }
  .title { font-size: 17px; }
}
@media (max-width: 520px) {
  .top { height: 68px; }
  .brand img { height: 38px; }
  .top .btn { height: 40px; padding: 0 16px; font-size: 14px; }
  .row-main { grid-template-columns: 76px minmax(0, 1fr); }
  .num { display: none; }
  .thumb-wrap { width: 76px; }
  .dur { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) 40px 40px; }
  .title { font-size: 16px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .foot { padding-bottom: 130px; }
}
