/*
 * La Mesa Larga · Experiencia
 * A presentation layer over the lamesalarga child theme. Uses the theme tokens (--lml-tinto, --lml-maiz, --lml-olivo,
 * --lml-ink, --lml-pale) and Gabarito; adds illustration, motion and the interactive pieces. Everything here is scoped
 * to body.lmx (added by the plugin) so deactivating the plugin removes it entirely.
 */

:root {
	--lmx-crema: #FBF6EE;
	--lmx-papel: #FFFCF7;
	--lmx-linea: #E2D6D9;
	--lmx-texto-2: #5C4A4F;
	--lmx-sombra: 0 22px 44px -22px rgba(74, 19, 35, .45);
	--lmx-sombra-s: 0 10px 22px -14px rgba(74, 19, 35, .5);
	--lmx-ease: cubic-bezier(.2, .7, .2, 1);
	--lmx-arco: 999px 999px 24px 24px;
}

/* ---------------------------------------------------------------------------
 * 1. Shared pieces
 * ------------------------------------------------------------------------ */

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

/* Three chairs: tinto, olivo, maíz. The logo's dot language as a section eyebrow. */
.lmx-mark {
	display: flex;
	gap: 6px;
	margin-bottom: 14px;
}

.lmx-mark i {
	display: block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--lml-tinto);
}

.lmx-mark i:nth-child(2) { background: var(--lml-olivo); }
.lmx-mark i:nth-child(3) { background: var(--lml-maiz); }

.lmx-lead {
	max-width: 760px;
	font-size: clamp(19px, 2.1vw, 23px);
	line-height: 1.45;
	color: #3A2C30;
}

.lmx-muted {
	color: var(--lmx-texto-2);
	font-size: 15px;
}

/* Full-bleed band inside the theme's 1200px content column. */
.lmx-bleed {
	width: 100vw;
	max-width: none;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

body.lmx-page { overflow-x: clip; }

body.lmx .lml-button,
body.lmx button.lml-outline {
	transition: transform .2s var(--lmx-ease), box-shadow .2s var(--lmx-ease), background-color .2s;
}

body.lmx .lml-button:hover {
	transform: translateY(-2px);
	box-shadow: var(--lmx-sombra-s);
}

body.lmx .lml-button:active { transform: translateY(0); box-shadow: none; }

body.lmx .lml-outline:hover { background: var(--lml-pale); color: var(--lml-tinto); }

.lmx-claro,
body.lmx .lml-button.lmx-claro {
	background: #fff;
	border-color: #fff;
	color: var(--lml-tinto);
}

body.lmx .lml-button.lmx-claro:hover { background: var(--lml-pale); color: var(--lml-tinto); }

.lmx-arco {
	margin: 0;
	border-radius: var(--lmx-arco);
	overflow: hidden;
	box-shadow: var(--lmx-sombra);
	background: var(--lml-pale);
}

.lmx-arco img,
.lmx-marco img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lmx-marco {
	margin: 0;
	border-radius: 20px;
	overflow: hidden;
}

/* Scroll reveal. Only elements below the fold get the attribute (set by the script), so nothing flashes. */
html.lmx-js [data-lmx-reveal] {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity .7s var(--lmx-ease), transform .7s var(--lmx-ease);
	transition-delay: calc(var(--i, 0) * 90ms);
}

html.lmx-js [data-lmx-reveal].lmx-in {
	opacity: 1;
	transform: none;
}

/* ---------------------------------------------------------------------------
 * 2. Home: hero with the long-table window
 * ------------------------------------------------------------------------ */

body.lmx.home-page .lml-hero::after {
	content: "";
	display: block;
	aspect-ratio: 16 / 11;
	border-radius: 220px 220px 22px 22px;
	background: var(--lml-pale) url(img/hero-mesa-800.webp) 62% 60% / cover no-repeat;
	box-shadow: var(--lmx-sombra);
}

body.lmx.home-page .lml-hero::before {
	content: "Tu silla te espera" / "";
	display: none;
}

@media (min-width: 900px) {
	/* Rows: flexible space, title, text, buttons, link, flexible space. The window spans them all. */
	body.lmx.home-page .lml-hero {
		display: grid;
		grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
		grid-template-rows: 1fr auto auto auto auto 1fr;
		column-gap: clamp(32px, 5vw, 72px);
		row-gap: 0;
		align-items: start;
		padding-top: 40px;
		padding-bottom: 48px;
	}

	body.lmx.home-page .lml-hero > * { grid-column: 1; }
	body.lmx.home-page .lml-hero > h1 { grid-row: 2; font-size: clamp(3.4rem, 6.4vw, 6rem); margin-bottom: 24px; }
	body.lmx.home-page .lml-hero > p { grid-row: 3; margin-bottom: 26px !important; }
	body.lmx.home-page .lml-hero > .lml-actions { grid-row: 4; }
	body.lmx.home-page .lml-hero > .lmx-hero-link { grid-row: 5; margin-top: 14px; justify-self: start; }

	body.lmx.home-page .lml-hero::after {
		grid-column: 2;
		grid-row: 1 / -1;
		aspect-ratio: 5 / 6;
		border-radius: var(--lmx-arco);
		background-image: url(img/hero-mesa.webp);
	}

	/* A stamped "place card" on the window: brand mustard ring with the promise. Out of flow so it never sizes rows. */
	body.lmx.home-page .lml-hero { position: relative; }

	body.lmx.home-page .lml-hero::before {
		display: grid;
		place-items: center;
		position: absolute;
		grid-column: 2;
		grid-row: 1 / -1;
		left: -44px;
		bottom: 84px;
		z-index: 1;
		width: 136px;
		height: 136px;
		padding: 22px;
		border-radius: 50%;
		background: var(--lml-maiz);
		outline: 3px dashed rgba(107, 30, 51, .55);
		outline-offset: -11px;
		color: var(--lml-tinto);
		font: 800 18px/1.1 Gabarito, sans-serif;
		text-align: center;
		letter-spacing: -.01em;
		box-shadow: var(--lmx-sombra-s);
		transform: rotate(-9deg);
		animation: lmx-sello 6s ease-in-out infinite;
	}
}

@keyframes lmx-sello {
	0%, 100% { transform: rotate(-9deg); }
	50% { transform: rotate(-3deg) translateY(-4px); }
}

.lmx-hero-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-weight: 700;
}

