/*
 * Página "Muy pronto" (plantilla de página "Muy pronto").
 *
 * El contenido (logo, textos, íconos) vive en la página de WordPress y se
 * edita desde el panel. Este archivo solo pone el estilo: lo único fijo es
 * lo decorativo (formas de fondo, cuadrícula, animaciones y el trazo curvo
 * bajo el título, que se adapta a cualquier texto que se escriba).
 * Los colores salen de la paleta de theme.json.
 */

@font-face {
	font-family: "Caveat";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/caveat-latin-700-normal.woff2") format("woff2");
}

/* La portada ocupa todo el ancho: se anula el margen lateral base. */
.wp-site-blocks {
	padding-left: 0;
	padding-right: 0;
}

body {
	margin: 0;
	background: var(--wp--preset--color--blanco);
}

.soon {
	--soon-ink: var(--wp--preset--color--teal-oscuro);
	--soon-teal: var(--wp--preset--color--teal);
	--soon-sky: var(--wp--preset--color--celeste);
	--soon-coral: var(--wp--preset--color--coral);
	--soon-paper: var(--wp--preset--color--celeste-suave);
	--soon-coral-soft: #ffe1e1;

	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1.5rem, 4vw, 3rem);

	color: var(--soon-ink);
	font-family: var(--wp--preset--font-family--poppins);
	font-size: 1rem;
	line-height: 1.65;

	/* Fondo cuadriculado sutil (textura de la marca) */
	background-color: var(--wp--preset--color--blanco);
	background-image:
		linear-gradient(var(--soon-paper) 2px, transparent 2px),
		linear-gradient(90deg, var(--soon-paper) 2px, transparent 2px);
	background-size: 64px 64px;
	background-position: center top;
}

.soon,
.soon *,
.soon *::before,
.soon *::after {
	box-sizing: border-box;
}

/* Formas decorativas de fondo */

.soon::before,
.soon::after,
.soon__wrapper::before {
	content: "";
	position: absolute;
	z-index: -1;
	border-radius: 50%;
	pointer-events: none;
}

.soon::before {
	width: 460px;
	height: 460px;
	top: -240px;
	right: -140px;
	background: var(--soon-paper);
	box-shadow: 0 0 0 2px var(--soon-sky);
}

.soon::after {
	width: 340px;
	height: 340px;
	bottom: -190px;
	left: -110px;
	background: var(--soon-coral-soft);
}

.soon__wrapper::before {
	width: 96px;
	height: 96px;
	top: 40%;
	right: 2%;
	border: 18px solid var(--soon-sky);
	opacity: 0.55;
	animation: soon-bob 6s ease-in-out infinite;
	--soon-r0: 0deg;
	--soon-r1: 10deg;
}

/* Elementos flotantes: bloques de imagen (íconos y sello) que se pueden reemplazar */

/* En el editor cada bloque trae position: relative; el selector doble evita que la anule */
.soon > .soon__float {
	position: absolute;
}

.soon__float {
	z-index: 0;
	margin: 0;
	pointer-events: none;
	user-select: none;
	filter: drop-shadow(0 14px 16px rgba(1, 59, 69, 0.18));
	animation: soon-bob var(--soon-dur, 6s) ease-in-out var(--soon-delay, 0s) infinite;
}

.soon__float img {
	display: block;
	width: 100%;
	height: auto;
}

.soon__float--a {
	width: clamp(72px, 9vw, 132px);
	left: 7%;
	top: 21%;
	--soon-dur: 6s;
	--soon-r0: -7deg;
	--soon-r1: 1deg;
}

.soon__float--b {
	width: clamp(64px, 8vw, 112px);
	right: 8%;
	top: 13%;
	--soon-dur: 7s;
	--soon-delay: -2s;
	--soon-r0: 8deg;
	--soon-r1: 2deg;
}

.soon__float--c {
	width: clamp(60px, 7vw, 100px);
	left: 13%;
	bottom: 12%;
	--soon-dur: 8s;
	--soon-delay: -4s;
	--soon-r0: 4deg;
	--soon-r1: -5deg;
}

