/*
Theme Name: Dotacion Empresarial Blog
Theme URI: https://dotacionempresarial.co/blog
Author: Dotacion Empresarial
Description: Tema a medida del blog, replica la estetica de la web (crema, pino, menta; Archivo + Instrument Sans).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: dotacion
*/

/* Hallmark · macrostructure: Marquee Hero · tone: light editorial-bold, marca Super · anchor hue: pino/menta 162
   gama adaptada de superdotacion.co (crema #F3F2EC + pino #15211F + menta #93D7B7)
   ------------------------------------------------------------------
   Dotación Empresarial: sistema claro (marca Super)
   Fondo crema, tinta pino profundo, acento menta y verde legible para textos.
   Display Archivo pesado en mayusculas; cuerpo Instrument Sans (igual que Super).
   Estructura, mockups y animaciones heredados del rediseño oscuro; solo cambia
   la gama. Se conservan los NOMBRES de variables para no romper otras paginas.
   ------------------------------------------------------------------ */
:root {
  /* Superficies crema */
  --paper: #f3f2ec;
  --paper-2: #eceadf;
  --paper-3: #e1dfd3;
  --white: #ffffff;

  /* Tinta pino */
  --ink: #15211f;
  --ink-soft: #5f6e6c;

  /* Verde legible (textos y enlaces con color de marca sobre crema) */
  --brand: #2e6b51;
  --brand-700: #214e3b;
  --brand-soft: #bfe4d2;
  --brand-tint: #e5f1ea;

  /* Menta: acento de firma (pastillas, bloques, detalles sobre oscuro) */
  --mint: #93d7b7;
  --mint-surface: #ddefe6;

  /* Acento = verde legible para texto; los rellenos fuertes van en pino */
  --accent: #2e6b51;
  --accent-700: #214e3b;

  /* Lineas */
  --line: #e0ddd0;
  --line-strong: #cbc7ba;
  --rule: #c7c3b5;

  /* Reverso: texto sobre menta/pino */
  --on-mint: #15211f;
  --on-ink: #f3f2ec;

  /* Tipografia */
  --font-display: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'Archivo', ui-sans-serif, system-ui, sans-serif;

  /* Escala espacial base 4px */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;
  --maxw: 1180px;

  --shadow: 0 2px 10px rgba(21, 33, 31, 0.07), 0 26px 54px rgba(21, 33, 31, 0.12);
  --shadow-sm: 0 1px 3px rgba(21, 33, 31, 0.08);

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-4);
  color: var(--ink);
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.015em; }
h3 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.18; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 var(--sp-4); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; color: var(--ink); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-5); }
.section { padding-block: clamp(var(--sp-7), 5.5vw, var(--sp-9)); }

/* Pastilla menta con flecha (estilo Super) */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.01em; color: var(--on-mint);
  background: var(--mint); border-radius: 999px;
  padding: 7px 16px; margin-bottom: var(--sp-5);
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex: none; }
.lead { font-size: 1.18rem; line-height: 1.55; color: var(--ink-soft); max-width: 56ch; }