.lmx-hero-link::after {
	content: "→";
	transition: transform .2s var(--lmx-ease);
}

.lmx-hero-link:hover::after { transform: translateX(4px); }

/* ---------------------------------------------------------------------------
 * 3. Home: the table where every chair is a country
 * ------------------------------------------------------------------------ */

.lmx-mesa-svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.lmx-mesa-svg .lmx-silla circle {
	transform-box: fill-box;
	transform-origin: center;
	transition: transform .25s var(--lmx-ease), filter .25s;
}

.lmx-mesa-svg .lmx-silla:hover circle,
.lmx-mesa-svg .lmx-silla:focus-visible circle {
	transform: scale(1.28);
	filter: drop-shadow(0 4px 6px rgba(30, 20, 22, .3));
}

.lmx-mesa-svg .lmx-silla:focus { outline: none; }

.lmx-mesa-svg .lmx-silla:focus-visible circle {
	stroke: var(--lml-ink);
	stroke-width: 3px;
}

.lmx-mesa-svg.is-ready .lmx-silla {
	animation: lmx-sentarse .6s var(--lmx-ease) both;
	animation-delay: calc(var(--i) * 45ms);
}

@keyframes lmx-sentarse {
	from { opacity: 0; transform: translateY(var(--dy, -30px)); }
	to { opacity: 1; transform: none; }
}

.lmx-mesa-svg .lmx-mesa-label {
	fill: #F3DCE2;
	font: 700 19px Gabarito, sans-serif;
	letter-spacing: .01em;
	pointer-events: none;
}

.lmx-mesa-svg .lmx-tusilla circle {
	transform-box: fill-box;
	transform-origin: center;
	animation: lmx-latido 2.4s ease-in-out 1.4s infinite;
}

.lmx-mesa-svg .lmx-tusilla text {
	font: 700 20px Gabarito, sans-serif;
	fill: var(--lml-tinto);
}

.lmx-mesa-svg .lmx-tusilla:hover circle,
.lmx-mesa-svg .lmx-tusilla:focus-visible circle { stroke: var(--lml-tinto); }

@keyframes lmx-latido {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.14); }
}

.lmx-mesa-caption {
	margin: 14px 0 0 !important;
	font-size: 15px;
	color: var(--lmx-texto-2);
	min-height: 1.5em;
}

@media (max-width: 640px) {
	.lmx-mesa-svg .lmx-mesa-label { display: none; }
}

/* ---------------------------------------------------------------------------
 * 4. The map of the mesas (home directory and /mapa/)
 * ------------------------------------------------------------------------ */

.lmx-vista {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	margin: 0 0 18px;
	border: 1px solid var(--lmx-linea);
	border-radius: 999px;
	background: #fff;
}

body.lmx .lmx-vista button {
	min-height: 40px;
	padding: 6px 20px;
	border: 0;
	background: transparent;
	color: var(--lml-tinto);
	font-size: 16px;
}

body.lmx .lmx-vista button[aria-pressed="true"] {
	background: var(--lml-tinto);
	color: #fff;
}

.lmx-map-mount:empty {
	min-height: 320px;
	border-radius: 20px;
	background: #fff url(svg/silla-libre.svg) center / 56px no-repeat;
	border: 1px solid var(--lmx-linea);
}

.lmx-map {
	position: relative;
	border: 1px solid var(--lmx-linea);
	border-radius: 22px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 30px 60px -48px rgba(74, 19, 35, .55);
}

.lmx-map-head {
	padding: 20px 22px 6px;
	border-bottom: 1px solid #F1E8EA;
}

.lmx-map-stats {
	margin: 0 0 12px !important;
	font-size: 17px;
	color: var(--lmx-texto-2);
}

.lmx-map-stats strong {
	color: var(--lml-tinto);
	font-size: 22px;
	font-weight: 800;
}

.lmx-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 2px 2px 14px;
	scrollbar-width: thin;
	scroll-snap-type: x proximity;
}

