/*
 * Sistema editorial (F10, propuesta B): tokens, tipografía, botones, foco,
 * marcador de sección y formularios. Común a todas las páginas.
 */

@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/roboto-regular.woff2") format("woff2");
}

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

@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 900;
	font-display: swap;
	src: url("../fonts/roboto-black.woff2") format("woff2");
}

@font-face {
	font-family: "Playfair Display";
	font-style: italic;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/playfair-display-semibold-italic.woff2") format("woff2");
}

:root {
	--ink: #19171b;
	--ink-hover: #2e2b31;
	--muted: #5f5f5c;
	--muted-dark: #a9a7a3;
	--paper: #f3f2ef;
	--paper-2: #e7e7e6;
	--line: #d6d4cf;
	--yellow: #ffd54b;
	--yellow-hover: #f5c62c;
	--white: #fff;
	--error: #b3261e;
	--font-body: "Roboto", Arial, sans-serif;
	--font-display: "Playfair Display", Georgia, "Times New Roman", serif;
	--container: 1280px;
	--gutter: 24px;
	--section: 144px;
	--stack: 48px;
	--header-height: 88px;
	--header-height-mobile: 64px;

	/* Valores que cambian en superficies oscuras (.is-dark). */
	--surface-fg: var(--ink);
	--surface-bg: var(--paper);
	--text-muted: var(--muted);
	--focus-color: var(--ink);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.125rem;
	line-height: 1.65;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-weight: 700;
	line-height: 1.05;
}

p {
	margin-block: 0 1rem;
}

p:last-child {
	margin-bottom: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

figure {
	margin: 0;
}

button,
input,
textarea,
select {
	font: inherit;
}

button {
	cursor: pointer;
}

:focus-visible {
	outline: 3px solid var(--focus-color);
	outline-offset: 3px;
}

/* Superficies oscuras: tinta de fondo, texto blanco, foco amarillo. */
.is-dark {
	--surface-fg: var(--white);
	--surface-bg: var(--ink);
	--text-muted: var(--muted-dark);
	--focus-color: var(--yellow);
	background: var(--ink);
	color: var(--white);
}

/* Banda amarilla: el foco vuelve a ser tinta. */
.is-yellow {
	--surface-fg: var(--ink);
	--surface-bg: var(--yellow);
	--text-muted: var(--ink);
	--focus-color: var(--ink);
	background: var(--yellow);
	color: var(--ink);
}

.container {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	top: 0.75rem;
	left: 1rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--yellow);
	color: var(--ink);
	font-weight: 700;
	transform: translateY(-150%);
	transition: transform 160ms ease;
}

.skip-link:focus {
	transform: translateY(0);
}

/* ------------------------------------------------------------------ */
/* Tipografía                                                         */
/* ------------------------------------------------------------------ */

