/* ============================================================
   PRÓKOPO · ESTILOS PRINCIPALES
   Aquí se modifican colores, fondos, transparencias y distribución.
   Las rutas de las tres imágenes de fondo están en la sección 03.
   ============================================================ */

/* 01. VARIABLES GENERALES Y PALETA DEL TEMA NOCHE */
:root {
  color-scheme: dark;
  --ink: #090b0d;
  --paper: #f4f1eb;
  --muted: rgba(244, 241, 235, .72);
  --line: rgba(255, 255, 255, .18);
  --glass: rgba(15, 18, 19, .48);
  --accent: #c7b397;
  /* Escala tipográfica general: subí este valor si necesitás letras aún mayores. */
  --type-scale: 1.30;
  /* Ancho compartido: apenas más amplio que la primera versión de 960px. */
  --content: 1120px;
  --gutter: 32px;
  /* Espacio interior de los paneles y separación entre secciones. */
  --panel-padding: clamp(26px, 3vw, 36px);
  --section-gap: 30px;
  /* TAMAÑO DE PORTADAS: ajustá el máximo (140px) para hacerlas más grandes o pequeñas.
     El valor se adapta automáticamente en pantallas más angostas. */
  --cover-size: clamp(88px, 14vw, 140px);
  --blur: 14px;
  --shadow: 0 14px 38px rgba(0, 0, 0, .22);
  --overlay: linear-gradient(150deg, rgba(42, 50, 48, .55), rgba(8, 11, 12, .88) 78%);
}

/* 02. COLORES DEL TEMA ATARDECER */
html[data-theme="sunset"] {
  color-scheme: dark;
  --ink: #211817;
  --paper: #fff1e7;
  --muted: rgba(255, 241, 231, .74);
  --line: rgba(255, 224, 204, .2);
  --glass: rgba(53, 32, 29, .52);
  --accent: #e6ad8b;
  --overlay: linear-gradient(145deg, rgba(104, 57, 47, .56), rgba(24, 17, 19, .9) 78%);
}

/* 03. COLORES DEL TEMA DÍA */
html[data-theme="day"] {
  color-scheme: light;
  --ink: #e9e6df;
  --paper: #262725;
  --muted: rgba(38, 39, 37, .73);
  --line: rgba(48, 43, 35, .17);
  --glass: rgba(255, 255, 255, .58);
  --accent: #8c704d;
  --shadow: 0 14px 38px rgba(48, 39, 29, .12);
  --overlay: linear-gradient(145deg, rgba(237, 233, 224, .68), rgba(225, 220, 210, .84) 78%);
}

/* 04. FONDOS: CAMBIÁ ESTAS TRES RUTAS POR TUS IMÁGENES.
   Noche conserva la ruta original Fondo.jpg.
   Atardecer usa Fondo-atardecer.jpg.
   Día usa Fondo-dia.jpg.
   Guardá los tres archivos dentro de la carpeta assets/. */
.background-image--night {
  background-image: url("assets/Fondo.jpg");
}
.background-image--sunset {
  background-image: url("assets/Fondo-atardecer.jpg");
}
.background-image--day {
  background-image: url("assets/Fondo-dia.jpg");
}

/* 05. RESETEO Y REGLAS GENERALES */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  /* Mantiene el espacio reservado para que los modales no provoquen saltos laterales. */
  scrollbar-gutter: stable;

  /* Scrollbar discreta: pista transparente y un pequeño indicador redondeado. */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 52%, transparent) transparent;
}

/* Chrome, Edge y Safari: indicador fino tipo píldora, sin fondo de pista. */
html::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

html::-webkit-scrollbar-track,
html::-webkit-scrollbar-corner {
  background: transparent;
}

html::-webkit-scrollbar-thumb {
  min-height: 38px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 58%, transparent);
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  background-clip: padding-box;
}

/* La restauración técnica de la posición debe ser instantánea, no animada. */
html.is-restoring-scroll {
  scroll-behavior: auto !important;
}

body {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  /* clip evita crear un segundo contenedor de scroll en el body. */
  overflow-x: clip;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.65 "Manrope", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

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

::selection {
  color: var(--ink);
  background: var(--accent);
}

[hidden] {
  display: none !important;
}

/* ANCLA DE INICIO: destino exacto de los enlaces del logotipo y del footer.
   Es invisible y no ocupa espacio en el diseño. */
.page-top-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  scroll-margin-top: 0;
  pointer-events: none;
}

/* 06. FONDO CON TRES CAPAS: la opacidad cambia según data-theme.
   La transición permite que una imagen se desvanezca y aparezca la otra. */