body.lmx .lmx-chips button {
	flex: 0 0 auto;
	min-height: 40px;
	padding: 6px 14px;
	border: 1px solid #D9C7CC;
	background: #fff;
	color: var(--lml-ink);
	font: 600 15px/1.2 Gabarito, sans-serif;
	scroll-snap-align: start;
}

body.lmx .lmx-chips button small {
	margin-left: 6px;
	color: var(--lmx-texto-2);
	font-size: 13px;
}

body.lmx .lmx-chips button:hover { background: var(--lml-pale); color: var(--lml-ink); }

body.lmx .lmx-chips button[aria-pressed="true"] {
	background: var(--lml-tinto);
	border-color: var(--lml-tinto);
	color: #fff;
}

body.lmx .lmx-chips button[aria-pressed="true"] small { color: #F3DCE2; }

.lmx-map-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 960px) {
	.lmx-map-body { grid-template-columns: minmax(0, 1fr) 320px; }

	/* The map sets the height; a long country list scrolls inside the panel instead of stretching the card. */
	.lmx-panel {
		border-left: 1px solid #F1E8EA;
		contain: size;
		overflow-y: auto;
		overscroll-behavior: contain;
	}
}

.lmx-map-stage {
	position: relative;
	background:
		radial-gradient(circle at 70% 40%, rgba(242, 179, 61, .08), transparent 55%),
		#FDFBF9;
}

.lmx-map-svg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1000 / 760;
	touch-action: manipulation;
}

.lmx-map-svg .lmx-other path { fill: #F1E9EB; stroke: none; }

.lmx-map-svg .lmx-focus path {
	fill: #F7EEDB;
	stroke: #E2CFA8;
	stroke-width: .8px;
	vector-effect: non-scaling-stroke;
	cursor: pointer;
	transition: fill .3s;
}

.lmx-map-svg .lmx-focus path:hover { fill: #F9E3B3; }
.lmx-map-svg .lmx-focus path.is-on { fill: #F6D68E; stroke: #D9A93E; }
.lmx-map[data-cc] .lmx-focus path:not(.is-on) { fill: #F5EFE6; }

.lmx-map-svg .lmx-dot { cursor: pointer; }
.lmx-map-svg .lmx-dot:focus { outline: none; }
.lmx-map-svg .lmx-dot-hit { fill: transparent; }

.lmx-map-svg .lmx-dot-c {
	fill: var(--lml-tinto);
	stroke: #fff;
	stroke-width: 1.6px;
	vector-effect: non-scaling-stroke;
	transition: opacity .3s, fill .2s;
}

.lmx-map[data-cc] .lmx-dot:not(.is-cc) .lmx-dot-c { opacity: .28; }

.lmx-map-svg .lmx-dot:hover .lmx-dot-c,
.lmx-map-svg .lmx-dot.is-hot .lmx-dot-c { fill: var(--lml-olivo); }

.lmx-map-svg .lmx-dot:focus-visible .lmx-dot-c,
.lmx-map-svg .lmx-dot.is-sel .lmx-dot-c {
	fill: var(--lml-maiz);
	stroke: var(--lml-tinto);
	stroke-width: 3px;
}

/* The long table crossing the Atlantic, drawn like the logo. */
.lmx-travesia .lmx-trav-mesa {
	fill: none;
	stroke: var(--lml-tinto);
	stroke-width: 9;
	stroke-linecap: round;
}

.lmx-travesia .lmx-trav-silla { transform-box: fill-box; transform-origin: center; }

.lmx-travesia text {
	fill: var(--lml-tinto);
	font: 700 14px Gabarito, sans-serif;
	letter-spacing: .06em;
}

.lmx-map.is-drawn .lmx-trav-mesa { transition: stroke-dashoffset 1.6s var(--lmx-ease); stroke-dashoffset: 0 !important; }

.lmx-map:not(.is-drawn) .lmx-trav-silla,
.lmx-map:not(.is-drawn) .lmx-travesia text { opacity: 0; }

.lmx-map.is-drawn .lmx-trav-silla {
	animation: lmx-pop .45s var(--lmx-ease) both;
	animation-delay: calc(.5s + var(--i) * 55ms);
}

.lmx-map.is-drawn .lmx-travesia text { transition: opacity .8s 1.4s; opacity: 1; }

/* Zoomed into a country, the ocean table would only get in the way. */
.lmx-travesia { transition: opacity .35s; }
.lmx-map[data-cc] .lmx-travesia { opacity: 0; }

@keyframes lmx-pop {
	from { opacity: 0; transform: scale(.2); }
	to { opacity: 1; transform: none; }
}

.lmx-tip {
	position: absolute;
	z-index: 2;
	padding: 6px 10px;
	border-radius: 8px;
	background: var(--lml-ink);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
	pointer-events: none;
	transform: translate(-50%, calc(-100% - 12px));
}

.lmx-tip[hidden] { display: none; }

.lmx-map-zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 1;
}

body.lmx .lmx-map-zoom button {
	min-height: 40px;
	padding: 6px 16px;
	font-size: 15px;
	box-shadow: var(--lmx-sombra-s);
}

.lmx-panel {
	padding: 22px;
	min-width: 0;
	font-size: 16px;
}

.lmx-panel h3 {
	font-size: 26px !important;
	margin: 4px 0 10px !important;
	color: var(--lml-tinto);
}

.lmx-panel h4 {
	margin: 22px 0 8px;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--lml-olivo);
}

.lmx-panel p { margin: 0 0 12px !important; }

.lmx-panel ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lmx-panel li { border-top: 1px solid #F1E8EA; }

.lmx-panel li a {
	display: grid;
	grid-template-columns: 10px minmax(0, 1fr);
	align-items: center;
	column-gap: 10px;
	min-height: 44px;
	padding: 6px 0;
	color: var(--lml-ink);
	text-decoration: none;
	font-weight: 600;
}

.lmx-panel li a::before {
	content: "";
	flex: 0 0 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--lml-tinto);
}

.lmx-panel li a:hover { color: var(--lml-tinto); text-decoration: underline; }
.lmx-panel li span { grid-column: 2; font-size: 14px; color: var(--lmx-texto-2); font-weight: 400; }

.lmx-panel .lml-actions { margin-top: 18px; }
.lmx-panel .lml-actions .lml-button { min-height: 44px; padding: 8px 18px; font-size: 16px; }

.lmx-eyebrow-s {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--lml-olivo);
}

body.lmx .lmx-volver {
	min-height: 40px;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--lml-tinto);
	font-size: 15px;
	font-weight: 700;
}

