/* ==========================================================================
   SISTEMA · línea punteada, portadas y redes
   La línea punteada es un elemento identificatorio: siempre del color de tono
   de la sección (--accent) y siempre separada del objeto por el mismo aire.
   Para pasar de guiones a puntos, cambiar --line-style a «dotted».
   ========================================================================== */
:root {
  --line-width: 2px;
  --line-style: dashed;
  --line-gap: 12px;
}

/* 1 · De este lado del escenario: la línea va en .stage-frame (lineas.js) */
.encounters .stage-frame { position: relative; z-index: 1; width: min(100%, 980px); margin-inline: auto; }

/* 2 · ¿Quién es este?: la línea va por detrás de la silueta (data-line="behind") */
.about .portrait-window { isolation: isolate; }

/* 3 · Álbumes y temas: portadas reales y anillo alrededor de cada círculo */
.music .album { overflow: visible; }
.music .cover.has-art { background: var(--black); overflow: visible; }
.music .cover.has-art img { border-radius: 50%; }
.music .cover.has-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; bottom: auto;
  object-fit: cover; filter: none; transform: none; margin: 0;
}
.music .album:nth-child(1) { --glow: var(--red); }
.music .album:nth-child(2) { --glow: var(--blue); }
.music .album:nth-child(3) { --glow: var(--orange); }

/* 4 · Descargo: el campo y el botón de envío */

/* Redes: hover con un color de la paleta para cada una */
.site-footer .social-link { transition: color .25s ease, scale .2s ease; }
.site-footer .social-link[href*="instagram"] { --tone: var(--pink); }
.site-footer .social-link[href*="youtube"]   { --tone: var(--red); }
.site-footer .social-link[href*="spotify"]   { --tone: var(--yellow); }
.site-footer .social-link:is(:hover, :focus-visible) { color: var(--tone); }

@media (max-width: 760px) {
  :root { --line-gap: 8px; }
  /* Aire para que la línea no toque el borde de la pantalla */
  .release-free .phrase-entry { padding-inline: 10px; }
}

/* Footer igual en todo el sitio: mismo tono, venga de la sección que venga */
.site-footer { --accent: var(--yellow); --accent-rgb: var(--yellow-rgb); --button-ink: var(--black); }

/* De este lado del escenario: el color sigue al momento elegido.
   Arriba del escenario = rojo · Detrás del ruido = celeste (como su silueta). */
