:root {
  --color-bg: #f7f8f9;
  --color-text: #202020;
  --color-white: #fff;
  --color-accent: #d4622e;
  --color-crema: #faf8f4;
  --article-height: 100%;
  --article-ratio: 2;

  --body-font: "Inter Tight", sans-serif;
  --h1-font: "Cormorant", serif;
  --h2-font: "Albert Sans", sans-serif;
}

::selection {
  background: rgba(255, 255, 255, 0.125);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
  scroll-padding-top: 7rem;
}

body {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-text);
  font-family: var(--body-font);
  font-size: 1rem;
}

/* ===========================
   LAZY LOAD FADE IN
   =========================== */
.lazy {
  opacity: 0;
}

img.lazy.loaded,
video.lazy.loaded,
iframe.lazy.loaded {
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

img:not([src]):not([srcset]) {
  visibility: hidden;
}

/* HEADER */
header {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: center center;
  background-size: 40%;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 10rem 5rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.video-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  pointer-events: none;
}

header video {
  object-fit: cover;
}

#intro h1 {
  font-size: 9.6875rem;
  font-weight: 400;
  color: var(--color-white);
  mix-blend-mode: exclusion;
  line-height: 86%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

#intro p {
  color: var(--color-white);
}

header h1 span {
  margin: 0 0.375rem;
}

/* ====================================================
   ESPACIADO DE SECCIONES (Refactorización)
   Trasladamos el padding del H2 al contenedor para mejor UX
   ==================================================== */
#sobre,
#tracks,
#fechas {
  padding-top: 4rem; /* Espaciado base para móviles */
}

/* ===========================
   SECCIÓN SOBRE (Manifiesto)
   =========================== */
#sobre {
  background-color: #000;
  color: var(--color-white);
}

/* Ajuste solicitado: Tamaño específico para H2 en sección Sobre */
#sobre h2 {
  font-size: 4rem;
}

/* Ajuste solicitado: Separador en Desktop */
.separator-spacing {
  margin-bottom: 8rem;
}

#tracks {
  background: url("bg-tracks.png") fixed center center;
  background-size: 40%;
  background-repeat: repeat-y;
}

#tracks h3 {
  margin-top: 1rem;
  color: #000;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: normal;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: var(--h2-font);
}

/* H2 Global - LIMPIO */
h2 {
  font-weight: 500;
  font-family: var(--h2-font);
  font-size: 4.6rem;
  letter-spacing: -0.1875rem;
  line-height: 100%;
  margin-bottom: 2rem;
  scroll-margin-top: 8rem; /* FIX: Asegura que el ancla caiga correctamente */
}

h2:before {
  position: absolute;
  margin-left: -5rem;
  color: var(--color-accent);
}

/* === MODIFICACIÓN GLOBAL EN NAV === */
nav {
  width: 100%;
  z-index: 1000;
  color: var(--color-text);
  padding: 2.5rem 4rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
}

nav a#home {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5rem;
  letter-spacing: 0.125rem;
  color: #000;
  mix-blend-mode: exclusion;
  text-align: center;
  z-index: 2;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav #home svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 1rem;
  fill: var(--color-text);
}

/* ====================================================
   SOCIAL LINKS (Estilos Base / Desktop)
   ==================================================== */
.social-link {
  color: var(--color-text);
  mix-blend-mode: exclusion;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.0625rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Valores base seguros */
  min-width: 44px;
  min-height: 44px;
  line-height: 1;
  padding: 0.25rem;
}

.social-link:hover {
  color: #000;
}

.social-link .link-text {
  display: none;
}

.social-link .social-icon {
  display: inline-block;
  font-size: 1.8rem;
}

.bandcamp-icon {
  width: 3.6rem;
  height: 3.6rem;
  background-color: currentColor;
  -webkit-mask: url("bc.svg") no-repeat center center;
  mask: url("bc.svg") no-repeat center center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

nav.nav-white-text #home {
  color: #ffffff !important;
}

nav.nav-white-text .social-link {
  color: #ffffff !important;
}

nav.nav-white-text #menuToggle span {
  background: #ffffff;
}

/* --- MENU TOGGLE (CÍRCULO NEGRO ACCESIBLE) --- */
#menuToggle {
  width: 3.5rem;
  height: 3.5rem;
  background-color: #000;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

#menuToggle input {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  opacity: 0;
  z-index: 2;
  -webkit-touch-callout: none;
}

#menuToggle span {
  display: block;
  width: 1.6rem;
  height: 2px;
  position: relative;
  background: #fff;
  z-index: 1;
  border-radius: 2px;
  transition:
    transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1),
    background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1),
    opacity 0.55s ease;
}

#menuToggle input:checked ~ span {
  opacity: 1;
  background: #fff;
}