body.lmx .lmx-volver:hover { background: none; color: var(--lml-tinto); text-decoration: underline; }

.lmx-map-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 18px;
	padding: 12px 22px;
	border-top: 1px solid #F1E8EA;
	font-size: 15px;
	color: var(--lmx-texto-2);
}

.lmx-map-foot p { margin: 0 !important; }
.lmx-map-foot .lmx-fuentes { font-size: 13px; }

@media (max-width: 600px) {
	.lmx-map-head { padding: 16px 14px 4px; }
	.lmx-panel { padding: 18px 14px; }
	.lmx-map-foot { padding: 12px 14px; }
}

/* ---------------------------------------------------------------------------
 * 5. Home: illustrated steps, the sobremesa band and the footer table
 * ------------------------------------------------------------------------ */

body.lmx .lml-steps article::before {
	content: "";
	display: block;
	width: 92px;
	height: 92px;
	margin-bottom: 14px;
	background: url(svg/paso-silla.svg) center / contain no-repeat;
	transition: transform .5s var(--lmx-ease);
}

body.lmx .lml-steps article:nth-child(2)::before { background-image: url(svg/paso-presentate.svg); }
body.lmx .lml-steps article:nth-child(3)::before { background-image: url(svg/paso-sobremesa.svg); }
body.lmx .lml-steps article:hover::before { transform: rotate(-7deg) scale(1.06); }

body.lmx .lml-section > h2::before,
body.lmx #mesas h2::before {
	content: "";
	display: block;
	width: 48px;
	height: 12px;
	margin-bottom: 14px;
	background:
		radial-gradient(circle, var(--lml-tinto) 5.5px, transparent 6px) 0 0 / 12px 12px no-repeat,
		radial-gradient(circle, var(--lml-olivo) 5.5px, transparent 6px) 18px 0 / 12px 12px no-repeat,
		radial-gradient(circle, var(--lml-maiz) 5.5px, transparent 6px) 36px 0 / 12px 12px no-repeat;
}

body.lmx .lml-tinto .lml-section > h2::before,
body.lmx .lml-upcoming h2::before { display: none; }

body.lmx.home-page #sobremesas,
body.lmx .lmx-invitacion {
	position: relative;
	isolation: isolate;
}

body.lmx.home-page #sobremesas {
	background:
		linear-gradient(180deg, var(--lml-tinto) 0 46%, rgba(107, 30, 51, .78) 72%, rgba(107, 30, 51, .45)),
		var(--lml-tinto) url(img/sobremesa-noche-800.webp) center bottom / cover no-repeat;
}

body.lmx.home-page #sobremesas::before,
body.lmx .lmx-invitacion::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	z-index: -1;
	height: 64px;
	background: url(svg/guirnalda.svg) left top / 480px 64px repeat-x;
	pointer-events: none;
}

body.lmx.home-page #sobremesas .lml-section {
	padding-top: 104px;
	padding-bottom: 220px;
}

@media (min-width: 900px) {
	body.lmx.home-page #sobremesas {
		background:
			linear-gradient(90deg, var(--lml-tinto) 0 40%, rgba(107, 30, 51, .82) 56%, rgba(107, 30, 51, .25) 82%, rgba(107, 30, 51, .1)),
			var(--lml-tinto) url(img/sobremesa-noche.webp) right center / auto 100% no-repeat;
	}

	body.lmx.home-page #sobremesas .lml-section {
		padding-top: 120px;
		padding-bottom: 120px;
	}

	body.lmx.home-page #sobremesas .lml-upcoming { align-items: flex-end; }
}