.encounters { --moment: var(--red); }
.encounters:has(#tab-detras[aria-selected="true"]) { --moment: var(--blue); }
.encounters .segmented button[aria-selected="true"] { background: var(--moment); color: var(--cream); transition: background-color .45s ease; }
.encounters .stage-frame { --line-color: var(--moment); }
.encounters .play-button { background: var(--moment); color: var(--cream); transition: background-color .45s ease; }
.encounters .play-button .ui-icon { color: var(--cream); }

/* Álbumes y temas en celular: tarjetas horizontales, las tres a la vista, sin flechas */
@media (max-width: 760px) {
  .music .carousel-controls { display: none !important; }
  .music .album-grid {
    display: flex; flex-direction: column; gap: 20px; height: auto;
    overflow: visible; margin-inline: 0; padding: 0; scroll-snap-type: none;
  }
  .music .pill-card, .music .pill-card:nth-child(2) {
    min-height: 0; padding: 16px 20px 16px 16px; border-radius: 999px;
    transform: none; animation: none; opacity: 1;
  }
  .music .pill-card .album-open { flex-direction: row; align-items: center; gap: 18px; }
  .music .pill-card .cover { width: 96px; flex: 0 0 96px; }
  .music .pill-card .album-meta { flex: 1; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; gap: 10px; padding: 0; }
  .music .pill-card .album-name { text-align: left; }
  .music .pill-card .album-title { font-size: 19px; margin-top: 4px; }
  .music .pill-card .album-arrow { width: 40px; height: 40px; flex: 0 0 auto; }
  .music .pill-card > p { text-align: left; padding: 0 0 0 114px; margin: -14px 0 0; max-width: none; font-size: 13px; }
}

/* Spotify: crema como las demás redes; al pasar el mouse toma su verde original (excepción de marca: logo de un tercero) */
.site-footer .social-link[href*="spotify"] { --tone: #1ED760; }


/* En la sección secreta (CURITAS, silueta, mezclador y filtro) el nombre del footer es más chico:
   acompaña el cierre sin competir con la experiencia. */
.curitas-page .footer-live { padding-block: 44px 36px; gap: 16px; }
.curitas-page .footer-live .footer-wordmark { font-size: clamp(64px, 8vw, 120px); }
@media (max-width: 760px) {
  .curitas-page .footer-live .footer-wordmark { font-size: 64px; }
}

/* Álbumes y temas: al posarse en uno, los otros pasan a blanco y negro */
.music .album { transition: filter .45s ease, opacity .45s ease; }
@media (hover: hover) {
  .music .album-grid:has(.album:hover) .album:not(:hover) { filter: grayscale(1); opacity: .72; }
}
/* Solo con el mouse encima: un clic, el foco o cerrar el detalle ya no dejan portadas en gris */
/* La tarjeta bajo el cursor siempre a color */
.music .album:hover { filter: none; opacity: 1; }
html.paused .music .album { transition: none; }


/* De este lado del escenario: la palabra resaltada del título y el ícono del micrófono
   también siguen al momento elegido (rojo arriba del escenario, celeste detrás del ruido). */
.encounters .section-heading .warm-word, .encounters .section-heading .section-symbol,
.encounters .section-heading .section-symbol .ui-icon { color: var(--moment); transition: color .45s ease; }

/* Campos de texto: sin el recuadro grueso al enfocarlos. El foco se nota en el campo,
   que se aclara apenas, y en el cursor de escritura en el color de la sección. */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
input, textarea { caret-color: var(--accent); }
.release-form:has(input:focus) { background-color: rgb(var(--cream-rgb) / .1); transition: background-color .25s ease; }
/* Clave de CURITAS: solo la píldora del campo se aclara (antes se pintaba todo el bloque, un cuadrado fuera de lugar) */
.access-form .code-field { border-radius: 100px; transition: background-color .25s ease; }
.access-form .code-field:has(input:focus) { background-color: rgb(var(--cream-rgb) / .08); }
select:focus { box-shadow: 0 0 0 1px rgb(var(--cream-rgb) / .35); }


/* Álbumes y temas: tarjetas sin tinte de color; el único color es el brillo al pasar el mouse */
.music .pill-card::before, .music .pill-card:nth-child(2)::before {
  background: linear-gradient(165deg, rgb(var(--cream-rgb) / .06), rgb(var(--cream-rgb) / .025) 70%, rgb(var(--cream-rgb) / .012));
}


/* Footer · el nombre: al pasar el mouse (o con foco de teclado), las letras se llenan con
   la trama de íconos de Luasó (curitas, notas, platos voladores), que se desplaza en diagonal
   sin parar. La trama vive en una copia del nombre superpuesta (movimiento.js), así el
   cambio se puede fundir. */
.site-footer .footer-wordmark { position: relative; display: inline-block; }
.site-footer .footer-wordmark:focus-visible { outline: none; }
.footer-wordmark .wm-trama {
  position: absolute; inset: -.3em 0 0 0; box-sizing: border-box; padding: .3em 0 0; text-align: inherit; white-space: nowrap; pointer-events: none; opacity: 0;
  color: transparent;
  background: url(assets/trama-iconos.webp) 0 0 / 0.78em 0.78em repeat, linear-gradient(var(--accent), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  transition: opacity .45s ease;
  animation: wm-trama 9s linear infinite; animation-play-state: paused;
}
.site-footer .footer-wordmark:is(:hover, :focus-visible) .wm-trama { opacity: 1; animation-play-state: running; }
@keyframes wm-trama { to { background-position: 0.78em -0.78em, 0 0; } }
html.paused-user .footer-wordmark .wm-trama { animation: none; }

/* Footer · volver arriba, a la derecha */
.site-footer { position: relative; }
.to-top {
  position: absolute; right: var(--gutter); bottom: 32px; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; color: var(--cream);
  font-family: var(--heading); font-size: 14px; line-height: 1; background: transparent;
  box-shadow: inset 0 0 0 1.5px rgb(var(--cream-rgb) / .3); transition: box-shadow .25s ease, color .25s ease;
}
.to-top .ui-icon { width: 20px; height: 20px; color: inherit; transition: translate .25s ease; }
.to-top:hover { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.to-top:hover .ui-icon { translate: 0 -2px; }
@media (max-width: 760px) {
  .to-top { position: static; margin-top: 4px; order: 10; }
}

/* ¿Quién es este?: el recorte de la foto ya no usa clip-path con un <clipPath> SVG
   (Safari en iPhone lo dibujaba mal y la foto quedaba cortada con un difuminado).
   Ahora es una máscara CSS de dos capas: arriba un rectángulo ancho (la guitarra puede
   salirse del círculo) y abajo el mismo círculo crema, con borde nítido. */
.about .portrait-cutout {
  clip-path: none; left: -25%; width: 150%;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 65.52% no-repeat,
                radial-gradient(closest-side, #000 calc(100% - 1px), transparent 100%) bottom center / 66.667% 68.97% no-repeat;
          mask: linear-gradient(#000 0 0) top / 100% 65.52% no-repeat,
                radial-gradient(closest-side, #000 calc(100% - 1px), transparent 100%) bottom center / 66.667% 68.97% no-repeat;
}
.about .portrait-window .portrait-cutout img { left: 20.67%; }
/* Alturas en unidades del contenedor: no dependen de resolver porcentajes sobre un círculo
   con aspect-ratio (otro punto frágil en Safari). */
@supports (width: 1cqw) {
  .about .portrait-window { container-type: inline-size; }
  .about .portrait-cutout { height: 145cqw; }
  .about .portrait-window .portrait-cutout img { height: 145cqw; }
}