.site-background {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--ink);
}

.background-image {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.015);
  transition: opacity .8s ease, transform 1.2s ease;
}

html[data-theme="night"] .background-image--night,
html[data-theme="sunset"] .background-image--sunset,
html[data-theme="day"] .background-image--day {
  opacity: 1;
  transform: scale(1);
}

/* Velo de color y textura fina por encima de las imágenes. */
.site-background::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    var(--overlay),
    radial-gradient(rgba(255, 255, 255, .16) .5px, transparent .6px);
  background-size: auto, 5px 5px;
  opacity: 1;
}

/* 07. SUPERFICIE GLASSMORPHISM REUTILIZABLE */
.glass {
  border: 1px solid var(--line);
  border-top-color: color-mix(in srgb, var(--line), white 28%);
  background: var(--glass);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(125%);
  backdrop-filter: blur(var(--blur)) saturate(125%);
}

/* 08. CABECERA Y ANCHO GENERAL.
   Los bloques comparten 1120px como máximo: un poco más que la versión inicial,
   pero con aire visible a ambos lados de la página. */
.topbar,
.intro-wrap,
.content-section,
.footer {
  width: min(var(--content), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  margin-top: 20px;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  justify-self: start;
  font: 500 16px "Montserrat", sans-serif;
  letter-spacing: .17em;
}

.wordmark span,
.footer-mail span {
  color: var(--accent);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 34px);
}

.top-nav a,
.theme-toggle {
  color: var(--muted);
  font-size: calc(12px * var(--type-scale));
  letter-spacing: .08em;
  text-transform: uppercase;
}

.top-nav a,
.footer-bottom a {
  transition: color .2s ease;
}

.top-nav a:hover,
.footer-bottom a:hover {
  color: var(--paper);
}

/* 09. BOTÓN DE TRES TEMAS.
   El círculo, el brillo y el icono tienen transiciones independientes.
   Los IDs internos son actualizados por script.js. */
.theme-toggle {
  position: relative;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 150px;
  min-height: 44px;
  padding: 4px 12px 4px 49px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--glass);
  box-shadow: 0 7px 20px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  transition: transform .25s ease, border-color .3s ease, background .35s ease, box-shadow .3s ease;
}

/* Disco de color que funciona como indicador animado. */
.theme-toggle::before {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 84%), 0 0 18px color-mix(in srgb, var(--accent), transparent 42%);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), background .35s ease, box-shadow .35s ease;
}

.theme-toggle-indicator {
  position: absolute;
  z-index: 1;
  top: 4px;
  left: 4px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  pointer-events: none;
}

.theme-toggle-indicator span {
  display: block;
  color: #1c1b19;
  font-size: calc(18px * var(--type-scale));
  line-height: 1;
  transform-origin: center;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1), color .3s ease;
}

.theme-toggle-label {
  position: relative;
  min-width: 67px;
  text-align: left;
  transition: color .3s ease, letter-spacing .3s ease;
}

.theme-toggle-hint {
  position: relative;
  margin-left: auto;
  color: var(--accent);
  font-size: calc(16px * var(--type-scale));
  transition: transform .45s ease, color .3s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .2), 0 0 18px color-mix(in srgb, var(--accent), transparent 82%);
}

.theme-toggle:hover .theme-toggle-hint {
  transform: rotate(90deg);
}

.theme-toggle:active {
  transform: scale(.96);
}

/* Cada cambio de tema hace girar el símbolo y da un pequeño pulso al disco. */
html[data-theme="sunset"] .theme-toggle-indicator span {
  transform: rotate(180deg) scale(1.12);
}

html[data-theme="day"] .theme-toggle-indicator span {
  transform: rotate(360deg) scale(1.08);
}

html[data-theme="sunset"] .theme-toggle::before {
  transform: scale(1.08);
}

html[data-theme="day"] .theme-toggle::before {
  transform: scale(.94);
}

html[data-theme="sunset"] .theme-toggle-hint,
html[data-theme="day"] .theme-toggle-hint {
  transform: rotate(180deg);
}

/* 10. PRESENTACIÓN DEL ARTISTA */
.intro-wrap {
  margin-top: clamp(28px, 4vw, 48px);
  margin-bottom: var(--section-gap);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(52px, 6.5vw, 82px);
  padding: var(--panel-padding);
  border-radius: 24px;
}

.portrait-frame {
  width: 100%;
  max-width: 290px;
  aspect-ratio: 1;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  box-shadow: var(--shadow);
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.84);
}

