/* sbassbear.com
   Everything here is lifted from the Sbassbear logo (assets/logo-*.webp):
   - the tiles' colours and the letters' cyan offset shadow → accents;
   - the nebula inside the bear → the "lit" fill for anything you press;
   - the page itself is night sky: black at the top fading to dark purple. */

:root {
  color-scheme: dark;

  /* tile colours, sampled from the logo, left to right */
  --maroon: #7d2537;
  --mauve: #aa5c78;
  --ochre: #c98a45;
  --green: #8fd474;
  --sage: #74c0a4;
  --teal: #1c7c86;
  --deep: #1f406b;
  --indigo: #2b2c78;
  --purple: #4a2a6e;
  --cyan: #14cfe0;     /* the letters' offset shadow */

  --sky: linear-gradient(180deg, #000000 0%, #07040d 22%, #140a26 55%, #26103f 85%, #2e1250 100%);
  --night: #07040d;    /* solid dark for video frames */
  --page-2: rgb(255 255 255 / 0.08);  /* raised: hover rows, tab track */
  --ink: #f4f1fa;      /* text and rules: off-white */
  --ink-soft: #bcb5d1;
  --white: #ffffff;

  --brush: "Caveat Brush", "Segoe Print", "Comic Sans MS", cursive;
  --plain: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --text: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* the bear's nebula, dimmed a touch so white text on it stays readable */
  /* border-box: size the image to the whole element, or it wraps around under transparent borders */
  --nebula: linear-gradient(rgb(20 16 42 / 0.32), rgb(20 16 42 / 0.32)) border-box, url("assets/nebula.jpg") 50% 50% / cover no-repeat border-box #3a1f5c;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-s: 0.5rem;
  --radius-l: 1rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html { background: #000; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--sky);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, iframe { display: block; max-width: 100%; }
iframe { border: 0; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { fill: currentColor; }
button { font: inherit; color: inherit; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.6rem 1rem;
  background: var(--white);
  color: var(--night);
  border-radius: var(--radius-s);
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font: 1.6rem/1 var(--brush);
}
.brand img { width: 44px; height: 44px; }
.top nav { display: flex; gap: clamp(0.75rem, 3vw, 2rem); }
.top nav a {
  font-weight: 600;
  text-decoration: none;
  padding-block: 0.25rem;
  background: linear-gradient(var(--cyan), var(--cyan)) 0 100% / 0 3px no-repeat;
  transition: background-size 0.2s;
}
.top nav a:hover { background-size: 100% 3px; }

/* ---------- hero: the logo itself ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding-block: clamp(0.5rem, 2vw, 1.5rem) 0;
}
.logo {
  width: 100%;
  max-width: 40rem;
  height: auto;
  /* fade the splash out a little sooner than the artwork does, and let the
     next section tuck up into the faded tail */
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 94%);
  margin-bottom: clamp(-7rem, -9vw, -3rem);
}
.hero-text {
  /* sit level with the bear's body, not the top of the tiles */
  padding-top: clamp(2rem, 17vw, 13rem);
}
/* Deadpan: the joke is set like a serious pull quote. */
.tagline {
  font: 500 clamp(2rem, 3.6vw, 2.9rem)/1.1 var(--plain);
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 16ch;
}
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* Pill links: ink outline on the page; pressing one lights it with the bear's nebula. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.05rem 0.6rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  transition: color 0.15s, border-color 0.15s;
}
.pill svg { width: 1.15rem; height: 1.15rem; flex: none; }
.pill:hover,
.pill:active {
  color: var(--white);
  border-color: transparent;
  background: var(--nebula);
}

/* ---------- sections ---------- */

.block { position: relative; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.block h2 {
  margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
  font: 800 clamp(2.2rem, 5vw, 3.4rem)/1 var(--text);
  letter-spacing: -0.02em;
}

/* ---------- listen ---------- */

.release {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.release-when {
  display: inline-block;
  font: 400 1.6rem/1 var(--brush);
  color: var(--white);
  text-shadow: 0.05em 0.05em 0 var(--cyan);
  background: var(--maroon);
  padding: 0.3rem 0.7rem 0.2rem;
  rotate: -3deg;
  margin-bottom: 1.1rem;
}
.release-title {
  font: 800 clamp(1.9rem, 4vw, 3rem)/1.05 var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}
.release-kind { color: var(--ink-soft); margin-bottom: 1.25rem; }
.release-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.release-cover { display: grid; }
.release-art {
  width: min(100%, 25rem);
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  justify-self: end;
  rotate: 2deg;
  border: 6px solid var(--white);
}
/* tilt alternate covers the other way so stacked blocks don't look copy-pasted */
.release:nth-child(even) .release-art { rotate: -2deg; }

.players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}
.col-h {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font: 800 1.125rem/1.2 var(--text);
  margin-bottom: 0.9rem;
}
.col-h svg { width: 1.25rem; height: 1.25rem; }
.spotify { width: 100%; border-radius: var(--radius-l); }

/* Bandcamp: every release as a cover grid (no scrolling), the chosen one plays below. */
.shelf {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.shelf button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius-s);
}
.shelf img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--radius-s);
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.shelf button:hover img { opacity: 1; }
/* Selected release is lit: full colour with a cyan ring. */
.shelf button[aria-pressed="true"] img {
  opacity: 1;
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}
.bandcamp {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-s);
}

