/* daezpro.com — 00-tokens-base.css
   Capa de tokens canónica del sitio (F4.A1) — consume PLAN-MAESTRO/CONTRATO-TOKENS.md
   y SPEC-DS-V3-DETALLE.md. Este archivo ES la capa de tokens: los valores literales
   viven acá (allowlist de SPEC-GATE-PURITY); ningún otro archivo puede tener hex.
   Aliases legados (--ink, --line, --bg, …) NO viven acá: fueron eliminados en
   F4.B (SPEC-DS-V3-DETALLE §13) y no se reintroducen.
   Trato de usted (D3). Valores canónicos: AdqueoSuite-DS (ADR-100). */

/* ============================================================================
   1. TOKENS CANÓNICOS (CONTRATO-TOKENS.md §1) + EXTENSIONES DECLARADAS
   ============================================================================ */
:root{
  /* Marca (color.css:33-35,239-242;59-60,244-245) */
  --primary:        #1a58cf;   /* --blue-600   color.css:33,239 */
  --primary-hover:  #1546a6;   /* --blue-700   color.css:34,240 */
  --primary-press:  #133a85;   /* --blue-800   color.css:35,241 */
  --primary-soft:   #ecf3ff;   /* --blue-50    color.css:27,242 */
  --accent:         #0da37e;   /* --teal-500   color.css:59,244 */
  --accent-soft:    #e6f7f2;   /* --teal-50    color.css:54,245 */
  --accent-strong:  #088566;   /* --teal-600   color.css:60 (extensión) */

  /* Tinta y texto (color.css:134-137,285-288) */
  --text-strong:    #141b28;   /* --ink-900    color.css:137,285 */
  --text-body:      #2c3547;   /*             color.css:286 */
  --text-muted:     #6a7486;   /* --sage-500   color.css:134,287 */
  --text-faint:     #97a0b0;   /*             color.css:288 */
  --text-invert:    #ffffff;   /* --on-primary color.css:243 (extensión) */

  /* Fondo y superficie (color.css:127-129,248-252) */
  --bg-app:         #fbfcfe;   /* --paper      color.css:128,248 */
  --bg-canvas:      #f1f4f9;   /* --paper-2    color.css:129,249 */
  --surface:        #ffffff;   /* --white      color.css:127,250 */
  --surface-2:      #f1f4f9;   /* --paper-2    color.css:129,252 */

  /* Líneas y foco (color.css:292-296) */
  --border:         #e4e9f1;   /* --line       color.css:130,292 */
  --border-strong:  #d1d8e4;   /*             color.css:294 */
  --border-subtle:  #edf0f5;   /*             color.css:295 */
  --ring:           rgba(26,88,207,0.34); /* color.css:296 */

  /* Radios (border.css:4-10) */
  --r-xs: 4px;  --r-sm: 6px;  --r-md: 8px;  --r-lg: 10px;
  --r-xl: 14px; --r-2xl: 20px; --r-pill: 999px;

  /* Sombras (shadow.css:4-12) */
  --sh-xs: 0 1px 2px rgba(20,27,40,0.07);
  --sh-sm: 0 1px 2px rgba(20,27,40,0.07), 0 2px 8px rgba(20,27,40,0.06);
  --sh-md: 0 2px 4px rgba(20,27,40,0.07), 0 8px 20px rgba(20,27,40,0.10);
  --sh-lg: 0 4px 8px rgba(20,27,40,0.08), 0 14px 34px rgba(20,27,40,0.14);
  --sh-xl: 0 8px 16px rgba(20,27,40,0.10), 0 28px 60px rgba(20,27,40,0.20);
  --sh-pop: 0 6px 12px rgba(20,27,40,0.10), 0 18px 40px rgba(20,27,40,0.18);
  --sh-focus: 0 0 0 3px var(--ring);

  /* Tipografía (typography.css:18-30) — --font-body renombra a --font-ui */
  --font-display: 'Sora', 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-ui:      'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --fs-display: 40px; --fs-h1: 28px; --fs-h2: 22px; --fs-h3: 18px; --fs-title: 15px;
  --fs-body: 14px; --fs-sm: 13px; --fs-xs: 12px; --fs-2xs: 11px;

  /* Motion (motion.css:4-6) — aliases --motion-* renombran a --dur-* */
  --dur-fast: 120ms; --dur: 180ms; --dur-slow: 260ms;

  /* Colores de tema (CONTRATO-TOKENS.md §3; F1.T2; B-006) */
  --theme-energy:       var(--sky-600);
  --theme-energy-text:  var(--sky-700);
  --theme-mtto:         var(--status-assigned-text);
  --theme-mtto-text:    var(--status-assigned-text);
  --theme-admin:        var(--clay-600);
  --theme-admin-text:   var(--clay-700);
  --theme-money:        var(--sage-500);
  --theme-money-text:   var(--sage-700);

  /* Escalas del DS usadas por los temas (color.css:87-98,118-122,131-136,194) */
  --sky-300: #4db9db; --sky-600: #0c7c96; --sky-700: #085670;
  --lime-400: #6bc94a; --lime-500: #4fae2f;
  --status-assigned-text: #377821;
  --clay-400: #ee8a5a; --clay-600: #d1502f; --clay-700: #a13d1f;
  --sage-200: #ccd3de; --sage-300: #adb6c4; --sage-500: #6a7486; --sage-700: #384357;

  /* Semánticos (color.css:210-216) + pares texto/soft (extensiones) */
  --success: #0da37e; --success-text: #078847; --success-soft: #e2f5ef;
  --warning: #f0a429; --warning-text: #ae6319; --warning-soft: #fcf3e0;
  --danger:  #e24444; --danger-text:  #e61e25; --danger-soft:  #fbe9e7;
  --info:    #1a58cf; --info-text:    #1649ac; --info-soft:    #e7eeff;

  /* ============ LAYOUT DEL SITIO (extensiones, SPEC-DS-V3-DETALLE §13) ============ */
  --maxw:          1240px;  /* INVENTADO — PENDIENTES-REEMPLAZAR.md#N-003 */
  --pad:           24px;
  --sec-space:     clamp(80px, 11vw, 132px);
  --nav-bg:        rgba(255,255,255,0.94); /* extensión del sitio */
}

