/**
 * LBM CANNA — Cannalogía con el Design System de La Barraca de maría.
 *
 * Tokens copiados del sistema (tokens.json). Una sola familia (Myriad Pro),
 * titulares en title, texto en ink, naranja solo para la acción, el foco y
 * los subrayados. Sin franjas laterales, sin rayas en los antetítulos, sin
 * degradados ni fondos de ruido.
 */

.lbm-canna {
	--title: #445055;
	--ink: #20262a;
	--muted: #5f676b;
	--line: #dde2e4;
	--line-2: #c2c9cc;
	--paper: #fff;
	--paper-2: #f7f8f8;
	--plate: #f1f3f3;
	--well: #eef1f1;
	--orange: #ef7d00;
	--orange-hover: #f68a1a;
	--on-orange: #fff;
	--orange-soft: #fdf0e2;
	--stage: #0e1113;
	--stage-2: #161b1d;
	--stage-ink: #f3f2ef;
	--stage-muted: #a9b1b4;
	--stage-line: rgba(255, 255, 255, .13);
	--r-in: 4px;
	--r: 8px;
	--r-btn: 24px;
	--r-pill: 999px;
	--sh: 0 1px 3px rgba(30, 37, 40, .06), 0 14px 28px -16px rgba(30, 37, 40, .30);
	--sh-hover: 0 2px 6px rgba(30, 37, 40, .08), 0 20px 34px -18px rgba(30, 37, 40, .38);
	--shell: 1248px;
	--lectura: 740px;
	--gut: max(5vw, 18px);
	--gap: 20px;
	--gap-col: clamp(16px, 2vw, 28px);
	--sec: clamp(3.5rem, 7vw, 6rem);
	--ease: cubic-bezier(.2, .7, .2, 1);
	--f: "myriad_proregular", "LBM Myriad", "Segoe UI", system-ui, -apple-system, sans-serif;
	--f-semi: "myriad_prosemibold", "LBM Myriad", "Segoe UI", system-ui, -apple-system, sans-serif;
	--f-bold: "myriad_probold", "LBM Myriad", "Segoe UI", system-ui, -apple-system, sans-serif;

	display: block;
	font-family: var(--f);
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--paper);
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}

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

.lbm-canna :where(h1, h2, h3, h4) {
	margin: 0;
	padding: 0;
	font-family: var(--f-bold);
	font-weight: 400;
	color: var(--title);
	text-wrap: balance;
}

.lbm-canna h1 { font-size: clamp(2.3rem, 5vw, 4.25rem); line-height: .98; letter-spacing: -.03em; }
.lbm-canna h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.2; letter-spacing: -.015em; }
.lbm-canna h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.01em; }
.lbm-canna h4 { font-size: 1.0625rem; line-height: 1.3; font-family: var(--f-semi); }

.lbm-canna :where(p, ul, ol, figure, blockquote) { margin: 0; padding: 0; }

.lbm-canna a { color: var(--title); }
.lbm-canna :focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.cn-shell {
	max-width: calc(var(--shell) + 2 * var(--gut));
	margin: 0 auto;
	padding: 0 var(--gut);
}

.cn-ante {
	margin: 0 0 12px !important;
	font-family: var(--f-semi);
	font-size: .8125rem;
	line-height: 1.2;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--muted);
}

/* ---------- texto corrido ---------- */

.cn-texto > * + * { margin-top: 1em; }
.cn-texto h2 + *,
.cn-texto h3 + *,
.cn-texto h4 + * { margin-top: .5em; }
.cn-texto * + h2,
.cn-texto * + h3,
.cn-texto * + h4 { margin-top: 1.5em; }
.cn-texto ul,
.cn-texto ol { padding-left: 1.25em; }
.cn-texto li + li { margin-top: .35em; }
.cn-texto li::marker { color: var(--muted); }
.cn-texto strong,
.cn-texto b { font-family: var(--f-semi); font-weight: 400; color: var(--ink); }
.cn-texto a {
	color: var(--title);
	text-decoration: underline;
	text-decoration-color: var(--orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: color .15s var(--ease);
}
.cn-texto a:hover { color: var(--ink); }
.cn-texto img { display: block; max-width: 100%; height: auto; border-radius: var(--r-in); }
.cn-texto blockquote { padding: 18px 22px; background: var(--plate); border-radius: var(--r); }
.cn-texto table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9375rem; }
.cn-texto th,
.cn-texto td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }

