/*
Theme Name: Bestiario
Author: Bestiario
Description: Tema de bloques para el estudio Bestiario. Dirección "Lámina": fondo claro, serif editorial y grabados. La home se arma con patrones editables desde el editor del sitio.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
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: bestiario
*/

/* ------------------------------------------------------------------
   Variables
   El color de acento sale de la paleta del tema (Estilos > Colores >
   "Bermellón"): cambiarlo ahí cambia el círculo del hero y el cierre.
------------------------------------------------------------------- */
:root {
	--bst-paper: var(--wp--preset--color--papel, #F4F4F0);
	--bst-ink: var(--wp--preset--color--tinta, #141414);
	--bst-mute: #5C5C58;
	--bst-soft: #3A3A37;
	--bst-rule: #CFCFC8;
	--bst-accent: var(--wp--preset--color--bermellon, #EC4A22);
	--bst-serif: var(--wp--preset--font-family--instrument-serif, "Instrument Serif", Georgia, serif);
	--bst-sans: var(--wp--preset--font-family--instrument-sans, "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif);
	--bst-pad: clamp(20px, 5.5vw, 80px);
	--bst-max: 1280px;
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.wp-site-blocks > * {
	margin-block-start: 0;
}

/* Los bloques dentro de las secciones no usan el margen automático de
   WordPress: el espaciado se maneja con gap en cada contenedor. */
body .bst-section :where(p, h1, h2, h3, h4, ul, figure, .wp-block-group, .wp-block-buttons, .wp-block-image),
body .bst-header :where(p, figure, .wp-block-group, .wp-block-image, .wp-block-navigation),
body .bst-footer :where(p, figure, .wp-block-group, .wp-block-image) {
	margin-block: 0;
}

.bst-section {
	scroll-margin-top: 24px;
}

/* Contenedor: ancho máximo centrado con margen lateral fluido */
.bst-wrap {
	box-sizing: border-box;
	max-width: calc(var(--bst-max) + 2 * var(--bst-pad));
	margin-inline: auto;
	padding-inline: var(--bst-pad);
}

/* ------------------------------------------------------------------
   Piezas compartidas
------------------------------------------------------------------- */
.bst-eyebrow {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.18em;
	line-height: 1.5;
	text-transform: uppercase;
	color: var(--bst-mute);
}

.bst-display {
	font-family: var(--bst-serif);
	font-weight: 400;
	font-size: clamp(54px, 7.6vw, 112px);
	line-height: 0.96;
	letter-spacing: -0.012em;
	text-wrap: balance;
}

.bst-h2 {
	font-family: var(--bst-serif);
	font-weight: 400;
	font-size: clamp(42px, 5.4vw, 78px);
	line-height: 1;
	letter-spacing: -0.01em;
}

.bst-lead {
	max-width: 520px;
	font-size: 20px;
	line-height: 1.5;
	color: var(--bst-soft);
}

.bst-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 32px;
}

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	min-height: 56px;
	padding: 0 28px;
	border-radius: 0;
	background: var(--bst-ink);
	color: var(--bst-paper);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
	background: #3A3A37;
	color: var(--bst-paper);
}

.bst-btn .wp-block-button__link::after,
.bst-textlink--arrow a::after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 12h16M13 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 12h16M13 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bst-textlink a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-size: 16px;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 5px;
}

.bst-textlink--arrow a::after {
	width: 16px;
	height: 16px;
}

.bst-textlink a:hover {
	color: var(--bst-mute);
}

/* ------------------------------------------------------------------
   Cabecera
------------------------------------------------------------------- */
.bst-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 40px;
	padding-block: 26px;
}

.bst-logo img {
	display: block;
	width: auto !important;
	height: 34px !important;
}

.bst-menu .wp-block-navigation__container {
	align-items: center;
	gap: 4px 36px;
}

.bst-menu .wp-block-navigation-item__content {
	display: flex;
	align-items: center;
	min-height: 44px;
	font-size: 15px;
}

.bst-menu .wp-block-navigation-item__content:hover {
	color: var(--bst-mute);
}

.bst-menu .bst-nav-cta > .wp-block-navigation-item__content {
	box-sizing: border-box;
	padding: 0 20px;
	border: 1.5px solid currentColor;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.bst-menu .wp-block-navigation__responsive-container.is-menu-open {
	padding: 26px var(--bst-pad);
}

.bst-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 12px;
}

.bst-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 22px;
}

