/* WORLD RADIO AI — site público (R6.10). Cores inspiradas no logótipo oficial: azul-noite, azul elétrico e violeta.
   Sem tipos de letra externos (CSP «self»): pilha de tipos do sistema. */
:root {
  --bg: #060b1d;
  --bg-2: #0b1430;
  --surface: rgba(18, 30, 66, .72);
  --surface-solid: #111c3e;
  --line: rgba(120, 160, 255, .18);
  --text: #eef2ff;
  --muted: #a3b0d6;
  --blue: #3ea4ff;
  --violet: #9b6bff;
  --cyan: #5ee0ff;
  --ok: #3ddc97;
  --warn: #ffc857;
  --off: #ff7b8a;
  --radius: 16px;
  --grad: linear-gradient(135deg, var(--blue), var(--violet));
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --player-h: 84px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font: 16px/1.55 var(--font); color: var(--text); background: var(--bg);
  background-image: radial-gradient(1200px 600px at 15% -10%, rgba(62, 164, 255, .18), transparent 60%),
                    radial-gradient(900px 500px at 95% 0%, rgba(155, 107, 255, .16), transparent 60%);
  background-attachment: fixed; padding-bottom: calc(var(--player-h) + 24px);
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4.2vw, 3rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
.lead { font-size: 1.12rem; color: #d6ddf5; max-width: 62ch; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--surface-solid); padding: 8px 12px; }

/* Cabeçalho */
.top { position: sticky; top: 0; z-index: 20; background: rgba(6, 11, 29, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: .06em; }
.brand:hover { text-decoration: none; }
.brand-word b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.brand-mark span { width: 4px; border-radius: 2px; background: var(--grad); }
.brand-mark span:nth-child(1) { height: 40%; } .brand-mark span:nth-child(2) { height: 100%; }
.brand-mark span:nth-child(3) { height: 65%; } .brand-mark span:nth-child(4) { height: 85%; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 600; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: rgba(62, 164, 255, .16); }
.ribbon { text-align: center; font-size: .9rem; color: #ffe3a3; background: rgba(255, 200, 87, .08); border-bottom: 1px solid rgba(255, 200, 87, .25); padding: 6px 16px; }

/* Etiquetas */
.tag { display: inline-block; vertical-align: middle; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.tag-rehearsal { color: var(--warn); border-color: rgba(255, 200, 87, .5); }
.tag-demo { color: #ffb3d1; border-color: rgba(255, 140, 190, .5); }
.mode { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.mode::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mode-live { color: var(--ok); } .mode-demo { color: var(--warn); } .mode-off { color: var(--off); }
.pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.pill-active { color: var(--ok); } .pill-draft { color: var(--cyan); } .pill-paused { color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: rgba(62, 164, 255, .12); color: #cfe6ff; border: 1px solid rgba(62, 164, 255, .25); }

/* Destaque */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 40px 0 24px; }
.hero-logo { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(62, 164, 255, .18); }
.hero-type { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; gap: .3em; border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, rgba(62, 164, 255, .35), transparent 60%), var(--bg-2); font-weight: 900; font-size: clamp(1.6rem, 4vw, 2.6rem); letter-spacing: .08em; }
.hero-type b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 20px 0 10px; }
.cta { display: inline-flex; align-items: center; gap: 12px; border: 0; cursor: pointer; font: 700 1.05rem var(--font); color: #fff; padding: 14px 24px; border-radius: 999px; background: var(--grad); box-shadow: 0 10px 30px rgba(110, 120, 255, .35); }
.cta:hover { filter: brightness(1.08); }
.cta:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.play-icon { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; }
[data-state="playing"] .play-icon, [data-state="connecting"] .play-icon, [data-state="buffering"] .play-icon { width: 12px; height: 16px; border: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }

/* Cartões e blocos */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.big { font-size: 1.35rem; font-weight: 700; margin-bottom: .2em; }
.np { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .95rem; }
.np-label { color: var(--muted); }
.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--grad); }
.block { margin: 40px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head { padding: 40px 0 8px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.crumb { margin: 24px 0 0; }

/* Artistas */
.artist-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.artist-chip { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); height: 100%; }
.artist-chip:hover { text-decoration: none; border-color: rgba(62, 164, 255, .5); }
.artist-chip img, .avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: cover; object-position: center 20%; }
.avatar { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; background: var(--grad); }
.artist-chip span { display: flex; flex-direction: column; min-width: 0; }
.artist-chip small { color: var(--muted); font-size: .8rem; }
.artist-grid { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.artist-card a { display: flex; flex-direction: column; height: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.artist-card a:hover { text-decoration: none; border-color: rgba(62, 164, 255, .55); transform: translateY(-2px); transition: transform .15s; }
.artist-img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 15%; background: var(--bg-2); }
.artist-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted);
  background: radial-gradient(circle at 50% 35%, rgba(155, 107, 255, .35), transparent 60%), var(--bg-2); }
.artist-ph span { font-size: 4rem; font-weight: 900; color: rgba(255, 255, 255, .85); }
.artist-ph small { font-size: .8rem; }
.artist-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; }
.artist-name { font-size: 1.15rem; }
.more { margin-top: auto; color: var(--cyan); font-weight: 600; font-size: .9rem; }
.profile { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 36px; margin: 16px 0 40px; align-items: start; }
.profile-media .artist-img { border-radius: 20px; border: 1px solid var(--line); }
.eyebrow { color: var(--violet); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 20px 0 28px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.works { padding-left: 1.2em; }

/* Programação */
.week { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; }
.day h3 { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.slot { display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 8px; background: rgba(255, 255, 255, .03); margin-bottom: 6px; font-size: .9rem; }
.slot-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8rem; }
.slot-now { background: rgba(62, 164, 255, .14); outline: 1px solid rgba(62, 164, 255, .45); }
.live-dot { color: var(--ok); font-weight: 700; font-size: .75rem; text-transform: uppercase; }
.programs { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.program { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.program p { margin: 4px 0 0; font-size: .92rem; }
.program-state { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }

/* Leitor fixo */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(9, 15, 38, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.player-in { display: flex; align-items: center; gap: 16px; min-height: var(--player-h); padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.play { flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; background: var(--grad); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 22px rgba(110, 120, 255, .4); }
.play:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.play .play-icon { margin-left: 3px; }
.player[data-state="playing"] .play .play-icon, .player[data-state="connecting"] .play .play-icon, .player[data-state="buffering"] .play .play-icon { margin-left: 0; }
.player-meta { flex: 1; min-width: 0; }
.cover { flex: none; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.player-program { font-size: .85rem; color: var(--cyan); }
.player-line { display: flex; align-items: center; gap: 12px; margin: 0; flex-wrap: wrap; }
.state { font-size: .85rem; color: var(--muted); }
.player[data-state="playing"] .state { color: var(--ok); }
.player[data-state="error"] .state { color: var(--off); font-weight: 700; }
.player-now { margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.player-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.retry { cursor: pointer; font: 600 .9rem var(--font); color: var(--text); background: rgba(255, 123, 138, .18); border: 1px solid rgba(255, 123, 138, .5); padding: 8px 14px; border-radius: 999px; }
.mute { cursor: pointer; background: transparent; border: 1px solid var(--line); color: var(--text); width: 40px; height: 40px; border-radius: 50%; }
.mute[aria-pressed="true"] { opacity: .5; }
.vol input { width: 120px; accent-color: var(--blue); }
.player[data-state="connecting"] .play, .player[data-state="buffering"] .play { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(62, 164, 255, 0); filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Rodapé */
.foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0; font-size: .9rem; }
.foot p { margin: 0 0 6px; }

/* Responsivo */
@media (max-width: 1000px) {
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .artist-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 20px; gap: 20px; }
  .cards { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
  .profile-media { max-width: 420px; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-compact .day:nth-child(n+5) { display: none; }
  .artist-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  :root { --player-h: 76px; }
  body { font-size: 15px; }
  .top-in { min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
  .nav a { padding: 6px 10px; }
  .week { grid-template-columns: 1fr; }
  .week-compact .day:nth-child(n+3) { display: none; }
  .artist-strip { grid-template-columns: 1fr; }
  .vol { display: none; }                       /* telemóveis: volume pelos botões do aparelho */
  /* R6.10-B: o texto do leitor ocupa até 2 linhas (sem cortar o aviso de demonstração) e o fim da página reserva a
     altura real do leitor (a etiqueta do modo pode ocupar 2 linhas), para nunca tapar o rodapé. */
  body { padding-bottom: calc(var(--player-h) + 72px + env(safe-area-inset-bottom)); }
  .player-now { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .88rem; line-height: 1.35; }
  .mode { font-size: .72rem; }
  .player-in { gap: 12px; }
  .play { width: 48px; height: 48px; }
  .program { flex-direction: column; }
  .program-state { align-items: flex-start; text-align: left; }
  .facts { grid-template-columns: 1fr; gap: 4px; }
  .facts dd { margin-bottom: 10px; }
}
