/* RE Theme · portada animada, transición de scroll y apariciones.
   Todo el movimiento depende de la clase `re-anim` en <html>, que solo se
   añade si la persona no ha pedido reducir el movimiento. */

.wp-site-blocks { overflow-x: clip; }

/* ---------- Portada ---------- */
.re-hero2 {
	--fs: min(19vh, 11.2vw);
	position: sticky;
	top: 0;
	z-index: 0;
	display: flex;
	flex-direction: column;
	min-height: calc(100svh - 82px);
	max-width: none !important;
	padding: 24px 20px calc(36px + 6vw);
	overflow: hidden;
	background: var(--re-fondo);
}

.re-hero2__bg {
	position: absolute;
	right: -14vh;
	bottom: -30vh;
	width: 100vh;
	pointer-events: none;
}
/* Una sola espiral gigante, cortada por el borde, como marca de agua. */
.re-hero2__bg img { display: block; width: 100%; height: auto; opacity: .07; }

.re-hero2__stage {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
	/* Todo el título alineado a la izquierda, en la misma línea que el texto de abajo:
	   así da igual lo larga que sea la palabra que rota. */
	justify-content: flex-start;
	width: 100%;
	max-width: 1120px;
	margin-inline: auto;
	padding-block: 24px;
	transform-origin: 50% 40%;
	will-change: transform, opacity;
}

.re-hero2__title {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: calc(var(--fs) * .12);
	margin: 0;
	font-family: var(--re-fuente-marca);
	font-weight: 300;
	color: var(--re-texto);
}

.re-hero2__lead {
	max-width: calc(var(--fs) * 6.4);
	font-size: clamp(20px, calc(var(--fs) * .25), 44px);
	line-height: 1.15;
	text-wrap: balance;
	letter-spacing: -.005em;
}

.re-hero2__word {
	display: flex;
	align-items: center;
	font-size: var(--fs);
	line-height: .95;
	letter-spacing: -.03em;
	white-space: nowrap;
	font-variation-settings: "opsz" 144;
}
.re-hero2__re { color: var(--re-marca); font-weight: 400; }

.re-hero2__pill {
	position: relative;
	flex: none;
	width: 1.2em;
	height: 1.2em;
	margin-inline: .085em;
	border-radius: 999px;
	overflow: hidden;
	background: var(--re-fondo-profundo);
}
.re-hero2__pill::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--re-violeta-400);
	opacity: 0;
	pointer-events: none;
}
.re-hero2__canvas {
	position: absolute;
	left: 50%;
	top: 0;
	display: block;
	width: 1.2em;
	height: 1.2em;
	transform: translateX(-50%);
}

/* Palabras que rotan tras «RE»: cambio lento y sutil. */
.re-rot {
	display: inline-block;
	text-align: left;
	transition: opacity .9s ease, filter .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}
.re-rot.is-out { opacity: 0; filter: blur(8px); transform: translateY(.06em); }

.re-hero2__foot {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: var(--re-espacio-5);
	width: 100%;
	max-width: 1120px;
	margin-inline: auto;
}
.re-hero2__text {
	flex: none;
	max-width: 27em;
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
	color: var(--re-texto-suave);
}
.re-hero2__text::first-letter {
	float: left;
	margin: .06em .1em 0 0;
	font: 400 3.1em/.8 var(--re-fuente-marca);
	color: var(--re-texto);
}
.re-hero2__rule {
	flex: 1;
	height: 1px;
	margin-bottom: 23px;
	background: var(--re-borde-fuerte);
	transform-origin: 50% 50%;
}
.re-hero2__foot .re-btn { flex: none; }