/* Botones: pastilla; principal en pino, fantasma con borde */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.1;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer;
  transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary, .btn-accent { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover, .btn-accent:hover { background: #0e1716; color: var(--on-ink); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--sp-6); box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: var(--sp-5); }
.grid > * { min-width: 0; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.muted { color: var(--ink-soft); }
.small { font-size: 0.92rem; }
.center { text-align: center; }

.sec-head { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-6); max-width: 60ch; }
.sec-head .lead { font-size: 1.08rem; }

/* Tarjetas de contenido */
.post-card {
  display: flex; flex-direction: column; gap: var(--sp-2);
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--sp-5); color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.post-card:hover { text-decoration: none; border-color: var(--mint); transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card h3 { margin-bottom: var(--sp-1); }
.post-cat { font-family: var(--font-body); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand); font-weight: 700; }
.prod-more { font-family: var(--font-body); font-size: 0.84rem; letter-spacing: 0.02em; color: var(--brand); font-weight: 700; margin-top: auto; }

/* Chips de categoria */
.chip {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 8px 16px; color: var(--ink); font-size: 0.9rem; font-weight: 500;
  transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.chip:hover { text-decoration: none; border-color: var(--mint); color: var(--brand-700); background: var(--brand-tint); }

/* Prosa de articulos (claro) */
.prose { max-width: 70ch; margin-inline: auto; font-size: 1.1rem; line-height: 1.75; color: #3a4a47; }
.prose h2, .prose h3 { color: var(--ink); text-transform: none; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-top: var(--sp-8); }
.prose h3 { margin-top: var(--sp-6); }
.prose p { margin-bottom: var(--sp-5); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: var(--sp-5); }
.prose li { margin-bottom: var(--sp-2); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand-soft); }
.prose a:hover { text-decoration-color: var(--brand); }
.prose blockquote { border-left: 3px solid var(--mint); margin: var(--sp-6) 0; padding: var(--sp-1) var(--sp-5); color: var(--ink); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: var(--sp-6) 0; font-size: 0.98rem; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose thead th { border-bottom: 2px solid var(--line-strong); font-family: var(--font-display); color: var(--ink); }

.fig, .tnum { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 3px; }

/* -------- Revelado al hacer scroll (solo si hay JS) -------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
html.js [data-reveal='left'] { transform: translateX(-26px); }
html.js [data-reveal='right'] { transform: translateX(26px); }
html.js [data-reveal='zoom'] { transform: scale(0.965); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Resplandor de menta reutilizable */
.glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; opacity: 0.5; z-index: 0; background: radial-gradient(circle, var(--mint), transparent 68%); }

/* Sello circular giratorio */
.spin-badge { position: relative; width: 112px; height: 112px; display: grid; place-items: center; }
.spin-badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 14s linear infinite; }
.spin-badge text { font-family: var(--font-display); font-size: 9.1px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; fill: var(--ink); }
.spin-badge .spin-core { width: 54px; height: 54px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; color: var(--on-mint); font-size: 1.35rem; font-weight: 800; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn:hover, .post-card:hover { transform: none; }
  html.js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .marquee-track, .spin-badge svg { animation: none !important; }
}

/* ====================================================================
   Componentes y paginas del blog (header, footer, listados, articulo)
   Heredados de la web Astro, sin scope para WordPress.
   ==================================================================== */

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* -------- Header -------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 22px rgba(21, 33, 31, 0.1);
}
.site-header .bar { display: flex; align-items: center; gap: var(--sp-5); min-height: 74px; transition: min-height var(--dur) var(--ease-out); }
.site-header.scrolled .bar { min-height: 60px; }
.site-header .brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; font-size: 1.16rem; letter-spacing: -0.02em; color: var(--ink); }
.site-header .brand:hover { text-decoration: none; }
.brand-mark { position: relative; width: 30px; height: 21px; border-radius: 4px; background: linear-gradient(145deg, var(--brand), var(--brand-700)); flex: none; box-shadow: var(--shadow-sm); }
.brand-mark::before { content: ''; position: absolute; top: 5px; left: 5px; width: 8px; height: 6px; border-radius: 1.5px; background: var(--accent); }
.brand-mark::after { content: ''; position: absolute; bottom: 4px; right: 5px; width: 10px; height: 2px; border-radius: 1px; background: var(--mint); }
.brand-accent { color: var(--brand-700); }
.site-header .nav { display: none; gap: 1px; margin-left: auto; }
.nav-link { color: var(--ink-soft); font-weight: 500; font-size: 0.94rem; padding: 8px 13px; border-radius: 7px; transition: color var(--dur) var(--ease-out), background var(--dur) var(--ease-out); }
.nav-link:hover { color: var(--ink); background: var(--brand-tint); text-decoration: none; }
.nav-link.active { color: var(--brand-700); font-weight: 600; }
.site-header .cta { display: none; }
.menu-toggle { margin-left: auto; display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }
.mobile-nav { display: none; flex-direction: column; gap: 4px; padding: var(--sp-4) var(--sp-5) var(--sp-5); border-bottom: 1px solid var(--line); }
.mobile-nav.open { display: flex; }
.mobile-link { padding: 12px 8px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 500; }
@media (min-width: 960px) {
  .site-header .nav { display: flex; }
  .site-header .cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* -------- Footer -------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: var(--sp-8) var(--sp-6); margin-top: var(--sp-9); }