.soon__float--d {
	width: clamp(76px, 10vw, 140px);
	right: 10%;
	bottom: 15%;
	--soon-dur: 6.5s;
	--soon-delay: -1s;
	--soon-r0: -8deg;
	--soon-r1: 0deg;
}

.soon__float--seal {
	width: clamp(90px, 11vw, 160px);
	left: 24%;
	top: 6%;
	filter: none;
	opacity: 0.9;
	--soon-dur: 9s;
	--soon-delay: -3s;
	--soon-r0: -4deg;
	--soon-r1: 4deg;
}

/* Contenido */

.soon__wrapper {
	position: relative;
	z-index: 1;
	width: 100%;
	display: flex;
	justify-content: center;
}

.soon__content {
	width: 100%;
	max-width: 760px;
	text-align: center;
	animation: soon-appear 0.8s ease-out both;
}

/* Los bloques traen su propio espacio entre bloques: se anula para controlarlo aquí */
.soon__content > * {
	margin-block: 0;
}

.soon__logo {
	width: fit-content;
	margin: 0 auto 1.75rem;
	line-height: 0;
}

.soon__logo img {
	display: block;
	width: clamp(150px, 22vw, 210px);
	height: auto;
}

/* Etiqueta */

.soon__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1.6rem;
	padding: 0.55rem 1rem;
	background: var(--wp--preset--color--blanco);
	border: 2px solid var(--soon-ink);
	border-radius: 999px;
	box-shadow: 4px 4px 0 var(--soon-sky);
	color: var(--soon-ink);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1.2;
	animation: soon-slide-down 0.7s ease-out both;
}

/* El punto de la etiqueta es decorativo */
.soon__badge::before {
	content: "";
	flex: none;
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: var(--soon-coral);
	box-shadow: 0 0 0 4px var(--soon-coral-soft);
	animation: soon-pulse 2.2s ease-in-out infinite;
}

/*
 * Título con el trazo curvo. El trazo cuelga del propio título (dos
 * pseudo-elementos con máscara), así se adapta a cualquier texto que se
 * escriba y no se pierde al editarlo. Se dibuja en unidades del viewBox
 * (300×19) para que el grosor guarde proporción con la letra.
 */
.soon__title {
	position: relative;
	isolation: isolate;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto 1.6rem;
	padding: 0 0.04em 0.16em;
	color: var(--soon-ink);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: clamp(2.6rem, 13.5vw, 8rem);
	font-weight: 800;
	line-height: 0.95;
	letter-spacing: -0.055em;
	text-wrap: balance;
}

.soon__title::before,
.soon__title::after {
	content: "";
	position: absolute;
	z-index: -1;
	left: -2%;
	bottom: -0.1em;
	width: 104%;
	height: 0.36em;
	pointer-events: none;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	clip-path: inset(0 100% 0 0);
	animation: soon-reveal 0.9s cubic-bezier(0.55, 0, 0.25, 1) forwards;
}

.soon__title::after {
	background: var(--soon-coral);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 19' preserveAspectRatio='none'%3E%3Cpath d='M5 6.5 C80 15 212 16 295 3.5' fill='none' stroke='%23000' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 19' preserveAspectRatio='none'%3E%3Cpath d='M5 6.5 C80 15 212 16 295 3.5' fill='none' stroke='%23000' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E");
	animation-delay: 0.55s;
}

.soon__title::before {
	background: var(--soon-sky);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 19' preserveAspectRatio='none'%3E%3Cpath d='M62 16 C130 18 204 18 258 14' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 19' preserveAspectRatio='none'%3E%3Cpath d='M62 16 C130 18 204 18 258 14' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E");
	animation-duration: 0.6s;
	animation-delay: 1.3s;
}

/* Texto */

.soon__subtitle {
	max-width: 36rem;
	margin: 0 auto;
	color: #3f6068;
	font-size: clamp(1.05rem, 2.5vw, 1.3rem);
	line-height: 1.65;
	text-wrap: balance;
}

.soon__subtitle strong {
	color: var(--soon-ink);
	font-weight: 600;
}

.soon__note {
	margin-top: 1rem;
	color: var(--soon-coral);
	font-family: var(--wp--preset--font-family--caveat);
	font-size: clamp(1.9rem, 4.5vw, 2.6rem);
	font-weight: 700;
	line-height: 1;
	transform: rotate(-2deg);
}

