/**
 * Estilos globales del theme 3dlancer (dirección D · Estudio técnico).
 * Los tokens viven en theme.json; aquí solo va lo que theme.json no puede expresar:
 * modo claro, retícula, foco, movimiento reducido y utilidades de la capa técnica.
 * Ver DESIGN.md.
 */

/* ---------- Modo claro (el oscuro es el predeterminado en theme.json) ---------- */
:root { color-scheme: dark; }
html[data-theme="light"] {
	color-scheme: light;
	--wp--preset--color--base: #f4f3f0;
	--wp--preset--color--surface: #ffffff;
	--wp--preset--color--surface-2: #e9e7e2;
	--wp--preset--color--contrast: #161513;
	--wp--preset--color--muted: #5c5954;
	--wp--preset--color--border: #dedbd5;
	--wp--preset--color--border-strong: #b3aea5;
	--wp--preset--color--border-input: #8c877e;
	--wp--preset--color--accent: #8a5a2b;
	--wp--preset--color--accent-hover: #74481f;
	--wp--preset--color--on-accent: #ffffff;
	--wp--preset--color--media: #0b0a09;
	--wp--custom--grid--line: rgba(22, 21, 19, 0.06);
}

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

/* ---------- Retícula de 12 columnas, apenas visible ---------- */
body {
	background-image: linear-gradient(to right, var(--wp--custom--grid--line) 1px, transparent 1px);
	background-size: calc(min(100vw - 2 * var(--wp--custom--gutter), var(--wp--style--global--wide-size)) / 12) 100%;
	background-position: center top;
}

/* ---------- Foco visible en todo ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* ---------- Enlaces del texto: subrayado discreto ---------- */
:where(p, li) a {
	text-decoration-color: var(--wp--preset--color--border-strong);
	text-underline-offset: 0.25em;
	transition: color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease), text-decoration-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease);
}
:where(p, li) a:hover { text-decoration-color: currentColor; }

/* ---------- Botones: secundario (estilo "Outline" del núcleo) ---------- */
.wp-block-button .wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; transition: background-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease), border-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease), color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease), transform 120ms var(--wp--custom--motion--ease); }
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--border-strong);
	padding: calc(0.9em - 1px) calc(1.4em - 1px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--wp--preset--color--contrast); }

/* ---------- Campos de formulario ---------- */
:where(input:not([type="checkbox"], [type="radio"], [type="submit"]), select, textarea) {
	min-height: 44px;
	padding: 0.6em 0.8em;
	border: 1px solid var(--wp--preset--color--border-input);
	border-radius: var(--wp--custom--radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
}

/* ---------- Capa técnica: utilidades ---------- */
/* Etiqueta en mono (eyebrow, meta de tarjetas) */
.tdl-label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
/* Índice de sección: 01, 02… */
.tdl-index {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: var(--wp--custom--label--tracking);
	color: var(--wp--preset--color--accent);
	margin-right: 0.75em;
}
/* Etiqueta tipo chip (Self-initiated study, Client work) */
.tdl-tag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	color: var(--wp--preset--color--muted);
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius);
	padding: 0.2em 0.6em;
}
/* Marcas de corte en dos esquinas de un medio destacado */
.tdl-crop { position: relative; }
.tdl-crop::before,
.tdl-crop::after {
	content: "";
	position: absolute;
	z-index: 2;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--wp--preset--color--accent);
	pointer-events: none;
}
.tdl-crop::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.tdl-crop::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }
/* Anotación sobre el producto (máximo 2 por medio) */
.tdl-anno {
	position: absolute;
	z-index: 2;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ecebe7;
	background: rgba(11, 10, 9, 0.68);
	padding: 0.3em 0.55em;
}
.tdl-anno::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 0.5em;
	vertical-align: 1px;
	background: #d4a373;
}
/* Contorno fino en medios de tarjetas */
.tdl-media-outline { outline: 1px solid var(--wp--preset--color--border-strong); outline-offset: -1px; }

/* ---------- Aparición al hacer scroll (la activa assets/js/theme-mode.js) ---------- */
/* Solo con tdl-motion (sin movimiento reducido, sin ahorro de datos ni red lenta). Sin ella todo se ve desde el inicio.
   --tdl-delay escalona hermanos de una rejilla (lo pone theme-mode.js, máximo 360 ms). */
.tdl-motion [data-tdl-reveal] {
	opacity: 0;
	transform: translateY(var(--wp--custom--motion--reveal-distance));
	transition: opacity var(--wp--custom--motion--reveal) var(--wp--custom--motion--ease) var(--tdl-delay, 0ms), transform var(--wp--custom--motion--reveal) var(--wp--custom--motion--ease) var(--tdl-delay, 0ms);
}
.tdl-motion [data-tdl-reveal].is-in { opacity: 1; transform: none; }
.tdl-motion [data-tdl-reveal] .tdl-anno {
	opacity: 0;
	transition: opacity 600ms var(--wp--custom--motion--ease) calc(var(--wp--custom--motion--annotation-delay) + var(--tdl-delay, 0ms));
}
.tdl-motion [data-tdl-reveal].is-in .tdl-anno { opacity: 1; }

/* ---------- Selector de modo claro/oscuro ---------- */
.tdl-theme-toggle {
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.75em;
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	cursor: pointer;
}
.tdl-theme-toggle:hover { border-color: var(--wp--preset--color--contrast); }

.tdl-price small { font-size: 0.45em; letter-spacing: 0.06em; color: var(--wp--preset--color--muted); font-family: var(--wp--preset--font-family--mono); }

/* ---------- Movimiento reducido: todo estático ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	.tdl-motion [data-tdl-reveal],
	.tdl-motion [data-tdl-reveal] .tdl-anno { opacity: 1; transform: none; }
	.tdl-card:hover .tdl-card__media img { transform: none; }
}

/* =====================================================================
   F1-5 · Plantillas: cabecera, pie, secciones, tarjetas, casos y páginas.
   Todo con tokens de theme.json; nada de colores sueltos salvo el hero
   (texto claro sobre video, igual en los dos modos) y el logo.
   ===================================================================== */