.artist-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding-left: clamp(12px, 1.8vw, 24px);
}

.artist-kicker,
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: calc(10px * var(--type-scale));
  font-weight: 700;
  letter-spacing: .18em;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

.artist-side h1 {
  margin: 0;
  font-size: clamp(calc(40px * var(--type-scale)), 5vw, calc(56px * var(--type-scale)));
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.055em;
}

h1 em,
h2 em {
  color: var(--accent);
  font-style: normal;
}

.artist-subtitle {
  max-width: 470px;
  margin: 12px 0 21px;
  color: var(--muted);
  font-size: calc(15px * var(--type-scale));
}

.social-row {
  display: flex;
  gap: 16px;
}

.social-row a {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  transition: transform .2s ease, background .2s ease;
}

.social-row a:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .16);
}

.social-row img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.intro-divider {
  width: min(100%, 460px);
  height: 1px;
  margin: 23px 0 15px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.menu-note {
  margin: 0;
  color: var(--muted);
  font-size: calc(9px * var(--type-scale));
  font-weight: 600;
  letter-spacing: .16em;
}

/* 11. TÍTULOS DE SECCIÓN Y CATÁLOGO */
.content-section {
  margin-bottom: var(--section-gap);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading .eyebrow {
  margin-bottom: 6px;
}

h2 {
  margin: 0;
  font-size: clamp(calc(30px * var(--type-scale)), 3.8vw, calc(38px * var(--type-scale)));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.05em;
}

.section-index {
  padding-bottom: 5px;
  color: var(--muted);
  font-size: calc(10px * var(--type-scale));
  letter-spacing: .14em;
}

/* 12. CARRUSEL DE CANCIONES.
   Se muestra una tarjeta centrada por vez. Las flechas laterales recorren
   CONFIG.tracks; al sumar canciones no hace falta cambiar el HTML ni el CSS. */
.catalog-carousel {
  position: relative;
  width: 100%;
}

.catalog-viewport,
.catalog-grid {
  min-width: 0;
  width: 100%;
}

.catalog-grid > .music-card {
  width: 100%;
  min-width: 0;
}

/* Las flechas quedan fuera del flujo: la tarjeta conserva el ancho completo
   de las demás secciones. En pantallas angostas se acercan al borde visible. */
.carousel-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0 0 4px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  color: var(--paper);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  font-size: calc(38px * var(--type-scale));
  line-height: 1;
  touch-action: manipulation;
  transform: translateY(-50%);
  transition: transform .22s ease, border-color .22s ease, background .22s ease, opacity .22s ease;
}

.carousel-arrow--previous { left: -58px; }
.carousel-arrow--next { right: -58px; }

.carousel-arrow:hover:not(:disabled) {
  transform: translateY(-50%) scale(1.07);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--glass), var(--accent) 12%);
}

.carousel-arrow:active:not(:disabled) {
  transform: translateY(-50%) scale(.94);
}

.carousel-arrow:disabled {
  opacity: .32;
  cursor: not-allowed;
}

.carousel-position {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: calc(10px * var(--type-scale));
  font-variant-numeric: tabular-nums;
  letter-spacing: .16em;
  text-align: center;
}

