/**
 * Estilos base del theme de Kore App.
 *
 * Consume los mismos tokens que el plugin (tokens.css), de modo que el sitio y
 * el modal de reserva se lean como una sola pieza. El lenguaje es el de Apple:
 * mucho aire, tipografía de sistema, escala de grises muy contenida y un solo
 * color de acento.
 *
 * Aquí está lo que necesita cualquier página del sitio. Los bloques de la
 * portada viven en home.css, que solo se carga en la portada.
 */

/* --- Base ---------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--orv-font);
	font-size: var(--orv-text-base);
	line-height: var(--orv-leading-normal);
	color: var(--orv-ink);
	background: var(--orv-surface);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Los titulares pueden llevar otra tipografia que el texto: es el contraste
   serif/sans que da el aire de este tipo de sitios. Con el respaldo puesto,
   porque si nadie ha elegido nada la variable de titulares no existe y sin el
   respaldo el navegador caeria a Times.

   Van por etiqueta y no por clase: asi lo hereda tambien lo que escriba quien
   monte una pagina con el editor de bloques, que no lleva clases del theme. */
h1,
h2,
h3,
h4,
.orvt-brand__name {
	font-family: var(--orv-font-heading, var(--orv-font));
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--orv-accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

:focus-visible {
	outline: 2px solid var(--orv-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* El enlace de salto es invisible hasta que alguien navega con teclado. */
.orvt-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--orv-ink);
	color: var(--orv-surface);
	border-radius: 0 0 var(--orv-radius-sm) 0;
}

.orvt-skip:focus {
	left: 0;
}

/* Texto que solo leen los lectores de pantalla: el nombre de cada icono. */
.orvt-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.orvt-container {
	width: 100%;
	max-width: var(--orv-container);
	margin-inline: auto;
	padding-inline: var(--orv-space-5);
}

.orvt-container--narrow {
	max-width: var(--orv-container-narrow);
}

.orvt-section {
	padding-block: var(--orv-space-9);
}

.orvt-section--sunken {
	background: var(--orv-surface-sunken);
}

/* --- Botones -------------------------------------------------------------
 *
 * Un solo componente para el botón de la portada, el de cada bloque y los de
 * acceso de la cabecera. El color, el color del texto y el redondeo llegan como
 * variables desde los ajustes; cuando no hay ajuste, la variable no se declara
 * y manda el valor de reserva que hay aquí.
 */

.orvt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--orv-space-2);
	padding: 12px 26px;
	border: 1px solid transparent;
	border-radius: var(--orvt-btn-radius, var(--orv-radius-pill));
	font-family: inherit;
	font-size: var(--orv-text-base);
	font-weight: var(--orv-weight-medium);
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--orv-duration-fast) var(--orv-ease),
		border-color var(--orv-duration-fast) var(--orv-ease),
		color var(--orv-duration-fast) var(--orv-ease),
		opacity var(--orv-duration-fast) var(--orv-ease),
		transform var(--orv-duration-fast) var(--orv-ease);
}

.orvt-btn:hover {
	text-decoration: none;
}

.orvt-btn:active {
	transform: scale(0.97);
}

.orvt-btn--fill {
	background: var(--orvt-btn-color, var(--orv-accent));
	color: var(--orvt-btn-ink, #fff);
}

.orvt-btn--fill:hover {
	color: var(--orvt-btn-ink, #fff);
	opacity: 0.88;
}

.orvt-btn--outline {
	background: transparent;
	border-color: var(--orvt-btn-color, var(--orv-accent));
	color: var(--orvt-btn-color, var(--orv-accent));
}

.orvt-btn--outline:hover {
	background: var(--orv-accent-soft);
	color: var(--orvt-btn-color, var(--orv-accent));
}

/* El botón de solo texto no lleva relleno lateral: si lo llevara, alineado con
   los demás parecería un botón desactivado en vez de un enlace. */
.orvt-btn--text {
	padding-inline: 0;
	background: none;
	color: var(--orvt-btn-color, var(--orv-accent));
}

.orvt-btn--text:hover {
	color: var(--orvt-btn-color, var(--orv-accent));
	text-decoration: underline;
}

/* El icono no se encoge cuando el texto del botón es largo, y baja un pelo su
   opacidad para que no pese más que la palabra a la que acompaña. */
.orvt-btn__icon {
	flex: 0 0 auto;
	opacity: 0.9;
}

.orvt-access .orvt-btn__icon {
	width: 16px;
	height: 16px;
}

.orvt-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--orv-space-4);
	margin-top: var(--orv-space-6);
}