.re-hero2__pause {
	position: absolute;
	right: 12px;
	top: 12px;
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: transparent;
	border: 1px solid var(--re-borde);
	border-radius: 50%;
	color: var(--re-texto-suave);
	cursor: pointer;
}
.re-hero2__pause:hover { background: var(--re-fondo-alt); color: var(--re-texto); }
.re-hero2__pause-label {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.re-hero2__pause-icon {
	width: 10px;
	height: 12px;
	border-inline: 3px solid currentColor;
}
.re-hero2__pause[aria-pressed="true"] .re-hero2__pause-icon {
	width: 0;
	height: 0;
	border-block: 7px solid transparent;
	border-inline: 11px solid currentColor;
	border-inline-end: 0;
	margin-inline-start: 3px;
}

/* Estado inicial, antes de que arranque la apertura (evita el parpadeo). */
html.re-anim:not(.re-hero-on):not(.re-anim-done) .re-hero2__pill {
	width: .012em;
	margin-inline: .02em;
	clip-path: inset(50% 0);
}
html.re-anim:not(.re-hero-on):not(.re-anim-done) :is(.re-hero2__lead, .re-hero2__foot, .re-hero2__bg, .re-hero2__pause) {
	opacity: 0;
}
html.re-anim:not(.re-hero-on):not(.re-anim-done) body:has([data-re-hero]) .re-header {
	transform: translateY(-110%);
}

/* Móvil: la palabra se queda entera en una línea y la cápsula se abre debajo. */
@media (max-width: 720px) {
	.re-hero2 {
		--fs: min(15.5vw, 12vh);
		position: relative;
		min-height: calc(100svh - 73px);
		padding-bottom: calc(32px + 6vw);
	}
	.re-hero2__title,
	.re-hero2__word { width: 100%; }
	.re-hero2__word { flex-wrap: wrap; row-gap: .14em; }
	.re-hero2__word::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
	.re-hero2__pill {
		order: 3;
		width: min(64vw, 300px);
		height: auto;
		aspect-ratio: 1;
		margin: .1em auto 0;
	}
	.re-hero2__canvas {
		left: 0;
		top: 50%;
		width: 100%;
		height: auto;
		aspect-ratio: 1;
		transform: translateY(-50%);
	}
	html.re-anim:not(.re-hero-on):not(.re-anim-done) .re-hero2__pill {
		width: min(64vw, 300px);
		height: 1.5px;
		aspect-ratio: auto;
		margin: .1em auto 0;
		clip-path: inset(0 50%);
	}
	.re-hero2__foot { flex-direction: column; align-items: flex-start; gap: var(--re-espacio-4); }
	.re-hero2__text { max-width: none; font-size: 15px; }
	.re-hero2__rule { flex: none; width: 100%; margin: 0; }
	.re-hero2__bg { width: 120vw; right: -40vw; bottom: -30vw; }
}

/* Pantallas bajas: sin portada fija, para que nada quede cortado. */
@media (max-height: 560px) {
	.re-hero2 { position: relative; }
}

/* ---------- Lo que sube por encima de la portada ---------- */
.re-hero2 ~ * { position: relative; z-index: 1; margin-block-start: 0 !important; }
.re-hero2 ~ .re-section:not(.re-section--alt):not(.re-section--dark) { background: var(--re-fondo); }

/* El borde curvo con resplandor violeta, como un horizonte. */
.re-hero2 + .re-section { padding-block-start: calc(var(--re-espacio-7) + 2vw); }
.re-hero2 + .re-section::before {
	content: "";
	position: absolute;
	left: -18%;
	right: -18%;
	top: -6vw;
	height: 12vw;
	z-index: -1;
	border-radius: 50%;
	background: var(--re-fondo);
	box-shadow:
		0 -1px 0 rgba(139, 92, 246, .28),
		0 -14px 44px -4px rgba(139, 92, 246, .42),
		0 -44px 120px -8px rgba(124, 124, 240, .34);
	/* Solo la mitad de arriba: el resplandor no debe asomar por debajo. */
	clip-path: inset(-240px 0 50% 0);
	pointer-events: none;
}

/* ---------- Sección fijada: titular quieto, texto que pasa ---------- */
.re-pin h2 {
	font-size: var(--wp--preset--font-size--display);
	font-weight: 300;
	line-height: 1.04;
	letter-spacing: -.01em;
	margin: 0;
}
.re-pin p { font-size: 20px; line-height: 1.5; }
.re-pin p + p { margin-block-start: var(--re-espacio-6); }
@media (min-width: 782px) {
	.re-grid-2.re-pin { align-items: start; }
	.re-pin > :first-child { position: sticky; top: 96px; }
	.re-pin > :last-child { padding-block: 6vh 10vh; }
	.re-pin p { font-size: 24px; line-height: 1.42; }
	.re-pin p + p { margin-block-start: 14vh; }
}

/* ---------- Sección oscura: fondo tinta, letras claras ---------- */
.re-section--dark .re-lead { color: var(--re-tinta-200); }
.re-section--dark .re-steps > li::before { border-color: var(--re-violeta-400); color: var(--re-violeta-300); }
.re-section--dark .re-steps > li { color: var(--re-tinta-200); }
.re-section--dark .re-steps > li strong { color: var(--re-texto-invertido); }
.re-section--dark .re-card { background: rgba(253, 251, 249, .05); border-color: rgba(253, 251, 249, .16); }
.re-section--dark .re-card:hover { border-color: var(--re-violeta-400); box-shadow: none; }
.re-section--dark .re-price { color: var(--re-texto-invertido); }
.re-section--dark .re-meta { color: var(--re-tinta-300); }
.re-section--dark .re-icon-wrap { color: var(--re-violeta-300); }
.re-section--dark .re-pending { color: var(--re-tinta-300); border-color: rgba(253, 251, 249, .28); }
.re-section--dark .wp-block-button.is-style-outline > .wp-block-button__link { border-color: var(--re-violeta-400); color: var(--re-texto-invertido); }
.re-section--dark .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(253, 251, 249, .08); }
.re-section--dark li::marker { color: var(--re-violeta-300); }