/* Entrada discreta al cambiar de canción, con movimiento según la flecha usada. */
.music-card.carousel-enter {
  animation: catalog-slide-in .34s cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes catalog-slide-in {
  from {
    opacity: 0;
    transform: translateX(var(--carousel-offset, 16px)) scale(.995);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* 13. TARJETA MUSICAL Y DATOS DE LA CANCIÓN */
.music-card {
  min-width: 0;
  padding: var(--panel-padding);
  border-radius: 20px;
}

/* La columna y la imagen usan exactamente la misma variable para evitar estiramientos. */
.track-top {
  display: grid;
  grid-template-columns: var(--cover-size) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
}

.cover {
  display: block;
  width: var(--cover-size);
  height: var(--cover-size); /* Fuerza una caja cuadrada aunque la imagen original sea rectangular. */
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  object-fit: cover; /* Recorta el excedente sin deformar la portada. */
  object-position: center;
  box-shadow: var(--shadow);
}

.track-details {
  min-width: 0;
}

.track-details .eyebrow {
  margin-bottom: 7px;
  font-size: calc(9px * var(--type-scale));
}

.track-details h3 {
  margin: 0 0 5px;
  font-size: clamp(calc(20px * var(--type-scale)), 2.3vw, calc(26px * var(--type-scale)));
  font-weight: 600;
  line-height: 1.3;
}

.track-details > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: calc(13px * var(--type-scale));
}

.free-tag {
  display: block;
  margin-top: 9px;
  color: var(--accent);
  font-size: calc(9px * var(--type-scale));
  font-weight: 700;
  letter-spacing: .11em;
}

.track-number {
  align-self: start;
  color: var(--muted);
  font-size: calc(11px * var(--type-scale));
  letter-spacing: .1em;
}

/* 14. REPRODUCTOR DE MUESTRAS DE AUDIO */
audio {
  display: none;
}

.player {
  margin-top: 25px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.timeline {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: calc(10px * var(--type-scale));
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.timeline input[type="range"] {
  height: 5px;
}

/* Barra de progreso personalizada: el valor se actualiza con requestAnimationFrame
   desde script.js para que el cabezal avance de forma continua. */
.seek-input {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--waveform-color, var(--accent)) 0%,
    var(--waveform-color, var(--accent)) var(--progress, 0%),
    color-mix(in srgb, var(--paper), transparent 82%) var(--progress, 0%),
    color-mix(in srgb, var(--paper), transparent 82%) 100%
  );
  cursor: pointer;
}

.seek-input::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border: 2px solid var(--waveform-color, var(--accent));
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 8px rgba(0, 0, 0, .24);
}

.seek-input::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid var(--waveform-color, var(--accent));
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 8px rgba(0, 0, 0, .24);
}

.seek-input::-moz-range-track {
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}


.player-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.transport {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  transition: transform .2s ease, background .2s ease;
  background: var(--accent);
  color: #171717;
  font-size: calc(16px * var(--type-scale));
}

.play-button:hover:not(:disabled) {
  transform: scale(1.05);
}

/* El botón cambia sutilmente de aspecto mientras la muestra está reproduciéndose. */
.play-button[aria-pressed="true"] {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 78%);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: calc(9px * var(--type-scale));
  letter-spacing: .12em;
  white-space: nowrap;
}

.volume-control input[type="range"] {
  width: 100px;
}

.player-note {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: calc(10px * var(--type-scale));
}

/* 15. COMPRA DE LA DESCARGA */
.download-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.download-title {
  margin: 0 0 4px;
  font-size: calc(14px * var(--type-scale));
  font-weight: 700;
}

.download-copy {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: calc(11px * var(--type-scale));
}

.buy-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.track-price {
  color: var(--accent);
  font-size: calc(15px * var(--type-scale));
  white-space: nowrap;
}

.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  color: var(--paper);
  font-size: calc(11px * var(--type-scale));
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.glass-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, .16);
}

.glass-button > span:last-child {
  color: var(--accent);
  font-size: calc(17px * var(--type-scale));
}

.glass-button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

/* 16. APOYO VOLUNTARIO Y SECCIÓN SOBRE MÍ */
.about-panel,
.support-panel {
  padding: var(--panel-padding);
  border-radius: 20px;
  text-align: center;
}

.about-panel .eyebrow,
.support-panel .eyebrow {
  margin-bottom: 8px;
}

.section-copy {
  max-width: 700px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: calc(12px * var(--type-scale));
  line-height: 1.9;
}

/* Texto personal: permite una presentación larga sin quedar comprimida. */
.about-copy {
  max-width: 820px;
  margin-top: 22px;
  line-height: 2;
  text-wrap: pretty;
}

.about-copy + .about-copy {
  margin-top: 14px;
}

.support-button {
  margin-top: 20px;
}

/* 17. PIE DE PÁGINA Y CONTACTO */
.footer {
  margin-bottom: 16px;
  padding: var(--panel-padding) clamp(24px, 3vw, 36px) 20px;
  border-radius: 20px;
  text-align: center;
}

.footer .eyebrow {
  margin-bottom: 8px;
}

.footer h2 {
  font-size: clamp(calc(28px * var(--type-scale)), 3.5vw, calc(36px * var(--type-scale)));
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin: 20px 0 27px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 255, 255, .07);
  font-size: calc(11px * var(--type-scale));
}

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: calc(9px * var(--type-scale));
  letter-spacing: .07em;
}

.footer-bottom > span:first-child {
  justify-self: start;
}

.footer-credit {
  justify-self: center;
  text-align: center;
}

.footer-bottom > a {
  justify-self: end;
}

/* 18. TABLETS: reduce márgenes y ajusta la cabecera. */
@media (max-width: 1240px) {
  .carousel-arrow--previous { left: -30px; }
  .carousel-arrow--next { right: -30px; }
}