/* Transformación a X */
#menuToggle input:checked ~ span:nth-child(2) {
  transform: rotate(45deg) translate(0.35rem, 0.35rem);
}

#menuToggle input:checked ~ span:nth-child(3) {
  opacity: 0;
  transform: scale(0.2, 0.2);
}

#menuToggle input:checked ~ span:nth-child(4) {
  transform: rotate(-45deg) translate(0.35rem, -0.35rem);
}

#menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #010101;
  list-style: none;
  counter-reset: li;
  list-style-position: outside;
  -webkit-font-smoothing: antialiased;
  transform-origin: 0% 0%;
  transform: translate(100%, 0);
  transition: all 0.5s cubic-bezier(0.77, 0.2, 0.05, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10rem 5rem 3.5rem 5rem;
  z-index: -1;
}

#menuToggle input:checked ~ ol {
  transform: none;
  z-index: 0;
}

#menu a li {
  font-weight: 400;
  font-size: 4.475rem;
  line-height: 100%;
  letter-spacing: 0.1875rem;
  color: white;
  margin-bottom: 1.5rem;
  counter-increment: li;
  text-align: center;
  margin-left: 1.5rem;
}

#menu a {
  text-decoration: none;
}

#menu a:hover li {
  text-decoration: none;
  color: var(--color-white);
}

li::before {
  content: counter(li, decimal-leading-zero) ".";
  color: var(--color-accent);
  margin-left: -1.5rem;
  margin-right: 1.5rem;
}

article {
  height: 100%;
  box-sizing: border-box;
  margin: auto;
  position: relative;
  margin-bottom: 3em;
}

.hero-image {
  max-width: 100%;
}

img[class^="editorial-image"] {
  width: 50%;
  max-width: 25rem;
  margin-bottom: 2rem;
  aspect-ratio: 2 / 3;
}

.editorial-image-left {
  float: left;
  margin-right: 2rem;
  margin-left: -5rem;
}

.editorial-image-right {
  float: right;
  margin-left: 2rem;
  margin-right: -5rem;
}

.logo {
  max-width: 16em;
  height: auto;
}

.logo-friend {
  max-width: 10em;
  height: auto;
}

.section-spacing {
  margin-bottom: 8rem;
}

p {
  font-size: 1.2rem;
  letter-spacing: 0.0625rem;
  font-weight: 400;
  line-height: auto;
  margin-bottom: 2rem;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

blockquote {
  font-family: "Anonymous Pro";
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5rem;
  letter-spacing: 0.125rem;
  text-transform: uppercase;
  margin: 1rem 3.375rem 3rem;
  border-left: 0.125rem solid var(--color-accent);
  padding: 0 2rem;
  display: inline-block;
  padding-right: 0;
}

blockquote span {
  float: right;
  margin-top: 0.5rem;
}

.audio-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.625rem;
  padding-bottom: calc(0.625rem + env(safe-area-inset-bottom));
  background-color: black;
  font-family: "Ubuntu Mono", monospace;
  font-weight: 400;
  color: white;
  z-index: 10;
}

.audio-controls button {
  background: none !important;
  color: #c4c5c5;
  font-size: 2em;
  padding: 0 0.2em;
}

.progress {
  height: 0.3125rem;
}

.volume-slider {
  width: 7.5rem;
}

.text-shadow {
  text-shadow: 1px 1px 3px black;
}

#toggle-bar {
  position: fixed;
  top: 45%;
  right: 1rem;
  z-index: 2000;
  border: none;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  width: 3rem;
  height: 3rem;
  font-size: 1.2rem;
}

#toggle-bar:hover {
  background-color: rgba(0, 0, 0, 0.75);
}

.social,
.social a {
  color: var(--color-text);
  font-size: 4rem;
  text-decoration: none;
}

.copys {
  font-size: 0.8rem;
}

/* ===========================
   SCROLL REVEAL (Cascada)
   =========================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s cubic-bezier(0.5, 0, 0, 1),
    transform 0.8s cubic-bezier(0.5, 0, 0, 1);
  will-change: opacity, transform;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   INTERACTIVE ZOOM & FORMAS GEOMÉTRICAS
   =========================== */

#tracks article a {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  transition: clip-path 0.6s ease-in-out;
}

#tracks article img {
  filter: grayscale(100%);
  transition:
    opacity 1s ease-in-out,
    filter 0.4s ease-in-out,
    transform 0.8s ease;
  width: 100%;
  display: block;
}

#tracks article a:hover img,
#tracks article a:focus img,
#tracks article a:active img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

#tracks article .active img {
  filter: grayscale(0%);
  transition:
    filter 0.4s ease-in-out,
    transform 0.8s ease,
    opacity 1s ease-in-out;
}

