/*
 * Vibe website: the home page. Loaded after core.css.
 *
 * Order follows the page: hero and stage, facts, the feature row with the queue, the commands
 * told as sentences, the two screens in sync, the bots to add, questions, the closing action.
 */

/* --- section rhythm ------------------------------------------------------------------------- */

.band {
  padding-block: var(--section) 0;
}
.band-title {
  max-width: 16ch;
  margin-bottom: var(--s-7);
  font-size: var(--step-4);
  font-weight: var(--light);
  line-height: var(--leading-tight);
  letter-spacing: var(--track-display);
}
.band-title b,
.hero-title b {
  font-weight: var(--bold);
}
.band-lede {
  max-width: 46ch;
  color: var(--ink-2);
}

/* --- hero ----------------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(var(--s-6), 6vw, var(--s-9));
}
.hero-top {
  display: grid;
  gap: var(--s-5) var(--s-7);
  align-items: end;
}
.hero-title {
  max-width: 12ch;
  font-size: var(--step-5);
  font-weight: var(--light);
  line-height: 0.98;
  letter-spacing: var(--track-display);
}
.hero-lede {
  max-width: 36ch;
  margin-bottom: var(--s-5);
  color: var(--ink-2);
  font-size: var(--step-1);
  line-height: 1.45;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-5);
}
@media (min-width: 56rem) {
  .hero-top {
    grid-template-columns: 1fr auto;
  }
}
@media (max-width: 40rem) {
  .hero-lede {
    font-size: var(--step-0);
  }
}

/* The product, at the width of the page. */
.stage {
  margin-top: clamp(var(--s-6), 5vw, var(--s-8));
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--ring), var(--stage-glow);
  animation: stage-in var(--t-slow) var(--ease) both;
}
.stage img {
  width: 100%;
}
@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(var(--s-5));
  }
}
@media (max-width: 40rem) {
  .stage {
    max-height: 62svh;
  }
  .stage img {
    object-fit: cover;
    object-position: top;
  }
}

/* --- facts ---------------------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--s-4) var(--s-7);
  padding: var(--s-6) 0 0;
  list-style: none;
  color: var(--ink-2);
  font-size: var(--step--1);
}
.facts strong {
  display: block;
  color: var(--ink);
  font-size: var(--step-1);
  font-weight: var(--medium);
}

/* --- feature row ---------------------------------------------------------------------------- */

/* A title, a picture and some text. On a phone they stack in that order; with room, the picture
   stands beside the other two, on the left or (flipped) on the right. */
.feature {
  display: grid;
  gap: var(--s-6) clamp(var(--s-6), 6vw, var(--s-9));
}
.feature > .band-title {
  margin-bottom: 0;
}
@media (min-width: 56rem) {
  .feature {
    grid-template: "media title" auto "media body" 1fr / 5fr 6fr;
    align-items: start;
  }
  .feature-flip {
    grid-template: "title media" auto "body media" 1fr / 6fr 5fr;
  }
  .feature > .band-title {
    grid-area: title;
    align-self: end;
  }
  .feature-media {
    grid-area: media;
    align-self: center;
  }
  .feature-body {
    grid-area: body;
  }
}
.points {
  padding: 0;
  list-style: none;
}
.point {
  padding-block: var(--s-5);
  border-top: 1px solid var(--line);
}
.point h3 {
  margin-bottom: var(--s-1);
  font-size: var(--step-1);
  font-weight: var(--medium);
}
.point p {
  max-width: 46ch;
  color: var(--ink-2);
}

/* --- the queue ------------------------------------------------------------------------------ */
/* The player's queue rail as its own object, drawn the way the player draws it: a two-line row (title over
   artist, length over who asked) with a 44px cover, and a boost button that is a ring until it has votes. */

.queue {
  padding: var(--s-5) var(--s-3) var(--s-4);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: var(--ring);
}
.queue-heading {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  padding: 0 var(--s-2) var(--s-2);
  font-weight: var(--medium);
}
.queue-heading span {
  color: var(--ink-3);
  font-weight: var(--regular);
}
.queue-list {
  display: grid;
  gap: 0.125rem;
  padding: 0;
  list-style: none;
}
.queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-2);
}
.queue-play {
  display: grid;
  grid-template-columns: var(--target) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
  padding: var(--s-2);
}
.queue-art {
  width: var(--target);
  height: var(--target);
  border-radius: var(--r-1);
}
.queue-words,
.queue-meta {
  display: grid;
  min-width: 0;
}
.queue-title,
.queue-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-title {
  font-weight: var(--medium);
}
.queue-artist,
.queue-meta {
  color: var(--ink-3);
  font-size: var(--step--1);
}
.queue-meta {
  justify-items: end;
  max-width: 6rem;
  font-variant-numeric: tabular-nums;
}
.boost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-width: 2rem;
  height: 1.75rem;
  margin-right: var(--s-2);
  padding-inline: var(--s-2);
  border-radius: var(--r-full);
  box-shadow: inset 0 0 0 1px var(--line-control);
  color: var(--ink-2);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}