/* An endless long table along the top of the footer, ending in the empty chair. */
body.lmx .lml-footer::before {
	content: "";
	display: block;
	height: 42px;
	margin: 8px 0 30px;
	background:
		url(svg/silla-libre.svg) right center / 42px 42px no-repeat,
		linear-gradient(#fff, #fff) right center / 42px 100% no-repeat,
		url(svg/mantel-inicio.svg) left center / 22.5px 42px no-repeat,
		linear-gradient(#fff, #fff) left center / 12px 100% no-repeat,
		url(svg/mantel.svg) 12px center / 45px 42px repeat-x;
}

/* ---------------------------------------------------------------------------
 * 6. Existing pages dressed by slug: bienvenida, recursos, sobremesas
 * ------------------------------------------------------------------------ */

body.lmx.lmx-slug-bienvenida .lml-content > article::after,
body.lmx.post-type-archive-lml_sobremesa .lml-content::after {
	content: "";
	display: block;
	margin-top: 36px;
	aspect-ratio: 4 / 3;
	border-radius: 220px 220px 22px 22px;
	background: var(--lml-pale) url(img/silla-libre-800.webp) center 70% / cover no-repeat;
	box-shadow: var(--lmx-sombra);
}

body.lmx.post-type-archive-lml_sobremesa .lml-content::after {
	background-image: url(img/sobremesa-noche-800.webp);
	background-position: center;
}

@media (min-width: 900px) {
	body.lmx.lmx-slug-bienvenida .lml-content > article,
	body.lmx.post-type-archive-lml_sobremesa .lml-content {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
		grid-template-rows: repeat(7, auto) 1fr;
		column-gap: clamp(32px, 5vw, 72px);
		align-items: start;
	}

	body.lmx.lmx-slug-bienvenida .lml-content > article > *,
	body.lmx.post-type-archive-lml_sobremesa .lml-content > * { grid-column: 1; }

	body.lmx.lmx-slug-bienvenida .lml-content > article > .lml-button { justify-self: start; }

	body.lmx.lmx-slug-bienvenida .lml-content > article::after,
	body.lmx.post-type-archive-lml_sobremesa .lml-content::after {
		grid-column: 2;
		grid-row: 1 / -1;
		margin-top: 0;
		aspect-ratio: 1136 / 1408;
		border-radius: var(--lmx-arco);
		background-image: url(img/silla-libre.webp);
	}

	body.lmx.post-type-archive-lml_sobremesa .lml-content::after {
		aspect-ratio: 4 / 5;
		background-image: url(img/sobremesa-noche.webp);
	}
}

.lmx-bienvenida-extra {
	margin-top: 22px !important;
	padding: 18px 20px;
	border-radius: 14px;
	background: var(--lml-pale);
	max-width: 560px;
}

body.lmx.lmx-slug-recursos .lml-content > article {
	display: flex;
	flex-direction: column;
}

body.lmx.lmx-slug-recursos .lml-content > article > :not(h1) { order: 2; }

body.lmx.lmx-slug-recursos .lml-content > article::before {
	content: "";
	order: 1;
	display: block;
	width: 100%;
	max-width: 920px;
	aspect-ratio: 3 / 1;
	margin: 4px 0 30px;
	border-radius: 22px;
	background: var(--lml-pale) url(img/mesa-de-trabajo.webp) center 40% / cover no-repeat;
	box-shadow: var(--lmx-sombra);
}

@media (max-width: 600px) {
	body.lmx.lmx-slug-recursos .lml-content > article::before {
		aspect-ratio: 16 / 9;
		background-image: url(img/mesa-de-trabajo-800.webp);
	}
}

/* ---------------------------------------------------------------------------
 * 7. Experience pages (mapa, la-mesa, tu-silla)
 * ------------------------------------------------------------------------ */

body.lmx-page .lml-content > article > h1 {
	max-width: 15ch;
	font-size: clamp(2.6rem, 6.4vw, 5.2rem);
	line-height: .98;
	letter-spacing: -.04em;
}

body.lmx-page .lml-content > article > h1::before {
	content: "";
	display: block;
	width: 54px;
	height: 14px;
	margin-bottom: 22px;
	background:
		radial-gradient(circle, var(--lml-tinto) 6.5px, transparent 7px) 0 0 / 14px 14px no-repeat,
		radial-gradient(circle, var(--lml-olivo) 6.5px, transparent 7px) 20px 0 / 14px 14px no-repeat,
		radial-gradient(circle, var(--lml-maiz) 6.5px, transparent 7px) 40px 0 / 14px 14px no-repeat;
}

body.lmx-page .lml-content { padding-bottom: 0; }

body.lmx-page .lml-content h2 {
	font-size: clamp(1.9rem, 3.6vw, 2.8rem);
}

body.lmx-page .lml-content section,
body.lmx-page .lml-content nav.lmx-explora { margin-top: clamp(56px, 8vw, 104px); }

/* Mapa */
.lmx-mapa-stage {
	margin-top: 28px;
	padding: 36px 0 44px;
	background: var(--lml-pale);
}

.lmx-indice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 26px 28px;
	margin-top: 28px;
}

.lmx-pais {
	margin: 0 !important;
	padding-top: 14px;
	border-top: 5px solid var(--lml-tinto);
}

.lmx-pais:nth-child(3n+2) { border-color: var(--lml-olivo); }
.lmx-pais:nth-child(3n) { border-color: var(--lml-maiz); }

body.lmx .lmx-pais h3 {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 10px;
	margin: 0 0 8px;
	font-size: 21px;
	color: var(--lml-ink);
}

.lmx-pais h3 small {
	font-size: 14px;
	font-weight: 600;
	color: var(--lmx-texto-2);
	letter-spacing: 0;
}

.lmx-pais ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lmx-pais li a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	text-decoration: none;
	color: var(--lml-ink);
}