/* ---------- Base ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }
html { scroll-padding-top: 88px; }
body { overflow-x: clip; }
img, video { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
:where(.tdl-main) { padding-bottom: 0; }
.tdl-main strong, .tdl-main b { font-weight: 600; }
:where(h1, h2, h3) strong { font-weight: 600; }
.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;
}

/* Etiqueta en mono sobre un título (eyebrow) */
.tdl-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin: 0 0 var(--wp--preset--spacing--40);
}
/* Índice automático 01, 02… en el orden en que aparecen las secciones */
.tdl-main { counter-reset: tdl-section; }
/* Solo en la home y en las páginas armadas con patrones; en casos y archivo no hay secuencia */
.tdl-archive .tdl-eyebrow--index::before, .tdl-case .tdl-eyebrow--index::before { content: none; }
.tdl-eyebrow--index::before {
	counter-increment: tdl-section;
	content: counter(tdl-section, decimal-leading-zero);
	color: var(--wp--preset--color--accent);
	margin-right: 0.75em;
}
.tdl-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); max-width: 52ch; }
.tdl-muted { color: var(--wp--preset--color--muted); }
.tdl-caption {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-top: var(--wp--preset--spacing--30);
}
.tdl-link-quiet { margin: 0; font-size: var(--wp--preset--font-size--small); }
.tdl-link-quiet a {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--border-strong);
	text-underline-offset: 0.3em;
}
.tdl-link-quiet a:hover { color: var(--wp--preset--color--contrast); text-decoration-color: currentColor; }

/* ---------- Logo ---------- */
.tdl-logo { display: inline-flex; align-items: center; line-height: 0; color: inherit; text-decoration: none; }
.tdl-logo__svg { display: block; width: auto; height: 18px; overflow: visible; }
.tdl-logo__svg path { stroke-width: 0.5; }
.tdl-logo__svg .t1 { fill: #fafafa; stroke: #fafafa; }
.tdl-logo__svg .t2 { fill: #c8c8c8; stroke: #c8c8c8; }
.tdl-logo__svg .t3 { fill: #969696; stroke: #969696; }
.tdl-logo__svg .t4 { fill: #646464; stroke: #646464; }
/* Modo claro: el mismo degradado, invertido (oscuro → gris medio), todo ≥ 3:1 sobre el fondo */
html[data-theme="light"] .tdl-logo__svg .t1 { fill: #161513; stroke: #161513; }
html[data-theme="light"] .tdl-logo__svg .t2 { fill: #3d3b38; stroke: #3d3b38; }
html[data-theme="light"] .tdl-logo__svg .t3 { fill: #5c5954; stroke: #5c5954; }
html[data-theme="light"] .tdl-logo__svg .t4 { fill: #7d7972; stroke: #7d7972; }

/* ---------- Cabecera ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 0px); }
.tdl-header {
	position: relative;
	isolation: isolate;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
/* El fondo translúcido va en un pseudoelemento: un backdrop-filter en .tdl-header convertiría la cabecera en el
   bloque contenedor del menú móvil (position: fixed) y el panel quedaría atrapado en sus 64 px de alto. */
.tdl-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	-webkit-backdrop-filter: saturate(1.2) blur(10px);
	backdrop-filter: saturate(1.2) blur(10px);
}
.tdl-header__bar { min-height: 64px; gap: var(--wp--preset--spacing--50); }
.tdl-header__bar > * { margin-block: 0; }
.tdl-nav { flex: 1 1 auto; }
.tdl-nav .wp-block-navigation__container { gap: 1.75rem; }
.tdl-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--muted); text-decoration: none; padding-block: 0.5em; }
.tdl-nav .wp-block-navigation-item__content:hover,
.tdl-nav .current-menu-item > .wp-block-navigation-item__content,
.tdl-nav [aria-current="page"] { color: var(--wp--preset--color--contrast); }
.tdl-header__actions { gap: var(--wp--preset--spacing--30); }
.tdl-header__cta { gap: 0; }
.tdl-header__cta .wp-block-button__link { white-space: nowrap; }
.tdl-header__bar > .tdl-logo { flex: 0 1 auto; min-width: 0; }
.tdl-theme-toggle { display: inline-flex; align-items: center; gap: 0.5em; }
/* Botón de menú en móvil y panel desplegable */
.tdl-nav .wp-block-navigation__responsive-container-open,
.tdl-nav .wp-block-navigation__responsive-container-close {
	min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
	color: var(--wp--preset--color--contrast);
}
.tdl-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50) var(--wp--custom--gutter);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}
.tdl-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: var(--wp--preset--spacing--50);
}
.tdl-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--h-3);
	font-weight: 300;
	color: var(--wp--preset--color--contrast);
}
@media (max-width: 599px) {
	/* Logo, modo, botón y menú; el texto del selector se oculta */
	.tdl-header__bar { gap: var(--wp--preset--spacing--20); }
	.tdl-logo__svg { height: 14px; }
	.tdl-nav { order: 3; flex: 0 0 auto; }
	.tdl-theme-toggle { padding: 0; justify-content: center; }
	.tdl-theme-toggle__label { display: none; }
	.tdl-header__cta .wp-block-button__link { padding-inline: 0.8em; letter-spacing: 0.03em; }
}
@media (max-width: 359px) {
	.tdl-logo__svg { height: 11px; }
	.tdl-header__cta .wp-block-button__link { padding-inline: 0.7em; letter-spacing: 0.02em; }
}

/* ---------- Pie ---------- */
.tdl-footer {
	border-top: 1px solid var(--wp--preset--color--border);
	margin-top: 0;
	padding-block: var(--wp--preset--spacing--80) var(--wp--preset--spacing--60);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.tdl-footer a { color: var(--wp--preset--color--muted); text-decoration: none; }
.tdl-footer a:hover { color: var(--wp--preset--color--contrast); }
.tdl-footer__cols {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--60);
}
.tdl-footer__brand { grid-column: 1 / span 5; }
.tdl-footer__brand > p { max-width: 36ch; margin: var(--wp--preset--spacing--40) 0 0; }
.tdl-footer__nav { grid-column: 7 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wp--preset--spacing--60); }
.tdl-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4em; }
.tdl-footer__list a { display: inline-block; padding-block: 0.35em; }
.tdl-footer__legal {
	margin-top: var(--wp--preset--spacing--70);
	padding-top: var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--preset--color--border);
	gap: var(--wp--preset--spacing--40);
}
.tdl-footer__legal p { margin: 0; }
@media (max-width: 781px) {
	.tdl-footer__brand, .tdl-footer__nav { grid-column: 1 / -1; }
}