@media (max-width: 720px) {
  :root {
    --gutter: 24px;
  }

  .carousel-arrow--previous { left: -22px; }
  .carousel-arrow--next { right: -22px; }

  .topbar {
    grid-template-columns: 1fr auto;
    row-gap: 12px;
    margin-top: 15px;
  }

  .top-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: wrap;
    gap: 9px 22px;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .intro-wrap {
    margin-bottom: var(--section-gap);
  }

  .intro-panel {
    grid-template-columns: minmax(170px, 230px) minmax(0, 1fr);
    gap: 34px;
    padding: 30px;
  }

  .portrait-frame {
    max-width: 230px;
  }

  .artist-side {
    padding-left: 10px;
  }

  .track-top {
    grid-template-columns: var(--cover-size) minmax(0, 1fr) auto;
    gap: 15px;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    text-align: center;
  }

  .footer-bottom > span:first-child,
  .footer-credit,
  .footer-bottom > a {
    justify-self: center;
  }
}

/* 19. CELULARES: una columna y márgenes más estrechos. */
@media (max-width: 600px) {
  :root {
    --gutter: 17px;
  }

  .theme-toggle {
    min-width: 137px;
    min-height: 41px;
    padding-left: 46px;
    font-size: calc(10px * var(--type-scale));
  }

  .theme-toggle::before,
  .theme-toggle-indicator {
    top: 3px;
    left: 3px;
    width: 33px;
    height: 33px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
    padding-bottom: 3px;
    font-size: calc(30px * var(--type-scale));
  }

  .carousel-arrow--previous { left: -15px; }
  .carousel-arrow--next { right: -15px; }

  :root {
    --cover-size: clamp(64px, 20vw, 82px);
  }

  .content-section {
    margin-bottom: 28px;
  }

  .intro-wrap {
    margin-bottom: 28px;
  }

  .wordmark {
    font-size: calc(14px * var(--type-scale));
  }

  .top-nav a {
    font-size: calc(10px * var(--type-scale));
  }

  .intro-panel {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 22px 17px;
  }

  .portrait-frame {
    max-width: 110px;
    border-radius: 14px;
  }

  .artist-side {
    padding-left: 4px;
  }

  .artist-kicker {
    font-size: calc(9px * var(--type-scale));
    letter-spacing: .1em;
  }

  .artist-side h1 {
    font-size: clamp(calc(30px * var(--type-scale)), 8vw, calc(39px * var(--type-scale)));
  }

  .artist-subtitle {
    margin: 8px 0 13px;
    font-size: calc(12px * var(--type-scale));
    line-height: 1.5;
  }

  .social-row {
    gap: 8px;
  }

  .social-row a {
    width: 44px;
    height: 44px;
  }

  .social-row img {
    width: 26px;
    height: 26px;
  }

  .intro-divider {
    margin: 14px 0 10px;
  }

  .menu-note {
    font-size: calc(9px * var(--type-scale));
    letter-spacing: .08em;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .section-index {
    padding: 0;
  }

  .music-card {
    padding: 18px 14px;
  }

  .track-top {
    grid-template-columns: var(--cover-size) minmax(0, 1fr);
    gap: 13px;
  }

  .track-details h3 {
    font-size: calc(18px * var(--type-scale));
  }

  .track-details > p:not(.eyebrow) {
    font-size: calc(11px * var(--type-scale));
  }

  .free-tag {
    margin-top: 12px;
    font-size: calc(9px * var(--type-scale));
  }

  .track-number {
    display: none;
  }

  .player-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .play-button {
    width: 47px;
    height: 47px;
  }

  .volume-control {
    width: 100%;
    justify-content: space-between;
  }

  .volume-control input[type="range"] {
    width: 76%;
  }

  .download-strip {
    align-items: stretch;
    flex-direction: column;
    gap: 13px;
  }

  .buy-area {
    justify-content: space-between;
  }

  .glass-button {
    min-height: 43px;
  }

  .about-panel,
  .support-panel {
    padding: 26px 22px;
  }

  .section-copy {
    font-size: calc(12px * var(--type-scale));
  }

  .about-copy {
    line-height: 1.85;
  }

  .footer {
    padding: 29px 20px 18px;
  }
}

/* 20. TELÉFONOS ANGOSTOS: evita que la presentación se desborde. */
@media (max-width: 360px) {
  :root {
    --gutter: 12px;
    --cover-size: 64px;
  }

  .carousel-arrow {
    width: 32px;
    height: 32px;
    font-size: calc(27px * var(--type-scale));
  }

  .carousel-arrow--previous { left: -10px; }
  .carousel-arrow--next { right: -10px; }

  .intro-panel {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 13px;
    padding: 16px 11px;
  }

  .portrait-frame {
    max-width: 92px;
  }

  .artist-side {
    padding-left: 2px;
  }

  .artist-side h1 {
    font-size: calc(28px * var(--type-scale));
  }

  .social-row {
    gap: 6px;
  }

  .social-row a {
    width: 40px;
    height: 40px;
  }

  .social-row img {
    width: 23px;
    height: 23px;
  }

  .track-top {
    grid-template-columns: var(--cover-size) minmax(0, 1fr);
    gap: 10px;
  }

  .track-details h3 {
    font-size: calc(16px * var(--type-scale));
  }

  .buy-area {
    align-items: stretch;
    flex-direction: column;
  }
}

/* 21. ACCESIBILIDAD: respeta la preferencia del sistema por menos animaciones. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ========================================================================== 
   22. EXPERIENCIA DINÁMICA · WAVEFORM, ATMÓSFERA Y MICROINTERACCIONES
   Estas reglas complementan el diseño base sin cambiar los tres temas ni
   el ancho general de la página.
   ========================================================================== */

/* Permite interpolar suavemente el color ambiental entre portadas. */
@property --song-glow {
  syntax: "<color>";
  inherits: true;
  initial-value: hsla(34, 32%, 62%, .22);
}

:root {
  --song-glow: hsla(34, 32%, 62%, .22);
  transition: --song-glow 1.2s ease;
}

/* 22.1. Brillo ambiental tomado del color dominante de la portada activa. */
.site-background .background-image {
  z-index: 0;
}

.site-background::before {
  position: absolute;
  z-index: 1;
  inset: -12%;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 24%, var(--song-glow), transparent 42%),
    radial-gradient(ellipse at 82% 72%, color-mix(in srgb, var(--song-glow), transparent 38%), transparent 46%);
  opacity: .9;
  filter: blur(18px);
  transition: opacity .8s ease;
}

