/* Un campo lleno de estrellas · Año Santo Compostelano 2027
   Paleta tomada de los logotipos oficiales:
   rojo 991620 · negro 1d1d1b · crema fdf9e4 */

:root {
  --rojo: #991620;
  --rojo-oscuro: #74101a;
  --negro: #1d1d1b;
  --crema: #fdf9e4;
  --piedra: #f1ebcd;
  --linea: rgba(29, 29, 27, .16);
  --f-titulo: "Alegreya SC", Georgia, serif;
  --f-texto: "Alegreya", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--negro);
  font-family: var(--f-texto);
  font-size: 1.2rem;
  line-height: 1.65;
}
img, svg, iframe { max-width: 100%; }
a { color: var(--rojo); }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }

.wrap { width: min(1100px, 100% - 2rem); margin-inline: auto; }
.wrap-narrow { width: min(720px, 100% - 2rem); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(29, 29, 27, .94);
  backdrop-filter: blur(6px);
}
.brand img { display: block; height: 2.6rem; width: auto; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; }
.site-header nav a {
  color: var(--crema); text-decoration: none;
  font-family: var(--f-titulo); font-size: 1.05rem; letter-spacing: .04em;
  padding: .2rem 0; border-bottom: 2px solid transparent;
}
.site-header nav a:hover { border-color: var(--rojo); }

.site-lang { display: flex; gap: .25rem; }
.site-lang button {
  font: inherit; font-family: var(--f-titulo); font-size: .9rem; letter-spacing: .06em;
  cursor: pointer; padding: .15rem .45rem; border-radius: 4px;
  background: transparent; color: var(--crema); border: 1px solid rgba(253, 249, 228, .35);
  transition: background .2s, border-color .2s;
}
.site-lang button:hover { border-color: var(--crema); }
.site-lang button[aria-pressed="true"] { background: var(--rojo); border-color: var(--rojo); }

/* ---------- Hero: campo de estrellas ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(88vh, 760px);
  display: grid; place-items: center; text-align: center;
  padding: 5rem 1.25rem;
  color: var(--crema);
  background: radial-gradient(ellipse at 50% 120%, #3a0d12 0%, var(--negro) 62%);
}
.sky {
  position: absolute; inset: 0; z-index: -1; opacity: .9;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 20%, var(--crema) 50%, transparent 52%),
    radial-gradient(1px 1px at 22% 72%, var(--crema) 50%, transparent 52%),
    radial-gradient(2px 2px at 35% 14%, var(--crema) 50%, transparent 52%),
    radial-gradient(1px 1px at 47% 58%, var(--crema) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 61% 28%, var(--crema) 50%, transparent 52%),
    radial-gradient(1px 1px at 72% 82%, var(--crema) 50%, transparent 52%),
    radial-gradient(2px 2px at 84% 18%, var(--crema) 50%, transparent 52%),
    radial-gradient(1px 1px at 93% 55%, var(--crema) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 15% 46%, var(--crema) 50%, transparent 52%),
    radial-gradient(1px 1px at 55% 90%, var(--crema) 50%, transparent 52%);
  background-size: 420px 420px;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }

/* Estrella del logotipo oficial (disco con la estrella de ocho puntas en negativo) */
.star-big {
  position: absolute; z-index: -1; width: min(640px, 110vw); height: auto;
  left: 50%; top: 50%; translate: -50% -50%;
  opacity: .4;
  animation: giro 160s linear infinite;
}
@keyframes giro { to { rotate: 360deg; } }