#tracks article:nth-of-type(1) a {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
#tracks article:nth-of-type(2) a {
  clip-path: circle(50% at 50% 50%);
}
#tracks article:nth-of-type(3) a {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
#tracks article:nth-of-type(4) a {
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}
#tracks article:nth-of-type(5) a {
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}
#tracks article:nth-of-type(6) a {
  clip-path: polygon(0% 20%, 100% 0%, 100% 80%, 0% 100%);
}
#tracks article:nth-of-type(7) a {
  clip-path: polygon(
    0% 50%,
    20% 20%,
    50% 0%,
    80% 20%,
    100% 50%,
    80% 80%,
    50% 100%,
    20% 80%
  );
}
#tracks article:nth-of-type(8) a {
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}
#tracks article:nth-of-type(9) a {
  clip-path: polygon(
    0% 0%,
    70% 0%,
    100% 30%,
    80% 60%,
    100% 100%,
    30% 90%,
    0% 100%,
    0% 40%
  );
}
#tracks article:nth-of-type(10) a {
  clip-path: polygon(
    35% 0%,
    65% 0%,
    65% 20%,
    80% 20%,
    80% 35%,
    100% 35%,
    100% 65%,
    80% 65%,
    80% 80%,
    65% 80%,
    65% 100%,
    35% 100%,
    35% 80%,
    20% 80%,
    20% 65%,
    0% 65%,
    0% 35%,
    20% 35%,
    20% 20%,
    35% 20%
  );
}
#tracks article:nth-of-type(13) a {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
#tracks article:nth-of-type(11) a {
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

#tracks article .play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  padding: 0.625rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  opacity: 1;
  transition: transform 0.3s ease-in-out;
  z-index: 2;
}

#tracks article .play-text {
  display: none;
}

#tracks article a:hover .play-overlay {
  transform: translate(-50%, -50%) scale(1.1);
}

@media (hover: none) {
  #tracks article a:active img {
    filter: grayscale(0%);
  }
}

#tracks article {
  will-change: transform;
  transition: transform 0.2s ease-out;
}

#fechas .card {
  border: 0px solid #000;
  transition:
    transform 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
}

#fechas .card-body {
  background: #f7f8f9;
}

/* ====================================
   DOWNLOAD LINK & ANIMATION
   ==================================== */
.download-link {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 15.625rem;
  height: 15.625rem;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.download-link:hover {
  transform: scale(1.1);
}

/* OPTIMIZACIÓN DRY: Definido solo UNA vez. */
.sunburst-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  border-radius: 50%;
  clip-path: polygon(
    50% 0%,
    46.93% 3.1%,
    43.47% 0.43%,
    40.83% 3.9%,
    37.06% 1.7%,
    34.89% 5.49%,
    30.87% 3.81%,
    29.21% 7.85%,
    25% 6.7%,
    23.89% 10.92%,
    19.56% 10.33%,
    19.01% 14.66%,
    14.64% 14.64%,
    14.66% 19.01%,
    10.33% 19.56%,
    10.92% 23.89%,
    6.7% 25%,
    7.85% 29.21%,
    3.81% 30.87%,
    5.49% 34.89%,
    1.7% 37.06%,
    3.9% 40.83%,
    0.43% 43.47%,
    3.1% 46.93%,
    0% 50%,
    3.1% 53.07%,
    0.43% 56.53%,
    3.9% 59.17%,
    1.7% 62.94%,
    5.49% 65.11%,
    3.81% 69.13%,
    7.85% 70.79%,
    6.7% 75%,
    10.92% 76.11%,
    10.33% 80.44%,
    14.66% 80.99%,
    14.64% 85.36%,
    19.01% 85.34%,
    19.56% 89.67%,
    23.89% 89.08%,
    25% 93.3%,
    29.21% 92.15%,
    30.87% 96.19%,
    34.89% 94.51%,
    37.06% 98.3%,
    40.83% 96.1%,
    43.47% 99.57%,
    46.93% 96.9%,
    50% 100%,
    53.07% 96.9%,
    56.53% 99.57%,
    59.17% 96.1%,
    62.94% 98.3%,
    65.11% 94.51%,
    69.13% 96.19%,
    70.79% 92.15%,
    75% 93.3%,
    76.11% 89.08%,
    80.44% 89.67%,
    80.99% 85.34%,
    85.36% 85.36%,
    85.34% 80.99%,
    89.67% 80.44%,
    89.08% 76.11%,
    93.3% 75%,
    92.15% 70.79%,
    96.19% 69.13%,
    94.51% 65.11%,
    98.3% 62.94%,
    96.1% 59.17%,
    99.57% 56.53%,
    96.9% 53.07%,
    100% 50%,
    96.9% 46.93%,
    99.57% 43.47%,
    96.1% 40.83%,
    98.3% 37.06%,
    94.51% 34.89%,
    96.19% 30.87%,
    92.15% 29.21%,
    93.3% 25%,
    89.08% 23.89%,
    89.67% 19.56%,
    85.34% 19.01%,
    85.36% 14.64%,
    80.99% 14.66%,
    80.44% 10.33%,
    76.11% 10.92%,
    75% 6.7%,
    70.79% 7.85%,
    69.13% 3.81%,
    65.11% 5.49%,
    62.94% 1.7%,
    59.17% 3.9%,
    56.53% 0.43%,
    53.07% 3.1%
  );
  animation: spin 14s linear infinite;
}

