/* SAL — Laboratorio de creación artística
   Paleta y tipografía tomadas de la identidad de SAL. */
:root {
  --crema: #F8F4BD;
  --crema-2: #F4ED91;
  --violeta: #3E2F72;
  --violeta-osc: #2A1F55;
  --lila: #6F57BC;
  --lila-claro: #8E7AD6;
  --cobalto: #14287D;
  --texto-suave: #EDE7FF;
  --gris-violeta: #5A4C8F;
  --display: 'Horizon', 'Unbounded', system-ui, sans-serif;
  --texto: 'Be Vietnam Pro', system-ui, sans-serif;
  --ancho: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--crema); color: var(--violeta-osc); font-family: var(--texto); font-size: 18px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--violeta); }
a:hover { color: var(--lila); }
h1, h2, h3 { font-family: var(--display); margin: 0; }
p { margin: 0; }

.contenedor { max-width: var(--ancho); margin: 0 auto; }
.seccion { padding: 96px 5vw; }
.seccion--violeta { background: var(--violeta); color: var(--crema); }
.seccion--amarilla { background: var(--crema-2); }
.titulo-seccion { font-weight: 900; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.08; color: var(--violeta); }
.seccion--violeta .titulo-seccion { color: var(--crema); }
.etiqueta { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--lila); }
.seccion--violeta .etiqueta { color: var(--crema-2); }
.cinta { display: inline-block; background: var(--cobalto); color: var(--crema-2); font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; padding: 10px 18px; border-radius: 6px; }
.fila { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.fila > * { min-width: 0; }
.pila { display: flex; flex-direction: column; gap: 20px; }
.boton { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .04em; text-decoration: none; padding: 16px 26px; border-radius: 999px; background: var(--crema); color: var(--violeta); border: 2px solid var(--crema); }
.boton:hover { background: var(--crema-2); color: var(--violeta); }
.boton--borde { background: transparent; color: var(--crema); }
.boton--borde:hover { background: var(--crema); color: var(--violeta); }
.boton--violeta { background: var(--violeta); color: var(--crema); border-color: var(--violeta); }
.boton--violeta:hover { background: var(--lila); border-color: var(--lila); color: var(--crema); }

/* Formas */
.circulo { border-radius: 50%; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.gota { border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.capsula { border-radius: 999px 999px 999px 40px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }

/* Encabezado */
.cabecera { background: var(--violeta); padding: 20px 5vw; position: relative; z-index: 2; }
.cabecera nav { max-width: var(--ancho); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.marca { font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: .04em; color: var(--crema); text-decoration: none; }
.marca:hover { color: var(--crema-2); }
.menu { display: flex; flex-wrap: wrap; gap: 4px 28px; font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.menu a { color: var(--crema); text-decoration: none; padding: 12px 0; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--crema-2); }

/* Portada */
.portada { position: relative; overflow: hidden; background: var(--violeta); color: var(--crema); padding: 72px 5vw 170px; }
.portada .ondas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 360px; opacity: .55; }
.portada .fila { position: relative; align-items: center; }
.portada__texto { flex: 999 1 560px; display: flex; flex-direction: column; gap: 28px; }
.portada__logo { flex: 1 1 340px; max-width: 460px; }
.portada h1 { font-weight: 900; font-size: clamp(36px, 5.2vw, 76px); line-height: 1.04; letter-spacing: -.01em; }
.portada .bajada { max-width: 560px; font-size: 20px; font-style: italic; color: var(--texto-suave); }
.botones { display: flex; flex-wrap: wrap; gap: 14px; }
.ola { display: block; width: 100%; height: 80px; margin-top: -80px; position: relative; }

/* Qué es */
.que-es__titulo { flex: 1 1 380px; }
.que-es__texto { flex: 2 1 520px; font-size: 19px; }
.que-es__foto { max-width: 420px; margin-top: 8px; }
.brujula { margin-top: 12px; background: var(--violeta); color: var(--crema); border-radius: 28px; padding: 28px 32px; display: flex; flex-direction: column; gap: 10px; }
.brujula .etiqueta { color: var(--crema-2); font-size: 12px; }
.brujula p:last-child { font-size: 24px; line-height: 1.4; font-style: italic; }

/* Recorrido */
.encabezado-seccion { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 40px; }
.etapas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.etapa { background: var(--crema); border-radius: 24px; padding: 24px 22px 26px; display: flex; flex-direction: column; gap: 10px; min-height: 230px; }
.etapa__num { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-weight: 900; font-size: 34px; color: var(--lila); }
.etapa__ahora { background: var(--violeta); color: var(--crema-2); font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.etapa h3 { font-weight: 700; font-size: 17px; line-height: 1.25; color: var(--violeta); }
.etapa__enc { font-size: 14px; color: var(--gris-violeta); }
.etapa__obj { font-size: 15px; font-style: italic; }

/* Territorio (home) */
.territorio__texto { flex: 1 1 420px; }
.territorio__texto p { font-size: 19px; color: var(--texto-suave); }
.territorio__mapa { flex: 1 1 420px; }
.territorio__mapa svg { width: 100%; max-width: 520px; margin: 0 auto; display: block; }
.dos-fotos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 480px; margin-top: 12px; }

/* Archivo */
.eje { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 36px 0; }
.eje span { font-family: var(--display); font-weight: 700; font-size: 18px; padding: 16px 26px; border-radius: 999px; color: var(--crema); }
.eje .flecha { color: var(--lila); padding: 0; font-size: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.chips li { border: 2px solid var(--violeta); color: var(--violeta); font-size: 16px; padding: 8px 16px; border-radius: 999px; }
.chips--llenas li { border-color: var(--crema-2); background: var(--crema-2); }
.archivo__col { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; }
.cita { margin: 48px 0 0; max-width: 820px; font-size: 26px; line-height: 1.45; font-style: italic; color: var(--violeta); }
.cita cite { font-style: normal; font-size: 16px; color: var(--gris-violeta); }

/* Personas (home) */
.grilla-personas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 24px; }
.grilla-personas a { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--crema); }
.grilla-personas img { border: 4px solid var(--lila); transition: border-color .2s; }
.grilla-personas a:hover img { border-color: var(--crema-2); }
.grilla-personas strong { font-family: var(--display); font-size: 18px; line-height: 1.2; }
.grilla-personas span { font-size: 15px; color: var(--texto-suave); }
.equipo-linea { margin-top: 40px; font-size: 16px; color: var(--texto-suave); }
.enlace-claro { color: var(--crema-2); font-size: 17px; }
.enlace-claro:hover { color: var(--crema); }

/* Obra */
.foto-ancha { width: 100%; height: 360px; object-fit: cover; border-radius: 40px; margin: 36px 0 20px; }
.fechas { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.fecha { border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 10px; background: var(--crema-2); }
.fecha strong { font-family: var(--display); font-weight: 900; font-size: 40px; line-height: 1.1; color: var(--violeta); }
.fecha em { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--lila); }
.fecha--azul { background: var(--cobalto); color: var(--crema); }
.fecha--azul strong { color: var(--crema); }
.fecha--azul em { color: var(--crema-2); }

/* Pie */
.pie { background: var(--violeta-osc); color: var(--crema); padding: 56px 5vw; font-size: 15px; }
.pie .contenedor { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.pie .pila { gap: 8px; }
.pie a { color: var(--crema-2); }
.pie .marca { font-size: 28px; }
.pie .apoyo { max-width: 360px; color: var(--texto-suave); }

/* Página Territorio */
.pagina-oscura { background: var(--violeta); color: var(--crema); }
.mapa-pagina { max-width: 1320px; margin: 0 auto; padding: 40px 5vw 64px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.mapa-pagina__mapa { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.mapa-pagina h1 { font-weight: 900; font-size: clamp(28px, 3.4vw, 48px); line-height: 1.08; }
.mapa-pagina__intro { font-size: 18px; color: var(--texto-suave); max-width: 640px; }
.mapa { position: relative; width: 100%; max-width: 720px; aspect-ratio: 8 / 9; margin-top: 8px; }
.mapa svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.marcador { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; min-width: 48px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.marcador span { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--cobalto); color: var(--crema); font-family: var(--display); font-weight: 900; font-size: 18px; transition: transform .15s; }
.marcador:hover span { transform: scale(1.08); }
.marcador[aria-pressed="true"] span { width: 60px; height: 60px; background: var(--lila); border: 4px solid var(--crema); font-size: 22px; }
.marcador:focus-visible { outline: 3px solid var(--crema-2); outline-offset: 4px; border-radius: 50%; }
.ficha { flex: 1 1 360px; min-width: 0; background: var(--crema); color: var(--violeta-osc); border-radius: 32px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.ficha h2 { font-weight: 900; font-size: 40px; line-height: 1; color: var(--violeta); }
.ficha__fotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ficha__fotos span { display: block; aspect-ratio: 1 / 1; border-radius: 50%; background: var(--lila); opacity: .8; }
.ficha__fotos span:nth-child(2) { background: var(--cobalto); border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%; }
.ficha__fotos span:nth-child(3) { background: var(--lila-claro); }
.ficha__dato { font-size: 14px; color: var(--gris-violeta); }
.ficha__quienes { border-top: 1px solid #E6DFA0; padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }

/* Página Personas */
.personas-pagina { max-width: 1320px; margin: 0 auto; padding: 48px 5vw 72px; display: flex; flex-direction: column; gap: 40px; }
.selector { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.selector a { display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 14px; min-height: 52px; text-decoration: none; background: var(--crema); color: var(--violeta); border: 2px solid var(--violeta); }
.selector a img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.selector a:hover, .selector a[aria-current="true"] { background: var(--violeta); color: var(--crema); }
.artista { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; background: var(--violeta); color: var(--crema); border-radius: 40px; padding: 48px; scroll-margin-top: 24px; }
.js .artista[hidden] { display: none; }
.artista__retrato { flex: 1 1 320px; max-width: 420px; }
.artista__retrato img { border: 6px solid var(--crema-2); }
.artista__texto { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.artista .etiqueta { color: var(--crema-2); }
.artista h2 { font-weight: 900; font-size: clamp(32px, 3.8vw, 56px); line-height: 1.02; }
.artista__bio { font-size: 19px; line-height: 1.6; color: var(--texto-suave); }
.artista__obras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 8px; }
.artista__obras img:last-child { border-radius: 999px 999px 40px 999px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.equipo { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.miembro { display: flex; gap: 20px; align-items: flex-start; background: var(--crema-2); border-radius: 28px; padding: 28px; }
.miembro img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.miembro strong { font-family: var(--display); font-size: 20px; color: var(--violeta); display: block; }
.miembro .rol { font-size: 14px; font-weight: 600; color: var(--gris-violeta); display: block; margin: 4px 0 6px; }
.miembro p { font-size: 16px; line-height: 1.5; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .seccion { padding: 64px 5vw; }
  .portada { padding: 48px 5vw 140px; }
  .artista { padding: 28px; border-radius: 28px; }
  .ficha { padding: 24px; }
  .foto-ancha { height: 220px; border-radius: 24px; }
  .miembro { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============ Animaciones ============ */
@keyframes subir { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes deriva { from { transform: translateX(0); } to { transform: translateX(-60px); } }
@keyframes deriva-inversa { from { transform: translateX(-40px); } to { transform: translateX(20px); } }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes flotar-2 { 0%, 100% { transform: translate(150px, 20px); } 50% { transform: translate(150px, 32px); } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes caminar { to { stroke-dashoffset: -52; } }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(255, 253, 196, .55); } 70% { box-shadow: 0 0 0 16px rgba(255, 253, 196, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 253, 196, 0); } }
@keyframes respirar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }

/* Portada: entrada del texto, mar y logo */
.portada__texto > * { animation: subir .9s cubic-bezier(.2, .7, .2, 1) both; }
.portada__texto > *:nth-child(2) { animation-delay: .12s; }
.portada__texto > *:nth-child(3) { animation-delay: .24s; }
.portada__texto > *:nth-child(4) { animation-delay: .36s; }
.portada__logo { animation: aparecer 1.2s .3s both; }
.portada .ondas path { animation: deriva 16s ease-in-out infinite alternate; }
.portada .ondas path:nth-child(even) { animation-name: deriva-inversa; animation-duration: 21s; }
.portada .ondas path:nth-child(3n) { animation-duration: 26s; }
.logo-flor-1 { animation: flotar 7s ease-in-out infinite; }
.logo-flor-2 { animation: flotar-2 9s ease-in-out infinite; }
.estrella { position: absolute; top: 40px; right: 5vw; width: 56px; height: 56px; animation: girar 30s linear infinite; }

/* Mapa: el recorrido camina, el lugar elegido late */
.ruta { animation: caminar 2.4s linear infinite; }
.marcador[aria-pressed="true"] span { animation: latido 2.4s ease-out infinite; }
.ficha--cambio > * { animation: subir .45s cubic-bezier(.2, .7, .2, 1) both; }
.ficha--cambio > *:nth-child(2) { animation-delay: .04s; }
.ficha--cambio > *:nth-child(3) { animation-delay: .08s; }
.ficha--cambio > *:nth-child(n+4) { animation-delay: .12s; }

/* Personas: la ficha aparece al cambiar de artista */
.js .artista:not([hidden]) { animation: aparecer .5s ease both; }
.js .artista:not([hidden]) .artista__texto > * { animation: subir .6s cubic-bezier(.2, .7, .2, 1) both; }
.js .artista:not([hidden]) .artista__texto > *:nth-child(2) { animation-delay: .06s; }
.js .artista:not([hidden]) .artista__texto > *:nth-child(3) { animation-delay: .12s; }
.js .artista:not([hidden]) .artista__texto > *:nth-child(4) { animation-delay: .18s; }

/* Imágenes y botones al pasar el mouse */
.circulo, .gota, .capsula, .foto-ancha, .artista__obras img { transition: transform .5s cubic-bezier(.2, .7, .2, 1), border-radius .6s ease; }
.gota:hover { transform: scale(1.03); border-radius: 50%; }
.capsula:hover, .circulo:hover, .artista__obras img:hover { transform: scale(1.03); }
.boton, .selector a, .etapa, .fecha { transition: transform .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.boton:hover, .selector a:hover { transform: translateY(-2px); }
.etapa:hover, .fecha:hover { transform: translateY(-4px); box-shadow: 0 10px 0 -2px rgba(62, 47, 114, .18); }
.brujula { animation: respirar 8s ease-in-out infinite; }

/* Aparición al hacer scroll (la clase la pone js/animaciones.js) */
.revelar { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
.revelar.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .revelar { opacity: 1; transform: none; }
}

/* Ajustes de la portada animada */
.portada .ondas { left: -80px; right: auto; width: calc(100% + 160px); }
.portada__logo svg { overflow: visible; }
.portada .etiqueta { color: var(--crema-2); }

/* ============ Manual de marca ============ */
/* Horizon (encabezados) y Bernoru (logo) no están en Google Fonts.
   Si el colectivo tiene los archivos con licencia web, copiarlos en /fonts y se usan solos. */
/* Cuando tengan horizon.woff2 en /fonts, descomentar:
@font-face { font-family: 'Horizon'; src: url('../fonts/horizon.woff2') format('woff2'); font-weight: 700 900; font-display: swap; } */

.logo-sal { width: 100%; height: auto; }
.portada__logo { animation: aparecer 1.2s .3s both, flotar 9s 1.5s ease-in-out infinite; }
.estrella { width: 64px; height: auto; }

.mision-vision { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; padding: 8px 0 4px; border-top: 2px solid var(--crema-2); padding-top: 20px; }
.mision-vision p:last-child { font-size: 17px; line-height: 1.55; margin-top: 6px; }

.con-forma { position: relative; overflow: hidden; }
.con-forma > .contenedor { position: relative; z-index: 1; }
.forma { position: absolute; pointer-events: none; z-index: 0; height: auto; }
.forma--personas { right: -60px; bottom: -40px; width: min(420px, 45vw); opacity: .9; }
.forma--recorrido { left: -70px; bottom: -70px; width: min(240px, 30vw); }

.duotono { filter: url(#duotono-sal); }
.dos-fotos { isolation: isolate; }
.dos-fotos > img { transition: filter .6s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.dos-fotos > img.duotono:hover { filter: none; }

.mec { width: 100%; max-width: 320px; height: auto; }

@media (max-width: 640px) {
  .forma--personas { width: 220px; right: -70px; bottom: -30px; opacity: .5; }
  .forma--recorrido { display: none; }
  .estrella { top: auto; bottom: 150px; right: 16px; width: 44px; }
}

/* Arcanos del Vuelo (portada) */
.arcanos-home { background: #07021A; border-top: 1px solid #1e0a50; }
.arcanos-home .titulo-seccion { color: #E8DF70; }
.arcanos-home .etiqueta { color: #C8A840; }
.arcanos-texto { flex: 1 1 380px; }
.arcanos-texto p:not(.etiqueta) { font-size: 19px; color: #D9D2A8; max-width: 520px; }
.arcanos-home .boton { background: #C8A840; border-color: #C8A840; color: #07021A; }
.arcanos-home .boton:hover { background: #E8DF70; border-color: #E8DF70; }
.arcanos-cartas { flex: 1 1 380px; position: relative; display: block; height: 380px; max-width: 460px; }
.arcanos-cartas img { position: absolute; top: 20px; left: 50%; width: 170px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; border: 2px solid #C8A840; box-shadow: 0 20px 40px rgba(0,0,0,.5); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.arcanos-cartas img:nth-child(1) { transform: translateX(-120%) rotate(-12deg); }
.arcanos-cartas img:nth-child(2) { transform: translateX(-50%); z-index: 1; }
.arcanos-cartas img:nth-child(3) { transform: translateX(20%) rotate(12deg); }
.arcanos-cartas:hover img:nth-child(1) { transform: translateX(-135%) rotate(-18deg); }
.arcanos-cartas:hover img:nth-child(2) { transform: translateX(-50%) translateY(-14px); }
.arcanos-cartas:hover img:nth-child(3) { transform: translateX(35%) rotate(18deg); }
@media (max-width: 640px) { .arcanos-cartas { height: 300px; } .arcanos-cartas img { width: 130px; } }