/* ---------- Secciones ---------- */
.tdl-section { padding-block: var(--wp--preset--spacing--90) 0; }
.tdl-main > .tdl-section:last-child, .tdl-content > .tdl-section:last-child { padding-bottom: var(--wp--preset--spacing--90); }
.tdl-section-head { gap: var(--wp--preset--spacing--40); margin-bottom: var(--wp--preset--spacing--60); }
.tdl-section-head h2 { margin: 0; }
.tdl-section-head__text { min-width: 0; }
.tdl-section > * + * { margin-top: 0; }
/* Nota al pie de una sección (paquetes, How it works): aire sobre ella. */
/* Nota al pie después de otro contenido: aire arriba en todo el sitio.
   Excepciones: pie de figura del visor 3D (pegado al medio) y la nota en línea de .tdl-film (margin 0 en case-media). */
* + .tdl-caption { margin-top: var(--wp--preset--spacing--50); }
.tdl-viewer-block > .tdl-caption { margin-top: var(--wp--preset--spacing--30); }
.tdl-page-head { padding-top: var(--wp--preset--spacing--80); }
.tdl-page-head h1 { margin: 0 0 var(--wp--preset--spacing--40); max-width: 18ch; }
.tdl-page-intro { padding-top: var(--wp--preset--spacing--50); }
.tdl-page-intro .tdl-lead { margin: 0; }

/* Dos columnas sobre la retícula de 12: texto 5, medio 6 */
.tdl-split {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--60);
	align-items: center;
}
.tdl-split > .tdl-split__text { grid-column: 1 / span 5; }
.tdl-split > .tdl-split__media { grid-column: 7 / span 6; }
.tdl-split--reverse > .tdl-split__text { grid-column: 8 / span 5; grid-row: 1; }
.tdl-split--reverse > .tdl-split__media { grid-column: 1 / span 6; grid-row: 1; }
.tdl-split--about > .tdl-split__media { grid-column: 1 / span 4; }
.tdl-split--about > .tdl-split__text { grid-column: 6 / span 7; }
.tdl-split--even { align-items: start; }
.tdl-split--even > .tdl-split__text:first-child { grid-column: 1 / span 5; }
.tdl-split--even > .tdl-split__text:last-child { grid-column: 7 / span 6; }
@media (max-width: 781px) {
	.tdl-split > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
}
.tdl-split__text > p { max-width: var(--wp--custom--measure); }