.hero-inner { max-width: 820px; }
.eyebrow {
  margin: 0 0 1rem; font-family: var(--f-titulo); font-size: 1.05rem;
  letter-spacing: .18em; text-transform: uppercase; color: #e9c8b8;
}
.hero h1 {
  margin: 0; font-family: var(--f-titulo); font-weight: 800;
  font-size: clamp(2.8rem, 9vw, 6rem); line-height: 1.02;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .55);
}
.subtitle { margin: .6rem 0 0; font-style: italic; font-size: 1.5rem; color: #e9c8b8; }
.verse { margin: 1.6rem 0 2rem; font-style: italic; font-size: 1.35rem; }
.verse .ref { font-style: normal; opacity: .7; margin-left: .4rem; white-space: nowrap; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

.btn {
  display: inline-block; padding: .75rem 1.6rem; border-radius: 999px;
  font-family: var(--f-titulo); font-size: 1.1rem; letter-spacing: .04em;
  text-decoration: none; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--rojo); color: var(--crema); border: 2px solid var(--rojo); }
.btn-primary:hover { background: var(--rojo-oscuro); border-color: var(--rojo-oscuro); }
.btn-ghost { color: var(--crema); border: 2px solid var(--crema); }
.btn-ghost:hover { background: var(--crema); color: var(--negro); }

/* ---------- Secciones ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-stone { background: var(--piedra); border-block: 1px solid var(--linea); }
.section-title {
  margin: 0; text-align: center; color: var(--rojo);
  font-family: var(--f-titulo); font-weight: 800; letter-spacing: .03em;
  font-size: clamp(2rem, 5vw, 3rem);
}
.star-divider { display: flex; justify-content: center; margin: .8rem 0 2rem; }
.star-divider img { width: 1.9rem; height: auto; }
.lead { text-align: center; max-width: 40rem; margin: -.6rem auto 2rem; }

/* ---------- Vídeos ---------- */
.video-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.video-card h3 { margin: .9rem 0 .1rem; font-family: var(--f-titulo); font-size: 1.5rem; }
.video-card p { margin: 0; opacity: .8; }
.video-frame {
  aspect-ratio: 16 / 9; background: var(--negro);
  border: 3px solid var(--negro); border-radius: 6px;
  box-shadow: 8px 8px 0 var(--rojo);
}
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Plataformas ---------- */
.platforms {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-rows: 1fr; /* todas las tarjetas con la misma altura */
}
.platforms li { display: flex; }
.platforms a {
  flex: 1; min-height: 4.6rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.4rem; text-decoration: none;
  background: var(--crema); color: var(--negro);
  border: 2px solid var(--negro); border-radius: 6px;
  transition: background .2s, color .2s, border-color .2s;
}
.p-name { font-family: var(--f-titulo); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.p-go { font-size: .95rem; color: var(--rojo); white-space: nowrap; }
.platforms a:hover { background: var(--rojo); border-color: var(--rojo); color: var(--crema); }
.platforms a:hover .p-go { color: var(--crema); }

/* ---------- Letra ---------- */
.lang-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 2rem; }
.lang-switch button {
  font: inherit; font-family: var(--f-titulo); font-size: 1.05rem; cursor: pointer;
  padding: .4rem 1.1rem; border-radius: 999px;
  background: transparent; color: var(--negro); border: 2px solid var(--negro);
  transition: background .2s, color .2s;
}
.lang-switch button:hover { background: var(--piedra); }
.lang-switch button[aria-selected="true"] { background: var(--rojo); border-color: var(--rojo); color: var(--crema); }

.lyrics { text-align: center; padding: 0 .5rem; }
@media (min-width: 900px) {
  #letra .wrap-narrow { width: min(1000px, 100% - 2rem); }
  .lyrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4rem; text-align: left; align-items: start; }
  .lyrics .pending { grid-column: 1 / -1; text-align: center; }
  .lyrics-col + .lyrics-col { border-left: 1px solid var(--linea); padding-left: 4rem; }
}
.lyrics .stanza { margin: 0 0 1.8rem; font-size: 1.3rem; }
.lyrics .stanza.chorus { color: var(--rojo); font-weight: 700; }
.lyrics .stanza.chorus-cont { margin-top: -1rem; }
.lyrics .stanza-label {
  display: block; margin-bottom: .2rem; font-family: var(--f-titulo);
  font-size: .9rem; letter-spacing: .15em; text-transform: uppercase; opacity: .6;
}
.lyrics .pending {
  padding: 1.6rem; border: 2px dashed var(--linea); border-radius: 6px; font-style: italic; opacity: .75;
}

/* ---------- Partituras ---------- */
.scores {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}
.scores a {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem;
  text-decoration: none; color: var(--negro);
  background: var(--crema); border: 2px solid var(--negro); border-radius: 6px;
  transition: transform .2s, box-shadow .2s;
}
.scores a:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--rojo); }
.scores strong { display: block; font-family: var(--f-titulo); font-size: 1.25rem; }
.scores small { font-size: 1rem; opacity: .75; }
.score-note { max-width: 40rem; margin: 1.6rem auto 0; text-align: center; font-size: 1.05rem; opacity: .85; }
.pdf-badge {
  flex: none; display: grid; place-items: center; width: 3.2rem; height: 3.8rem;
  background: var(--rojo); color: var(--crema); border-radius: 4px;
  font-family: var(--f-titulo); font-weight: 800; letter-spacing: .05em;
}

/* ---------- Sobre la canción ---------- */
#sobre p { margin: 0 0 1.2rem; }
.credits { margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.credits dl { margin: 0; display: grid; gap: .8rem; }
.credits dl div { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; }
.credits dt, .credits h3 { font-family: var(--f-titulo); color: var(--rojo); font-weight: 700; }
.credits dd { margin: 0; }
.credits h3 { margin: 1.8rem 0 .8rem; font-size: 1.4rem; }
.musicians {
  list-style: none; margin: 0 0 1.8rem; padding: 0;
  display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.musicians li {
  display: flex; flex-direction: column; padding: .7rem 1rem;
  background: var(--piedra); border-left: 4px solid var(--rojo); border-radius: 0 6px 6px 0;
}
.musicians .who { font-weight: 700; }
.musicians .what { font-style: italic; opacity: .8; line-height: 1.35; }

/* ---------- Pie ---------- */
.site-footer { background: var(--negro); color: var(--crema); text-align: center; padding: 3rem 1rem; }
.footer-logo { height: 3.6rem; width: auto; margin-bottom: 1rem; }
.site-footer p { margin: .2rem 0; }

@media (max-width: 640px) {
  body { font-size: 1.1rem; }
  .site-header { flex-direction: column; padding-block: .6rem; }
  .site-header nav { justify-content: center; gap: .1rem 1rem; }
  .credits dl div { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky, .star-big { animation: none; }
  .btn, .scores a { transition: none; }
}
@media print {
  .site-header, .hero, .video-grid, .platforms { display: none; }
}