.boost svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.boost[data-on] {
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--accent-text);
}

/* --- commands, as sentences ----------------------------------------------------------------- */

.says {
  padding: 0;
  list-style: none;
}
.say {
  padding-block: var(--s-5);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: var(--step-3);
  font-weight: var(--light);
  line-height: 1.3;
  letter-spacing: var(--track-heading);
  text-wrap: balance;
}
.say:last-child {
  border-bottom: 1px solid var(--line);
}
.say b {
  color: var(--ink);
  font-weight: var(--regular);
}

/* --- two screens, one player ---------------------------------------------------------------- */

.screens {
  display: grid;
  max-width: 34rem;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
  align-items: start;
}
.screen {
  --p: 33%;
  padding: var(--s-4);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--ring);
}
.screen:nth-child(2) {
  margin-top: var(--s-7);
}
.screen-who {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
  color: var(--ink-2);
  font-size: var(--step--1);
}
.screen-who i {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--step--2);
  font-style: normal;
  font-weight: var(--bold);
}
.screen-art {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: var(--s-3);
  border-radius: var(--r-1);
}
.screen-title {
  font-weight: var(--bold);
}
.screen-artist {
  color: var(--ink-2);
  font-size: var(--step--1);
}
.screen-bar {
  height: 0.25rem;
  margin-top: var(--s-3);
  border-radius: var(--r-full);
  background: linear-gradient(to right, var(--accent) var(--p), rgba(255, 255, 255, 0.12) var(--p));
}
.screen-time {
  display: flex;
  justify-content: space-between;
  margin-top: var(--s-2);
  color: var(--ink-3);
  font-size: var(--step--2);
  font-variant-numeric: tabular-nums;
}
/* The one control of the section: move it and both screens follow. */
.scrub {
  display: grid;
  gap: var(--s-1);
  margin-top: var(--s-5);
  color: var(--ink-2);
  font-size: var(--step--1);
}
.scrub input {
  --p: 33%;
  appearance: none;
  width: 100%;
  max-width: 24rem;
  height: var(--target);
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.scrub input::-webkit-slider-runnable-track {
  height: 0.375rem;
  border-radius: var(--r-full);
  background: linear-gradient(to right, var(--accent) var(--p), rgba(255, 255, 255, 0.14) var(--p));
}
.scrub input::-moz-range-track {
  height: 0.375rem;
  border-radius: var(--r-full);
  background: linear-gradient(to right, var(--accent) var(--p), rgba(255, 255, 255, 0.14) var(--p));
}
.scrub input::-webkit-slider-thumb {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: -0.4375rem;
  border-radius: 50%;
  background: var(--ink);
}
.scrub input::-moz-range-thumb {
  width: 1.25rem;
  height: 1.25rem;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}

/* --- questions ------------------------------------------------------------------------------ */

.faq {
  max-width: var(--max-prose);
}
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 4rem;
  padding-block: var(--s-4);
  font-size: var(--step-1);
  font-weight: var(--medium);
  line-height: var(--leading-snug);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary h3 {
  font: inherit;
  letter-spacing: inherit;
}
/* A plus that turns into a minus: the horizontal bar stays, the vertical one folds away. */
.faq summary::after {
  content: "";
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
  background:
    linear-gradient(var(--ink-2), var(--ink-2)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink-2), var(--ink-2)) center / 2px 100% no-repeat;
  transition: transform var(--t) var(--ease);
}
.faq details[open] summary::after {
  background-size:
    100% 2px,
    2px 0;
  transform: rotate(180deg);
}
.faq-answer {
  max-width: var(--measure);
  padding-bottom: var(--s-5);
  color: var(--ink-2);
}
.faq-answer a {
  color: var(--ink);
  text-underline-offset: 0.25em;
}

/* --- closing action ------------------------------------------------------------------------- */

.closing {
  display: grid;
  gap: var(--s-5);
  justify-items: start;
}

/* --- small parts of the home page ----------------------------------------------------------- */

.band-after {
  margin-top: var(--s-4);
}
.point a,
.closing-more a {
  color: var(--ink);
  text-underline-offset: 0.25em;
}
/* Three across when there is room: plain columns under a rule, not cards. */
@media (min-width: 56rem) {
  .points-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-7);
  }
}
.closing-more {
  max-width: 46ch;
  color: var(--ink-2);
  font-size: var(--step--1);
}