.lmx-pais li a:hover { color: var(--lml-tinto); text-decoration: underline; }

.lmx-pais-oficios li { margin-bottom: 8px; }
.lmx-pais-oficios li span { display: block; font-size: 14px; color: var(--lmx-texto-2); }

/* La mesa */
.lmx-oceano {
	position: relative;
	margin-top: 32px;
	margin-bottom: 0;
	overflow: hidden;
}

.lmx-oceano img {
	display: block;
	width: 100%;
	height: clamp(300px, 54vw, 760px);
	object-fit: cover;
	transform: translateY(calc(var(--p, 0) * 6%)) scale(1.12);
	will-change: transform;
}

.lmx-oceano figcaption {
	position: absolute;
	left: max(24px, calc(50vw - 576px));
	bottom: 28px;
	max-width: calc(100% - 48px);
	padding: 12px 20px;
	border-radius: 999px;
	background: rgba(255, 252, 247, .94);
	color: var(--lml-tinto);
	font-weight: 800;
	font-size: clamp(16px, 2vw, 21px);
	box-shadow: var(--lmx-sombra-s);
}

.lmx-platos ul {
	list-style: none;
	margin: 30px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px;
}

.lmx-plato h3 {
	font-size: 23px !important;
	color: var(--lml-ink) !important;
	margin: 0 0 10px !important;
}

.lmx-plato p { font-size: 17px; color: #3A2C30; }

/* A plate, from above: rim, glaze and a little served dish in the brand colour. */
.lmx-plato-art {
	--c: var(--lml-tinto);
	display: block;
	width: 132px;
	height: 132px;
	margin-bottom: 20px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 50% 50%, var(--c) 0 23%, transparent 23.5%),
		radial-gradient(circle at 40% 42%, rgba(255, 255, 255, .5) 0 9%, transparent 9.5%),
		radial-gradient(circle, #fff 0 52%, #EFE6E8 53% 55%, #fff 56% 100%);
	box-shadow: 0 0 0 1px #E8DCDF, 0 16px 26px -18px rgba(74, 19, 35, .6);
	transition: transform .6s var(--lmx-ease);
}

.lmx-plato-olivo .lmx-plato-art { --c: var(--lml-olivo); }
.lmx-plato-maiz .lmx-plato-art { --c: var(--lml-maiz); }
.lmx-plato:hover .lmx-plato-art { transform: rotate(40deg) translateY(-4px); }

.lmx-historia {
	padding: clamp(56px, 8vw, 96px) 0;
	background: var(--lml-pale);
}

.lmx-historia-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	gap: clamp(28px, 5vw, 64px);
	margin-top: 24px;
}

.lmx-historia-sticky {
	position: sticky;
	top: 18vh;
	align-self: start;
	padding: 26px;
	border-radius: 24px;
	background: #fff;
	box-shadow: var(--lmx-sombra);
}

.lmx-historia-svg {
	display: block;
	width: 100%;
	height: auto;
}

.lmx-historia-svg text {
	font: 700 17px Gabarito, sans-serif;
	fill: var(--lml-tinto);
}

.lmx-historia-svg .lmx-h-luces circle { fill: var(--lml-maiz); }

.lmx-historia-svg g > * {
	transform-box: fill-box;
	transform-origin: center;
	transition: opacity .5s var(--lmx-ease), transform .5s var(--lmx-ease);
	transition-delay: calc(var(--i, 0) * 30ms);
}

.lmx-historia[data-step="1"] .lmx-h-ciudades > *,
.lmx-historia[data-step="1"] .lmx-h-oficios > *,
.lmx-historia[data-step="2"] .lmx-h-oficios > *,
.lmx-historia[data-step="1"] .lmx-h-luces > *,
.lmx-historia[data-step="2"] .lmx-h-luces > *,
.lmx-historia[data-step="3"] .lmx-h-luces > * {
	opacity: 0;
	transform: scale(.3);
}

.lmx-historia[data-step="4"] .lmx-h-luces circle {
	filter: drop-shadow(0 0 6px rgba(242, 179, 61, .9));
	animation: lmx-brillo 2.6s ease-in-out infinite;
	animation-delay: calc(var(--i) * -.3s);
}

@keyframes lmx-brillo {
	0%, 100% { opacity: 1; }
	50% { opacity: .6; }
}

.lmx-historia-pasos {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: paso;
}

.lmx-paso {
	counter-increment: paso;
	min-height: 58vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 24px 0;
	transition: opacity .4s;
}

.lmx-paso::before {
	content: counter(paso);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-bottom: 14px;
	border-radius: 50%;
	background: var(--lml-maiz);
	color: var(--lml-ink);
	font-weight: 800;
}

