/* ============================================================
   TM Editorial v2 · main.css
   Reset + tokens + tipografía base
   ============================================================ */

/* Variables del sistema D2 (Editorial Data-Pro) */
:root {
	/* Fondos */
	--bg:           #FAFAF7;
	--bg-soft:      #F2EFE7;
	--bg-card:      #FFFFFF;

	/* Texto */
	--fg:           #1A1A1F;
	--fg-soft:      #5A5D63;
	--fg-mute:      #9CA0A6;

	/* Líneas */
	--rule:         #DDD9CF;
	--rule-strong:  #1A1A1F;

	/* Acento editorial */
	--accent:       #C2410C;
	--accent-soft:  #FED7AA;
	--accent-faint: #FDF3E7;

	/* Color de marca (solo logo + icono) */
	--brand:        #5630FF;

	/* Semánticos */
	--success:      #15803D;
	--success-soft: #DCFCE7;
	--warn:         #A16207;
	--warn-soft:    #FEF3C7;
	--rec:          #B91C1C;
	--rec-soft:     #FEE2E2;

	/* Layout */
	--max:          1240px;
	--narrow:       760px;

	/* Tipografía */
	--font-sans:    'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--font-mono:    'IBM Plex Mono', Menlo, Consolas, monospace;
	--font-serif:   'Newsreader', Georgia, serif;
}

/* Box-sizing global SOLO en body editorial (no afecta admin bar WP) */
body.tm-editorial,
body.tm-editorial *,
body.tm-editorial *::before,
body.tm-editorial *::after {
	box-sizing: border-box;
}

/* Reset suave de márgenes en elementos del cuerpo editorial */
body.tm-editorial h1,
body.tm-editorial h2,
body.tm-editorial h3,
body.tm-editorial h4,
body.tm-editorial h5,
body.tm-editorial h6,
body.tm-editorial p,
body.tm-editorial figure,
body.tm-editorial blockquote,
body.tm-editorial ul,
body.tm-editorial ol,
body.tm-editorial dl,
body.tm-editorial pre {
	margin: 0;
	padding: 0;
}

/* Listas dentro del cuerpo editorial: padding-left default */
body.tm-editorial .tm-ficha-content ul,
body.tm-editorial .tm-ficha-content ol {
	padding-left: 0;
}

body.tm-editorial img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Body base */
body.tm-editorial {
	font-family: var(--font-sans);
	background: var(--bg);
	color: var(--fg);
	font-size: 16px;
	line-height: 1.6;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

html {
	scroll-behavior: smooth;
}

/* Tipografía base del cuerpo editorial */
body.tm-editorial h1 { font-size: 54px; font-weight: 600; line-height: 1.05; letter-spacing: -0.025em; color: var(--fg); margin: 0 0 16px; }
body.tm-editorial h2 { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; color: var(--fg); margin: 0 0 16px; }
body.tm-editorial h3 { font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; color: var(--fg); margin: 0 0 12px; }
body.tm-editorial h4 { font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; color: var(--fg); margin: 0 0 10px; }
body.tm-editorial h5 { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--fg); margin: 0 0 8px; }
body.tm-editorial p  { font-size: 17px; line-height: 1.65; color: var(--fg); margin: 0 0 18px; }
body.tm-editorial p:last-child { margin-bottom: 0; }
body.tm-editorial a {
	color: var(--fg);
	text-decoration: underline;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
	transition: color 150ms;
}
body.tm-editorial a:hover { color: var(--accent); }
body.tm-editorial strong { font-weight: 600; }
body.tm-editorial em { font-style: italic; }

/* Tipografía mono */
body.tm-editorial .tm-mono {
	font-family: var(--font-mono);
	font-feature-settings: "tnum" 1;
	font-variant-numeric: tabular-nums;
	font-weight: 500;
}

/* Layout containers (chrome) */
body.tm-editorial .tm-container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
body.tm-editorial .tm-narrow    { max-width: var(--narrow); margin: 0 auto; padding: 0 32px; }

/* Layout containers (cuerpo del mock — sin prefijo tm-) */
body.tm-editorial .container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
body.tm-editorial .narrow    { max-width: var(--narrow); margin: 0 auto; padding: 0 32px; }

@media (max-width: 640px) {
	body.tm-editorial .tm-container,
	body.tm-editorial .tm-narrow,
	body.tm-editorial .container,
	body.tm-editorial .narrow { padding: 0 20px; }
}

/* Botones base */
body.tm-editorial .tm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 24px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	transition: 150ms;
	font-family: inherit;
}
body.tm-editorial .tm-btn-primary {
	background: var(--accent);
	color: #fff;
	width: 100%;
}
body.tm-editorial .tm-btn-primary:hover { background: #9A3209; color: #fff; }
body.tm-editorial .tm-btn-ghost {
	background: transparent;
	color: var(--fg);
	border: 1px solid var(--rule);
}
body.tm-editorial .tm-btn-ghost:hover { border-color: var(--fg); color: var(--fg); }

body.tm-editorial .tm-cta-link {
	display: block;
	text-align: center;
	margin-top: 12px;
	font-size: 13px;
	color: var(--fg-soft);
	text-decoration: none;
}
body.tm-editorial .tm-cta-link:hover { color: var(--accent); }

/* Bloque + section-head (chrome del cuerpo) */
body.tm-editorial .tm-bloque { padding: 64px 0; }
body.tm-editorial .tm-bloque + .tm-bloque { border-top: 1px solid var(--rule); }
body.tm-editorial .tm-section-head { padding-bottom: 32px; border-bottom: 1px solid var(--rule); margin-bottom: 32px; }
body.tm-editorial .tm-kicker { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
body.tm-editorial .tm-section-title { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 8px; }
body.tm-editorial .tm-section-intro { font-size: 15px; color: var(--fg-soft); max-width: 720px; line-height: 1.6; }

/* Container ancho para CPTs (override del GP grid) */
body.tm-editorial .tm-fullwidth.grid-container,
body.tm-editorial .tm-fullwidth .grid-container,
body.tm-editorial .tm-fullwidth.site-content {
	max-width: none;
	padding: 0;
}

body.tm-editorial .grid-container {
	max-width: none;
	padding: 0;
}

/* Quitar el container default de GP en singulares editoriales */
body.tm-editorial.single-tm_producto .site-content > .grid-container,
body.tm-editorial.single-tm_comparativa .site-content > .grid-container,
body.tm-editorial.tax-marca .site-content > .grid-container,
body.tm-editorial.tax-uso .site-content > .grid-container,
body.tm-editorial.tax-tipo .site-content > .grid-container,
body.tm-editorial.home .site-content > .grid-container,
body.tm-editorial.blog .site-content > .grid-container,
body.tm-editorial.archive .site-content > .grid-container,
body.tm-editorial.error404 .site-content > .grid-container {
	max-width: none;
	padding: 0;
}

/* Entry GP wrapper sin padding/border */
body.tm-editorial .entry-content { margin: 0; }

/* Helpers */
.tm-sep { color: var(--fg-mute); margin: 0 6px; }

/* Skip link de accesibilidad */
body.tm-editorial .skip-link { position: absolute; left: -9999px; }
body.tm-editorial .skip-link:focus { left: 8px; top: 8px; z-index: 9999; padding: 8px 16px; background: var(--fg); color: var(--bg); }
