/*
 * Creators' and channels' public pages (ADR-073, ADR-079): plain HTML the scheduler writes to
 * /c/<id>, /radio and /radio/<id>, from api/src/domain/public_page.py and channel_page.py, which
 * name the classes below. Not built by Next, so the palette is a copy of src/app/globals.css's: a
 * change there has to be repeated here.
 */

:root {
  color-scheme: light dark;
  --bg: #fbf8f2;
  --surface: #ffffff;
  --glass: rgb(255 255 255 / 0.84);
  --text: #1c1b3d;
  --muted: #625f7c;
  --border: #e2dce9;
  --outline: #1c1b3d;
  --accent: #b0158c;
  --on-brand: #ffffff;
  --brand: linear-gradient(120deg, #d1168f 0%, #9a1cc8 55%, #5b2bd6 100%);
  --brand-glow: rgb(194 27 184 / 0.3);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110e1f;
    --surface: #1b1730;
    --glass: rgb(27 23 48 / 0.86);
    --text: #f1eefa;
    --muted: #a9a3c4;
    --border: #352e55;
    --outline: #7667b8;
    --accent: #ff70cf;
    --brand-glow: rgb(255 46 176 / 0.25);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.5;
}

.shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 1rem;
}

main {
  display: grid;
  flex: 1;
  gap: 1rem;
  align-content: start;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
}

.brand {
  display: block;
  border-radius: 0.5rem;
}

.brand img {
  display: block;
  width: clamp(10rem, 46vw, 15rem);
  height: auto;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  overflow-wrap: anywhere;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h2 {
  font-size: 1.25rem;
  font-weight: 800;
}

a {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.eyebrow {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border: 1.5px solid var(--outline);
  border-radius: 1.5rem;
  background: var(--glass);
}

.button {
  display: inline-block;
  justify-self: start;
  padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

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

.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button.primary {
  border-color: transparent;
  background: var(--brand) border-box;
  box-shadow: 0 6px 18px -6px var(--brand-glow);
  color: var(--on-brand);
}

.creator-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.creator-head > div {
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 6rem;
  height: 6rem;
  border: 1.5px solid var(--outline);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  object-fit: cover;
}

/* Plain text as the creator typed it: their line breaks are kept. */
.bio {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.links a {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.links .site {
  color: var(--muted);
  font-weight: 400;
}

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

.tracks li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.tracks li:first-child {
  border-top: 0;
  padding-top: 0;
}

.tracks li > div {
  min-width: 0;
}

.cover {
  display: block;
  flex: none;
  width: 3rem;
  height: 3rem;
  border: 1.5px solid var(--outline);
  border-radius: 0.75rem;
  background: var(--surface);
  object-fit: cover;
}

.title {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.hit {
  display: inline-block;
  margin-inline-start: 0.5rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
  vertical-align: 0.1em;
}

.channel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel-links a,
.channel-list a {
  font-weight: 600;
}

.channel-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The web pages' footer, as src/app/globals.css styles it, less the backing for the ribbons. */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 0 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
}

.footer-links a {
  padding: 0.125rem 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.app-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 1.25rem 0.375rem 0.375rem;
}

.app-link img {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
}