.lmx-paso h3 { font-size: clamp(24px, 2.6vw, 32px) !important; margin-bottom: 12px !important; }
.lmx-paso p { font-size: 19px; color: #3A2C30; max-width: 460px; }

html.lmx-js .lmx-historia[data-step] .lmx-paso:not(.is-on) { opacity: .32; }

.lmx-honesta {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: center;
}

.lmx-honesta .lmx-arco { aspect-ratio: 4 / 5; }

.lmx-checks {
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
}

.lmx-checks li {
	position: relative;
	padding: 0 0 16px 40px;
	font-size: 18px;
}

/* Bullets are tiny empty chairs: the mustard ring from the logo. */
.lmx-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .2em;
	width: 16px;
	height: 16px;
	border: 4px solid var(--lml-maiz);
	border-radius: 50%;
}

.lmx-anfitriona {
	max-width: 760px;
	padding: 34px;
	border-radius: 24px;
	background: var(--lmx-crema);
	border: 1px solid #EFE2CC;
}

.lmx-anfitriona p { font-size: 19px; }

.lmx-enlaces {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 0 !important;
}

.lmx-enlaces a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 700;
}

.lmx-invitacion {
	text-align: left;
}

.lmx-invitacion .lml-section { padding-top: 112px; padding-bottom: 88px; }

body.lmx-page .lmx-invitacion h2 { color: #fff !important; font-size: clamp(2.2rem, 5vw, 3.6rem) !important; }
.lmx-invitacion p { max-width: 560px; font-size: 20px; color: #F3DCE2; }

/* Explora */
.lmx-explora ul {
	list-style: none;
	margin: 26px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.lmx-explora-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 0 0 20px;
	border-radius: 22px;
	background: #fff;
	border: 1px solid var(--lmx-linea);
	color: var(--lml-ink);
	text-decoration: none;
	overflow: hidden;
	transition: transform .3s var(--lmx-ease), box-shadow .3s var(--lmx-ease);
}

.lmx-explora-card:hover {
	text-decoration: none;
	transform: translateY(-4px);
	box-shadow: var(--lmx-sombra);
}

.lmx-explora-art {
	display: block;
	aspect-ratio: 16 / 9;
	margin-bottom: 12px;
	overflow: hidden;
	background: var(--lml-pale);
}

.lmx-explora-art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s var(--lmx-ease);
}

.lmx-explora-card:hover img { transform: scale(1.05); }

.lmx-explora-card strong {
	padding: 0 20px;
	font-size: 21px;
	color: var(--lml-tinto);
}

.lmx-explora-card > span:last-child {
	padding: 0 20px;
	font-size: 16px;
	color: var(--lmx-texto-2);
}

body.lmx-page .lmx-explora { margin-bottom: clamp(56px, 8vw, 96px); }

/* Tu silla: the place-card builder */
.lmx-tarjeta {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(28px, 5vw, 64px);
	margin-top: 32px;
	align-items: start;
}

.lmx-tarjeta-form p { margin: 0 0 18px; }

.lmx-tarjeta-form p > label,
.lmx-colores legend {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--lml-ink);
}

.lmx-tarjeta-form input[type="text"],
.lmx-tarjeta-form select {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid #B9A0A7;
	border-radius: 10px;
	background: #fff;
	color: var(--lml-ink);
	font: 400 17px/1.3 Gabarito, sans-serif;
}

.lmx-tarjeta-form input::placeholder { color: #9A858B; }

.lmx-colores {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
}

.lmx-colores legend { width: 100%; }

.lmx-color {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 6px 16px 6px 8px;
	border: 1px solid #D9C7CC;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 600;
}

.lmx-color input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden;
	clip: rect(0 0 0 0);
	opacity: 0;
}

.lmx-color span::before {
	content: "";
	display: inline-block;
	width: 26px;
	height: 26px;
	margin-right: 8px;
	vertical-align: middle;
	border-radius: 50%;
	background: var(--lml-tinto);
}

.lmx-color-maiz span::before { background: var(--lml-maiz); }
.lmx-color-olivo span::before { background: var(--lml-olivo); }
.lmx-color:has(input:checked) { border-color: var(--lml-ink); box-shadow: 0 0 0 2px var(--lml-ink) inset; }
.lmx-color:has(input:focus-visible) { outline: 3px solid var(--lml-olivo); outline-offset: 3px; }

.lmx-tarjeta-stage {
	position: sticky;
	top: 24px;
	perspective: 1100px;
}

.lmx-carta {
	--c: var(--lml-tinto);
	--c-txt: #fff;
	position: relative;
	margin: 0;
	padding: 0;
	border-radius: 22px;
	background: var(--lmx-papel);
	box-shadow: 0 1px 0 #E8DCDF, 0 40px 60px -40px rgba(74, 19, 35, .65), 0 0 0 1px #EDE2E4;
	transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -4deg));
	transform-style: preserve-3d;
	transition: transform .4s var(--lmx-ease);
}

.lmx-carta[data-color="maiz"] { --c: var(--lml-maiz); --c-txt: var(--lml-ink); }
.lmx-carta[data-color="olivo"] { --c: var(--lml-olivo); }