/* Relleno de medios pendientes (PLACEHOLDER) */
.tdl-ph {
	display: grid;
	place-items: center;
	min-height: 12rem;
	padding: var(--wp--preset--spacing--50);
	background: repeating-linear-gradient(135deg, var(--wp--preset--color--surface-2) 0 12px, var(--wp--preset--color--surface) 12px 24px);
	border-radius: var(--wp--custom--radius);
	outline: 1px solid var(--wp--preset--color--border-strong);
	outline-offset: -1px;
}
.tdl-ph--4x5 { aspect-ratio: 4 / 5; }
.tdl-ph--3x2 { aspect-ratio: 3 / 2; }
.tdl-ph--wide { aspect-ratio: 21 / 9; }
@media (max-width: 599px) { .tdl-ph--wide { aspect-ratio: auto; } }
.tdl-ph--form { min-height: 24rem; }
.tdl-ph__label {
	margin: 0;
	text-align: center;
	max-width: 40ch;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* ---------- Hero de la home ---------- */
.tdl-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(92svh, 980px);
	margin-top: 0 !important;
	color: #ecebe7;
	background: var(--wp--preset--color--media);
	overflow: hidden;
}
.tdl-hero .tdl-hero__media { position: absolute; inset: 0; margin: 0; }
.tdl-hero .tdl-hero__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
/* Velos para leer el texto: lateral e inferior (los únicos degradados del sitio) */
.tdl-hero .tdl-hero__media::before,
.tdl-hero .tdl-hero__media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.tdl-hero .tdl-hero__media::before { background: linear-gradient(90deg, rgba(11, 10, 9, 0.72) 0%, rgba(11, 10, 9, 0.35) 45%, transparent 70%); }
.tdl-hero .tdl-hero__media::after { background: linear-gradient(180deg, rgba(11, 10, 9, 0.1) 0%, rgba(11, 10, 9, 0.2) 50%, rgba(11, 10, 9, 0.9) 100%); }
.tdl-hero__inner {
	position: relative;
	z-index: 2;
	width: min(100% - 2 * var(--wp--custom--gutter), var(--wp--style--global--wide-size));
	margin-inline: auto;
	padding-block: var(--wp--preset--spacing--70) clamp(2.5rem, 6vw, 5rem);
}
/* Marcas de corte del hero, en las esquinas derechas */
.tdl-hero::before,
.tdl-hero::after { content: ""; position: absolute; z-index: 2; right: clamp(1rem, 3vw, 2.5rem); width: 22px; height: 22px; border: 1.5px solid #d4a373; pointer-events: none; }
.tdl-hero::before { top: clamp(1rem, 3vw, 2.5rem); border-left: 0; border-bottom: 0; }
.tdl-hero::after { bottom: clamp(1rem, 3vw, 2.5rem); border-left: 0; border-top: 0; }
.tdl-hero .tdl-eyebrow { color: #cfccc5; }
.tdl-hero__title { max-width: 17ch; margin: 0; color: #ecebe7; }
.tdl-hero__sub { max-width: 50ch; font-size: var(--wp--preset--font-size--large); color: #cfccc5; margin: var(--wp--preset--spacing--50) 0 var(--wp--preset--spacing--60); }
.tdl-hero__actions { gap: var(--wp--preset--spacing--30); }
.tdl-hero .wp-block-button__link { background: #d4a373; color: #0b0a09; }
.tdl-hero .wp-block-button__link:hover { background: #e2bb93; color: #0b0a09; }
.tdl-hero .is-style-outline > .wp-block-button__link { background: transparent; color: #ecebe7; border-color: rgba(236, 235, 231, 0.45); }
.tdl-hero .is-style-outline > .wp-block-button__link:hover { border-color: #ecebe7; background: transparent; color: #ecebe7; }
.tdl-hero__reply {
	margin: var(--wp--preset--spacing--40) 0 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.02em;
	color: #cfccc5;
}
@media (max-width: 599px) {
	.tdl-hero { min-height: 86svh; }
	.tdl-hero::before, .tdl-hero::after { display: none; }
}

/* ---------- Franja de prueba ---------- */
.tdl-proof { margin-top: 0 !important; padding-block: var(--wp--preset--spacing--50); border-bottom: 1px solid var(--wp--preset--color--border); }
.tdl-proof__list {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 0.5rem 2.5rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.tdl-proof__list strong { color: var(--wp--preset--color--contrast); font-weight: 500; }

/* ---------- Tarjetas de caso ---------- */
.tdl-work__grid {
	list-style: none; margin: 0; padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50);
}
.tdl-work__grid > li { margin: 0; min-width: 0; }
@media (max-width: 1023px) { .tdl-work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .tdl-work__grid { grid-template-columns: minmax(0, 1fr); } }
/* Home: una pieza grande 21:9 y tres verticales 4:5 */
.tdl-work--featured .tdl-work__grid > li:first-child { grid-column: 1 / -1; }
.tdl-card__media { margin: 0; overflow: hidden; border-radius: var(--wp--custom--radius); background: var(--wp--preset--color--media); outline: 1px solid var(--wp--preset--color--border-strong); outline-offset: -1px; }
.tdl-card__media a { display: block; }
.tdl-card__media img {
	display: block; width: 100%; height: auto;
	aspect-ratio: 4 / 5; object-fit: cover;
	transition: transform var(--wp--custom--motion--slow) var(--wp--custom--motion--ease);
}
.tdl-work--featured .tdl-work__grid > li:first-child .tdl-card__media img { aspect-ratio: 21 / 9; }
@media (max-width: 599px) {
	.tdl-work--featured .tdl-work__grid > li:first-child .tdl-card__media img { aspect-ratio: 4 / 3; }
}
@media (hover: hover) and (pointer: fine) { .tdl-card:hover .tdl-card__media img { transform: scale(var(--wp--custom--motion--hover-zoom)); } }
.tdl-card__meta { margin-top: var(--wp--preset--spacing--30) !important; gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40); }
.tdl-card__title { margin: 0; font-size: var(--wp--preset--font-size--large); font-weight: 500; letter-spacing: 0; line-height: 1.3; }
.tdl-card__title a { color: var(--wp--preset--color--contrast); text-decoration: none; transition: color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease); }
.tdl-card:hover .tdl-card__title a, .tdl-card__title a:focus-visible { color: var(--wp--preset--color--accent); }
.tdl-case-line { margin: 0.25em 0 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.tdl-card > * + * { margin-block-start: 0; }
/* Caso sin póster: hueco del mismo tamaño para no romper la rejilla */
.tdl-card:not(:has(.tdl-card__media))::before {
	content: ""; display: block; aspect-ratio: 4 / 5; border-radius: var(--wp--custom--radius);
	background: repeating-linear-gradient(135deg, var(--wp--preset--color--surface-2) 0 12px, var(--wp--preset--color--surface) 12px 24px);
	outline: 1px solid var(--wp--preset--color--border-strong); outline-offset: -1px;
}
.tdl-work--featured .tdl-work__grid > li:first-child .tdl-card:not(:has(.tdl-card__media))::before { aspect-ratio: 21 / 9; }

/* ---------- Filtros del portafolio ---------- */
.tdl-filters {
	display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--70);
	padding-block: var(--wp--preset--spacing--50);
	margin-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70) !important;
	border-block: 1px solid var(--wp--preset--color--border);
}
.tdl-filters__group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wp--preset--spacing--30); min-width: 0; }
.tdl-filters__label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: var(--wp--custom--label--tracking);
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}
.tdl-filters__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--20); }
.tdl-filters__link {
	display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.85em;
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}
.tdl-filters__link:hover { color: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--contrast); }
.tdl-filters__link[aria-current="page"] { color: var(--wp--preset--color--on-accent); background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); }
@media (pointer: coarse) { .tdl-filters__link { min-height: 44px; } }
.tdl-pagination { margin-top: var(--wp--preset--spacing--70); font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); }