.bst-menu .wp-block-navigation__responsive-container.is-menu-open .bst-nav-cta > .wp-block-navigation-item__content {
	min-height: 52px;
	margin-top: 12px;
	padding: 0 22px;
	font-size: 14px;
}

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------- */
.bst-hero {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
	align-items: center;
	gap: 48px 32px;
	padding-block: 40px 88px;
}

.bst-hero__text {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.bst-hero__figure {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.bst-hero__art {
	position: relative;
	padding: 9% 0 4%;
}

.bst-hero__art::before {
	content: "";
	position: absolute;
	top: 0;
	right: 3%;
	width: 76%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: var(--bst-accent);
}

.bst-hero__art .wp-block-image {
	position: relative;
	width: 108%;
	max-width: none;
	margin-left: -8%;
}

.bst-hero__art img {
	display: block;
	width: 100%;
	height: auto;
}

.bst-caption {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	padding-top: 14px;
	border-top: 1px solid var(--bst-ink);
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bst-mute);
}

.bst-caption strong {
	font-weight: 600;
	color: var(--bst-ink);
}

/* ------------------------------------------------------------------
   Clientes
------------------------------------------------------------------- */
.bst-clients__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 28px 44px;
	padding-block: 30px;
	border-block: 1px solid var(--bst-ink);
}

.bst-clients__row .bst-eyebrow {
	max-width: 150px;
}

.bst-client img {
	display: block;
	width: auto !important;
	height: 44px !important;
}

.bst-client--bajo img {
	height: 18px !important;
}

.bst-client--medio img {
	height: 39px !important;
}

.bst-client--alto img {
	height: 56px !important;
}

/* ------------------------------------------------------------------
   El problema
------------------------------------------------------------------- */
.bst-statement {
	padding-block: 120px 112px;
}

.bst-statement__text {
	max-width: 1060px;
	font-family: var(--bst-serif);
	font-size: clamp(34px, 4.3vw, 62px);
	line-height: 1.08;
	letter-spacing: -0.008em;
	text-wrap: pretty;
}

/* ------------------------------------------------------------------
   El bestiario (servicios)
------------------------------------------------------------------- */
.bst-bestiary {
	display: flex;
	flex-direction: column;
	gap: 56px;
	padding-bottom: 120px;
}

.bst-sechead {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 48px;
}

.bst-sechead__title {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.bst-sechead__aside {
	max-width: 380px;
	color: var(--bst-soft);
}

.bst-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
	gap: 48px 32px;
}

.bst-card {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding-top: 16px;
	border-top: 1.5px solid var(--bst-ink);
}

.bst-card__meta {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bst-mute);
}

.bst-card__meta strong {
	font-weight: 600;
	color: var(--bst-ink);
}

.bst-card__img {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 210px;
}

.bst-card__img img {
	display: block;
	width: auto !important;
	height: auto !important;
	max-width: 100%;
	max-height: 210px;
	object-fit: contain;
}

.bst-card__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 210px;
	padding: 16px;
	border: 1.5px dashed #8A8A84;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-align: center;
	text-transform: uppercase;
	color: var(--bst-mute);
}

.bst-card__title {
	font-family: var(--bst-serif);
	font-weight: 400;
	font-size: 38px;
	line-height: 1.05;
}

body .bst-section .bst-card__creature {
	margin-top: -12px;
	font-family: var(--bst-serif);
	font-style: italic;
	font-size: 20px;
	color: var(--bst-mute);
}