/* The fold: the back half of the tent card, peeking above the front face. */
.lmx-carta::before {
	content: "";
	display: block;
	height: 26px;
	border-radius: 22px 22px 0 0;
	background: linear-gradient(180deg, color-mix(in srgb, var(--c) 82%, #000), var(--c));
}

.lmx-carta-cara {
	position: relative;
	padding: 26px 30px 30px;
}

.lmx-carta p { margin: 0 !important; }

.lmx-carta-marca {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 800;
	font-size: 15px;
	color: var(--lml-tinto);
}

.lmx-carta .lmx-carta-mesa {
	margin-top: 22px !important;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--lml-olivo);
}

.lmx-carta .lmx-carta-nombre {
	margin-top: 6px !important;
	font-size: clamp(36px, 4.4vw, 52px);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -.035em;
	color: var(--lml-tinto);
	overflow-wrap: anywhere;
	padding-right: 72px;
}

.lmx-carta .lmx-carta-oficio {
	margin-top: 10px !important;
	font-size: 19px;
	color: #3A2C30;
	overflow-wrap: anywhere;
}

.lmx-carta dl {
	margin: 22px 0 0;
	padding-top: 18px;
	border-top: 2px dotted #DCCDD1;
	display: grid;
	gap: 12px;
}

.lmx-carta dl div {
	display: grid;
	grid-template-columns: 74px minmax(0, 1fr);
	gap: 10px;
}

.lmx-carta dt {
	align-self: start;
	padding: 3px 0;
	border-radius: 999px;
	background: var(--c);
	color: var(--c-txt);
	font-size: 13px;
	font-weight: 800;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.lmx-carta dd {
	margin: 0;
	font-size: 17px;
	overflow-wrap: anywhere;
}

.lmx-carta .lmx-carta-pie {
	margin-top: 24px !important;
	font-size: 14px;
	font-weight: 700;
	color: var(--lmx-texto-2);
}

.lmx-carta-silla {
	position: absolute;
	top: 22px;
	right: 26px;
	width: 56px;
	height: 70px;
	background: var(--c);
	-webkit-mask: url(svg/silla.svg) center / contain no-repeat;
	mask: url(svg/silla.svg) center / contain no-repeat;
	transition: background-color .3s;
}

.lmx-carta .is-vacio { color: #A8949A; }

.lmx-tarjeta-actions[hidden] { display: none; }

.lmx-tarjeta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

.lmx-tarjeta-estado {
	min-height: 1.5em;
	margin: 12px 0 4px !important;
	font-weight: 700;
	color: var(--lml-olivo);
}

.lmx-nota {
	padding: 18px 20px;
	border-radius: 14px;
	background: var(--lml-pale);
}

.lmx-despues-pasos {
	list-style: none;
	margin: 22px 0 24px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	counter-reset: despues;
}

.lmx-despues-pasos li {
	counter-increment: despues;
	padding-top: 16px;
	border-top: 2px solid var(--lmx-linea);
	font-size: 17px;
}

.lmx-despues-pasos li::before {
	content: counter(despues);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-bottom: 10px;
	border-radius: 50%;
	background: var(--lml-maiz);
	font-weight: 800;
}

.lmx-despues-pasos strong { display: block; margin-bottom: 4px; color: var(--lml-tinto); }

/* ---------------------------------------------------------------------------
 * 8. Responsive
 * ------------------------------------------------------------------------ */

@media (max-width: 1000px) {
	.lmx-platos ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.lmx-tarjeta,
	.lmx-honesta,
	.lmx-historia-grid { grid-template-columns: minmax(0, 1fr); }

	.lmx-tarjeta-stage { position: static; order: -1; }

	.lmx-historia-sticky {
		top: 0;
		z-index: 2;
		padding: 12px 14px;
		border-radius: 0 0 18px 18px;
	}

	.lmx-historia-svg { max-height: 30vh; margin: 0 auto; }
	.lmx-paso { min-height: 48vh; }
	.lmx-despues-pasos { grid-template-columns: minmax(0, 1fr); }
	.lmx-honesta .lmx-arco { aspect-ratio: 4 / 3; border-radius: 180px 180px 22px 22px; }
}

@media (max-width: 560px) {
	.lmx-platos ul { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.lmx-plato { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 18px; align-items: start; }
	.lmx-plato-art { grid-row: 1 / 3; width: 76px; height: 76px; margin: 0; }
	.lmx-indice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
	body.lmx .lmx-pais h3 { font-size: 18px; }
	.lmx-pais li a { min-height: 32px; font-size: 15px; }
	.lmx-anfitriona { padding: 22px 18px; }
	.lmx-carta-cara { padding: 22px 20px 24px; }
	.lmx-carta-nombre { padding-right: 56px; }
	.lmx-carta-silla { width: 44px; height: 55px; right: 18px; }
	.lmx-carta dl div { grid-template-columns: 64px minmax(0, 1fr); }
	.lmx-oceano figcaption { left: 16px; bottom: 16px; border-radius: 16px; }
	body.lmx .lml-footer::before { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	body.lmx [class^="lmx-"], body.lmx [class*=" lmx-"],
	body.lmx [class^="lmx-"] *, body.lmx [class*=" lmx-"] *,
	body.lmx [class^="lmx-"]::before, body.lmx [class^="lmx-"]::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
	html.lmx-js [data-lmx-reveal] { opacity: 1; transform: none; }
	.lmx-oceano img { transform: none; }
	.lmx-carta { transform: none; }
	body.lmx.home-page .lml-hero::before { animation: none; }
}
