/* Buen Viento / Bon Vent (2025): negro, plata, verde petróleo y el rojo de las flores.
   Serif fina en mayúsculas (Cormorant) solo en el título, partido por la cuerda como en su cartel, y en el lema.
   La estructura de la portada y de las secciones es la común (edicion.css). */
body.ed-viento {
  --fondo: #000000;
  --ink: #eceef0;
  --ink-2: #a9b1b7;
  --c: #ec4a52;
  --rojo: #ec4a52;
  --plata: #c9ced3;
  --linea-ed: rgba(236, 238, 240, 0.16);
  --f-garamond: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  /* el cruce va sobre el verde petróleo (tinta 12,8:1) */
  --banda: #0f2b2c;
  --banda-ink: #eceef0;
}

/* ---------- Portada: la cuerda baja desde arriba, parte el título en dos (es | fr) y acaba en la piedra ---------- */
.ed-viento .ed-hero-txt { --v-pt: clamp(36px, 5vw, 72px); --v-fs: clamp(3rem, 6.1vw, 5.75rem); }
.v-cuerda {
  /* el centro del título: la columna de texto solo tiene margen a la izquierda */
  left: calc(50% + var(--gutter) / 2); top: 0; width: 80px; margin-left: -40px;
  height: calc(var(--v-pt) + 2.16 * var(--v-fs)); overflow: visible;
}
.v-cuerda .soga { stroke: var(--plata); stroke-width: 1.5; }
.v-cuerda .nudo { fill: none; stroke: var(--plata); stroke-width: 3; stroke-linecap: round; }
.v-cuerda .roca { fill: #3b4347; stroke: var(--plata); stroke-width: 1; }
.v-cuerda .piedra { transform-box: fill-box; transform-origin: 50% 0; }
.v-tit {
  display: grid; grid-template-columns: 1fr 1fr;
  font: 500 var(--v-fs)/0.98 var(--f-garamond); text-transform: uppercase; letter-spacing: 0.02em; color: #e9ebee;
}
.v-tit .es { text-align: right; padding-right: 0.4em; }
.v-tit .fr { text-align: left; padding-left: 0.4em; }
.v-lema {
  margin: calc(0.2 * var(--v-fs) + 72px) auto 0; text-align: center; max-width: none;
  font: italic 500 clamp(1.5rem, 2.1vw, 2rem)/1.15 var(--f-garamond); color: var(--plata);
}
@media (min-width: 1001px) { .ed-viento .ed-hero-datos .datos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .ed-viento .ed-hero-txt { --v-fs: clamp(2.5rem, 10vw, 5.75rem); }
  .v-cuerda { left: 50%; }
}

/* el viento: ráfagas de plata que cruzan el cartel (la única animación continua de la página; buen-viento.js la para fuera de vista) */
.v-aire { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.v-aire .viento-l { fill: none; stroke: var(--plata); stroke-width: 1.2; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.34; stroke-dasharray: 0.16 1.2; stroke-dashoffset: 0.16; }

/* ---------- Sinopsis y los tres movimientos ---------- */
.v-sinopsis { grid-column: 1 / span 8; }
.v-disc { grid-column: 10 / -1; }
.v-disc h3 { margin: 0 0 12px; font: 800 1.25rem/1.2 var(--f-sas); font-stretch: 108%; }
.v-disc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.v-disc li { font: 600 0.875rem/1 var(--f-sas); padding: 9px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--linea-ed); }
.v-disc p { margin: 18px 0 0; color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 1000px) { .v-sinopsis, .v-disc { grid-column: 1 / -1; } .v-disc { margin-top: 12px; } }

.v-mov { margin: clamp(32px, 4vw, 56px) 0; }
.v-mov ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 32px); }
.v-mov li { display: grid; align-content: start; gap: 10px; border-top: 1px solid var(--linea-ed); padding-top: 18px; }
.v-mov svg { width: 100%; height: auto; color: var(--ink); overflow: visible; }
.v-mov .l { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.v-mov .l2 { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; opacity: 0.45; }
.v-mov .rojo { fill: var(--c); }
.v-mov .aro { fill: none; stroke: var(--ink); stroke-width: 2; }
.v-mov span { font: 700 1rem/1.2 var(--f-sas); font-stretch: 108%; }
@media (max-width: 600px) { .v-mov ol { grid-template-columns: 1fr; } .v-mov li { grid-template-columns: 1fr 1.2fr; align-items: center; } }

/* ---------- El cruce: la cuerda roja entre los dos polos, sobre el petróleo (rojo 4:1, gráfico) ---------- */
.ed-viento .proceso-ed .cruce-eje { --c: var(--rojo); }

/* ---------- Movimiento ----------
   Entrada propia: la cuerda baja y la piedra se queda colgando (900 ms en total).
   Al bajar, el viento separa las dos mitades del título (solo se desplazan).
   Los tres movimientos se dibujan con el punto rojo como pluma, uno detrás de otro. */
@media (prefers-reduced-motion: reduce) { .v-aire { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .listo .v-cuerda .soga { stroke-dasharray: 1; animation: trazo 600ms var(--ease-viaje) backwards; }
  .listo .v-cuerda .piedra { animation: cuelga 600ms var(--muelle) 300ms backwards; }

  .v-aire .viento-l { animation: rafaga 11s linear infinite; }
  .v-aire .viento-l:nth-child(2) { animation-duration: 13s; animation-delay: -4s; }
  .v-aire .viento-l:nth-child(3) { animation-duration: 9.5s; animation-delay: -7s; }
  .v-aire .viento-l:nth-child(4) { animation-duration: 12s; animation-delay: -2s; }
  .v-aire { transition: opacity 1200ms var(--ease-out); }
  .v-aire.quieta { opacity: 0; }
  .v-aire.quieta .viento-l { animation-play-state: paused; }

  @supports (animation-timeline: scroll()) {
    .listo .ed-tit.v-tit > .es { animation: levanta 800ms var(--ease-out) 0ms backwards, aparta-es linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 80vh; }
    .listo .ed-tit.v-tit > .fr { animation: levanta 800ms var(--ease-out) 70ms backwards, aparta-fr linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 80vh; }
  }

  .v-mov li:nth-child(1) { --i: 0; } .v-mov li:nth-child(2) { --i: 1; } .v-mov li:nth-child(3) { --i: 2; }
  .v-mov.espera .l { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .v-mov.espera .l2, .v-mov.espera .aro { opacity: 0; }
  .v-mov.visto .l { stroke-dasharray: 1; animation: trazo 1100ms var(--ease-viaje) backwards; animation-delay: calc(var(--i) * 180ms); }
  .v-mov.visto .l2 { stroke-dasharray: 1; animation: trazo 800ms var(--ease-out) backwards; animation-delay: calc(var(--i) * 180ms + 500ms); }
  .v-mov.visto .aro { transform-box: fill-box; transform-origin: center; animation: asentar-svg 600ms var(--muelle) 1400ms backwards; }
}
@keyframes cuelga { from { opacity: 0; transform: translateY(-14px) rotate(-10deg); } }
@keyframes rafaga { from { stroke-dashoffset: 0.16; } to { stroke-dashoffset: -1; } }
@keyframes aparta-es { to { translate: -0.35em 0; } }
@keyframes aparta-fr { to { translate: 0.35em 0; } }