/* ------------------------------------------------------------- 2. RESET/BASE */
*,*::before,*::after{ box-sizing:border-box; }
html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
  scroll-padding-top:84px; /* offset del nav sticky para anclas */
}
body{
  margin:0;
  background:var(--bg-app);
  color:var(--text-strong);
  font-family:var(--font-ui);
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  overflow-x:clip;
}
h1,h2,h3,h4,p,figure,ul,ol{ margin:0; }
ul,ol{ padding:0; list-style:none; }
img,svg{ display:block; max-width:100%; }
img{ height:auto; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; cursor:pointer; }
input,textarea,select{ font:inherit; }
::selection{ background:var(--primary-soft); }

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

/* ------------------------------------------------------------- 3. DARK THEME */
[data-theme="dark"]{
  --primary:        #4f8bf5;   /* --blue-400  color.css:323 */
  --primary-hover:  #86b0fb;   /* --blue-300  color.css:324 */
  --primary-press:  #2a6fe8;   /* --blue-500  color.css:325 */
  --primary-soft:   rgba(42,111,232,0.18); /* color.css:326 */
  --accent:         #23b894;   /* --teal-400  color.css:328 */
  --accent-soft:    rgba(13,163,126,0.18);  /* color.css:329 */
  --accent-strong:  #4db9db;   /* --sky-300   color.css:332 */

  --text-strong:    #eaeff8;   /* color.css:365 */
  --text-body:      #c2cbda;   /* color.css:366 */
  --text-muted:     #8894a7;   /* color.css:367 */
  --text-faint:     #667486;   /* color.css:368 */
  --text-invert:    #08111f;

  --bg-app:         #0b1420;   /* color.css:334 */
  --bg-canvas:      #08111b;   /* color.css:335 */
  --surface:        #111d2c;   /* color.css:336 */
  --surface-2:      #172436;   /* color.css:339 */

  --border:         #25334a;   /* color.css:372 */
  --border-strong:  #35475f;   /* color.css:374 */
  --border-subtle:  #1b2739;   /* color.css:375 */
  --ring:           rgba(79,139,245,0.5); /* color.css:376 */

  --success: #23b894; --info: #4f8bf5;
  --success-soft: rgba(13,163,126,0.18); --info-soft: rgba(42,111,232,0.2);
  --warning-soft: rgba(240,164,41,0.16); --danger-soft: rgba(226,68,68,0.18);

  /* Temas en oscuro (CONTRATO §5.3) */
  --theme-energy:      var(--sky-300);
  --theme-energy-text: var(--sky-300);
  --theme-mtto:        var(--lime-400);
  --theme-mtto-text:   var(--lime-400);
  --theme-admin:       var(--clay-400);
  --theme-admin-text:  var(--clay-400);
  --theme-money:       var(--sage-200);
  --theme-money-text:  var(--sage-300);

  /* Layout del sitio */
  --nav-bg: rgba(11,20,32,0.9);
}