.site-background::after {
  z-index: 2;
}

/* 22.2. La frase principal cambia con un desvanecimiento pequeño y elegante. */
.artist-subtitle#rotating-phrase {
  min-height: 3.2em;
  transition: opacity .32s ease, transform .32s ease;
}

#rotating-phrase.is-changing {
  opacity: 0;
  transform: translateY(5px);
}

/* 22.4. Onda de reproducción: el relleno avanza sobre una forma de onda estilizada. */
.waveform-control {
  position: relative;
  width: 100%;
  height: 38px;
  min-width: 0;
  border-radius: 9px;
  --progress: 0%;
  --waveform-color: var(--accent);
  transition: filter .2s ease;
}

.waveform-control:focus-within {
  outline: 2px solid color-mix(in srgb, var(--waveform-color, var(--accent)), transparent 28%);
  outline-offset: 4px;
}

.waveform-bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  overflow: hidden;
  pointer-events: none;
}

.waveform-bars span {
  display: block;
  flex: 1 1 0;
  min-width: 1px;
  max-width: 6px;
  height: var(--bar-height, 28%);
  border-radius: 99px;
  background: color-mix(in srgb, var(--waveform-color), transparent 76%);
  transition: background-color .2s ease;
}

.waveform-bars--played {
  -webkit-clip-path: inset(0 calc(100% - var(--progress)) 0 0);
  clip-path: inset(0 calc(100% - var(--progress)) 0 0);
}

.waveform-bars--played span {
  background: var(--waveform-color);
  box-shadow: 0 0 7px color-mix(in srgb, var(--waveform-color), transparent 56%);
}

.timeline .seek-input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.seek-input::-webkit-slider-runnable-track {
  height: 38px;
  background: transparent;
}

.seek-input::-moz-range-track {
  height: 38px;
  border: 0;
  background: transparent;
}

.seek-input::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: 12px;
  border: 2px solid var(--waveform-color, var(--accent));
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--waveform-color, var(--accent)), transparent 78%), 0 1px 8px rgba(0, 0, 0, .28);
}

.seek-input::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 2px solid var(--waveform-color, var(--accent));
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--waveform-color, var(--accent)), transparent 78%), 0 1px 8px rgba(0, 0, 0, .28);
}

/* 22.5. Botón para abrir la historia individual de cada canción. */
.story-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 13px 0 9px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent), transparent 55%);
  background: transparent;
  color: var(--muted);
  font-size: calc(10px * var(--type-scale));
  letter-spacing: .035em;
  text-align: left;
  transition: color .22s ease, border-color .22s ease, gap .22s ease;
}