/* ---------- Cabecera de las páginas interiores ---------- */
.re-page-head {
	position: relative;
	overflow: hidden;
	padding-block: clamp(56px, 13vh, 136px) var(--re-espacio-6);
}
/* La misma espiral gigante de la portada, cortada por el borde. */
.re-page-head::before {
	content: "";
	position: absolute;
	right: -12vh;
	top: -30vh;
	width: min(58vh, 90vw);
	aspect-ratio: 1;
	background: url("../logo/simbolo-color.svg") center / contain no-repeat;
	opacity: .07;
	pointer-events: none;
}
.re-page-head > * { position: relative; }
.re-page-head h1 {
	font-size: clamp(44px, 8.4vw, 112px);
	font-weight: 300;
	line-height: .98;
	letter-spacing: -.028em;
	font-variation-settings: "opsz" 144;
	padding-block-end: var(--re-espacio-5);
	border-bottom: 0;
}
/* La línea fina que se dibuja bajo el título, como en la portada. */
.re-page-head h1::after {
	content: "";
	display: block;
	height: 1px;
	margin-top: var(--re-espacio-5);
	background: var(--re-borde-fuerte);
	transform-origin: 0 50%;
}
.re-page-head .re-lead { font-size: clamp(18px, 2vw, 22px); max-width: 32em; margin-top: 0; }
.re-page-head + .wp-block-post-content > .re-section:first-child > .re-lead {
	font-size: clamp(19px, 2.1vw, 24px);
	line-height: 1.45;
}

@keyframes re-up {
	from { opacity: 0; transform: translateY(.22em); filter: blur(8px); }
	to { opacity: 1; transform: none; filter: none; }
}
@keyframes re-draw {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}
@keyframes re-fade {
	from { opacity: 0; }
	to { opacity: .07; }
}
html.re-anim .re-page-head h1 { animation: re-up 1s cubic-bezier(.2, .7, .2, 1) both; }
html.re-anim .re-page-head h1::after { animation: re-draw 1.2s cubic-bezier(.4, 0, .2, 1) .35s both; }
html.re-anim .re-page-head::before { animation: re-fade 1.6s ease .2s both; }
html.re-anim .re-page-head .re-lead { animation: re-up 1s cubic-bezier(.2, .7, .2, 1) .25s both; }

/* ---------- Galería de fotos con pie ---------- */
.re-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--re-espacio-5);
	margin-block: var(--re-espacio-6) !important;
}
.re-gallery > .re-figure { margin: 0 !important; }
.re-figure > * { margin: 0; }
.re-figure .re-photo { border-radius: var(--re-radio-lg); }
.re-figure .re-meta { margin-top: var(--re-espacio-2); }

