/* Estilos base de la página del álbum.
   El reproductor usa el prefijo .ap- para no chocar con el CSS que exportes desde pen.dev. */

:root {
  --paper: #e9e6df;
  --ink: #1b281b;
  --muted: #6d7569;
  --accent: #98134e;
  --line: rgba(27, 40, 27, 0.14);
  --surface: rgba(255, 255, 255, 0.58);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.85), transparent 62%),
    linear-gradient(135deg, #efeee9 0%, #dfded8 100%);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input { font: inherit; }

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

.site {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px) 80px;
}

.site--player {
  width: min(940px, 100%);
  padding-top: clamp(24px, 6vw, 72px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand span { color: var(--accent); }

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav a:hover { color: var(--ink); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 90px);
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 9vw, 132px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--accent);
  font-style: italic;
}

.lede {
  margin: 28px 0 0;
  max-width: 46ch;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.65;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #f7f5ef;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.button:hover { transform: translateY(-2px); background: var(--accent); border-color: var(--accent); }

.button--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button--ghost:hover { background: rgba(255, 255, 255, 0.6); color: var(--ink); border-color: var(--ink); }

.button.is-disabled { opacity: 0.48; cursor: not-allowed; transform: none; }

.hero__art {
  position: relative;
  margin: 0;
}

.hero__art img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper);
  box-shadow: 0 32px 70px -40px rgba(27, 40, 27, 0.55);
}

.hero__art::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--line);
  z-index: -1;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Reproductor */

.ap-player {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.ap-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  background: var(--paper);
}

.ap-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ap-meta { min-width: 0; }

.ap-track {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.ap-artist {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.ap-progress { margin-top: auto; padding-top: 34px; }

.ap-seek {
  --progress: 0%;
  --buffered: 0%;
  display: block;
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.ap-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--accent) 0 var(--progress),
    rgba(27, 40, 27, 0.22) var(--progress) var(--buffered),
    rgba(27, 40, 27, 0.12) var(--buffered) 100%
  );
}

.ap-seek::-moz-range-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(27, 40, 27, 0.12);
}

.ap-seek::-moz-range-progress { height: 3px; border-radius: 99px; background: var(--accent); }

.ap-seek::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.65);
}

.ap-seek::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
}

.ap-times {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ap-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 22px;
}

.ap-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ap-icon-button:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.75); transform: translateY(-1px); }
.ap-icon-button svg { width: 19px; height: 19px; }

.ap-play {
  width: 62px;
  height: 62px;
  border-color: var(--ink);
  background: var(--ink);
  color: #f7f5ef;
}

.ap-play:hover { background: var(--accent); border-color: var(--accent); }
.ap-play svg { width: 24px; height: 24px; }

.ap-volume {
  width: 88px;
  height: 20px;
  margin-left: auto;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.ap-volume::-webkit-slider-runnable-track { height: 2px; border-radius: 99px; background: rgba(27, 40, 27, 0.2); }
.ap-volume::-moz-range-track { height: 2px; border-radius: 99px; background: rgba(27, 40, 27, 0.2); }
.ap-volume::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--ink);
}
.ap-volume::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--ink); }

.ap-status {
  min-height: 18px;
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.ap-status[data-state="error"] { color: var(--accent); }
.ap-status[data-state="success"] { color: #2f6b3b; }

.ap-preview-note {
  display: none;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.is-preview .ap-preview-note { display: block; }

/* Lista de temas */

.tracklist {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.track { border-bottom: 1px solid var(--line); }

.track__button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.track__button:hover { background: rgba(255, 255, 255, 0.5); }
.track.is-active .track__button { color: var(--accent); }

.track__number {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.track.is-active .track__number { color: var(--accent); }

.track__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: -0.015em;
}

.track__duration {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* Apoyo / Polar */

.support {
  margin-top: clamp(64px, 9vw, 110px);
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(152, 19, 78, 0.055);
  text-align: center;
}

.support h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 62px);
  font-weight: 400;
  letter-spacing: -0.04em;
}

.support p {
  margin: 18px auto 0;
  max-width: 52ch;
  line-height: 1.7;
  color: var(--muted);
}

.support__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.amount-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.amount-field span { font-size: 13px; color: var(--muted); }

.amount-field input {
  width: 62px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  text-align: center;
  outline: none;
}

.support small {
  display: block;
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero__art { order: -1; max-width: 420px; }
  .ap-player { grid-template-columns: 1fr; }
  .ap-cover { max-width: 320px; }
  .ap-progress { padding-top: 26px; }
}

@media (max-width: 520px) {
  .nav { gap: 14px; font-size: 10px; }
  .hero h1 { font-size: clamp(52px, 15vw, 84px); }
  .ap-volume { width: 64px; }
  .track__button { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