.story-button span {
  color: var(--accent);
  transition: transform .22s ease;
}

.story-button:hover {
  gap: 12px;
  border-color: var(--accent);
  color: var(--paper);
}

.story-button:hover span {
  transform: translate(2px, -2px);
}

/* 22.6. Modal de historia: entrada y salida suaves de 1,4 segundos. */
.story-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 34px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 1.4s cubic-bezier(.2, .75, .25, 1),
    visibility 1.4s ease;
}

.story-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.story-modal.is-closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.story-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(11, 14, 17, .44);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  cursor: default;
}

.story-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(920px, 100%);
  min-height: min(580px, 78vh);
  max-height: min(820px, calc(100dvh - 48px));
  flex-direction: column;
  justify-content: center;
  overflow: auto;
  /* El modal usa el mismo indicador fino y transparente que la página. */
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 52%, transparent) transparent;
  padding: clamp(34px, 7vw, 82px);
  border: 1px solid color-mix(in srgb, var(--line), white 28%);
  border-radius: 28px;
  background: color-mix(in srgb, var(--glass), white 18%);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
  backdrop-filter: blur(26px) saturate(145%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255, 255, 255, .22);
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition:
    opacity 1.4s cubic-bezier(.2, .75, .25, 1),
    transform 1.4s cubic-bezier(.2, .75, .25, 1);
}

.story-modal.is-visible .story-modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.story-modal.is-closing .story-modal-panel {
  opacity: 0;
  transform: translateY(12px) scale(.985);
}

.story-modal-panel::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.story-modal-panel::-webkit-scrollbar-track,
.story-modal-panel::-webkit-scrollbar-corner {
  background: transparent;
}

.story-modal-panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 58%, transparent);
  background-clip: padding-box;
}

.story-modal-close {
  position: absolute;
  top: 17px;
  right: 21px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--paper);
  font-size: calc(27px * var(--type-scale));
  line-height: 1;
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.story-modal-close:hover {
  transform: rotate(90deg);
  border-color: var(--accent);
  background: rgba(255, 255, 255, .14);
}

.story-modal-meta {
  margin: 2px 0 17px;
  color: var(--muted);
  font-size: calc(9px * var(--type-scale));
  letter-spacing: .17em;
}

.story-modal-panel h2 {
  max-width: 720px;
  margin-inline: auto;
  font-size: clamp(calc(32px * var(--type-scale)), 5vw, calc(52px * var(--type-scale)));
}