/* ---------- Servicios ---------- */
.tdl-svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--wp--preset--spacing--40); }
@media (max-width: 781px) { .tdl-svc-grid { grid-template-columns: minmax(0, 1fr); } }
/* El grupo pone margen arriba a la 2.ª y 3.ª tarjeta (flujo de bloques); en una rejilla eso las deja más bajas. */
.tdl-svc-grid > * { margin-block: 0 !important; }
.tdl-svc {
	display: flex; flex-direction: column; gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--50);
	background: color-mix(in srgb, var(--wp--preset--color--surface) 70%, transparent);
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius);
}
.tdl-svc > * { margin: 0 !important; }
.tdl-price { font-size: var(--wp--preset--font-size--h-3); font-weight: 300; line-height: 1.2; letter-spacing: -0.01em; color: var(--wp--preset--color--contrast); }
.tdl-svc__list { margin: 0; padding-left: 1.1em; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
/* Botón y enlace al pie de la tarjeta, alineados entre tarjetas aunque las listas midan distinto. */
.tdl-svc > .tdl-svc__actions { margin-top: auto !important; padding-top: var(--wp--preset--spacing--30); gap: var(--wp--preset--spacing--40); }
.tdl-svc__actions .wp-block-buttons { margin: 0; }
/* F2-1 · Services: plazo bajo la lista y rejillas que se adaptan a 1, 3 o 4 paquetes. */
.tdl-svc__days { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); letter-spacing: 0.02em; color: var(--wp--preset--color--muted); }
.tdl-svc-grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.tdl-svc-grid--single { grid-template-columns: minmax(0, 32rem); }
/* Página Services: paquete = texto a la izquierda, precios a la derecha */
.tdl-pkg { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--wp--preset--spacing--60); border-top: 1px solid var(--wp--preset--color--border); margin-top: var(--wp--preset--spacing--90); padding-top: var(--wp--preset--spacing--70); }
.tdl-pkg > .tdl-section-head { grid-column: 1 / -1; }
.tdl-pkg > .tdl-pkg__text { grid-column: 1 / span 5; }
.tdl-pkg > .tdl-pkg__prices { grid-column: 7 / span 6; }
@media (max-width: 781px) { .tdl-pkg > * { grid-column: 1 / -1 !important; } }
.tdl-pkg__text .tdl-lead { margin-top: 0; }
.tdl-prices { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--wp--preset--color--border-strong); }
.tdl-prices li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--wp--preset--spacing--40); padding-block: var(--wp--preset--spacing--40); border-bottom: 1px solid var(--wp--preset--color--border); }
.tdl-prices strong { font-weight: 300; font-size: var(--wp--preset--font-size--large); white-space: nowrap; }
.tdl-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60); }
.tdl-checks li { border-top: 1px solid var(--wp--preset--color--border-strong); padding-top: var(--wp--preset--spacing--30); }

/* ---------- Pasos (How it works) ---------- */
.tdl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--wp--preset--spacing--50); counter-reset: tdl-step; }
.tdl-steps--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--wp--preset--spacing--70); }
@media (max-width: 1023px) { .tdl-steps, .tdl-steps--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .tdl-steps, .tdl-steps--6 { grid-template-columns: minmax(0, 1fr); } }
.tdl-steps li { counter-increment: tdl-step; border-top: 1px solid var(--wp--preset--color--border-strong); padding-top: var(--wp--preset--spacing--40); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.tdl-steps li::before {
	content: counter(tdl-step, decimal-leading-zero);
	display: block; margin-bottom: var(--wp--preset--spacing--20);
	font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label);
	color: var(--wp--preset--color--accent);
}
.tdl-steps strong { display: block; margin-bottom: 0.25em; font-size: var(--wp--preset--font-size--medium); font-weight: 500; color: var(--wp--preset--color--contrast); }

/* ---------- Visor 3D (lugar reservado hasta F1-6) ---------- */
.tdl-viewer { position: relative; aspect-ratio: 1 / 1; background: var(--wp--preset--color--media); border-radius: var(--wp--custom--radius); display: grid; place-items: center; }
.tdl-viewer > .tdl-viewer__cover { position: absolute; inset: 0; margin: 0; }
.tdl-viewer > .tdl-viewer__cover img { width: 100%; height: 100%; object-fit: cover; }
.tdl-viewer > .tdl-ph__label { position: absolute; left: var(--wp--preset--spacing--40); bottom: var(--wp--preset--spacing--40); z-index: 2; color: #ecebe7; background: rgba(11, 10, 9, 0.68); padding: 0.4em 0.7em; text-align: left; }

/* ---------- Reseñas ---------- */
.tdl-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--wp--preset--spacing--60); }
@media (max-width: 781px) { .tdl-quotes { grid-template-columns: minmax(0, 1fr); } }
.tdl-quote { margin: 0; padding: 0 0 0 var(--wp--preset--spacing--50); border-left: 1px solid var(--wp--preset--color--accent); }
.tdl-quote p { font-size: var(--wp--preset--font-size--large); font-weight: 300; line-height: 1.5; }
.tdl-quote cite { display: block; margin-top: var(--wp--preset--spacing--40); font-style: normal; font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); letter-spacing: var(--wp--custom--label--tracking); text-transform: uppercase; color: var(--wp--preset--color--muted); }

/* ---------- Llamada final ---------- */
.tdl-cta h2 { max-width: 16ch; margin: 0; }
.tdl-cta .tdl-lead { margin-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60); }
.tdl-cta .wp-block-buttons { display: inline-flex; vertical-align: middle; margin-right: var(--wp--preset--spacing--50); }
.tdl-cta .tdl-link-quiet { display: inline-block; vertical-align: middle; margin-top: var(--wp--preset--spacing--30); }

/* ---------- Caso individual ---------- */
.tdl-case__head { padding-top: var(--wp--preset--spacing--80); }
.tdl-case__eyebrow { gap: var(--wp--preset--spacing--30); align-items: center; margin-bottom: var(--wp--preset--spacing--40); }
.tdl-case__eyebrow .tdl-case-line { margin: 0; font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); letter-spacing: var(--wp--custom--label--tracking); text-transform: uppercase; }
.tdl-case__title { margin: 0; max-width: 20ch; }
.tdl-case__head .tdl-lead { margin-block: var(--wp--preset--spacing--50) 0; }
.tdl-case-note { margin: var(--wp--preset--spacing--40) 0 0; font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); letter-spacing: 0.02em; color: var(--wp--preset--color--muted); }
.tdl-case__media { margin-top: var(--wp--preset--spacing--70) !important; background: var(--wp--preset--color--media); border-radius: var(--wp--custom--radius); }
.tdl-case__media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.tdl-case__body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--wp--preset--spacing--60); padding-top: var(--wp--preset--spacing--80); align-items: start; }
.tdl-case__body > .tdl-details--facts { grid-column: 1 / span 4; margin: 0; }
.tdl-case__body > .tdl-details--brief { grid-column: 6 / span 7; margin: 0; }
.tdl-case__body > .tdl-details--brief:only-child { grid-column: 1 / span 8; }
@media (max-width: 781px) { .tdl-case__body > * { grid-column: 1 / -1 !important; } }
.tdl-details { margin: 0; }
.tdl-details__row { padding-block: var(--wp--preset--spacing--40); border-top: 1px solid var(--wp--preset--color--border); }
.tdl-details--facts .tdl-details__row:first-child { border-top-color: var(--wp--preset--color--border-strong); }
.tdl-details dt { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); letter-spacing: var(--wp--custom--label--tracking); text-transform: uppercase; color: var(--wp--preset--color--muted); margin-bottom: 0.4em; }
.tdl-details dd { margin: 0; }
.tdl-details--brief .tdl-details__row { display: grid; grid-template-columns: minmax(8rem, 1fr) 3fr; gap: var(--wp--preset--spacing--50); }
.tdl-details--brief dt { margin: 0.35em 0 0; }
@media (max-width: 599px) { .tdl-details--brief .tdl-details__row { grid-template-columns: minmax(0, 1fr); gap: 0.4em; } }
.tdl-case__story { padding-top: var(--wp--preset--spacing--80); }
.tdl-case__story:empty { display: none; }