.label,
.eyebrow {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.label--muted,
.eyebrow {
	color: var(--text-muted);
}

.display-xl {
	margin: 0;
	font-size: 6rem;
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.display-xl em {
	font-family: var(--font-display);
	font-size: 1.125em;
	font-style: italic;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.display {
	margin: 0;
	font-size: 4rem;
	font-weight: 700;
	line-height: 1;
}

.heading {
	margin: 0;
	font-size: 2.75rem;
	font-weight: 700;
	line-height: 1.05;
}

.display em,
.heading em,
.display .display-serif {
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 600;
	letter-spacing: 0;
}

.display--serif {
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 600;
}

.lead {
	font-size: 1.25rem;
	line-height: 1.55;
}

.serif {
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 600;
}

/* Marcador de sección: número · línea vertical · etiqueta. */
.section-marker {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
}

.section-marker > * {
	margin: 0;
}

.section-marker__number {
	display: flex;
	align-items: center;
	gap: 16px;
	font-family: var(--font-display);
	font-size: 1.75rem;
	font-style: italic;
	font-weight: 600;
	line-height: 1;
}

.section-marker__number::after {
	content: "";
	display: block;
	flex: 0 0 1px;
	width: 1px;
	height: 48px;
	background: var(--surface-fg);
}

.section-marker__label {
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.is-dark .section-marker__number {
	color: var(--yellow);
}

/* ------------------------------------------------------------------ */
/* Botones y enlaces                                                  */
/* ------------------------------------------------------------------ */

.button,
.wp-block-button__link,
.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 28px;
	border: 1.5px solid var(--yellow);
	border-radius: 999px;
	background: var(--yellow);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover,
.wp-block-button .wp-block-button__link:hover {
	border-color: var(--yellow-hover);
	background: var(--yellow-hover);
	color: var(--ink);
}

/*
 * Los modificadores se aplican al enlace o botón, nunca al <div> que envuelve
 * un botón de bloque (que también lleva la clase del modificador).
 */
.button.button--outline,
.wp-block-button.button--outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: currentColor;
	background: transparent;
	color: inherit;
}

.button.button--outline:hover,
.wp-block-button.button--outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--surface-fg);
	background: var(--surface-fg);
	color: var(--surface-bg);
}

.button.button--dark,
.wp-block-button.button--dark .wp-block-button__link {
	border-color: var(--ink);
	background: var(--ink);
	color: var(--white);
}

.button.button--dark:hover,
.wp-block-button.button--dark .wp-block-button__link:hover {
	border-color: var(--ink-hover);
	background: var(--ink-hover);
	color: var(--white);
}

.button.button--arrow::after,
.wp-block-button.button--arrow .wp-block-button__link::after {
	content: "";
	display: block;
	flex: 0 0 18px;
	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%3Cline x1='4' y1='12' x2='20' y2='12'/%3E%3Cpolyline points='14,6 20,12 14,18'/%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%3Cline x1='4' y1='12' x2='20' y2='12'/%3E%3Cpolyline points='14,6 20,12 14,18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.button.button--block,
.wp-block-button.button--block,
.wp-block-button.button--block .wp-block-button__link {
	width: 100%;
}

.wp-block-buttons,
.entry-content .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.wp-block-buttons .wp-block-button {
	margin: 0;
}

.text-link,
.entry-content .text-link a,
.entry-content a.text-link {
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.text-link:hover,
.entry-content .text-link a:hover,
.entry-content a.text-link:hover {
	text-decoration-color: var(--yellow);
}

.is-yellow .text-link:hover,
.is-yellow .text-link a:hover {
	text-decoration-color: var(--ink);
}

/* ------------------------------------------------------------------ */
/* Contenido de páginas                                               */
/* ------------------------------------------------------------------ */

.entry-content > * {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-right: auto;
	margin-left: auto;
}

.entry-content > .alignwide {
	width: min(100% - 2 * var(--gutter), var(--container));
}

.entry-content > .alignfull {
	width: auto;
	max-width: none;
	margin-right: 0;
	margin-left: 0;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.entry-content .wp-block-button__link,
.entry-content .section-marker a {
	text-decoration: none;
}

.entry-content p {
	margin-block: 0 1rem;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.25rem;
}

/*
 * Los patrones controlan el espaciado con gap. Se anulan los márgenes que el
 * diseño de flujo de WordPress añade a los hijos de cada grupo.
 */
.entry-content .wp-block-group,
.entry-content .wp-block-image,
.entry-content .wp-block-group > *,
.entry-content .wp-block-image img {
	margin-block: 0;
}

.entry-content .wp-block-image figcaption {
	margin: 12px 0 0;
}

/* ------------------------------------------------------------------ */
/* Formulario de contacto                                             */
/* ------------------------------------------------------------------ */

.contact-form {
	display: grid;
	gap: 24px;
}

.contact-form__note {
	margin: -8px 0 0;
	color: var(--muted);
	font-size: 0.9375rem;
}

.contact-form__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.contact-form__field {
	display: grid;
	gap: 8px;
}

.contact-form label {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.4;
}

.contact-form__optional {
	color: var(--muted);
	font-weight: 400;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
	width: 100%;
	min-height: 52px;
	padding: 0 16px;
	border: 1px solid var(--muted-dark);
	border-radius: 0;
	background: var(--white);
	color: var(--ink);
}

.contact-form textarea {
	min-height: 168px;
	padding: 14px 16px;
	resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
	border-color: var(--ink);
	outline: 3px solid var(--yellow);
	outline-offset: 0;
}

.contact-form__consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.contact-form__consent input {
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--ink);
}

.contact-form__consent label {
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.5;
}

.contact-form__consent a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.contact-form__actions {
	display: flex;
	justify-content: flex-start;
}

.contact-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-message {
	margin-bottom: 24px;
	padding: 16px 20px;
	border-left: 4px solid currentColor;
	background: var(--paper);
	color: var(--ink);
	font-size: 1rem;
}

.form-message--success {
	border-left-color: var(--yellow);
}

.form-message--error {
	border-left-color: var(--error);
}

.form-message ul {
	margin: 0;
	padding-left: 1.25rem;
}

/* ------------------------------------------------------------------ */
/* Puntos de corte                                                    */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	:root {
		--section: 112px;
	}

	.display-xl {
		font-size: 4.5rem;
	}

	.display {
		font-size: 3.25rem;
	}

	.heading {
		font-size: 2.5rem;
	}
}

@media (max-width: 767px) {
	:root {
		--gutter: 20px;
		--section: 80px;
		--stack: 32px;
	}

	body {
		font-size: 1rem;
	}

	.display-xl {
		font-size: 3.25rem;
	}

	.display {
		font-size: 2.5rem;
	}

	.heading {
		font-size: 2rem;
	}

	.lead {
		font-size: 1.125rem;
	}

	.section-marker,
	.section-marker__number {
		gap: 14px;
	}

	.section-marker__number {
		font-size: 1.5rem;
	}

	.section-marker__number::after {
		height: 40px;
	}

	.contact-form__row {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.contact-form {
		gap: 20px;
	}

	.contact-form__actions .button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