.download-text {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.125rem;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media only screen and (min-width: 81.25em) {
  /* 1300px */
  #intro {
    height: 95dvh;
  }
  #intro h1 {
    letter-spacing: -0.5rem;
  }
}

/* ====================================================
   MEDIA QUERY PRINCIPAL (Cambio de Layout)
   ==================================================== */
@media only screen and (min-width: 48em) {
  /* 768px - ESCRITORIO/TABLET GRANDE */

  /* Restauramos el padding grande en escritorio */
  #sobre,
  #tracks,
  #fechas {
    padding-top: 7.5rem;
    padding-bottom: 7.5rem;
  }

  /* Ajuste específico para #sobre que tenía 5rem en base */
  #sobre {
    padding-bottom: 7.5rem;
  }

  .social-link {
    display: inline;
    min-width: auto;
    min-height: auto;
    padding: 0;
  }

  .social-link .link-text {
    display: inline;
  }

  .social-link .social-icon {
    display: none;
  }
}

@media only screen and (max-width: 75em) {
  /* 1200px */
  :root {
    --article-ratio: 1.5;
  }

  header h1 {
    font-size: 13.75rem;
    justify-content: center;
    align-items: center;
  }

  #menu a li {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
  }
}

@media only screen and (max-width: 37.5em) {
  #intro {
    height: auto;
  }
  #intro h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.125rem;
    line-height: 2.6rem;
  }
  #intro p {
    font-size: 1rem;
    line-height: 1.3rem;
  }
  #menu {
    padding: 1.25rem 1.25rem;
  }

  nav {
    padding: 1rem 1rem;
    padding-top: max(1rem, env(safe-area-inset-top));
    width: 100%;
  }

  h2 {
    font-size: 2.4rem;
    padding-top: 1.5rem;
    margin-bottom: 1rem;
  }

  /* === AJUSTE SOLICITADO POR EL USUARIO PARA MÓVIL === */
  #sobre h2 {
    font-size: 1.6rem;
    letter-spacing: -0.1025rem;
  }

  h2:before {
    margin-left: -3.5rem;
  }

  article {
    margin-bottom: 1.5rem;
  }

  p {
    font-size: 1rem;
  }

  #fechas p {
    margin-bottom: 0.5rem;
  }

  .section-spacing {
    margin-bottom: 3rem;
  }

  .separator-spacing {
    margin-bottom: 4rem;
  }

  #tracks h3 {
    font-size: 1.3rem;
  }

  .logo {
    max-width: 10rem;
  }

  .logo-friend {
    max-width: 6rem;
  }

  .download-link {
    width: 11.25rem;
    height: 11.25rem;
  }
  .download-text {
    font-size: 1.1rem;
  }

  .social,
  .social a {
    font-size: 2.5rem;
    text-align: center !important;
  }

  .social-link {
    font-weight: normal;
  }

  /* === AJUSTES DE ICONOS PARA MÓVIL SOLICITADOS === */
  .social-link {
    min-width: 24px;
    min-height: 24px;
  }

  .social-link .social-icon {
    font-size: 1.7rem;
  }

  .bandcamp-icon {
    width: 3.4rem;
    height: 3.4rem;
  }

  footer {
    text-align: center;
  }

  #tracks img {
    min-width: 100%;
  }

  blockquote {
    margin: 1rem 0 3rem;
  }

  #menu a li {
    font-size: 2rem;
  }

  #video-hero {
    height: 50dvh;
  }
}

@media only screen and (max-height: 53.75em) {
  /* 860px */
  header h1 {
    font-size: 20dvh;
  }
}

@media only screen and (max-height: 42.5em) {
  /* 680px */
  header h1 {
    font-size: 40dvh;
  }
  #menu a li {
    font-size: 1.5rem;
    margin-bottom: 1rem !important;
  }
}

@media only screen and (max-height: 42.5em) and (max-width: 75em) {
  header h1 {
    font-size: 20vh;
  }
}