/* ---------- fotos ---------- */

.cn-fig img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--r);
}
.cn-fig figcaption {
	margin-top: 10px;
	font-size: .9375rem;
	line-height: 1.45;
	color: var(--muted);
}
.cn-fig--icono img {
	width: auto;
	max-width: 100%;
	max-height: 120px;
	border-radius: 0;
}
.cn-fig + .cn-fig { margin-top: var(--gap); }
.cn-fig + .cn-texto,
.cn-texto + .cn-fig,
.cn-texto + .cn-texto,
.cn-interactivo + .cn-texto,
.cn-texto + .cn-interactivo { margin-top: 1.25em; }

/* ---------- cabecera ---------- */

.cn-hero {
	background: var(--paper-2);
	padding: 20px 0 var(--sec);
}

.cn-nav {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 4px 0 6px;
	margin: 0 calc(-1 * var(--gut));
	padding-left: var(--gut);
	padding-right: var(--gut);
}
.cn-nav::-webkit-scrollbar { display: none; }
.cn-nav a {
	flex: none;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--line-2);
	border-radius: var(--r-pill);
	background: var(--paper);
	font-family: var(--f-semi);
	font-size: .9375rem;
	line-height: 1.2;
	color: var(--title);
	text-decoration: none;
	transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.cn-nav a[aria-current] { background: var(--title); border-color: var(--title); color: #fff; }

.cn-hero__txt {
	max-width: 860px;
	padding-top: clamp(2.5rem, 6vw, 4.5rem);
}
.cn-hero h1 { margin-bottom: 0; }
.cn-entradilla {
	margin-top: 22px;
	max-width: var(--lectura);
	font-size: 1.1875rem;
	line-height: 1.5;
	color: var(--ink);
}
.cn-entradilla > * + * { margin-top: .8em; }
.cn-entradilla a { color: var(--title); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.cn-aviso {
	margin-top: 22px;
	max-width: var(--lectura);
	padding: 16px 20px;
	background: var(--orange-soft);
	border-radius: var(--r);
	font-size: .9375rem;
	line-height: 1.5;
	color: var(--ink);
}
.cn-aviso > * + * { margin-top: .6em; }
.cn-aviso strong { font-family: var(--f-semi); font-weight: 400; }

.cn-hero__foto { margin-top: clamp(2rem, 4vw, 3rem); }
.cn-hero__foto img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 1;
	max-height: 560px;
	object-fit: cover;
	border-radius: var(--r);
	background: var(--well);
}

/* ---------- índice ---------- */

.cn-indice { padding: clamp(2.5rem, 5vw, 3.5rem) 0 0; }
.cn-indice__caja {
	max-width: var(--lectura);
	margin: 0 auto;
	padding: 22px 26px 24px;
	background: var(--plate);
	border-radius: var(--r);
}
.cn-indice ol {
	list-style: none;
	counter-reset: cn;
	margin: 0;
	padding: 0;
}
.cn-indice__dos { columns: 2; column-gap: 32px; }
.cn-indice li {
	counter-increment: cn;
	display: flex;
	gap: 10px;
	break-inside: avoid;
	padding: 5px 0;
	font-size: 1rem;
	line-height: 1.35;
}
.cn-indice li::before {
	content: counter(cn, decimal-leading-zero);
	flex: none;
	min-width: 1.6em;
	font-family: var(--f-semi);
	font-variant-numeric: tabular-nums;
	color: var(--muted);
}
.cn-indice a {
	color: var(--title);
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: text-decoration-color .15s var(--ease);
}
.cn-indice a:hover { text-decoration-color: var(--orange); }

/* ---------- secciones ---------- */

.cn-sec { padding: var(--sec) 0; }
.cn-sec--paper { background: var(--paper); }
.cn-sec--plate,
.cn-sec--autor { background: var(--plate); }
.cn-indice + .cn-sec--paper { padding-top: clamp(2.5rem, 5vw, 3.5rem); }

.cn-sec__cab {
	max-width: var(--lectura);
	margin: 0 auto clamp(1.75rem, 3.5vw, 2.75rem);
}
.cn-sec__cab h2 {
	font-size: clamp(1.9rem, 3.6vw, 3rem);
	line-height: 1.04;
	letter-spacing: -.025em;
}
.lbm-canna h2[id] { scroll-margin-top: 100px; }

.cn-fila + .cn-fila { margin-top: clamp(2.5rem, 5vw, 4rem); }

.cn-fila--texto {
	max-width: var(--lectura);
	margin-left: auto;
	margin-right: auto;
}

.cn-fila--foto { max-width: 960px; margin-left: auto; margin-right: auto; }
.cn-fila--foto .cn-fig--icono { text-align: center; }
.cn-fila--foto .cn-fig--icono img { margin: 0 auto; }

.cn-fila--galeria {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--gap-col);
	align-items: start;
}
.cn-fila--galeria .cn-fig + .cn-fig { margin-top: 0; }