.site-footer .cols { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; }
.site-footer .brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.site-footer .brand-accent { color: var(--brand-soft); }
.site-footer .brand-col .muted { color: #b7c3bd; margin: var(--sp-3) 0 var(--sp-4); max-width: 34ch; }
.site-footer h4 { color: var(--paper); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #cdd6d1; font-size: 0.95rem; }
.site-footer a:hover { color: var(--paper); }
.site-footer .legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-3); border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--sp-7); padding-top: var(--sp-5); }
.site-footer .legal .muted { color: #93a099; }
@media (min-width: 760px) { .site-footer .cols { grid-template-columns: 2fr 1fr 1.4fr 1fr; } }

/* -------- Listado del blog -------- */
.blog-hero { background: var(--paper-2); }
.cluster-chips { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.clu-sec { padding-block: var(--sp-7); }
.clu-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); }
.clu-head a { color: var(--brand-700); font-weight: 600; white-space: nowrap; }

/* -------- Articulo -------- */
.crumbs { margin-bottom: var(--sp-5); }
.crumbs a { color: var(--ink-soft); }
.art-head { max-width: 70ch; margin-inline: auto; margin-bottom: var(--sp-7); }
.art-layout { display: grid; gap: var(--sp-7); }
.art-aside { display: grid; gap: var(--sp-5); align-content: start; }
.aside-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); box-shadow: var(--shadow-sm); }
.aside-card .btn { margin: var(--sp-3) 0; width: 100%; }
.aside-links, .norm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.aside-links li a { color: var(--ink); font-weight: 500; }
.norm-list { font-feature-settings: 'tnum' 1; }
.art-aside .aside-card:first-child { background: var(--ink); border-color: transparent; color: var(--paper); box-shadow: var(--shadow); }
.art-aside .aside-card:first-child h3 { color: var(--paper); }
.art-aside .aside-card:first-child .muted { color: #a9c3b7; }
.art-aside .aside-card:first-child .aside-links { border-top: 1px solid rgba(255,255,255,0.12); margin-top: var(--sp-2); padding-top: var(--sp-4); }
.art-aside .aside-card:first-child .aside-links li a { color: var(--mint); font-weight: 500; }
.rel { margin-top: var(--sp-9); border-top: 1px solid var(--line); padding-top: var(--sp-7); }
@media (min-width: 940px) {
  .art-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .art-layout .prose { margin-inline: 0; }
  .art-aside { position: sticky; top: 84px; }
}

/* -------- Categoria -------- */
.cat-hero { background: var(--paper-2); }

/* -------- Paginacion WP -------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 14px; color: var(--ink); font-weight: 600; }
.pagination .page-numbers.current { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pagination .page-numbers:hover { border-color: var(--mint); text-decoration: none; }

/* -------- Contenido WP dentro de .prose -------- */
.prose img { border-radius: var(--radius); margin: var(--sp-5) 0; }
.prose figure { margin: var(--sp-5) 0; }
.prose figcaption { font-size: 0.88rem; color: var(--ink-soft); margin-top: var(--sp-2); }
.prose .wp-block-table table { width: 100%; }
.screen-reader-text { position: absolute; left: -9999px; }