.orvt-actions--center {
	justify-content: center;
}

/* --- Cabecera ------------------------------------------------------------ */

.orvt-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.72);
	/* El desenfoque tras la barra es la firma visual de macOS y iOS. */
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--orv-duration) var(--orv-ease);
}

@media (prefers-color-scheme: dark) {
	.orvt-header {
		background: rgba(0, 0, 0, 0.72);
	}
}

/* La línea inferior solo aparece al desplazar: en reposo la cabecera flota. */
.orvt-header--scrolled {
	border-bottom-color: var(--orv-border);
}

.orvt-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--orv-space-4);
	max-width: var(--orv-container);
	margin-inline: auto;
	padding: var(--orv-space-3) var(--orv-space-5);
	min-height: 56px;
}

.orvt-brand__name {
	font-size: var(--orv-text-lg);
	font-weight: var(--orv-weight-semibold);
	letter-spacing: var(--orv-tracking-tight);
	color: var(--orv-ink);
	text-decoration: none;
}

.orvt-brand img {
	max-height: 40px;
	width: auto;
}

.orvt-header__nav {
	display: flex;
	align-items: center;
	gap: var(--orv-space-5);
}

.orvt-nav__list {
	display: flex;
	align-items: center;
	gap: var(--orv-space-5);
	list-style: none;
	margin: 0;
	padding: 0;
}

.orvt-nav__list a {
	font-size: var(--orv-text-sm);
	font-weight: var(--orv-weight-medium);
	color: var(--orv-ink-soft);
	text-decoration: none;
	transition: color var(--orv-duration-fast) var(--orv-ease);
}

.orvt-nav__list a:hover,
.orvt-nav__list .current-menu-item > a {
	color: var(--orv-ink);
	text-decoration: none;
}

.orvt-lang {
	display: flex;
	gap: 2px;
	padding: 3px;
	background: var(--orv-surface-sunken);
	border-radius: var(--orv-radius-pill);
}

.orvt-lang__item {
	padding: 4px 11px;
	border-radius: var(--orv-radius-pill);
	font-size: var(--orv-text-xs);
	font-weight: var(--orv-weight-semibold);
	letter-spacing: 0.03em;
	color: var(--orv-ink-muted);
	text-decoration: none;
	transition: all var(--orv-duration-fast) var(--orv-ease);
}

.orvt-lang__item:hover {
	color: var(--orv-ink);
	text-decoration: none;
}

.orvt-lang__item--active {
	background: var(--orv-surface);
	color: var(--orv-ink);
	box-shadow: var(--orv-shadow-sm);
}

.orvt-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.orvt-burger span {
	display: block;
	height: 1.5px;
	width: 20px;
	margin-inline: auto;
	background: var(--orv-ink);
	border-radius: 2px;
	transition: transform var(--orv-duration) var(--orv-ease),
		opacity var(--orv-duration) var(--orv-ease);
}

.orvt-burger[aria-expanded="true"] span:first-child {
	transform: translateY(3.25px) rotate(45deg);
}

.orvt-burger[aria-expanded="true"] span:last-child {
	transform: translateY(-3.25px) rotate(-45deg);
}

/* --- Acceso en la cabecera ------------------------------------------------
 *
 * Los botones de acceso son el mismo componente que los de la portada, pero
 * más pequeños y en gris muy oscuro en vez de en el color de acento: en una
 * barra fija, dos botones de color compiten con el contenido de la página.
 */

.orvt-access {
	display: flex;
	align-items: center;
	gap: var(--orv-space-3);
}

.orvt-access .orvt-btn {
	padding: 7px 16px;
	font-size: var(--orv-text-sm);
}

/* El valor de reserva se pone por estilo y no una vez en el contenedor: si se
   declarara --orvt-btn-color ahi, el boton de solo texto heredaria el mismo
   gris oscuro que el relleno y dejaria de parecer un enlace. Asi, cuando hay
   color elegido lo usan los tres, y cuando no, cada uno tiene el suyo. */
.orvt-access .orvt-btn--fill {
	background: var(--orvt-btn-color, var(--orv-ink));
	color: var(--orvt-btn-ink, var(--orv-surface));
}

.orvt-access .orvt-btn--outline {
	border-color: var(--orvt-btn-color, var(--orv-ink));
	color: var(--orvt-btn-color, var(--orv-ink));
}

.orvt-access .orvt-btn--outline:hover {
	background: var(--orv-surface-sunken);
}

.orvt-access .orvt-btn--text {
	padding-inline: 0;
	color: var(--orvt-btn-color, var(--orv-ink-muted));
}