/* Casos relacionados con el mismo diseño de tarjeta */
.tdl-related { padding-top: var(--wp--preset--spacing--90); }
.tdl-related__heading { font-size: var(--wp--preset--font-size--h-2); margin: 0 0 var(--wp--preset--spacing--60); }
.tdl-related__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50); }
@media (max-width: 1023px) { .tdl-related__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .tdl-related__list { grid-template-columns: minmax(0, 1fr); } }
.tdl-related__img { aspect-ratio: 4 / 5; border-radius: var(--wp--custom--radius); outline: 1px solid var(--wp--preset--color--border-strong); outline-offset: -1px; }
.tdl-related__title { font-size: var(--wp--preset--font-size--large); font-weight: 500; }
.tdl-related__meta { font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); opacity: 1; }
.tdl-related__link:hover .tdl-related__title { text-decoration: none; color: var(--wp--preset--color--accent); }

/* ---------- Contenido libre de páginas ---------- */
.tdl-content > .tdl-section:first-child, .tdl-content > .tdl-page-intro + .tdl-section { padding-top: var(--wp--preset--spacing--80); }
.tdl-content > p, .tdl-content > ul, .tdl-content > ol { max-width: var(--wp--custom--measure); }
.tdl-content > h2 { font-size: var(--wp--preset--font-size--h-3); line-height: 1.2; margin-top: var(--wp--preset--spacing--70); }
.tdl-faq { border-top: 1px solid var(--wp--preset--color--border); padding-block: var(--wp--preset--spacing--40); max-width: 60rem; }
.tdl-faq summary { cursor: pointer; font-size: var(--wp--preset--font-size--large); min-height: 44px; display: flex; align-items: center; }
.tdl-faq summary:hover { color: var(--wp--preset--color--accent); }
.tdl-faq[open] summary { margin-bottom: var(--wp--preset--spacing--30); }
.tdl-faq p { color: var(--wp--preset--color--muted); max-width: var(--wp--custom--measure); }

/* ---------- Contacto ---------- */
.tdl-contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--wp--preset--spacing--60); padding-block: var(--wp--preset--spacing--80) var(--wp--preset--spacing--90); }
.tdl-contact__main { grid-column: 1 / span 8; }
.tdl-contact__aside { grid-column: 10 / span 3; padding-top: var(--wp--preset--spacing--70); }
.tdl-contact__aside > p { margin: 0 0 var(--wp--preset--spacing--30); }
@media (max-width: 781px) { .tdl-contact > * { grid-column: 1 / -1 !important; padding-top: 0; } }
.tdl-contact__title { font-size: var(--wp--preset--font-size--h-2); margin: 0 0 var(--wp--preset--spacing--70); max-width: 20ch; }

/* ---------- 404 ---------- */
.tdl-404 { padding-bottom: var(--wp--preset--spacing--90); }
.tdl-404 .wp-block-buttons { margin-top: var(--wp--preset--spacing--60); }

/* ---------- Listado genérico (index) ---------- */
.tdl-list { padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--90); }

/* =====================================================================
   F1-8 · Movimiento e interacciones globales. Ver DESIGN.md § Movimiento.
   Solo transform y opacity. Lo de entrada va bajo .tdl-motion (la pone el
   script de <head>: sin movimiento reducido, ahorro de datos ni red lenta).
   ===================================================================== */

/* ---------- Transición entre páginas (menú, filtros, casos) ----------
   Fundido corto con View Transitions entre documentos, solo CSS. Chrome, Edge y
   Safari 18.2+; los demás cambian de página como siempre. La cabecera no parpadea. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
}
header.wp-block-template-part { view-transition-name: tdl-header; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 280ms; animation-timing-function: var(--wp--custom--motion--ease); }

/* ---------- Hero: entrada al cargar ----------
   El título y el póster (candidatos a LCP) no cambian de opacidad: el póster solo
   se asienta con una escala lenta y el resto del texto entra escalonado. */
@keyframes tdl-rise { from { opacity: 0; transform: translateY(var(--wp--custom--motion--reveal-distance)); } to { opacity: 1; transform: none; } }
@keyframes tdl-settle { from { transform: scale(1.04); } to { transform: none; } }
@keyframes tdl-fade { from { opacity: 0; } to { opacity: 1; } }
.tdl-motion .tdl-hero .tdl-hero__media img,
.tdl-motion .tdl-hero .tdl-hero__media video { animation: tdl-settle 1800ms var(--wp--custom--motion--ease) both; }
.tdl-motion .tdl-hero .tdl-eyebrow { animation: tdl-rise var(--wp--custom--motion--reveal) var(--wp--custom--motion--ease) 80ms both; }
.tdl-motion .tdl-hero__sub { animation: tdl-rise var(--wp--custom--motion--reveal) var(--wp--custom--motion--ease) 220ms both; }
.tdl-motion .tdl-hero__actions { animation: tdl-rise var(--wp--custom--motion--reveal) var(--wp--custom--motion--ease) 340ms both; }
.tdl-motion .tdl-hero__reply { animation: tdl-fade var(--wp--custom--motion--reveal) var(--wp--custom--motion--ease) 520ms both; }
.tdl-motion .tdl-hero::before,
.tdl-motion .tdl-hero::after { animation: tdl-fade 600ms var(--wp--custom--motion--ease) 700ms both; }

