/* ==========================================================================
   Tokens de diseño – Remisiones NNA
   Acento: añil, el tinte histórico de El Salvador.
   Claro y oscuro comparten nombres; solo cambian los valores.
   ========================================================================== */
:root {
  color-scheme: light dark;

  /* Color · claro */
  --bg:            #eef0f6;
  --bg-elevated:   #f7f8fb;
  --surface:       #ffffff;
  --surface-2:     #f3f4f8;
  --glass:         rgb(247 248 251 / .72);
  --glass-strong:  rgb(255 255 255 / .86);
  --glass-dark:    rgb(22 26 52 / .82);
  --hairline:      rgb(26 31 66 / .10);
  --hairline-2:    rgb(26 31 66 / .16);

  --text:          #14172e;
  --text-2:        #4c5272;
  --text-3:        #7d829f;
  --text-on-accent:#ffffff;

  --accent:        #3344c4;   /* añil */
  --accent-press:  #2735a6;
  --accent-soft:   rgb(51 68 196 / .10);
  --accent-ring:   rgb(51 68 196 / .35);
  --accent-deep:   #1e2680;

  --success:       #16855a;
  --success-soft:  rgb(22 133 90 / .12);
  --warning:       #b86a00;
  --warning-soft:  rgb(184 106 0 / .13);
  --danger:        #cc2f27;
  --danger-soft:   rgb(204 47 39 / .10);

  /* Profundidad */
  --shadow-1: 0 1px 2px rgb(20 23 46 / .06), 0 1px 1px rgb(20 23 46 / .04);
  --shadow-2: 0 2px 6px rgb(20 23 46 / .06), 0 12px 32px -8px rgb(20 23 46 / .14);
  --shadow-3: 0 8px 24px rgb(20 23 46 / .10), 0 32px 64px -16px rgb(20 23 46 / .24);
  --shadow-accent: 0 10px 30px -10px rgb(39 53 166 / .65), 0 2px 6px rgb(39 53 166 / .25);

  /* Radios (concéntricos: interior = exterior − relleno) */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Espaciado (base 4) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --gutter: 20px;
  --max: 560px;

  /* Tipografía: SF Pro en Apple, Roboto/Segoe en el resto. Sin descargas: funciona sin señal. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-large-title: 34px;
  --fs-title-1: 28px;
  --fs-title-2: 22px;
  --fs-title-3: 20px;
  --fs-headline: 17px;
  --fs-body: 17px;
  --fs-callout: 16px;
  --fs-subhead: 15px;
  --fs-footnote: 13px;
  --fs-caption: 12px;

  /* Movimiento: resortes calculados (ζ≈0.72 y ζ≈0.9) */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.3, 1.3, .5, 1);
  --ease-snappy: cubic-bezier(.2, .9, .3, 1);
  --dur-press: 120ms;
  --dur-1: 200ms;
  --dur-2: 320ms;
  --dur-3: 520ms;

  /* Cabecera */
  --bar-h: 52px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ease-spring: linear(0, .0303, .1064, .2095, .3253, .4431, .5556, .6581, .7478, .8236, .8857, .9347, .972, .9992, 1.0179, 1.0296, 1.036, 1.0383, 1.0377, 1.0352, 1.0314, 1.027, 1.0225, 1.0181, 1.0141, 1.0105, 1.0074, 1.0049, 1.0029, 1.0014, 1.0003, .9995, 1);
    --ease-snappy: linear(0, .0466, .1525, .2819, .4131, .5342, .6396, .7275, .7984, .854, .8967, .9287, .9521, .969, .9807, .9888, .9941, .9975, .9996, 1.0007, 1.0013, 1.0015, 1.0015, 1.0014, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #090b1a;
    --bg-elevated:   #10132a;
    --surface:       #161a35;
    --surface-2:     #1d2242;
    --glass:         rgb(16 19 42 / .68);
    --glass-strong:  rgb(26 31 62 / .82);
    --glass-dark:    rgb(34 39 78 / .86);
    --hairline:      rgb(196 204 255 / .10);
    --hairline-2:    rgb(196 204 255 / .16);

    --text:          #eef0ff;
    --text-2:        #aab0d4;
    --text-3:        #737aa3;

    --accent:        #7d8cff;
    --accent-press:  #6a7af5;
    --accent-soft:   rgb(125 140 255 / .16);
    --accent-ring:   rgb(125 140 255 / .45);
    --accent-deep:   #3344c4;
    --text-on-accent:#0b0e24;

    --success:       #45c58f;
    --success-soft:  rgb(69 197 143 / .15);
    --warning:       #f0a33a;
    --warning-soft:  rgb(240 163 58 / .15);
    --danger:        #ff6b62;
    --danger-soft:   rgb(255 107 98 / .14);

    --shadow-1: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-2: 0 2px 8px rgb(0 0 0 / .35), 0 16px 40px -12px rgb(0 0 0 / .6);
    --shadow-3: 0 12px 32px rgb(0 0 0 / .45), 0 40px 80px -20px rgb(0 0 0 / .7);
    --shadow-accent: 0 12px 34px -12px rgb(80 98 255 / .7), 0 2px 8px rgb(0 0 0 / .4);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-press: 0ms;
    --dur-1: 1ms;
    --dur-2: 1ms;
    --dur-3: 1ms;
  }
}