/* ---------- watch ---------- */

.block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
}
.block-head h2 { margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem); }
.tabs {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: 999px;
  background: var(--page-2);
}
.tabs[hidden] { display: none; }
.tabs button {
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
}
.tabs button[aria-selected="true"] {
  color: var(--white);
  background: var(--nebula);
}

.watch {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--night);
}
.screen iframe,
.screen .facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.facade {
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--night);
}
.facade img { width: 100%; height: 100%; object-fit: cover; }
.facade .play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(4rem, 9vw, 6rem);
  aspect-ratio: 1;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--nebula);
  box-shadow: 0 0 0 5px var(--white);
  transition: scale 0.15s;
}
.facade .play svg {
  width: 42%;
  height: 42%;
  margin-left: 8%;
  filter: drop-shadow(0.12rem 0.1rem 0 var(--cyan));
}
.facade:hover .play { scale: 1.07; }

.now { margin-top: 1rem; }
.now h3 {
  font: 800 clamp(1.2rem, 2.2vw, 1.5rem)/1.25 var(--text);
  text-wrap: balance;
}
.now p { color: var(--ink-soft); margin-top: 0.2rem; }

.vlist { display: grid; gap: 0.35rem; }
.vlist[hidden] { display: none; }
.vlist button {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  padding: 0.4rem;
  border: 0;
  border-radius: calc(var(--radius-s) + 0.2rem);
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.vlist button:hover,
.vlist button[aria-current="true"] { background: var(--page-2); }
.vlist img {
  width: 8.5rem;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-s);
  background: var(--page-2);
}
.vlist button[aria-current="true"] img { outline: 3px solid var(--cyan); outline-offset: -3px; }
.v-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.25;
}
.v-date { display: block; color: var(--ink-soft); font-size: 0.875rem; margin-top: 0.15rem; }

.more { margin-top: 1.5rem; }

/* ---------- support rows ---------- */

.rows { border-top: 2px solid var(--ink); }
.rows li { border-bottom: 2px solid var(--ink); }
.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "icon name meta"
    "icon desc meta";
  column-gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
  padding: clamp(1.1rem, 2.6vw, 1.6rem) clamp(0.5rem, 2vw, 1.25rem);
  text-decoration: none;
  transition: color 0.15s;
}
/* each row's icon is one of the logo's tiles */
.row-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: clamp(3rem, 6vw, 4.25rem);
  aspect-ratio: 1;
  background: var(--c);
  color: var(--white);
  rotate: -4deg;
}
.rows li:nth-child(2) .row-icon { rotate: 3deg; }
.row-icon svg {
  width: 48%;
  height: 48%;
  filter: drop-shadow(0.1rem 0.09rem 0 var(--cyan));
}
.row-name {
  grid-area: name;
  font: 400 clamp(2.2rem, 4.8vw, 3.2rem)/1 var(--brush);
}
.row-desc { grid-area: desc; color: var(--ink-soft); margin-top: 0.1rem; }
.row-meta {
  grid-area: meta;
  font-weight: 600;
  text-align: right;
}
.row:hover {
  color: var(--white);
  background: var(--nebula);
}
.row:hover .row-desc { color: rgb(255 255 255 / 0.85); }
.row:hover .row-name { text-shadow: 0.05em 0.05em 0 var(--cyan); }

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2.5rem 3rem;
  color: var(--ink-soft);
}
.socials { display: flex; gap: 0.35rem; }
.socials a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: var(--ink);
}
.socials a:hover { color: var(--white); background: var(--nebula); }
.socials svg { width: 1.25rem; height: 1.25rem; }

/* ---------- smaller screens ---------- */

@media (max-width: 860px) {
  .hero,
  .release,
  .players,
  .watch { grid-template-columns: minmax(0, 1fr); }
  .hero { justify-items: center; text-align: center; }
  .logo {
    max-width: 34rem;
    -webkit-mask-image: linear-gradient(to bottom, #000 52%, transparent 80%);
    mask-image: linear-gradient(to bottom, #000 52%, transparent 80%);
    margin-bottom: min(-20vw, -2rem);
  }
  .hero-text { padding-top: 0; position: relative; }
  .tagline { margin-inline: auto; }
  .platforms { justify-content: center; }
  .vlist { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
  .release-art { justify-self: start; width: min(100% - 1rem, 22rem); }
}

@media (max-width: 560px) {
  .top nav a { font-size: 0.95rem; }
  .brand span { display: none; }
  .row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "icon name"
      "icon desc"
      "icon meta";
  }
  .row-meta { text-align: left; font-size: 0.9rem; margin-top: 0.35rem; overflow-wrap: anywhere; }
  .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .vlist button { grid-template-columns: 7rem minmax(0, 1fr); }
  .vlist img { width: 7rem; }
}
