/* Coqui Rodríguez — prototipo
   Paleta y tipografía tomadas de la maqueta (Diseño WebCoquiRodriguez). */

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Mynerve";
  src: url("../fonts/mynerve.woff2") format("woff2");
  font-display: swap;
}

:root {
  --fondo: #211915;
  --fondo-2: #2d231e;
  --tinta: #ffffff;
  --tinta-suave: #d6d3cf;
  --linea: #ffffff;
  --marco: #f4f1ea;
  --acento: #e2b25a;
  --mano: "Mynerve", "Comic Sans MS", cursive;
  --texto: "Open Sans", system-ui, sans-serif;
  --ancho: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
:root { color-scheme: dark; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font: 400 1.0625rem/1.65 var(--texto);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; }

.saltar {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--tinta); color: var(--fondo); padding: .6rem 1rem; text-decoration: none;
}
.saltar:focus { top: 1rem; }

.contenedor { width: min(var(--ancho), 100% - 2 * var(--gutter)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--mano); font-weight: 400; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin: 0 0 1.1em; max-width: 62ch; }

/* ---------- Cabecera ---------- */
.cabecera { position: relative; z-index: 20; padding-top: clamp(14px, 2.5vw, 28px); }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo img { width: clamp(190px, 26vw, 320px); }
.menu ul { list-style: none; display: flex; gap: clamp(1.2rem, 3.5vw, 3.2rem); margin: 0; padding: 0; }
.menu a {
  text-decoration: none; text-transform: uppercase; letter-spacing: .04em; font-size: .95rem;
  padding: .3rem 0 .45rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5 C18 2 30 7 50 4 S82 3 99 5' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 100% / 0 8px no-repeat;
  transition: background-size .35s cubic-bezier(.4, 1.3, .5, 1);
}
.menu a:hover, .menu a[aria-current="page"] { background-size: 100% 8px; }
.linea-cabecera { display: block; width: 100%; height: 18px; margin-top: 10px; }
.linea-cabecera path { fill: none; stroke: var(--linea); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .linea-cabecera path { animation: trazar 1.6s cubic-bezier(.5, 0, .3, 1) .2s backwards; }

.boton-menu {
  display: none; background: none; border: 2px solid var(--tinta); color: var(--tinta);
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; padding: 0;
}
.boton-menu span, .boton-menu span::before, .boton-menu span::after {
  display: block; width: 20px; height: 2px; background: currentColor; margin: auto; position: relative; content: "";
}
.boton-menu span::before { position: absolute; top: -6px; }
.boton-menu span::after { position: absolute; top: 6px; }

@media (max-width: 760px) {
  .boton-menu { display: grid; place-items: center; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--fondo);
    border-bottom: 2px solid var(--linea); display: none;
  }
  .menu.abierto { display: block; }
  .menu ul { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1.2rem; }
  .menu a { display: block; padding: .8rem 0; font-size: 1.05rem; }
}

/* ---------- Redes ---------- */
.redes { list-style: none; margin: 0; padding: 0; display: flex; gap: .9rem; }
.redes a {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--linea); transition: background .2s, color .2s;
}
.redes a:hover { background: var(--tinta); color: var(--fondo); }
.redes svg { width: 22px; height: 22px; fill: currentColor; }