.bst-card__outcome {
	font-weight: 600;
}

.bst-card__list {
	display: flex;
	flex-direction: column;
	padding: 0;
	list-style: none;
}

.bst-card__list li {
	padding: 11px 0;
	border-top: 1px solid var(--bst-rule);
}

/* ------------------------------------------------------------------
   Resultados
------------------------------------------------------------------- */
.bst-results {
	background: var(--bst-ink);
	color: var(--bst-paper);
}

.bst-results__inner {
	display: flex;
	flex-direction: column;
	gap: 56px;
	padding-block: 104px;
}

.bst-results .bst-eyebrow {
	color: #B4B4AE;
}

.bst-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: 56px 48px;
}

.bst-stat {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.bst-stat__num {
	font-family: var(--bst-serif);
	font-size: clamp(96px, 11.5vw, 172px);
	line-height: 0.86;
	letter-spacing: -0.02em;
}

.bst-stat__label {
	max-width: 320px;
	font-size: 20px;
}

.bst-stat__src {
	padding-top: 14px;
	border-top: 1px solid #4A4A46;
	font-size: 15px;
	color: #B4B4AE;
}

/* ------------------------------------------------------------------
   Casos
------------------------------------------------------------------- */
.bst-cases {
	display: flex;
	flex-direction: column;
	gap: 56px;
	padding-block: 120px;
}

.bst-cases__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
	gap: 56px 32px;
}

.bst-case {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.bst-case__img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.bst-case__tag {
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bst-mute);
}

.bst-case__title {
	font-family: var(--bst-serif);
	font-weight: 400;
	font-size: 32px;
	line-height: 1.1;
	text-wrap: balance;
}

/* ------------------------------------------------------------------
   Cierre
------------------------------------------------------------------- */
.bst-cta {
	background: var(--bst-accent);
	color: var(--bst-ink);
}

.bst-cta__inner {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
	align-items: center;
	gap: 40px 32px;
	padding-block: 96px;
}

.bst-cta__text {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.bst-cta .bst-display {
	font-size: clamp(52px, 7vw, 104px);
}

.bst-cta .bst-lead {
	max-width: 500px;
	color: var(--bst-ink);
}

.bst-cta .bst-textlink a {
	font-size: 17px;
}

.bst-cta .bst-textlink a:hover {
	color: var(--bst-ink);
	text-decoration-thickness: 2px;
}

.bst-cta__img img {
	display: block;
	width: 100%;
	height: auto;
	transform: scaleX(-1);
}

/* ------------------------------------------------------------------
   Pie
------------------------------------------------------------------- */
.bst-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 40px;
	padding-block: 36px 44px;
	font-size: 15px;
	color: var(--bst-mute);
}

.bst-footer .bst-logo img {
	height: 28px !important;
}

.bst-footer a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--bst-ink);
	text-decoration: none;
}

/* ------------------------------------------------------------------
   Páginas internas, entradas y 404
------------------------------------------------------------------- */
.bst-page {
	padding-block: 56px 120px;
}

.bst-page .wp-block-post-title,
.bst-page .wp-block-query-title,
.bst-page__title {
	margin-block: 0 40px;
	font-family: var(--bst-serif);
	font-weight: 400;
	font-size: clamp(44px, 6vw, 88px);
	line-height: 1;
	letter-spacing: -0.01em;
}

.bst-page .wp-block-post-template {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0;
	list-style: none;
}

.bst-page .wp-block-post-template > li {
	margin: 0;
	padding: 28px 0;
	border-top: 1px solid var(--bst-rule);
}

.bst-page .wp-block-post-template .wp-block-post-title {
	margin-block: 0 10px;
	font-size: 34px;
	line-height: 1.1;
}

.bst-page .wp-block-post-template .wp-block-post-title a {
	text-decoration: none;
}

.bst-page .wp-block-post-date {
	margin-block: 0 32px;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bst-mute);
}

.bst-page .wp-block-post-content {
	max-width: 760px;
}