.orvt-access .orvt-btn--text:hover {
	opacity: 0.7;
	text-decoration: none;
}

/* --- Páginas y contenido ------------------------------------------------- */

.orvt-page__title {
	margin: 0 0 var(--orv-space-6);
	font-size: clamp(1.875rem, 4vw, var(--orv-text-2xl));
	font-weight: var(--orv-weight-semibold);
	line-height: var(--orv-leading-snug);
	letter-spacing: var(--orv-tracking-tight);
	color: var(--orv-ink);
	text-wrap: balance;
}

.orvt-page__intro {
	margin-bottom: var(--orv-space-7);
}

.orvt-prose {
	font-size: var(--orv-text-base);
	line-height: var(--orv-leading-normal);
	color: var(--orv-ink-soft);
}

.orvt-prose > * + * {
	margin-top: var(--orv-space-4);
}

.orvt-prose p {
	margin: 0;
}

.orvt-prose h2 {
	margin-top: var(--orv-space-7);
	font-size: var(--orv-text-xl);
	font-weight: var(--orv-weight-semibold);
	letter-spacing: var(--orv-tracking-tight);
	color: var(--orv-ink);
}

.orvt-prose h3 {
	margin-top: var(--orv-space-6);
	font-size: var(--orv-text-lg);
	font-weight: var(--orv-weight-semibold);
	color: var(--orv-ink);
}

.orvt-prose img,
.orvt-prose figure {
	border-radius: var(--orv-radius);
	overflow: hidden;
}

.orvt-prose blockquote {
	margin-inline: 0;
	padding-left: var(--orv-space-5);
	border-left: 3px solid var(--orv-border-strong);
	color: var(--orv-ink-muted);
	font-style: italic;
}

/* --- Blog ---------------------------------------------------------------- */

.orvt-posts {
	display: grid;
	gap: var(--orv-space-7);
}

.orvt-post__media img {
	border-radius: var(--orv-radius);
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
}

.orvt-post__title {
	margin: var(--orv-space-4) 0 var(--orv-space-1);
	font-size: var(--orv-text-xl);
	font-weight: var(--orv-weight-semibold);
	letter-spacing: var(--orv-tracking-tight);
}

.orvt-post__title a {
	color: var(--orv-ink);
	text-decoration: none;
}

.orvt-post__meta {
	margin: 0 0 var(--orv-space-3);
	font-size: var(--orv-text-sm);
	color: var(--orv-ink-muted);
}

.orvt-post__excerpt {
	color: var(--orv-ink-soft);
}

.orvt-post__hero {
	margin: 0 0 var(--orv-space-6);
	border-radius: var(--orv-radius-lg);
	overflow: hidden;
}

.pagination,
.navigation.pagination {
	margin-top: var(--orv-space-7);
	display: flex;
	justify-content: center;
}

.nav-links {
	display: flex;
	gap: var(--orv-space-2);
	align-items: center;
}

.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding-inline: 10px;
	border-radius: var(--orv-radius-pill);
	font-size: var(--orv-text-sm);
	color: var(--orv-ink-soft);
	text-decoration: none;
}

.page-numbers.current {
	background: var(--orv-ink);
	color: var(--orv-surface);
}

/* --- Aviso interno y 404 ------------------------------------------------- */

.orvt-notice {
	padding: var(--orv-space-5);
	background: var(--orv-surface-sunken);
	border: 1px dashed var(--orv-border-strong);
	border-radius: var(--orv-radius);
	font-size: var(--orv-text-sm);
	color: var(--orv-ink-muted);
	text-align: center;
}

.orvt-404 {
	text-align: center;
	padding-block: var(--orv-space-8);
}

.orvt-404__text {
	margin: 0 auto var(--orv-space-6);
	max-width: 34em;
	color: var(--orv-ink-muted);
}

.orvt-empty {
	text-align: center;
	color: var(--orv-ink-muted);
	padding-block: var(--orv-space-8);
}

/* --- Pie ------------------------------------------------------------------
 *
 * El color de fondo y el del texto son configurables, así que todo lo demás se
 * deriva de `currentColor` en vez de fijar grises: sobre un pie oscuro los
 * grises del sistema de diseño se volverían ilegibles.
 */

.orvt-footer {
	border-top: 1px solid var(--orv-border);
	background: var(--orvt-footer-bg, var(--orv-surface-sunken));
	color: var(--orvt-footer-ink, var(--orv-ink));
	padding-block: var(--orv-space-8) var(--orv-space-6);
}

.orvt-footer__inner {
	max-width: var(--orv-container);
	margin-inline: auto;
	padding-inline: var(--orv-space-5);
}