/* ---------- Titulares de sección y tarjetas ---------- */
.re-section > h2 { font-size: var(--wp--preset--font-size--titulo-1); }
.re-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.re-card:hover {
	transform: translateY(-3px);
	border-color: var(--re-borde-fuerte);
	box-shadow: var(--re-sombra-media);
}

/* ---------- Apariciones al hacer scroll ---------- */
html.re-anim .re-rv {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
	transition-delay: var(--re-rv-d, 0ms);
}
html.re-anim .re-rv.is-in { opacity: 1; transform: none; }
html.re-anim .re-card.re-rv.is-in { transition: opacity .8s ease, transform .25s ease, box-shadow .25s ease, border-color .25s ease; transition-delay: 0ms; }

/* ---------- Cabecera fija: al bajar se recoge en una cápsula blanca ---------- */
.wp-site-blocks > .wp-block-template-part:first-child {
	position: sticky;
	top: 0;
	z-index: 60;
}
.re-header { transition: background-color .35s ease, border-color .35s ease, padding .35s ease; }
.re-header__inner {
	border: 1px solid transparent;
	border-radius: 36px;
	transition: background-color .35s ease, box-shadow .35s ease, border-color .35s ease, padding .35s ease, max-width .35s ease;
}
html.re-stuck .re-header {
	background: transparent;
	border-bottom-color: transparent;
	padding: 10px 12px 0;
}
html.re-stuck .re-header__inner {
	max-width: 1080px;
	padding: 6px 10px 6px 20px;
	background: #fff;
	border-color: var(--re-borde);
	box-shadow: var(--re-sombra-media);
}
html.re-stuck .re-header__logo img { height: 40px; }
@media (min-width: 960px) {
	html.re-stuck .re-header__logo img { height: 44px; }
}
html.re-stuck .re-header__nav.is-open { padding-inline-end: 10px; }

/* ---------- Botón flotante de WhatsApp ---------- */
.re-wa {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 55;
	display: inline-grid;
	place-items: center;
	width: 56px;
	height: 56px;
	background: var(--re-accion);
	border-radius: 50%;
	color: #fff;
	box-shadow: var(--re-sombra-violeta);
	transition: background-color .2s ease, transform .2s ease;
}
.re-wa:hover { background: var(--re-accion-hover); color: #fff; transform: translateY(-2px); }
.re-wa svg { display: block; width: 28px; height: 28px; }

/* ---------- Palabra animada del pie ---------- */
.re-footer__word {
	margin: var(--re-espacio-4) 0 var(--re-espacio-3);
	font: 300 clamp(40px, 5vw, 60px)/1 var(--re-fuente-marca);
	letter-spacing: -.02em;
	white-space: nowrap;
	color: var(--re-texto-invertido);
}
.re-footer__word b { font-weight: 400; color: var(--re-violeta-400); }
.re-footer__pause {
	margin-top: var(--re-espacio-3);
	padding: 0;
	background: none;
	border: 0;
	color: var(--re-tinta-300);
	font: 400 12px/1.4 var(--re-fuente-texto);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	min-height: 32px;
}
.re-footer__pause:hover { color: var(--re-texto-invertido); }
html:not(.re-anim) .re-footer__pause { display: none; }

/* En el editor de WordPress la portada no se fija. */
.editor-styles-wrapper .re-hero2 { position: relative; min-height: 560px; }

/* ---------- Carrusel (fotos y productos): se desliza con el dedo, con flechas ---------- */
.re-carousel {
	display: flex !important;
	gap: var(--re-espacio-5);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-bottom: var(--re-espacio-3);
	margin-block: var(--re-espacio-6) 0 !important;
	scrollbar-width: thin;
}
.re-carousel > * { flex: 0 0 min(80%, 456px); scroll-snap-align: center; margin: 0 !important; max-width: none !important; }
.re-carousel img, .re-carousel .re-photo { width: 100%; height: auto; }
.re-carousel-nav { display: flex; justify-content: flex-end; gap: var(--re-espacio-2); margin-top: var(--re-espacio-3); }
.re-carousel-nav button {
	width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--wp--preset--color--borde); background: var(--wp--preset--color--fondo);
	color: var(--wp--preset--color--tinta); font-size: 20px; line-height: 1; cursor: pointer;
}
.re-carousel-nav button:hover { border-color: var(--wp--preset--color--marca); }
.re-carousel-nav button:focus-visible { outline: 2px solid var(--wp--preset--color--marca); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .re-carousel { scroll-behavior: auto; } }
/* ---------- Testimonios ---------- */
.re-quote {
	margin: 0 !important;
	padding: var(--re-espacio-5) var(--re-espacio-6);
	background: var(--wp--preset--color--fondo);
	border: 1px solid var(--wp--preset--color--borde);
	border-left: 3px solid var(--wp--preset--color--marca);
	border-radius: var(--re-radio-lg);
}
.re-quote p { font-family: var(--wp--preset--font-family--marca, Fraunces, serif); font-size: var(--wp--preset--font-size--cuerpo-grande); line-height: 1.5; margin: 0; }
.re-quote cite { display: block; margin-top: var(--re-espacio-3); font-style: normal; font-size: var(--wp--preset--font-size--pequeno); color: var(--wp--preset--color--texto-suave); }
/* ---------- Tarjetas del mismo tamaño (charlas) ---------- */
.re-equal { align-items: stretch !important; }
.re-equal > .re-card { display: flex; flex-direction: column; }
.re-equal > .re-card .re-photo, .re-equal > .re-card figure img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.re-equal > .re-card > .re-fm, .re-equal > .re-card > :last-child { margin-top: auto; }