/* ---------- Portafolio: tarjetas escalonadas al cargar (también al cambiar de filtro) ----------
   Solo las de la primera pantalla; las de abajo las revela el scroll (data-tdl-reveal). */
.tdl-motion .tdl-archive .tdl-work__grid > li { animation: tdl-rise 560ms var(--wp--custom--motion--ease) both; }
.tdl-motion .tdl-archive .tdl-work__grid > li:nth-child(2) { animation-delay: 60ms; }
.tdl-motion .tdl-archive .tdl-work__grid > li:nth-child(3) { animation-delay: 120ms; }
.tdl-motion .tdl-archive .tdl-work__grid > li:nth-child(n+4) { animation-delay: 180ms; }
.tdl-motion .tdl-archive .tdl-work__grid > li[data-tdl-reveal] { animation: none; }

/* ---------- Respuesta al presionar ---------- */
.wp-block-button__link:active,
.tdl-filters__link:active,
.tdl-theme-toggle:active { transform: scale(0.97); }
.tdl-theme-toggle { transition: border-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease), transform 120ms var(--wp--custom--motion--ease); }
.tdl-filters__link { transition: color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease), border-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease), background-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease), transform 120ms var(--wp--custom--motion--ease); }

/* ---------- Hover (solo con ratón: en táctil el hover se queda pegado) ---------- */
.tdl-svc { transition: border-color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease); }
.tdl-steps > li { transition: border-color 400ms var(--wp--custom--motion--ease); }
.tdl-nav .wp-block-navigation-item__content { transition: color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease); }
.tdl-related__title { transition: color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease); }
.tdl-faq summary { transition: color var(--wp--custom--motion--fast) var(--wp--custom--motion--ease); }
@media (hover: hover) and (pointer: fine) {
	.tdl-svc:hover { border-color: var(--wp--preset--color--contrast); }
	.tdl-steps > li:hover { border-top-color: var(--wp--preset--color--accent); }
}

/* ---------- Preguntas frecuentes: la respuesta entra con un fundido ---------- */
.tdl-motion .tdl-faq[open] > :not(summary) { animation: tdl-rise 360ms var(--wp--custom--motion--ease) both; }

/* ---------- Movimiento reducido: además del bloque general de arriba ---------- */
@media (prefers-reduced-motion: reduce) {
	::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
	.wp-block-button__link:active, .tdl-filters__link:active, .tdl-theme-toggle:active { transform: none; }
}

/* ---------- F1-9 · Auditoría: desbordes en móvil ---------- */
/* Las retículas de 12 columnas guardan 11 huecos de 2rem (352 px) aunque cada hijo ocupe 1 / -1:
   en pantallas de 320–360 px eso empuja la página de lado. En móvil pasan a una sola columna. */
@media (max-width: 781px) {
	.tdl-footer__cols, .tdl-split, .tdl-pkg, .tdl-case__body, .tdl-contact { grid-template-columns: minmax(0, 1fr); }
}
/* Campos con width: 100% + relleno: sin border-box salían 30 px del formulario (Contact, 375–390 px). */
:where(input:not([type="checkbox"], [type="radio"]), select, textarea) { box-sizing: border-box; max-width: 100%; }
/* Cabecera en 320–389 px: el logo se encogía por debajo del ancho de su SVG y quedaba bajo el
   selector de modo. El logo ya no se encoge; "Request a scope" pasa a dos líneas solo ahí. */
@media (max-width: 599px) { .tdl-header__bar > .tdl-logo { flex: none; } }
@media (max-width: 389px) {
	.tdl-header__cta .wp-block-button__link { white-space: normal; text-align: center; line-height: 1.15; padding-block: 0.45em; max-width: 9.5em; }
}

/* =====================================================================
   F2-1 · Contenido final: medios dentro de los casos y galería de personajes
   ===================================================================== */
/* Historia del caso: etiqueta + titular + texto, con aire entre capítulos. */
.tdl-case__story > .tdl-eyebrow { margin-top: var(--wp--preset--spacing--80); margin-bottom: var(--wp--preset--spacing--30); }
.tdl-case__story > .tdl-eyebrow:first-child { margin-top: 0; }
.tdl-case__story > .tdl-eyebrow + h2 { margin-top: 0; }
.tdl-case__story :where(.wp-block-image, .wp-block-gallery, .wp-block-video, .tdl-media-row, .tdl-seq, .tdl-loop) { margin-block: var(--wp--preset--spacing--60); }
.tdl-case__story :where(.wp-block-image, .wp-block-gallery .wp-block-image, .wp-block-video) img,
.tdl-case__story .wp-block-video video { border-radius: var(--wp--custom--radius); display: block; width: 100%; height: auto; }
.tdl-case__story .wp-block-video video { background: var(--wp--preset--color--media); }
.tdl-case__story figcaption { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); letter-spacing: 0.02em; color: var(--wp--preset--color--muted); text-align: left; margin-top: 0.75em; }
.tdl-case__story .wp-block-gallery.has-nested-images { gap: var(--wp--preset--spacing--30); }
.tdl-case__story .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { display: none; }
.tdl-case__story .wp-block-gallery.has-nested-images > figcaption { flex-basis: 100%; }
/* Medios lado a lado a la MISMA altura (grupo con estilo "Side by side" o clase tdl-media-row).
   Cada video o imagen trae --tdl-ar (ancho ÷ alto, lo pone inc/blocks.php) y crece en esa proporción.
   Un 16:9 junto a un vertical queda muy bajo: los 16:9 van solos, a ancho completo. En móvil se apilan. */
