/*
Theme Name: Plexo Art
Description: Tema de bloques artístico para galerías, estudios y proyectos culturales. Landing page de una sola página, editable desde el editor de WordPress. Creado por Plexo.
Version: 0.4.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: plexo-art
*/

:root {
	--tap-gutter: clamp(1.5rem, 7vw, 7rem); /* margen lateral de toda la web */
	--tap-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--tap-serif: var(--wp--preset--font-family--serif);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--amarillo); color: #000; }
section[id] { scroll-margin-top: 4.5rem; }
:focus-visible { outline: 2px solid var(--wp--preset--color--azul); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
.wp-site-blocks > * { margin-block-start: 0; }
.tap-gutter { padding-left: var(--tap-gutter); padding-right: var(--tap-gutter); }
.tap-measure { max-width: 42rem; }
/* El texto de apertura se alinea con el borde izquierdo de los bloques anchos */
.tap-section > .tap-measure { margin-left: max(0px, calc((100% - 1240px) / 2)) !important; }
.tap-hero-text .tap-measure { margin-left: 0 !important; }
.tap-demo-note { font-size: 0.8rem; color: var(--wp--preset--color--gris); font-style: italic; }

/* ---------- Cabecera ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.9);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.4s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--wp--preset--color--linea); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header .wp-block-site-title a { text-decoration: none; }
.site-header .wp-block-navigation-item__content {
	text-decoration: none;
	padding-block: 0.25rem;
	background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
	transition: background-size 0.45s var(--tap-ease);
}
.site-header .wp-block-navigation-item__content:hover { background-size: 100% 1px; }
.site-header .tap-nav-cta > .wp-block-navigation-item__content {
	background: #000;
	color: #fff;
	padding: 0.55rem 1.3rem;
	transition: background-color 0.35s ease;
}
.site-header .tap-nav-cta > .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--azul);
}

/* ---------- Botones ---------- */
.wp-block-button__link {
	transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, transform 0.4s var(--tap-ease);
}
.wp-block-button__link:hover { transform: translateY(-3px); }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: var(--wp--preset--color--azul);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: #000;
	color: #fff;
	border-color: #000;
}

