/* "Hacia los 40 años": cierre de /nosotros/.
   Sin JS (o con "reducir movimiento") queda el texto plano, centrado y en
   verde. Con JS, se reemplaza por una frase manuscrita en SVG que se "escribe"
   una sola vez al entrar en pantalla: cada letra se traza con su contorno, de
   izquierda a derecha, después se rellena y por último se dibuja un subrayado.
   Idea tomada del efecto de trazo con `stroke-dashoffset` de Mellis. */
.af-cierre {
	display: block;
	margin-top: 36px;
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(20px, 2.4vw, 28px);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: var(--verde, #79d100);
}

.af-cierre__svg {
	display: block;
	width: clamp(240px, 34vw, 420px);
	height: auto;
	margin: 0 auto;
	overflow: visible;
}

.af-cierre__svg text {
	fill: transparent;
	stroke: var(--verde, #79d100);
	stroke-width: 1.3;
	stroke-linecap: round;
	stroke-linejoin: round;
	font-family: 'Dancing Script', cursive;
	font-weight: 700;
	transition: fill 0.9s ease;
}

.af-cierre__svg.is-relleno text {
	fill: var(--verde, #79d100);
}

/* Cada letra arranca "sin trazar": el guion es más largo que cualquier contorno. */
.af-cierre__ch {
	stroke-dasharray: 900;
	stroke-dashoffset: 900;
}

.af-cierre__svg.is-escribiendo .af-cierre__ch {
	animation: af-cierre-trazo 1.1s cubic-bezier(0.45, 0, 0.2, 1) forwards;
	animation-delay: calc(var(--i) * 0.11s);
}

.af-cierre__subr {
	fill: none;
	stroke: var(--verde, #79d100);
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
}

.af-cierre__svg.is-subrayando .af-cierre__subr {
	animation: af-cierre-trazo 0.9s cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

@keyframes af-cierre-trazo {
	to { stroke-dashoffset: 0; }
}

@media (max-width: 720px) {
	.af-cierre {
		margin-top: 28px;
	}

	.af-cierre__svg {
		width: min(78vw, 320px);
	}
}