.story-modal-rule {
  width: min(180px, 45%);
  height: 1px;
  margin: 28px auto;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.story-modal-copy {
  max-width: 660px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(calc(14px * var(--type-scale)), 1.7vw, calc(17px * var(--type-scale)));
  line-height: 2;
  white-space: pre-line;
}

body.story-modal-open,
body.welcome-open {
  overflow: hidden;
}

/* 22.7. Bienvenida inicial: aparece una vez por sesión y se puede omitir. */
/*
   La página permanece visible detrás de la bienvenida para que backdrop-filter
   pueda desenfocarla. La capa welcome-screen bloquea la interacción y el scroll,
   pero no oculta el contenido que debe verse a través del cristal.
*/
body.welcome-pending {
  overflow: hidden;
}

/* Al presionar Entrar, el contenido aparece en sincronía con el fade de la bienvenida. */
body.app-revealing > :not(.site-background):not(.welcome-screen) {
  animation: page-reveal 1.4s cubic-bezier(.2, .75, .25, 1) both;
}

@keyframes page-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-screen {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  /* Cristal translúcido: deja ver la página real detrás y la desenfoca. */
  background:
    radial-gradient(ellipse at 50% 42%, rgba(199, 179, 151, .12), transparent 48%),
    rgba(7, 9, 11, .28);
  -webkit-backdrop-filter: blur(18px) saturate(130%) brightness(.84);
  backdrop-filter: blur(50px) saturate(180%) brightness(.84);
  color: #f4f1eb;
  opacity: 1;
  transition: opacity 1.4s cubic-bezier(.2, .75, .25, 1), visibility 1.4s ease;
}

.welcome-screen.is-leaving {
  opacity: 0;
  visibility: hidden;
}

.welcome-content {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  animation: welcome-rise .8s cubic-bezier(.2, .8, .25, 1) both;
}

.welcome-kicker {
  margin: 0 0 14px;
  color: #c7b397;
  font-size: calc(9px * var(--type-scale));
  font-weight: 700;
  letter-spacing: .24em;
}

.welcome-wordmark {
  margin: 0;
  font: 500 clamp(35px, 7vw, 64px)/1 "Montserrat", sans-serif;
  letter-spacing: .2em;
}

.welcome-wordmark span {
  color: #c7b397;
}

.welcome-equalizer {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 5px;
  margin: 29px 0 17px;
}

.welcome-equalizer span {
  display: block;
  width: 3px;
  height: 12px;
  border-radius: 99px;
  background: #c7b397;
  animation: welcome-bars .8s ease-in-out infinite alternate;
}

.welcome-equalizer span:nth-child(2) { animation-delay: .12s; }
.welcome-equalizer span:nth-child(3) { animation-delay: .24s; }
.welcome-equalizer span:nth-child(4) { animation-delay: .36s; }
.welcome-equalizer span:nth-child(5) { animation-delay: .48s; }

.welcome-caption {
  margin: 0;
  color: rgba(244, 241, 235, .68);
  font-size: calc(12px * var(--type-scale));
  letter-spacing: .08em;
}

.welcome-enter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding: 10px 19px;
  border: 1px solid rgba(199, 179, 151, .45);
  border-radius: 99px;
  background: rgba(255, 255, 255, .055);
  color: #f4f1eb;
  font-size: calc(11px * var(--type-scale));
  letter-spacing: .12em;
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.welcome-enter:hover {
  transform: translateY(-3px);
  border-color: #c7b397;
  background: rgba(199, 179, 151, .13);
}

.welcome-enter span {
  color: #c7b397;
  transition: transform .22s ease;
}

.welcome-enter:hover span {
  transform: translate(2px, -2px);
}

@keyframes welcome-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes welcome-bars {
  from { height: 7px; opacity: .55; }
  to { height: 32px; opacity: 1; }
}

/* 22.8. Reflejo que sigue al puntero y microinteracciones de botones/tarjetas. */
.glass {
  position: relative;
  isolation: isolate;
  transition: border-color .32s ease, box-shadow .32s ease, transform .32s ease;
}

.glass::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  content: "";
  background: radial-gradient(360px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgba(255, 255, 255, .105), transparent 72%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.glass:hover::before {
  opacity: 1;
}

.glass > * {
  position: relative;
  z-index: 1;
}

.music-card:hover {
  border-color: color-mix(in srgb, var(--accent), var(--line) 48%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .09);
}

.top-nav a,
.social-row a,
.footer-mail,
.footer-bottom a,
.carousel-arrow,
.play-button,
.glass-button,
.theme-toggle {
  transition-timing-function: cubic-bezier(.2, .75, .25, 1);
}

.social-row a:hover {
  transform: translateY(-4px) scale(1.035);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18), 0 0 15px color-mix(in srgb, var(--accent), transparent 80%);
}

.glass-button:active:not(:disabled),
.play-button:active:not(:disabled),
.carousel-arrow:active:not(:disabled),
.welcome-enter:active {
  transform: scale(.96);
}

/* 22.9. Entrada progresiva: el contenido sigue visible si no hay JavaScript. */
html.has-scroll-reveal .reveal-on-scroll {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .75, .25, 1);
}

html.has-scroll-reveal .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 22.10. Ajustes de pantalla pequeña y accesibilidad. */
@media (max-width: 600px) {
  .waveform-control {
    height: 34px;
  }

  .seek-input::-webkit-slider-runnable-track,
  .seek-input::-moz-range-track {
    height: 34px;
  }

  .seek-input::-webkit-slider-thumb {
    margin-top: 10px;
  }

  .story-modal {
    padding: 10px;
  }

  .story-modal-panel {
    width: 100%;
    min-height: min(560px, 82vh);
    max-height: calc(100dvh - 20px);
    padding: 54px 24px 34px;
    border-radius: 22px;
  }

  .story-modal-close {
    top: 11px;
    right: 12px;
  }

  .story-modal-copy {
    font-size: calc(13px * var(--type-scale));
    line-height: 1.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  .artist-subtitle#rotating-phrase,
  .story-modal,
  .story-modal-panel,
  .story-modal-backdrop,
  .welcome-screen,
  .welcome-content,
  .welcome-equalizer span,
  .glass,
  .glass::before,
  .story-modal-close,
  .welcome-enter,
  .reveal-on-scroll,
  body.app-revealing > :not(.site-background):not(.welcome-screen) {
    animation: none !important;
    transition: none !important;
  }
}