/* ---------- Secciones ---------- */
.tap-section { padding-top: clamp(3rem, 6.5vw, 6rem); padding-bottom: clamp(3rem, 6.5vw, 6rem); }
.tap-section--alt { background: var(--wp--preset--color--papel); }
.tap-section--dark { background: #000; color: #fff; }
.tap-section--dark a { color: #fff; }
.tap-section--dark .tap-demo-note { color: rgba(255, 255, 255, 0.55); }
.tap-section--dark .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: #fff; color: #000 !important; }
.tap-section--dark .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: var(--wp--preset--color--amarillo); }
.tap-section--dark .wp-block-button.is-style-outline .wp-block-button__link { color: #fff !important; border-color: rgba(255, 255, 255, 0.5); }
.tap-section--dark .wp-block-button.is-style-outline .wp-block-button__link:hover { background: #fff; color: #000 !important; border-color: #fff; }
.tap-section h2 { margin: 0 0 1.5rem; }
.tap-section h2 + p { font-size: var(--wp--preset--font-size--large); }

/* ---------- Portada ---------- */
.tap-hero { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.wp-block-group.tap-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: end;
}
.wp-block-group.tap-hero-grid > * { margin: 0; }
.tap-hero h1 {
	font-size: clamp(3.25rem, 9vw, 8.25rem);
	line-height: 0.95;
	letter-spacing: -0.035em;
	margin: 1.25rem 0 2rem;
}
.tap-hero-place { color: var(--wp--preset--color--gris); font-size: 0.95rem; margin: 0; }
.tap-hero-art img { display: block; width: 100%; }
@media (max-width: 860px) {
	.wp-block-group.tap-hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Quiénes somos ---------- */
.tap-two {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 6vw, 6rem);
	margin-top: clamp(2rem, 4vw, 3rem);
}
.wp-block-group.tap-two > * { margin: 0; }
.tap-card { border-top: 1px solid #000; padding-top: 1.5rem; }
.tap-card h3 { margin: 0 0 1rem; }
@media (max-width: 760px) { .tap-two { grid-template-columns: minmax(0, 1fr); } }

.tap-valores-title { margin-top: clamp(2rem, 4vw, 3rem); }
.tap-valores {
	list-style: none;
	padding: 0;
	margin: 1.25rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 2rem;
	font-family: var(--tap-serif);
	font-size: clamp(1.9rem, 4.2vw, 3.5rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
}
.tap-valores li {
	margin: 0;
	cursor: default;
	transition: color 0.35s ease, transform 0.45s var(--tap-ease);
}
.tap-valores li:nth-child(even) { font-style: italic; }
.tap-valores li:nth-child(odd):hover { color: var(--wp--preset--color--azul); transform: translateY(-4px); }
.tap-valores li:nth-child(even):hover { color: var(--wp--preset--color--rosa); transform: translateY(-4px); }

/* ---------- Quiénes somos: collage ---------- */
.wp-block-group.tap-about {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
}
.wp-block-group.tap-about > * { margin: 0; }
.tap-stack { display: grid; gap: 1.75rem; margin-top: 2rem; }
.wp-block-group.tap-stack > * { margin: 0; }
.tap-collage { position: relative; padding-bottom: clamp(3rem, 7vw, 5rem); }
.tap-collage .tap-collage-a { margin: 0; overflow: hidden; }
.tap-collage .tap-collage-a img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.tap-collage .tap-collage-b {
	position: absolute;
	left: calc(clamp(1rem, 3vw, 2.5rem) * -1);
	bottom: 0;
	width: 48%;
	margin: 0;
	border: 8px solid #fff;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
	transition: transform 0.9s var(--tap-ease);
}
.tap-collage:hover .tap-collage-b { transform: translate(-6px, -10px) rotate(-1.5deg); }
.tap-collage .tap-collage-b img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
@media (max-width: 860px) {
	.wp-block-group.tap-about { grid-template-columns: minmax(0, 1fr); }
	.tap-collage .tap-collage-b { left: 1rem; }
}

/* ---------- Galería (diseño de la v0.1, a petición del cliente) ---------- */
.tap-grid { gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: clamp(2rem, 4vw, 3rem); }
.tap-obra figure { margin: 0 0 1rem; overflow: hidden; background: var(--wp--preset--color--linea); }
.tap-obra img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	transition: transform 0.6s ease;
}
.tap-obra:hover img { transform: scale(1.03); }
.tap-obra h3 {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1.25rem;
	font-weight: 500;
	letter-spacing: 0;
	margin: 0.35rem 0 0.5rem;
}
.tap-obra p { margin-block: 0 0.5rem; }
.tap-gallery .tap-meta {
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gris);
	margin: 0;
}
.tap-author {
	font-size: 0.85rem;
	color: var(--wp--preset--color--gris);
	border-left: 2px solid var(--wp--preset--color--amarillo);
	padding-left: 0.7rem;
}
/* Filtro por categoría (se crea solo con JavaScript) */
.tap-filtros { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.tap-filtros button {
	font: inherit;
	font-size: 0.9rem;
	padding: 0.5rem 1.15rem;
	background: transparent;
	color: #000;
	border: 1px solid #000;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.35s var(--tap-ease);
}
.tap-filtros button:hover { transform: translateY(-2px); background: var(--wp--preset--color--amarillo); border-color: #000; }
.tap-filtros button[aria-pressed="true"] { background: #000; color: #fff; }
.tap-obra { transition: opacity 0.4s ease, transform 0.4s var(--tap-ease); }
.tap-obra.is-leaving { opacity: 0; transform: scale(0.96); pointer-events: none; }
.tap-gallery-cta { margin-top: clamp(2rem, 4vw, 3rem); }

/* ---------- Proyectos (lista tipo programa de exposiciones) ---------- */
.tap-rows { margin-top: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid #000; }
.wp-block-group.tap-row {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 2.2fr);
	gap: 0.75rem clamp(1.5rem, 4vw, 4rem);
	align-items: center;
	position: relative;
	padding: clamp(1.5rem, 3vw, 2.25rem) 0;
	border-top: 1px solid #000;
	transition: padding-left 0.55s var(--tap-ease);
}
.wp-block-group.tap-row > * { margin: 0; }
.tap-row::before {
	content: "";
	position: absolute;
	left: 0;
	top: -1px;
	height: 3px;
	width: 0;
	background: var(--c, #000);
	transition: width 0.7s var(--tap-ease);
}
.tap-row:hover { padding-left: 1rem; }
.tap-row:hover::before { width: 100%; }
.tap-row h3 { font-size: clamp(1.9rem, 3.6vw, 3rem); transition: color 0.4s ease; }
.tap-row:hover h3 { color: var(--t, #000); }
.tap-row:nth-child(odd) { --c: var(--wp--preset--color--azul); --t: var(--wp--preset--color--azul); }
.tap-row:nth-child(even) { --c: var(--wp--preset--color--rosa); --t: var(--wp--preset--color--rosa); }
.tap-row:nth-child(3n) { --c: var(--wp--preset--color--amarillo); }
@media (max-width: 760px) { .wp-block-group.tap-row { grid-template-columns: minmax(0, 1fr); } .tap-thumb { max-width: 16rem; } }

.tap-thumb { margin: 0; overflow: hidden; }
.tap-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.9s var(--tap-ease); }
.tap-row:hover .tap-thumb img { transform: scale(1.08) rotate(1deg); }
.tap-artistas-title { margin-top: clamp(2.5rem, 5vw, 4rem); }
.tap-artistas { margin-top: 1rem; }
.tap-artistas details { border-top: 1px solid var(--wp--preset--color--linea); padding-block: 1.1rem; }
.tap-artistas details:last-child { border-bottom: 1px solid var(--wp--preset--color--linea); }
.tap-artistas summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	cursor: pointer;
	list-style: none;
	font-family: var(--tap-serif);
	font-size: 1.5rem;
}
.tap-artistas summary::-webkit-details-marker { display: none; }
.tap-artistas summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1.6rem;
	transition: transform 0.45s var(--tap-ease), color 0.3s ease;
}
.tap-artistas summary:hover::after { color: var(--wp--preset--color--rosa); }
.tap-artistas details[open] summary::after { transform: rotate(45deg); }
.tap-artistas details p { margin: 0.9rem 0 0; color: var(--wp--preset--color--gris); line-height: 1.9; max-width: 60rem; }

/* ---------- Cursos ---------- */
.tap-three {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 3vw, 3rem);
	margin-top: clamp(2rem, 4vw, 3rem);
}
.wp-block-group.tap-three > * { margin: 0; }
.tap-curso { border-top: 1px solid #000; padding-top: 1.25rem; transition: border-color 0.4s ease; }
.tap-curso:nth-child(1):hover { border-color: var(--wp--preset--color--azul); }
.tap-curso:nth-child(2):hover { border-color: var(--wp--preset--color--rosa); }
.tap-curso:nth-child(3):hover { border-color: var(--wp--preset--color--amarillo); }
.tap-curso figure { margin: 0 0 1.25rem; overflow: hidden; }
.tap-curso figure img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform 0.9s var(--tap-ease); }
.tap-curso:hover figure img { transform: scale(1.06); }
.tap-curso h3 { font-size: 2rem; margin: 0 0 0.75rem; }
.tap-curso .tap-meta { font-size: 0.85rem; color: var(--wp--preset--color--gris); margin: 0 0 0.75rem; }
@media (max-width: 980px) { .tap-three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tap-three { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contacto ---------- */
.tap-contact h2 { font-size: clamp(2.75rem, 7.5vw, 6.5rem); line-height: 0.98; letter-spacing: -0.03em; max-width: 16ch; }
.wp-block-group.tap-contact-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: center;
}
.wp-block-group.tap-contact-grid > * { margin: 0; }
.tap-contact-art img { display: block; width: 100%; }
@media (max-width: 860px) {
	.wp-block-group.tap-contact-grid { grid-template-columns: minmax(0, 1fr); }
	.tap-contact-art { max-width: 22rem; }
}
.tap-contact-info {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: 2rem;
	margin-top: clamp(2rem, 4vw, 3rem);
	padding-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
}
.wp-block-group.tap-contact-info > * { margin: 0; }
.tap-contact-info p { margin: 0.3rem 0 0; }
.tap-contact-info .tap-meta { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); margin: 0; }
.tap-section--dark .tap-contact-info a {
	text-decoration: none;
	background: linear-gradient(var(--wp--preset--color--amarillo), var(--wp--preset--color--amarillo)) left bottom / 100% 1px no-repeat;
	transition: background-size 0.4s var(--tap-ease), color 0.3s ease;
}
.tap-section--dark .tap-contact-info a:hover { background-size: 100% 100%; color: #000; }

/* ---------- Pie ---------- */
.tap-footer { border-top: 1px solid var(--wp--preset--color--linea); font-size: 0.85rem; color: var(--wp--preset--color--gris); }
.tap-footer p { margin: 0; }

/* ---------- Movimiento ----------
   La clase .tap-motion la añade functions.php solo si la persona NO ha pedido
   "reducir movimiento" en su dispositivo. */
@keyframes tap-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes tap-fade { from { opacity: 0; } to { opacity: 1; } }

.tap-motion .tap-hero-text > * { opacity: 0; animation: tap-rise 1.1s var(--tap-ease) forwards; }
.tap-motion .tap-hero-text > *:nth-child(1) { animation-delay: 0.05s; }
.tap-motion .tap-hero-text > *:nth-child(2) { animation-delay: 0.18s; }
.tap-motion .tap-hero-text > *:nth-child(3) { animation-delay: 0.36s; }
.tap-motion .tap-hero-text > *:nth-child(4) { animation-delay: 0.5s; }
.tap-motion .tap-hero-art { opacity: 0; animation: tap-fade 1.6s ease 0.25s forwards; }

.tap-motion .tap-reveal {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.9s var(--tap-ease), transform 0.9s var(--tap-ease);
	transition-delay: var(--d, 0s);
}
.tap-motion .tap-reveal.is-in { opacity: 1; transform: none; }
.tap-motion .tap-row.tap-reveal {
	transition: opacity 0.9s var(--tap-ease), transform 0.9s var(--tap-ease), padding-left 0.55s var(--tap-ease);
	transition-delay: var(--d, 0s), var(--d, 0s), 0s;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