/* ---------- Marcos de foto (bordes "dibujados" de la maqueta) ---------- */
.marco {
  margin: 0; background: var(--marco); padding: clamp(6px, 1vw, 12px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  clip-path: polygon(0.6% 1.2%, 99.2% 0, 100% 98.6%, 0 100%);
}
.marco img, .marco video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.marco.bn img { filter: grayscale(1) contrast(1.05); }
.marco { rotate: var(--giro, 0deg); transition: rotate .5s cubic-bezier(.3, 1.4, .5, 1), scale .5s cubic-bezier(.3, 1.4, .5, 1); }
.gira-izq { --giro: -1.4deg; }
.gira-der { --giro: 1.1deg; }

/* ---------- Portada ---------- */
.portada { position: relative; padding-top: clamp(10px, 3vw, 40px); }
.portada .redes { position: absolute; left: 0; top: clamp(20px, 3vw, 50px); flex-direction: column; z-index: 5; }
.portada .dibujo { display: block; width: 76%; height: auto; margin-left: 4%; }
.reel { position: absolute; right: 0; top: clamp(10px, 2vw, 30px); width: 42%; z-index: 6; text-align: right; }
.reel .marco { background: transparent; border: 4px solid var(--linea); padding: clamp(8px, 1.4vw, 18px); box-shadow: none; }
.reel .marco { position: relative; }
.reel-abrir { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; cursor: pointer; }
.reel-abrir img, .reel-abrir video { width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--encuadre, 40%); transition: scale .6s cubic-bezier(.3, 1, .4, 1); }
.reel-abrir:hover img, .reel-abrir:hover video { scale: 1.03; }
.reel-abrir:focus-visible { outline: 3px solid var(--acento); outline-offset: 4px; }
/* Botón de play grande sobre el vídeo (lo crea main.js; sin JS quedan los controles del navegador) */
.reel-play {
  position: absolute; inset: 0; margin: auto; width: clamp(76px, 8.5vw, 116px); height: clamp(76px, 8.5vw, 116px);
  border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .6); cursor: pointer; padding: 0;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1), background .2s;
}
.reel-play svg { width: 40%; height: 40%; margin-left: 9%; fill: rgba(33, 25, 21, .85); transition: fill .2s; }
.reel-abrir:hover .reel-play, .reel-abrir:focus-visible .reel-play { transform: scale(1.08); background: rgba(33, 25, 21, .75); border-color: #fff; }
.reel-abrir:hover .reel-play svg, .reel-abrir:focus-visible .reel-play svg { fill: #fff; }
.reel-play[hidden] { display: none; }
.reel p { margin: .7rem 0 0 auto; text-transform: uppercase; letter-spacing: .05em; font-size: .95rem; }

.collage { position: relative; aspect-ratio: 16 / 11.5; margin-top: -34%; z-index: 4; }
.collage .marco { position: absolute; }
.collage .c1 { left: 3%; top: 26%; width: 45%; aspect-ratio: 4 / 5; }
.collage .c2 { left: 30%; top: 0; width: 62%; aspect-ratio: 16 / 11; }

@media (max-width: 760px) {
  .portada { display: flex; flex-direction: column; }
  .portada .redes { position: static; flex-direction: row; order: -1; margin-bottom: 1rem; }
  .portada .dibujo { width: 100%; margin: 0; }
  .reel { position: relative; width: 62%; margin: -18% auto 0; right: auto; top: auto; text-align: center; }
  .reel p { margin-inline: auto; }
  .collage { margin-top: 2rem; aspect-ratio: 4 / 5.5; }
  .collage .c1 { left: 0; top: 42%; width: 55%; }
  .collage .c2 { left: 12%; top: 0; width: 88%; }
}

/* ---------- Frase ---------- */
.frase { text-align: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.frase blockquote { margin: 0 auto; max-width: 30ch; font-family: var(--mano); font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.3; }
.frase cite { display: block; margin-top: 1rem; font: normal .95rem var(--texto); color: var(--tinta-suave); letter-spacing: .05em; }

/* ---------- Tarjetas de portada ---------- */
.accesos { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.5rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.acceso { text-decoration: none; display: block; }
.acceso .marco { aspect-ratio: 4 / 5; margin-bottom: 1.1rem; }
.acceso:hover .marco { rotate: 0deg; scale: 1.02; }
.acceso h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .2em; }
.acceso p { color: var(--tinta-suave); margin: 0; }
@media (max-width: 760px) { .accesos { grid-template-columns: 1fr; } .acceso .marco { aspect-ratio: 16 / 11; } }

/* ---------- Bloques de texto (Sobre mí) ---------- */
.cabecera-pagina { padding: clamp(2rem, 6vw, 4rem) 0 1rem; }
.cabecera-pagina p { font-size: 1.15rem; color: var(--tinta-suave); }
.bloque { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; padding: clamp(2.5rem, 7vw, 5rem) 0; }
.bloque.invertido .bloque-texto { order: 2; }
.bloque-fotos { position: relative; aspect-ratio: 1 / 1.05; }
.bloque-fotos .marco { position: absolute; }
.bloque-fotos .f1 { right: 0; top: 0; width: 72%; aspect-ratio: 4 / 5; }
.bloque-fotos .f2 { left: 0; bottom: 0; width: 56%; aspect-ratio: 4 / 5; }
.bloque-fotos .deco { position: absolute; height: auto; pointer-events: none; z-index: 2; }
.bloque-fotos .estrellas { left: 2%; top: 2%; width: 16%; }
.bloque-fotos.con-escenario { aspect-ratio: 1 / 1.38; }
.bloque-fotos.con-escenario .f2 { bottom: auto; top: 34%; }
.bloque-fotos .burbujas { left: 1%; top: 0; width: 24%; }
.bloque-fotos .escenario { right: -4%; bottom: 0; width: 62%; z-index: 0; }
@media (max-width: 860px) {
  .bloque { grid-template-columns: 1fr; }
  .bloque.invertido .bloque-texto { order: 0; }
}

.escuchas { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.escuchas li { margin: 0 0 1.1rem; }
.play {
  display: inline-flex; align-items: center; gap: .9rem; background: none; border: 0; padding: 0;
  color: inherit; font: inherit; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; text-align: left;
}
.play svg { width: 30px; height: 30px; flex: none; transition: transform .2s; }
.play svg circle, .play svg path { fill: none; stroke: currentColor; stroke-width: 1.6; }
.play:hover svg { transform: scale(1.12); }
.play:hover span { text-decoration: underline; text-underline-offset: 4px; }

.boton {
  display: inline-block; border: 2px solid var(--linea); padding: .45rem 1rem; text-decoration: none;
  text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; background: none; color: var(--tinta);
  cursor: pointer; font-family: var(--texto); transition: background .2s, color .2s;
}
.boton:hover { background: var(--tinta); color: var(--fondo); }
.derecha { text-align: right; }

/* ---------- Galería ---------- */
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filtro { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 0 0 clamp(1.5rem, 4vw, 2.5rem); }
.filtro button {
  background: none; border: 0; color: var(--tinta-suave); font: 400 clamp(1.5rem, 3vw, 2rem) var(--mano);
  padding: .1rem .2rem; cursor: pointer; position: relative;
}
.filtro button[aria-pressed="true"] { color: var(--tinta); }
.filtro button[aria-pressed="true"]::after {
  content: ""; position: absolute; left: -4%; right: -4%; bottom: -2px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1 6 C20 2 35 8 52 5 S80 3 99 6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.filtro button:hover { color: var(--tinta); }

.rejilla { columns: 3 260px; column-gap: clamp(1.2rem, 3vw, 2.4rem); padding: .5rem 0 clamp(3rem, 8vw, 6rem); }
.pieza { break-inside: avoid; margin: 0 0 clamp(1.4rem, 3vw, 2.4rem); }
.pieza[hidden] { display: none; }
.pieza .abrir { all: unset; cursor: zoom-in; display: block; width: 100%; }
.pieza.video .abrir { cursor: pointer; }
.pieza .abrir:focus-visible { outline: 3px solid var(--acento); outline-offset: 6px; }
.pieza .marco { display: block; position: relative; }
.pieza .abrir:hover .marco { rotate: 0deg; scale: 1.02; }
/* bordes irregulares y giros distintos para que la rejilla no quede "en fila" */
.pieza:nth-child(5n+1) .marco { --giro: -1.6deg; clip-path: polygon(0.6% 1.2%, 99.2% 0, 100% 98.6%, 0 100%); }
.pieza:nth-child(5n+2) .marco { --giro: 1.2deg;  clip-path: polygon(0 0.4%, 100% 1.4%, 99.1% 100%, 0.8% 98.8%); }
.pieza:nth-child(5n+3) .marco { --giro: -0.7deg; clip-path: polygon(1.1% 0, 99.4% 0.9%, 100% 99.3%, 0 98.4%); }
.pieza:nth-child(5n+4) .marco { --giro: 2deg;    clip-path: polygon(0 1.5%, 98.9% 0, 100% 100%, 1.2% 99%); }
.pieza:nth-child(5n)   .marco { --giro: -1.1deg; clip-path: polygon(0.9% 0.6%, 100% 0, 99.2% 99.1%, 0 100%); }
.pieza figcaption { font-size: .85rem; color: var(--tinta-suave); margin-top: .7rem; line-height: 1.45; }
.pieza figcaption strong { display: block; color: var(--tinta); font-weight: 600; font-size: .95rem; }
.pieza.video.vertical :is(img, video) { aspect-ratio: 4 / 5; }
.pieza.video.apaisado :is(img, video) { aspect-ratio: 16 / 9; }
.icono-play {
  position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(0,0,0,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l8 5-8 5z' fill='white'/%3E%3C/svg%3E") center / 34px no-repeat;
  transition: transform .2s;
}
.pieza .abrir:hover .icono-play { transform: scale(1.1); }

/* ---------- Contacto ---------- */
.contacto-intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; padding-top: clamp(2rem, 6vw, 4rem); }
.contacto-dibujo { display: block; width: 100%; height: auto; }
@media (max-width: 860px) { .contacto-intro { grid-template-columns: 1fr; } .contacto-dibujo { order: -1; width: min(520px, 100%); } }
.formulario { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; max-width: 820px; margin: 2rem 0 3rem; }
.campo { display: flex; flex-direction: column; gap: .35rem; }
.campo.ancho { grid-column: 1 / -1; }
.campo label { font-size: .9rem; letter-spacing: .03em; }
.campo input, .campo textarea, .campo select {
  background: transparent; color: var(--tinta); border: 2px solid var(--linea); border-radius: 0;
  padding: .7rem .8rem; font: inherit;
}
.campo textarea { min-height: 190px; resize: vertical; }
.campo select option { background: var(--fondo); }
.check { grid-column: 1 / -1; display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; }
.check input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--acento); flex: none; }
.info-rgpd { grid-column: 1 / -1; font-size: .78rem; color: var(--tinta-suave); border-left: 2px solid #555; padding-left: .8rem; }
.info-rgpd p { max-width: none; margin: 0 0 .3rem; }
.formulario .boton { justify-self: start; padding: .7rem 1.6rem; }
.aviso-form { grid-column: 1 / -1; margin: 0; color: var(--acento); }
@media (max-width: 640px) { .formulario { grid-template-columns: 1fr; } }

.datos-contacto { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .5rem; }
.datos-contacto a { text-underline-offset: 4px; }

/* ---------- Legales ---------- */
.legal { max-width: 760px; padding-bottom: 4rem; }
.legal h2 { font-size: 2rem; margin-top: 2.5rem; }
.pendiente { background: #3a2f16; color: #ffdf9e; padding: 0 .3em; border-radius: 3px; }

/* ---------- Pie ---------- */
.pie { border-top: 2px solid var(--linea); padding: 2.5rem 0 1.5rem; margin-top: 2rem; font-size: .9rem; }
.pie .contenedor { display: grid; gap: 1.8rem; }
.pie-fila { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem; }
.pie .logo img { width: 200px; }
.pie nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; padding: 0; }
.pie nav a { text-underline-offset: 4px; color: var(--tinta-suave); }
.kit { text-align: center; }
.kit-leyenda {
  max-width: none; margin: 0 auto .9rem; color: var(--tinta); font-size: .72rem; line-height: 1.5;
  text-transform: uppercase; letter-spacing: .06em;
}
.kit-leyenda::after { content: ""; display: block; width: 120px; height: 1px; background: currentColor; margin: .6rem auto 0; opacity: .7; }
.kit-logos { background: #fff; padding: clamp(.7rem, 1.8vw, 1.1rem) clamp(.8rem, 3vw, 2rem); }
.kit-logos img { width: 100%; max-width: 1100px; margin-inline: auto; }
.copy { color: var(--tinta-suave); font-size: .8rem; margin: 0; max-width: none; }

/* ---------- Visor (fotos y vídeo) a pantalla completa ---------- */
dialog.visor {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0;
  padding: 0; border: 0; background: rgba(12, 9, 7, .94); color: #fff; overflow: hidden;
}
dialog.visor::backdrop { background: transparent; }
dialog.visor .escena {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px clamp(16px, 7vw, 96px) 24px;
}
dialog.visor .escena img, dialog.visor .escena video { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; }
dialog.visor .escena .yt { position: relative; width: min(1100px, 100%); aspect-ratio: 16 / 9; max-height: calc(100dvh - 150px); }
dialog.visor .escena .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
dialog.visor .pie-foto { color: #ddd; text-align: center; font-size: .9rem; margin: .8rem auto 0; max-width: 60ch; }
dialog.visor .pie-foto strong { color: #fff; }
dialog.visor .cerrar, dialog.visor .nav {
  position: fixed; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0, 0, 0, .35); border: 2px solid #fff; color: #fff; cursor: pointer; font: 400 1.6rem/1 var(--texto);
}
dialog.visor .cerrar:hover, dialog.visor .nav:hover { background: #fff; color: #111; }
dialog.visor .cerrar { top: 16px; right: 16px; }
dialog.visor .nav { top: 50%; translate: 0 -50%; }
dialog.visor .ant { left: 16px; }
dialog.visor .sig { right: 16px; }
dialog.visor .contador { position: fixed; top: 28px; left: 20px; font-size: .85rem; color: #bbb; letter-spacing: .05em; }
dialog.visor.unico .nav, dialog.visor.unico .contador { display: none; }
@media (max-width: 700px) {
  dialog.visor .escena { padding: 72px 12px 84px; }
  dialog.visor .nav { top: auto; bottom: 16px; translate: none; }
}

.aviso {
  position: fixed; left: 50%; bottom: 1.5rem; translate: -50% 0; background: var(--tinta); color: var(--fondo);
  padding: .7rem 1.2rem; font-size: .95rem; z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.aviso.visible { opacity: 1; }

/* ---------- Animaciones: orgánicas, una sola vez, nada en bucle ---------- */
@keyframes trazar { from { stroke-dashoffset: 1; } }
@keyframes caer {
  from { opacity: 0; translate: var(--desde-x, 0) 26px; rotate: calc(var(--giro, 0deg) * -2.2); }
}
@keyframes asomar { from { opacity: 0; scale: .35; rotate: -25deg; } 70% { scale: 1.08; } }

/* dibujos: cada trazo aparece por su cuenta, en desorden */
[data-trazos] :is(path, polygon, polyline, line, circle, ellipse, rect) { transition: opacity .7s ease; }
.js [data-trazos]:not(.visto) :is(path, polygon, polyline, line, circle, ellipse, rect) { opacity: 0; }
[data-trazos="pop"] :is(path, polygon) { transform-box: fill-box; transform-origin: center; }
.js [data-trazos="pop"].visto :is(path, polygon) { animation: asomar .9s cubic-bezier(.3, 1.5, .5, 1) backwards; animation-delay: var(--retraso, 0s); }
.tiembla { filter: url(#temblor); }

/* fotos: caen como polaroids sueltas */
.js .marco:not(.visto) { opacity: 0; }
.js .reel .marco:not(.visto) { opacity: 1; } /* el demo reel se ve desde el primer momento (LCP) */
.js .marco.cae { animation: caer .9s cubic-bezier(.25, 1.35, .45, 1) backwards; animation-delay: var(--retraso, 0s); }

/* frase: palabras sueltas */
.frase .pal { display: inline-block; transition: opacity .8s ease, translate .9s cubic-bezier(.25, 1.3, .45, 1); }
.frase cite { transition: opacity 1s ease; }
.js .frase blockquote:not(.visto) .pal { opacity: 0; translate: 0 .45em; }
.js .frase blockquote:not(.visto) cite { opacity: 0; }

/* tarjetas de la home: la tarjeta entera cae (su foto no anima por separado) */
.js .acceso:not(.visto) { opacity: 0; }
.js .acceso.cae { animation: caer 1s cubic-bezier(.25, 1.35, .45, 1) backwards; animation-delay: var(--retraso, 0s); }
.js .acceso .marco { opacity: 1; }
.js .tarjeta:not(.visto), .js li[data-entra]:not(.visto) { opacity: 0; }
.js .tarjeta.cae, .js li[data-entra].cae { animation: caer 1s cubic-bezier(.25, 1.35, .45, 1) backwards; animation-delay: var(--retraso, 0s); }
.js .tarjeta .marco { opacity: 1; }

/* títulos: letras algo torcidas, estáticas */
.letras .palabra { display: inline-block; white-space: nowrap; }
.letras .letra { display: inline-block; rotate: var(--r, 0deg); translate: 0 var(--y, 0); }

@media (prefers-reduced-motion: reduce) {
  .js [data-trazos]:not(.visto) :is(path, polygon, polyline, line, circle, ellipse, rect),
  .js .marco:not(.visto), .js .acceso:not(.visto), .js .tarjeta:not(.visto), .js li[data-entra]:not(.visto),
  .js .frase blockquote:not(.visto) .pal, .js .frase blockquote:not(.visto) cite { opacity: 1; translate: none; }
  .tiembla { filter: none; }
}

/* ================================================================
   WordPress: bloques del editor y piezas del tema
   ================================================================ */
.pagina { padding-bottom: clamp(2rem, 6vw, 4rem); }
.pagina .contenido > h2 { font-size: clamp(1.8rem, 3.5vw, 2.3rem); margin-top: 2.5rem; }
.pagina .contenido > ul, .pagina .contenido > ol { max-width: 62ch; padding-left: 1.2em; }
.pagina .contenido a { text-underline-offset: 4px; }
.cabecera-pagina .contenido p { font-size: 1.15rem; color: var(--tinta-suave); }

/* Grupos: el contenedor interno que añade WordPress no debe romper la rejilla */
.bloque > .wp-block-group__inner-container,
.bloque-fotos > .wp-block-group__inner-container { display: contents; }
.bloque { margin: 0; }
.bloque-fotos .wp-block-image { margin: 0; }
.bloque-fotos .wp-block-image img { width: 100%; height: 100%; }
.wp-block-image.marco img { height: 100%; }

/* Botones */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; margin: 0 0 1.4rem; }
.wp-block-buttons.is-content-justification-right { justify-content: flex-end; }
.wp-block-buttons.is-content-justification-center { justify-content: center; }
.wp-block-button__link, .boton {
  display: inline-block; border: 2px solid var(--linea); border-radius: 0; padding: .45rem 1rem; text-decoration: none;
  text-transform: uppercase; letter-spacing: .04em; font: 400 .95rem/1.4 var(--texto); background: none; color: var(--tinta);
  cursor: pointer; transition: background .2s, color .2s;
}
.wp-block-button__link:hover, .boton:hover { background: var(--tinta); color: var(--fondo); }
.wp-block-button.is-style-play .wp-block-button__link {
  display: inline-flex; align-items: center; gap: .9rem; border: 0; padding: 0; background: none; color: var(--tinta);
}
.wp-block-button.is-style-play .wp-block-button__link::before {
  content: ""; flex: none; width: 30px; height: 30px; transition: transform .2s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14.5' fill='none' stroke='white' stroke-width='1.6'/%3E%3Cpath d='M13 10.5l8 5.5-8 5.5z' fill='none' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-button.is-style-play .wp-block-button__link:hover { background: none; color: var(--tinta); text-decoration: underline; text-underline-offset: 4px; }
.wp-block-button.is-style-play .wp-block-button__link:hover::before { transform: scale(1.12); }
.bloque-texto .wp-block-buttons:has(.is-style-play) { flex-direction: column; align-items: flex-start; gap: 1.1rem; }

/* Galería sin portada de vídeo */
.sin-portada { display: block; aspect-ratio: 16 / 9; background: #000; }

/* Formulario */
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.aviso-form { grid-column: 1 / -1; margin: 0; padding: .9rem 1.1rem; border: 2px solid currentColor; }
.aviso-form.ok { color: #cdebb0; }
.aviso-form.error { color: #ffc4b3; }
.aviso-form ul { margin: .4rem 0 0; padding-left: 1.2em; }
.aviso-form a { color: inherit; }
.campo [aria-invalid="true"] { border-color: #ff9d85; }
.formulario .boton { justify-self: start; padding: .7rem 1.6rem; }

/* Landing */
.boton-cabecera { white-space: nowrap; }
.landing-formulario { padding-top: clamp(2rem, 6vw, 4rem); }

/* Mapa del sitio */
.mapa-web { list-style: none; padding: 0; display: grid; gap: .5rem; }
.mapa-web a { text-underline-offset: 4px; }

/* Encuadre elegido en el editor (--foco): se nota en las fotos que van recortadas */
.wp-block-image img { object-position: var(--foco, 50% 50%); }

/* Imágenes sueltas en el contenido */
.contenido .wp-block-image.marco { max-width: 520px; }