/* Separador: tres barras redondeadas (coral, teal, celeste) */

.soon hr.soon__line {
	width: 142px;
	height: 6px;
	margin: 1.9rem auto 1.5rem;
	padding: 0;
	border: 0;
	background: linear-gradient(90deg, var(--soon-coral) 0 36px, var(--soon-teal) 36px 112px, var(--soon-sky) 112px 142px);
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 142 6'%3E%3Crect width='36' height='6' rx='3'/%3E%3Crect x='44' width='68' height='6' rx='3'/%3E%3Crect x='120' width='22' height='6' rx='3'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 142 6'%3E%3Crect width='36' height='6' rx='3'/%3E%3Crect x='44' width='68' height='6' rx='3'/%3E%3Crect x='120' width='22' height='6' rx='3'/%3E%3C/svg%3E");
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	opacity: 1;
}

/* Bajada de materias */

.soon__tagline {
	color: var(--soon-ink);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.soon__footer {
	margin-top: 2rem;
	color: #5d7a81;
	font-size: 0.8rem;
}

/* Animaciones */

@keyframes soon-appear {
	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes soon-slide-down {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes soon-bob {
	0%,
	100% {
		transform: translateY(0) rotate(var(--soon-r0, 0deg));
	}

	50% {
		transform: translateY(calc(var(--soon-bob, 14px) * -1)) rotate(var(--soon-r1, 6deg));
	}
}

@keyframes soon-pulse {
	0%,
	100% {
		box-shadow: 0 0 0 4px var(--soon-coral-soft);
	}

	50% {
		box-shadow: 0 0 0 8px rgba(255, 87, 87, 0.12);
	}
}

@keyframes soon-reveal {
	to {
		clip-path: inset(0);
	}
}

/* Pantallas medianas: junto al texto no caben todos, se quitan dos */

@media (max-width: 1100px) {
	.soon__float--c,
	.soon__float--seal {
		display: none;
	}

	.soon__float--a {
		left: 3%;
		top: 9%;
	}

	.soon__float--b {
		right: 4%;
		top: 7%;
	}

	.soon__float--d {
		right: 4%;
		bottom: 5%;
	}
}

/*
 * Tableta y móvil: los cuatro íconos tienen su propia franja, dos arriba
 * (a los lados del logo) y dos abajo (a los lados del pie). El relleno de la
 * página reserva ese espacio, así que nunca se montan sobre el texto.
 */

@media (max-width: 900px) {
	.soon {
		padding: 6rem 1.25rem;
		--soon-bob: 8px;
	}

	.soon__wrapper::before {
		top: auto;
		right: -28px;
		bottom: 12%;
	}

	.soon__float--c {
		display: block;
	}

	.soon__float--a {
		width: clamp(64px, 19vw, 112px);
		left: 5%;
		top: 1rem;
	}

	.soon__float--b {
		width: clamp(58px, 17vw, 100px);
		right: 6%;
		top: 1.6rem;
	}

	.soon__float--c {
		width: clamp(58px, 17vw, 100px);
		left: 7%;
		top: auto;
		bottom: 1.5rem;
	}

	.soon__float--d {
		width: clamp(64px, 20vw, 116px);
		right: 5%;
		bottom: 1rem;
	}
}

/* Móvil */

@media (max-width: 600px) {
	.soon__wrapper::before {
		width: 72px;
		height: 72px;
		border-width: 14px;
		right: -26px;
		bottom: 8%;
	}

	.soon::before {
		width: 300px;
		height: 300px;
		top: -160px;
		right: -110px;
	}

	.soon__badge {
		font-size: 0.78rem;
		margin-bottom: 1.3rem;
	}

	.soon__tagline {
		font-size: 0.7rem;
		letter-spacing: 0.1em;
	}
}

/* Respeto por usuarios que prefieren menos movimiento */

@media (prefers-reduced-motion: reduce) {
	.soon *,
	.soon *::before,
	.soon *::after,
	.soon::before,
	.soon::after,
	.soon__wrapper::before,
	.soon__float {
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
		animation-iteration-count: 1 !important;
	}

	.soon__title::before,
	.soon__title::after {
		clip-path: none;
	}
}
