/* musica.operaria.cl · hoja común
   Canon visual Operaria (canon/canon-visual.md):
   navy pleno de fondo · navy matiz como superficie que sostiene los claros ·
   petrol claro (teal) como bisagra entre el navy y la luz. Tres tipografías. */

:root {
  --navy:        #132649;  /* Flow · navy pleno — el fondo */
  --navy-matiz:  #1D396D;  /* Flow · navy matiz — la superficie */
  --petrol:      #1F5B57;  /* Health · petrol — la bisagra */
  --teal:        #349891;  /* Health · petrol claro — la luz */
  --off-white:   #EDEAE3;  /* claro · texto sobre superficie */
  --crema:       #EBD8C1;  /* claro · secundario */
  --rosa-piel:   #EDC9C0;  /* claro · acento tenue */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  color: var(--off-white);
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* el pulso: de oscuro a brillante */
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(31,91,87,0.42) 0%, rgba(19,38,73,0) 62%),
    var(--navy);
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--rosa-piel); }

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Tipografía ── */
.kicker {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 18px;
}

h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(44px, 11vw, 78px);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0 0 10px;
  color: var(--off-white);
}

.autor {
  font-family: 'Archivo', sans-serif;
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--crema);
  opacity: 0.72;
  margin: 0 0 40px;
}

/* ── El reproductor ── */
.player {
  background: var(--navy-matiz);
  border: 1px solid rgba(52,152,145,0.28);
  border-radius: 4px;
  padding: 26px 24px 22px;
}

.player-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.play {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid var(--teal);
  background: transparent;
  color: var(--off-white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 220ms ease, border-color 220ms ease;
}
.play:hover { background: rgba(52,152,145,0.16); }
.play:focus-visible { outline: 2px solid var(--rosa-piel); outline-offset: 3px; }
.play svg { display: block; }
.play .icon-pause { display: none; }
.player.playing .play .icon-play { display: none; }
.player.playing .play .icon-pause { display: block; }

.bars {
  flex: 1 1 auto;
  height: 62px;
  min-width: 0;
}
.bars canvas { display: block; width: 100%; height: 62px; }

/* ── Progreso ── */
.progress {
  margin-top: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.rail {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(237,234,227,0.18);
}
.fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--teal);
}
.dot {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--off-white);
}

.times {
  display: flex;
  justify-content: space-between;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--crema);
  opacity: 0.62;
  margin-top: 10px;
}

/* ── Lista (portada) ── */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { border-top: 1px solid rgba(237,234,227,0.14); }
.lista li:last-child { border-bottom: 1px solid rgba(237,234,227,0.14); }
.lista a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  color: var(--off-white);
}
.lista a:hover { color: var(--rosa-piel); }
.lista .titulo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 30px;
  font-weight: 300;
}
.lista .meta {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
}

/* ── /indice ── */
.indice-item { padding: 20px 0; border-top: 1px solid rgba(237,234,227,0.14); }
.indice-item:last-child { border-bottom: 1px solid rgba(237,234,227,0.14); }
.indice-item .url {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  word-break: break-all;
}
.indice-item .que {
  font-size: 14px;
  color: var(--crema);
  opacity: 0.7;
  margin-top: 6px;
}

/* ── Pie ── */
footer {
  padding: 56px 24px 40px;
  text-align: center;
}
footer canvas { margin: 0 auto; }
footer .credito {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crema);
  opacity: 0.55;
  margin-top: 6px;
}
footer .credito a { color: inherit; border-bottom: 1px solid rgba(235,216,193,0.3); }
footer .credito a:hover { color: var(--rosa-piel); }

.volver {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 34px;
  display: inline-block;
}

@media (max-width: 560px) {
  .wrap { padding: 48px 20px 0; }
  .player { padding: 20px 18px 18px; }
  .player-top { gap: 14px; }
  .play { width: 54px; height: 54px; }
  .bars, .bars canvas { height: 54px; }
  .lista .titulo { font-size: 25px; }
  .lista a { padding: 18px 2px; }
}
