/* Ghost Signals Records.
   The ground is tape oxide, the type is sleeve card stock, and the only
   accent is VU amber, kept for things you can act on and the track that is
   playing. Album art supplies every other colour on the page. */

:root {
  --oxide: #15100d;        /* tape-oxide ground */
  --sleeve: #1f1815;       /* a raised surface: the sleeve card */
  --sleeve-edge: #2e241e;
  --bone: #ece3d4;         /* the card stock the liner notes are printed on */
  --dust: #9a8c7a;         /* secondary ink */
  --amber: #e0872f;        /* the signal: controls, and what is playing */
  --amber-dim: #8a5a24;
  --onair: #5ad07f;        /* the lamp, and nothing else */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --gear: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --rule: 1px solid #2b211b;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--oxide);
  color: var(--bone);
  font: 400 1.0625rem/1.65 var(--serif);
  /* A faint tape grain, drawn rather than downloaded. */
  background-image: radial-gradient(circle at 18% 12%, #22190f 0%, transparent 55%),
                    radial-gradient(circle at 82% 78%, #1c1613 0%, transparent 60%);
  background-attachment: fixed;
  padding-bottom: 5.5rem;
}

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: var(--bone); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------------------------------------------------------------- header */
.topbar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.4rem var(--gutter) 1.1rem;
  border-bottom: var(--rule);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.0625rem;
  letter-spacing: .06em;
  color: var(--bone);
  text-decoration: none;
}
.wordmark em { font-style: italic; color: var(--dust); }
.whereabouts { margin: 0; font-family: var(--gear); font-size: .8125rem; color: var(--dust); }

/* ---------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 27rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(2.5rem, 6vw, 5rem);
}

/* The sleeve: a square card with a printed edge down its spine. */
.sleeve {
  position: relative;
  aspect-ratio: 1;
  background: var(--sleeve);
  border: 1px solid var(--sleeve-edge);
  box-shadow: 0 24px 60px -28px #000, inset 0 0 0 1px #00000055;
  overflow: hidden;
}
.sleeve::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 9px;
  background: linear-gradient(90deg, #00000066, transparent);
  pointer-events: none;
}
.sleeve img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sleeve img:not([src]) { display: none; }
.sleeve-empty {
  position: absolute; inset: auto 1.25rem 1.25rem;
  margin: 0; color: var(--dust); font-style: italic;
}

h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.75rem);
  line-height: .95;
  letter-spacing: -0.018em;
  font-weight: 400;
  margin: 0 0 1.1rem;
  max-width: 15ch;
  text-wrap: balance;
}
.lede { margin: 0 0 1.6rem; max-width: var(--measure); color: #d8cebd; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1rem; }
.hero-fine { margin: 0; font-family: var(--gear); font-size: .8125rem; color: var(--dust); }

/* ---------------------------------------------------------------- buttons */
.btn {
  font-family: var(--gear);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: .7rem 1.15rem;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: #1a1008;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: #efa04f; border-color: #efa04f; color: #1a1008; }
.btn.ghost { background: transparent; color: var(--bone); border-color: #4a3a2f; }
.btn.ghost:hover { border-color: var(--bone); background: transparent; color: var(--bone); }
.btn.small { padding: .5rem .8rem; font-size: .8125rem; }
.btn[disabled] { opacity: .5; cursor: default; }

/* ---------------------------------------------------------------- sections */
section { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); border-top: var(--rule); }
.hero { border-top: 0; }
.section-h {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 1.6rem;
}

/* ---------------------------------------------------------------- back sleeve */
.back-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.brief-line { display: grid; grid-template-columns: 5.5rem 1fr; gap: .75rem; margin: 0 0 .9rem; }
.brief-line .key { font-family: var(--gear); font-size: .8125rem; color: var(--dust); padding-top: .25rem; }
.brief-line .val { margin: 0; max-width: 46ch; }
.brief-note { margin: 1.25rem 0 0; color: var(--dust); font-style: italic; max-width: 46ch; }

.tracklist { list-style: none; margin: 0; padding: 0; }
.tracklist li {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto;
  align-items: baseline;
  gap: .75rem;
  padding: .6rem 0;
  border-bottom: var(--rule);
}
.tracklist li:first-child { border-top: var(--rule); }
.tracklist .num, .tracklist .dur {
  font-family: var(--gear); font-size: .8125rem; color: var(--dust);
  font-variant-numeric: tabular-nums;
}
.tracklist .name {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: var(--bone); text-align: left; cursor: pointer;
}
.tracklist .name:hover { color: var(--amber); }
.tracklist li[data-playing="true"] .name,
.tracklist li[data-playing="true"] .num,
.tracklist li[data-playing="true"] .dur { color: var(--amber); }

/* Three bars that move only while something is actually playing. */
.bars { display: inline-flex; gap: 2px; margin-left: .5rem; vertical-align: baseline; }
.bars i { width: 2px; height: .6em; background: var(--amber); display: block; transform-origin: bottom; }
li[data-playing="true"] .bars i { animation: vu .9s ease-in-out infinite; }
li[data-playing="true"] .bars i:nth-child(2) { animation-delay: .15s; }
li[data-playing="true"] .bars i:nth-child(3) { animation-delay: .3s; }
@keyframes vu { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

/* ---------------------------------------------------------------- shelf */
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.shelf-sub, .desk-sub { margin: 0 0 1.6rem; color: var(--dust); max-width: var(--measure); }
.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(9.5rem, 22vw, 13rem);
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 1rem;
  scrollbar-color: var(--amber-dim) transparent;
}
.shelf > * { scroll-snap-align: start; }
.rack-item {
  background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-align: left;
}
.rack-item .sleeve { box-shadow: 0 14px 30px -18px #000; }
.rack-item[aria-current="true"] .sleeve { outline: 2px solid var(--amber); outline-offset: 2px; }
.rack-title { margin: .6rem 0 0; line-height: 1.3; }
.rack-meta { margin: .1rem 0 0; font-family: var(--gear); font-size: .75rem; color: var(--dust); }
.shelf-empty { color: var(--dust); max-width: var(--measure); font-style: italic; }

/* ---------------------------------------------------------------- spin */
.spin-card {
  border: var(--rule);
  background: linear-gradient(180deg, #1d1613, #171210);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  max-width: 46rem;
}
.lamp { display: flex; align-items: center; gap: .55rem; margin: 0 0 .75rem; font-family: var(--gear); font-size: .8125rem; color: var(--dust); }
.lamp .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--onair); box-shadow: 0 0 10px var(--onair); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.spin-card h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 400; margin: 0 0 .9rem; }
.spin-card p { margin: 0 0 .9rem; max-width: var(--measure); }
.spin-how { color: var(--dust); }

/* ---------------------------------------------------------------- cost */
.prices { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 0; max-width: 34rem; }
.prices li {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline;
  padding: .75rem 0; border-bottom: var(--rule);
}
.prices li:first-child { border-top: var(--rule); }
.prices .what { margin: 0; }
.prices .how-many { display: block; color: var(--dust); font-size: .9375rem; }
.prices .amount { font-family: var(--gear); font-variant-numeric: tabular-nums; }
.prices .amount.free { color: var(--onair); }
.cost-note { color: var(--dust); max-width: var(--measure); margin: 0; }

/* ---------------------------------------------------------------- desk */
.desk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.desk-head { grid-column: 1 / -1; }
.desk { display: flex; flex-direction: column; min-height: 26rem; }
.log {
  flex: 1; overflow-y: auto; max-height: 28rem;
  border: var(--rule); background: #191311; padding: 1.1rem;
}
.line { margin: 0 0 1rem; white-space: pre-wrap; max-width: var(--measure); }
.line.you { color: var(--dust); }
.line.you::before { content: "You: "; font-family: var(--gear); font-size: .75rem; color: var(--amber-dim); }
.say { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; margin-top: .8rem; }
.say #email { grid-column: 1 / -1; }
input {
  background: #191311; color: var(--bone); border: var(--rule); padding: .7rem .8rem;
  font: inherit; border-radius: 2px; min-width: 0;
}
input::placeholder { color: #7b6f60; }
.brief-panel { border: var(--rule); padding: 1.1rem; background: #191311; }
.brief-panel h3 { margin: 0 0 .75rem; font-size: 1rem; font-weight: 400; color: var(--dust); }
.brief-panel dt { font-family: var(--gear); font-size: .75rem; color: var(--dust); margin-top: .8rem; }
.brief-panel dd { margin: .15rem 0 0; white-space: pre-wrap; }
#order-state { margin-top: 1rem; font-family: var(--gear); font-size: .8125rem; }
#order-state a { display: inline-block; margin-top: .5rem; }

/* ---------------------------------------------------------------- footer */
.foot { padding: 2.5rem var(--gutter) 3rem; border-top: var(--rule); color: var(--dust); }
.foot p { margin: 0; max-width: var(--measure); font-size: .9375rem; }

/* ---------------------------------------------------------------- player */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: auto minmax(0, 15rem) 1fr auto auto;
  align-items: center; gap: 1rem;
  padding: .7rem var(--gutter);
  background: #120e0bef; border-top: 1px solid var(--sleeve-edge);
  backdrop-filter: blur(8px);
}
.transport {
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--amber); background: transparent; color: var(--amber);
  cursor: pointer; display: grid; place-items: center; font-size: .9rem; line-height: 1;
}
.transport:hover { background: var(--amber); color: #1a1008; }
.transport.small { width: 2rem; height: 2rem; border-color: #4a3a2f; color: var(--dust); font-size: 1.1rem; }
.transport.small:hover { background: transparent; border-color: var(--bone); color: var(--bone); }
.now { min-width: 0; }
.now-track { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-album { margin: 0; font-family: var(--gear); font-size: .75rem; color: var(--dust); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { height: 3px; background: #32271f; cursor: pointer; position: relative; }
.meter-fill { height: 100%; width: 0; background: var(--amber); }
.clock { margin: 0; font-family: var(--gear); font-size: .8125rem; color: var(--dust); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- motion + small screens */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 60rem) {
  .hero, .back-grid, .desk-wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .sleeve { max-width: 22rem; }
  .player { grid-template-columns: auto 1fr auto; row-gap: .5rem; }
  .player .meter { grid-column: 1 / -1; }
  .player .clock { display: none; }
}

/* ---------------------------------------------------------------- an album's own page */
.album-page .tracklist { margin: 1.5rem 0; max-width: 40rem; }
.album-page .tracklist li { grid-template-columns: 1.75rem 1fr auto auto; }
.tracklist .dl { font-family: var(--gear); font-size: .75rem; color: var(--dust); text-decoration: none; }
.tracklist .dl:hover { color: var(--amber); }

.owner { border-top: var(--rule); margin-top: 2rem; padding-top: 1.75rem; max-width: 40rem; }
.owner .section-h { font-size: 1.25rem; margin-bottom: 1.25rem; }
.owner-row + .owner-row { margin-top: 1.75rem; border-top: var(--rule); padding-top: 1.75rem; }
.owner-head { margin: 0 0 .4rem; }
.owner-note { margin: .4rem 0 .8rem; color: var(--dust); font-size: .9375rem; max-width: 52ch; }
.owner-controls { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.owner-said { margin: .7rem 0 0; font-family: var(--gear); font-size: .8125rem; color: var(--amber); }
.switch { display: flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { width: 1.1rem; height: 1.1rem; accent-color: var(--amber); }
select {
  background: #191311; color: var(--bone); border: var(--rule); padding: .6rem .7rem;
  font: inherit; font-family: var(--gear); font-size: .9375rem; border-radius: 2px;
}