.orvt-footer__cols {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: var(--orv-space-7);
	align-items: start;
}

.orvt-footer__logo {
	max-height: 44px;
	width: auto;
	margin-bottom: var(--orv-space-3);
}

.orvt-footer__name {
	margin: 0 0 var(--orv-space-2);
	font-size: var(--orv-text-lg);
	font-weight: var(--orv-weight-semibold);
	letter-spacing: var(--orv-tracking-tight);
	color: inherit;
}

.orvt-footer__tagline {
	margin: 0;
	max-width: 30em;
	font-size: var(--orv-text-sm);
	/* color-mix da el gris exacto sobre cualquier fondo; donde no exista, se
	   queda con la declaración anterior y solo se pierde un matiz. */
	color: inherit;
	color: color-mix(in srgb, currentColor 65%, transparent);
}

.orvt-footer__heading {
	margin: 0 0 var(--orv-space-3);
	font-size: var(--orv-text-xs);
	font-weight: var(--orv-weight-semibold);
	letter-spacing: var(--orv-tracking-wide);
	text-transform: uppercase;
	color: inherit;
	color: color-mix(in srgb, currentColor 55%, transparent);
}

.orvt-footer__line {
	margin: 0 0 6px;
	font-size: var(--orv-text-sm);
	color: inherit;
	color: color-mix(in srgb, currentColor 72%, transparent);
}

.orvt-footer__line a,
.orvt-footer__list a,
.orvt-footer__meta a {
	color: inherit;
	text-decoration: none;
	transition: opacity var(--orv-duration-fast) var(--orv-ease);
}

.orvt-footer__line a:hover,
.orvt-footer__list a:hover,
.orvt-footer__meta a:hover {
	text-decoration: none;
	opacity: 0.7;
}

.orvt-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
	font-size: var(--orv-text-sm);
	color: inherit;
	color: color-mix(in srgb, currentColor 72%, transparent);
}

.orvt-social {
	display: flex;
	gap: var(--orv-space-3);
	margin-top: var(--orv-space-5);
}

.orvt-social__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--orv-radius-pill);
	color: inherit;
	/* El fondo es el propio color del pie a muy baja opacidad: así funciona
	   igual sobre blanco que sobre negro sin declarar dos paletas. */
	background: color-mix(in srgb, currentColor 8%, transparent);
	transition: background-color var(--orv-duration-fast) var(--orv-ease);
}

.orvt-social__item:hover {
	background: color-mix(in srgb, currentColor 16%, transparent);
	text-decoration: none;
}

.orvt-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--orv-space-4);
	margin-top: var(--orv-space-7);
	padding-top: var(--orv-space-5);
	border-top: 1px solid;
	border-top-color: color-mix(in srgb, currentColor 14%, transparent);
	font-size: var(--orv-text-sm);
	color: inherit;
	color: color-mix(in srgb, currentColor 60%, transparent);
}

.orvt-footer__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--orv-space-4);
	align-items: center;
}

.orvt-footer__copy {
	margin: 0;
}

.orvt-footer__note {
	margin: var(--orv-space-4) 0 0;
	font-size: var(--orv-text-xs);
	color: inherit;
	color: color-mix(in srgb, currentColor 50%, transparent);
}

/* --- Adaptación a móvil -------------------------------------------------- */

@media (max-width: 860px) {
	.orvt-section {
		padding-block: var(--orv-space-7);
	}

	.orvt-burger {
		display: flex;
	}

	/* El menú se despliega como una lámina bajo la cabecera, con el mismo
	   desenfoque, en lugar de empujar el contenido. */
	.orvt-header__nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: var(--orv-space-4);
		padding: var(--orv-space-5);
		background: inherit;
		backdrop-filter: saturate(180%) blur(20px);
		-webkit-backdrop-filter: saturate(180%) blur(20px);
		border-bottom: 1px solid var(--orv-border);
		display: none;
	}

	.orvt-header__nav.is-open {
		display: flex;
	}

	.orvt-nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--orv-space-4);
	}

	.orvt-nav__list a {
		font-size: var(--orv-text-lg);
	}

	.orvt-footer__cols {
		grid-template-columns: 1fr;
		gap: var(--orv-space-6);
	}

	.orvt-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* --- Página del panel -----------------------------------------------------
 *
 * El panel trae su propia cabecera y su propio fondo, y la plantilla no llama
 * a get_header(). Aquí solo queda igualar el fondo mientras carga el bundle,
 * para que no haya un destello blanco.
 */

body.orvt-panel {
	background: var(--orv-surface-sunken);
}