/* Foto y texto a dos columnas */
.cn-fila--media {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(24px, 4.5vw, 72px);
	align-items: start;
}
.cn-fila--media.cn-fila--dcha { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.cn-fila--media.cn-fila--dcha .cn-media__foto { order: 2; }
.cn-media__foto { position: sticky; top: 100px; }
.cn-media__texto { max-width: var(--lectura); }

/* Columnas y tarjetas */
.cn-fila--columnas,
.cn-fila--tarjetas {
	display: grid;
	gap: var(--gap-col);
	align-items: start;
}
.cn-fila--tarjetas { align-items: stretch; }
.cn-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cn-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cn-tarjeta {
	padding: clamp(20px, 2.4vw, 28px);
	background: var(--plate);
	border-radius: var(--r);
	font-size: 1rem;
	line-height: 1.55;
}
.cn-sec--plate .cn-tarjeta { background: var(--paper); }
.cn-tarjeta > .cn-fig:first-child:not(.cn-fig--icono) {
	margin: calc(-1 * clamp(20px, 2.4vw, 28px)) calc(-1 * clamp(20px, 2.4vw, 28px)) 18px;
}
.cn-tarjeta > .cn-fig:first-child:not(.cn-fig--icono) img { border-radius: var(--r) var(--r) 0 0; }
.cn-tarjeta > .cn-fig:first-child:not(.cn-fig--icono) figcaption { padding: 0 clamp(20px, 2.4vw, 28px); }
.cn-tarjeta .cn-fig--icono { margin-bottom: 14px; }
.cn-tarjeta h2 { font-size: clamp(1.25rem, 1.8vw, 1.45rem); }

/* Bandas oscuras: fotos de estudio sobre negro */
.cn-sec--stage { background: var(--stage); color: var(--stage-ink); }
.cn-sec--stage h2,
.cn-sec--stage h3,
.cn-sec--stage h4,
.cn-sec--stage .cn-texto strong { color: var(--stage-ink); }
.cn-sec--stage .cn-ante,
.cn-sec--stage .cn-fig figcaption { color: var(--stage-muted); }
.cn-sec--stage .cn-texto a { color: var(--stage-ink); }
.cn-sec--stage .cn-tarjeta { background: var(--stage-2); }
.cn-sec--stage .cn-texto li::marker { color: var(--stage-muted); }

/* Autor */
.cn-sec--autor .cn-fila--media { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); max-width: 980px; margin: 0 auto; }
.cn-sec--autor .cn-media__foto { position: static; }
.cn-sec--autor .cn-texto { font-size: 1rem; color: var(--ink); }

/* Elemento interactivo (partes de la planta) */
.cn-interactivo { max-width: 960px; margin-left: auto; margin-right: auto; }
.cn-interactivo img { max-width: 100%; height: auto; }

/* ---------- tarjetas de las otras páginas ---------- */