/* ---------- Notice: título, texto y vídeo centrados y del mismo ancho ---------- */
.re-notice { max-width: 880px; margin-inline: auto !important; text-align: center; }
.re-notice > * { max-width: none !important; margin-inline: auto !important; }
.re-notice > p { max-width: 68ch !important; }
.re-notice .wp-block-embed { margin-top: var(--re-espacio-5) !important; text-align: initial; }
/* Foto vertical dentro de una columna de texto: no más alta que la pantalla. */
.re-figure--portrait { margin-top: var(--re-espacio-5) !important; }
.re-figure--portrait img, .re-figure--portrait .re-photo { width: 100%; max-height: 70vh; object-fit: cover; border-radius: var(--re-radio-lg); }
/* ---------- Banner de redes sociales ---------- */
.re-social-banner { text-align: center; }
.re-social-banner > * { margin-inline: auto !important; }
.wp-block-social-links.re-social { justify-content: center; gap: var(--re-espacio-4) !important; padding-bottom: var(--re-espacio-3); }
.wp-block-social-links.re-social > li { flex: 0 0 auto !important; max-width: none !important; scroll-snap-align: center; }
.wp-block-social-links.re-social .wp-social-link {
	background: var(--wp--preset--color--fondo) !important; color: var(--wp--preset--color--tinta) !important;
	border: 1px solid var(--wp--preset--color--borde); border-radius: 16px !important;
	transition: border-color .2s ease, transform .2s ease;
}
.wp-block-social-links.re-social .wp-social-link:hover { border-color: var(--wp--preset--color--marca); transform: translateY(-2px); }
.wp-block-social-links.re-social .wp-block-social-link-anchor { flex-direction: column; gap: 8px; padding: 20px 24px !important; }
.wp-block-social-links.re-social .wp-social-link svg { color: var(--wp--preset--color--marca) !important; fill: currentColor !important; width: 36px; height: 36px; }
.wp-block-social-links.re-social .wp-block-social-link-label { font-size: 15px !important; font-weight: 500; line-height: 1.2; }
.wp-block-social-links.re-social { font-size: 16px !important; }
.re-carousel-nav[hidden] { display: none; }
@media (min-width: 782px) { .wp-block-social-links.re-social { overflow: visible; } }
/* Fotos del carrusel con pie (Sobre mí): todas con la misma altura, recortadas al centro. */
.re-carousel > .re-figure img, .re-carousel > .re-figure .re-photo { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
/* El pie de foto de cada imagen trae su propia proporción: en el carrusel manda la misma para todas. */
.re-carousel > .re-figure { width: min(80%, 456px); }
.re-carousel > .re-figure .re-photo { aspect-ratio: 4 / 3 !important; width: 100%; overflow: hidden; }
.re-carousel > .re-figure .re-photo img { width: 100% !important; height: 100% !important; aspect-ratio: auto; object-fit: cover; }