:is(.tdl-media-row, .is-style-tdl-media-row) { display: flex; gap: var(--wp--preset--spacing--40); align-items: flex-start; justify-content: center; max-width: 48rem !important; margin-inline: auto !important; }
:is(.tdl-media-row, .is-style-tdl-media-row) > * { flex: var(--tdl-ar, 1) 1 0; min-width: 0; margin: 0 !important; }
:is(.tdl-media-row, .is-style-tdl-media-row) > * :is(img, video) { display: block; width: 100%; height: auto; }
@media (max-width: 599px) {
	:is(.tdl-media-row, .is-style-tdl-media-row) { flex-direction: column; align-items: center; }
	:is(.tdl-media-row, .is-style-tdl-media-row) > * { flex: none; width: 100%; max-width: calc(26rem * min(var(--tdl-ar, 1), 1)); }
}
/* Enlaces a videos externos (YouTube, Vimeo): se abren al hacer clic, nada carga antes. */
.tdl-case__story > ul:has(a[href*="youtu"], a[href*="vimeo"]) { list-style: none; padding: 0; }
.tdl-case__story > ul a[href*="youtu"]::before, .tdl-case__story > ul a[href*="vimeo"]::before, .tdl-case__story > p > a[href*="vimeo"]::before { content: "▶\00a0"; }

/* Galería de personajes (/characterart/): masonry con columnas CSS, sin JS. */
.tdl-masonry { columns: 3 18rem; column-gap: var(--wp--preset--spacing--30); margin: 0; padding: 0; list-style: none; }
.tdl-masonry li { break-inside: avoid; margin: 0 0 var(--wp--preset--spacing--30); }
.tdl-masonry a { display: block; border-radius: var(--wp--custom--radius); overflow: hidden; }
.tdl-masonry img { display: block; width: 100%; height: auto; transition: transform var(--wp--custom--motion--slow) var(--wp--custom--motion--ease); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .tdl-masonry a:hover img { transform: scale(var(--wp--custom--motion--hover-zoom)); } }

/* Retrato (home y About). */
.tdl-portrait { margin: 0; }
.tdl-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--wp--custom--radius); }
.tdl-why__img { margin: 0; }
.tdl-why__img img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--wp--custom--radius); }
/* Services · add-ons: precios con rangos largos; se acomodan en dos líneas en lugar de salirse. */
.tdl-prices--addons { max-width: 60rem; }
.tdl-prices--addons strong { white-space: normal; text-align: right; font-size: var(--wp--preset--font-size--medium); }
@media (max-width: 599px) { .tdl-prices--addons li { flex-direction: column; align-items: flex-start; gap: 0.25em; } .tdl-prices--addons strong { text-align: left; } }
/* Revisión UX (docs/08-revision-ux.md, punto 1): en la historia del caso, etiqueta, párrafo y listas empiezan
   en el mismo borde izquierdo que el titular (columna de 720 px) y conservan su medida de lectura. */
.tdl-case__story > :is(p, ul, ol, .tdl-eyebrow):not(.alignwide):not(.alignfull) {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size)) / 2)) !important;
	margin-right: auto !important;
}

/* ---------- Visor de imágenes (F2-1, assets/js/lightbox.js) ---------- */
.tdl-lb-trigger { cursor: zoom-in; }
.tdl-lb-trigger:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }
html.tdl-lb-open { overflow: hidden; }
.tdl-lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(11, 10, 9, 0.94); color: #ecebe7; }
.tdl-lb::backdrop { background: transparent; }
.tdl-lb__figure { margin: 0; position: absolute; inset: 4.5rem 4.5rem 5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; }
.tdl-lb__img { display: block; max-width: 100%; max-height: calc(100% - 2.5rem); width: auto; height: auto; object-fit: contain; border-radius: var(--wp--custom--radius); opacity: 0; }
.tdl-lb__img.is-ready { opacity: 1; }
.tdl-lb__caption { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); letter-spacing: 0.02em; color: #cfccc5; text-align: center; max-width: 60ch; }
.tdl-lb__count { position: absolute; left: 1.25rem; top: 1.25rem; margin: 0; font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--label); letter-spacing: var(--wp--custom--label--tracking); color: #cfccc5; }
.tdl-lb__btn { position: absolute; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(236, 235, 231, 0.35); border-radius: var(--wp--custom--radius); background: rgba(11, 10, 9, 0.6); color: #ecebe7; font: 300 1.5rem/1 var(--wp--preset--font-family--sans); cursor: pointer; }
.tdl-lb__btn:hover { border-color: #ecebe7; }
.tdl-lb__btn:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; }
.tdl-lb__close { top: 0.75rem; right: 0.75rem; }
.tdl-lb__prev, .tdl-lb__next { top: 50%; transform: translateY(-50%); }
.tdl-lb__prev { left: 0.75rem; }
.tdl-lb__next { right: 0.75rem; }
.tdl-lb.is-single :is(.tdl-lb__prev, .tdl-lb__next, .tdl-lb__count) { display: none; }
@media (max-width: 599px) {
	.tdl-lb__figure { inset: 4rem 0.75rem 5.5rem; }
	.tdl-lb__prev, .tdl-lb__next { top: auto; bottom: 1rem; transform: none; }
	.tdl-lb__prev { left: calc(50% - 56px); }
	.tdl-lb__next { right: calc(50% - 56px); }
}
@media (prefers-reduced-motion: no-preference) {
	.tdl-lb[open] { animation: tdl-lb-in 200ms var(--wp--custom--motion--ease); }
	.tdl-lb__img { transition: opacity 200ms var(--wp--custom--motion--ease); }
}
@keyframes tdl-lb-in { from { opacity: 0; } to { opacity: 1; } }

/* Revisión UX punto 4: cabecera en teléfonos (< 420 px). El logo se fija a un ancho menor y
   "Request a scope" cabe en una sola línea, más pequeño; antes iba en dos líneas y se veía apretado. */
@media (max-width: 419px) {
	.tdl-header__bar > .tdl-logo .tdl-logo__svg { height: auto; width: 92px; }
	.tdl-header__cta .wp-block-button__link { white-space: nowrap; max-width: none; font-size: 0.6875rem; letter-spacing: 0.02em; padding-inline: 0.65em; line-height: 1.2; }
}
@media (max-width: 359px) {
	.tdl-header__bar { gap: 6px; }
	.tdl-header__actions { gap: 6px; }
	.tdl-header__bar > .tdl-logo .tdl-logo__svg { width: 68px; }
	.tdl-header__cta .wp-block-button__link { font-size: 0.625rem; padding-inline: 0.45em; letter-spacing: 0; }
}