.cn-mas .cn-sec__cab { max-width: none; margin-left: 0; }
.cn-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--gap);
}
.cn-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cn-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cn-card { margin: 0; }
.cn-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--paper);
	border-radius: var(--r);
	box-shadow: var(--sh);
	overflow: hidden;
	text-decoration: none;
	color: var(--ink);
	transition: box-shadow .2s var(--ease);
}
.cn-card__img { display: block; overflow: hidden; background: var(--well); }
.cn-card__img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform .7s var(--ease);
}
.cn-card__cuerpo {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 20px 22px 24px;
}
.cn-card .cn-ante { margin-bottom: 8px !important; }
.cn-card__t {
	font-family: var(--f-bold);
	font-size: clamp(1.2rem, 1.6vw, 1.4rem);
	line-height: 1.2;
	letter-spacing: -.015em;
	color: var(--title);
}
.cn-card__txt {
	margin-top: 10px;
	font-size: .9375rem;
	line-height: 1.45;
	color: var(--muted);
	flex: 1 1 auto;
}
.cn-card__mas {
	align-self: flex-start;
	margin-top: 16px;
	font-family: var(--f-semi);
	font-size: 1rem;
	color: var(--title);
	text-decoration: underline;
	text-decoration-color: var(--orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
	.cn-nav a:not([aria-current]):hover { border-color: var(--title); }
	.cn-card__link:hover { box-shadow: var(--sh-hover); }
	.cn-card__link:hover .cn-card__img img { transform: scale(1.025); }
}

/* ---------- pantallas ---------- */

@media (max-width: 1024px) {
	.cn-cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cn-n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	.cn-fila--media,
	.cn-fila--media.cn-fila--dcha { grid-template-columns: minmax(0, 1fr); }
	.cn-fila--media.cn-fila--dcha .cn-media__foto { order: 0; }
	.cn-media__foto { position: static; max-width: 560px; }
	.cn-sec--autor .cn-fila--media { grid-template-columns: minmax(0, 1fr); }
	.cn-sec--autor .cn-media__foto { max-width: 180px; }
	.cn-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.lbm-canna { font-size: 1.0625rem; }
	.cn-n2,
	.cn-n3,
	.cn-cards--3,
	.cn-cards--4 { grid-template-columns: minmax(0, 1fr); }
	.cn-indice__dos { columns: 1; }
	.cn-hero__foto img { aspect-ratio: 16 / 10; }
	.cn-entradilla { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
	.lbm-canna * { transition: none !important; }
	.cn-card__link:hover .cn-card__img img { transform: none; }
}

/* ---------- ajustes tras la primera vista ---------- */

.cn-texto .cn-ante { margin-bottom: 6px !important; }
.cn-texto .cn-ante + h4 { margin-top: 0; }
.cn-entradilla h2 { font-size: clamp(1.2rem, 1.8vw, 1.4rem); }
.cn-entradilla h2 + * { margin-top: .5em; }

/* Mapa de las partes de la planta (Draw Attention): titulares en title, sin naranja como texto. */
.cn-interactivo .hotspot-title,
.cn-interactivo .hotspot-info .hotspot-title { color: var(--title) !important; font-family: var(--f-bold); font-weight: 400; }
.cn-interactivo .hotspots-image-container,
.cn-interactivo .leaflet-container { background: var(--well) !important; border-radius: var(--r); }
.cn-interactivo .hotspots-placeholder { color: var(--muted) !important; }
.lbm-canna h3[id] { scroll-margin-top: 100px; }

/* Sin cajas grises: las columnas van limpias, solo la foto lleva el radio. */
.lbm-canna .cn-tarjeta,
.lbm-canna .cn-sec--plate .cn-tarjeta,
.lbm-canna .cn-sec--stage .cn-tarjeta { background: none; padding: 0; border-radius: 0; }
.lbm-canna .cn-tarjeta > .cn-fig:first-child:not(.cn-fig--icono) { margin: 0 0 18px; }
.lbm-canna .cn-tarjeta > .cn-fig:first-child:not(.cn-fig--icono) img { border-radius: var(--r); }
.lbm-canna .cn-tarjeta > .cn-fig:first-child:not(.cn-fig--icono) figcaption { padding: 0; }
.lbm-canna .cn-fila--tarjetas { column-gap: clamp(24px, 4vw, 56px); row-gap: clamp(32px, 4vw, 48px); }
