/* latin-ext */
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/4UaSrEBBsBhlBjvfkSLk3abBFkvpkARTPlbgv5qvmSW1rw.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Alegreya';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/4UaSrEBBsBhlBjvfkSLk3abBFkvpkARTPlbgv5qhmSU.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/4UaBrEBBsBhlBjvfkSLvx6jx4w.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/4UaBrEBBsBhlBjvfkSLhx6g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/4UaBrEBBsBhlBjvfkSLvx6jx4w.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/4UaBrEBBsBhlBjvfkSLhx6g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/4UaBrEBBsBhlBjvfkSLvx6jx4w.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Alegreya';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/4UaBrEBBsBhlBjvfkSLhx6g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Alegreya SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/taiTGmRtCJ62-O0HhNEa-ZZc-oU4SKqGFQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Alegreya SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/taiTGmRtCJ62-O0HhNEa-ZZc-oU2SKo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Alegreya SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/taiTGmRtCJ62-O0HhNEa-ZYU_IU4SKqGFQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Alegreya SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/taiTGmRtCJ62-O0HhNEa-ZYU_IU2SKo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Alegreya SC';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/taiTGmRtCJ62-O0HhNEa-ZYI_4U4SKqGFQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Alegreya SC';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/taiTGmRtCJ62-O0HhNEa-ZYI_4U2SKo.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 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; }
.yt-facade { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--negro); cursor: pointer; overflow: hidden; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play {
  position: absolute; top: 50%; left: 50%; width: 4.2rem; height: 4.2rem; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--rojo); box-shadow: 0 0 0 3px var(--negro);
}
.yt-play::after {
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: .8rem 0 .8rem 1.3rem; border-color: transparent transparent transparent #fff;
}
.yt-facade:hover .yt-play, .yt-facade:focus-visible .yt-play { filter: brightness(1.15); }
.yt-facade:focus-visible { outline: 3px solid var(--rojo); outline-offset: -6px; }

/* ---------- Plataformas ---------- */
.platforms {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 1000px) { .platforms { grid-template-columns: repeat(4, 1fr); } } /* 8 plataformas: 4 x 2 */
.site-footer a { color: var(--crema); }
.platform {
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .6rem;
  padding: 1.1rem 1.4rem;
  background: var(--crema); border: 2px solid var(--negro); border-radius: 6px;
}
.p-name { font-family: var(--f-titulo); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.p-links { display: flex; align-items: center; justify-content: center; gap: .5rem; }
.p-go { font-size: .95rem; color: var(--rojo); margin-right: .1rem; }
.p-links a {
  font-family: var(--f-titulo); font-weight: 700; font-size: 1rem; letter-spacing: .06em;
  text-decoration: none; padding: .3rem .8rem; border-radius: 4px;
  color: var(--crema); background: var(--negro); border: 2px solid var(--negro);
  transition: background .2s, border-color .2s;
}
.p-links a:hover { background: var(--rojo); border-color: var(--rojo); }

@media (max-width: 559px) {
  /* móvil: 2 por fila, con "Escuchar" encima de los botones */
  .platforms { gap: .6rem; }
  .platform { padding: .8rem .5rem; gap: .4rem; }
  .p-name { font-size: 1.15rem; }
  .p-links { flex-wrap: wrap; gap: .3rem .5rem; }
  .p-go { flex-basis: 100%; margin: 0; font-size: .9rem; }
  .p-links a { padding: .25rem .7rem; }
}
/* ---------- 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: 1fr;
}
@media (min-width: 560px) { .scores { grid-template-columns: repeat(2, 1fr); } } /* 4 partituras: 2 x 2 */
.follow { margin: 2rem 0 0; text-align: center; }
.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; }

.site-lang-select { display: none; }
.site-lang-select:focus, .site-lang-select:focus-visible { outline: none; }
.site-lang-select { -webkit-tap-highlight-color: transparent; }

@media (max-width: 640px) {
  body { font-size: 1.1rem; }
  /* Cabecera compacta: logo + desplegable de idioma, y el menú en una sola línea con desplazamiento */
  .site-header { flex-wrap: wrap; padding-block: .4rem; gap: .2rem .8rem; }
  .brand img { height: 2.2rem; }
  .site-lang { display: none; }
  .site-lang-select {
    display: block; order: 2; margin-left: auto;
    font: inherit; font-family: var(--f-titulo); font-size: .95rem;
    padding: .25rem .5rem; border-radius: 4px; cursor: pointer;
    background: var(--negro); color: var(--crema); border: 1px solid rgba(253, 249, 228, .45);
  }
  /* 5 enlaces: 3 + 2 en cualquier idioma, en columnas alineadas */
  .site-header nav {
    order: 3; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem 0;
  }
  .site-header nav a { flex: 0 0 33.33%; font-size: 1rem; text-align: center; border-bottom: 0; }
  .site-header nav a:hover { text-decoration: underline; text-decoration-color: var(--rojo); text-underline-offset: 4px; }
  html { scroll-padding-top: 5.5rem; }
  .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; }
}
