/* Stampado — fuente única de tokens. Los NOMBRES son contrato (no renombrar); los valores los afina el agente de diseño.
   Tres niveles: primitivos (--c-*), semánticos (--s-*) y escalas (--r-, --e-, --sp-, --t-, --m-, --z-). */
:root {
  /* ── Primitivos de marca — paleta «Tinta + azul luminoso» (2027) ───── */
  /* Neutros cálidos: papel → tinta. paper-100 = papel de fondo, paper-900 = tinta. */
  --c-paper-0: #ffffff; --c-paper-50: #fdfcfa; --c-paper-100: #faf9f5; --c-paper-200: #f1efe8; --c-paper-300: #e4e1d8;
  --c-paper-400: #cdc9be; --c-paper-500: #a6a196; --c-paper-600: #7a766c; --c-paper-650: #625e56; --c-paper-700: #4a4741;
  --c-paper-800: #2b2a27; --c-paper-900: #141414;
  --c-ink: var(--c-paper-900);
  /* Azul luminoso (principal). 600 = color de marca. */
  --c-blue-50: #eef3fd; --c-blue-100: #dce6fb; --c-blue-200: #b9cbf6; --c-blue-300: #8aa8ee; --c-blue-400: #5a84e4;
  --c-blue-500: #3263d6; --c-blue-600: #1846b5; --c-blue-700: #133894; --c-blue-800: #102c73; --c-blue-900: #0c1f52;
  /* Naranja (acento). 500 = acento; texto naranja sobre claro: 700. */
  --c-orange-50: #fff3ee; --c-orange-100: #ffe3d8; --c-orange-200: #ffc4ae; --c-orange-300: #ffa07f; --c-orange-400: #ff8459;
  --c-orange-500: #ff6b3d; --c-orange-600: #e5501f; --c-orange-700: #b33c12; --c-orange-800: #86300f; --c-orange-900: #5a200b;
  /* Rosa (toque). 300 = toque; texto rosa sobre claro: 700. */
  --c-pink-50: #fff2f9; --c-pink-100: #ffe1f1; --c-pink-200: #ffc4e3; --c-pink-300: #ff8fc8; --c-pink-400: #f76bb0;
  --c-pink-500: #e14b94; --c-pink-600: #c2307a; --c-pink-700: #992461; --c-pink-800: #701a47; --c-pink-900: #4b1130;
  /* Estados. El verde queda SOLO para éxito. */
  --c-red-700: #94201a; --c-red-600: #b3261e; --c-red-100: #fbe9e7; --c-amber-600: #8a5306; --c-amber-100: #fdf1d8;
  --c-green-600: #1b6e45; --c-green-100: #e1f4e9;
  /* Bosque y lima: la identidad anterior (hasta nov-2026). Quedan SOLO como colores con nombre para los temas que
     elige un vendedor en su tienda («bosque», «noche», «ámbar»). No son de la marca: no usarlos en interfaz de Stampado. */
  --c-forest-950: #0d2a22; --c-forest-900: #153c32; --c-forest-800: #1c4a3e; --c-forest-700: #29604e;
  --c-forest-600: #3b7a64; --c-forest-500: #58977f; --c-forest-300: #a6c9bb; --c-forest-200: #cae0d6;
  --c-forest-100: #e3efe9; --c-forest-50: #f1f6f3;
  --c-lime-700: #6f8f22; --c-lime-600: #b3dc50; --c-lime-500: #c9ed71; --c-lime-400: #d8f78a; --c-lime-200: #ecfbc6; --c-lime-100: #f5fde2;

  /* ── Semánticos ──────────────────────────────────────────────────── */
  --s-bg: var(--c-paper-100);            /* fondo de página (papel #FAF9F5) */
  --s-surface: var(--c-paper-0);         /* tarjetas, paneles (blanco sobre papel, con --e-1) */
  --s-surface-2: var(--c-paper-50);      /* superficie secundaria */
  --s-sunken: var(--c-paper-200);        /* pozos, mesa de trabajo del editor, fondo de foto de producto */
  --s-text: var(--c-paper-900);          /* tinta: 17.5 sobre bg */
  --s-text-2: var(--c-paper-700);        /* 8.8 sobre bg */
  --s-text-3: var(--c-paper-650);        /* ayudas y marcadores: AA (≥ 4.5) también sobre --s-sunken (5.6) */
  --s-border: var(--c-paper-300);
  --s-border-strong: var(--c-paper-600);   /* borde de campos y controles: ≥ 3:1 sobre bg, surface y sunken */
  --s-primary: var(--c-blue-600);        /* acción principal: azul con texto blanco (8.1) */
  --s-primary-hover: var(--c-blue-700);
  --s-on-primary: #ffffff;
  --s-accent: var(--c-blue-600);         /* botón estrella y opción elegida: el mismo azul */
  --s-accent-hover: var(--c-blue-700);
  --s-on-accent: #ffffff;
  --s-accent-border: var(--c-blue-600);
  --s-highlight: var(--c-orange-500);    /* acento naranja: insignias, realces, ilustración (texto encima: tinta, 6.5) */
  --s-on-highlight: var(--c-paper-900);
  --s-highlight-text: var(--c-orange-700); /* naranja como TEXTO sobre claro (5.6) */
  --s-pop: var(--c-pink-300);            /* toque rosa: decoración y realce sobre tinta (8.8) */
  --s-on-inverse-accent: var(--c-orange-500); /* realce de texto sobre zonas tinta (6.5) */
  --s-selected: var(--c-blue-50);        /* fondo de ítem seleccionado */
  --s-hover: var(--c-paper-200);
  --s-focus: var(--c-blue-600);
  --s-inverse: var(--c-paper-900);       /* zonas oscuras, tooltips y avisos */
  --s-on-inverse: var(--c-paper-50);
  --s-on-inverse-2: var(--c-paper-300);  /* texto secundario sobre tinta (14.1) */
  --s-on-inverse-3: var(--c-paper-400);  /* notas sobre tinta (11.2) */
  --s-inverse-border: var(--c-paper-800);
  --s-focus-on-inverse: var(--c-blue-300); /* foco sobre zonas tinta (7.8) */
  --s-disabled-bg: var(--c-paper-200);   --s-disabled-text: var(--c-paper-500);
  --s-danger: var(--c-red-600);   --s-danger-bg: var(--c-red-100);  --s-danger-hover: var(--c-red-700);  --s-on-danger: #ffffff;
  --s-warning: var(--c-amber-600); --s-warning-bg: var(--c-amber-100);
  --s-success: var(--c-green-600); --s-success-bg: var(--c-green-100);
  --s-info: var(--c-blue-600);     --s-info-bg: var(--c-blue-50);
  --s-overlay: rgb(20 20 20 / .48);      /* velo de diálogos */
  /* editor: colores de guía sobre la prenda (deben verse sobre telas claras y oscuras) */
  --s-guide: #e0457b; --s-print-area: #2f6fed; --s-handle: #ffffff; --s-handle-border: var(--c-paper-900);

  /* ── Radios ──────────────────────────────────────────────────────── */
  --r-1: 6px; --r-2: 10px; --r-3: 14px; --r-4: 20px; --r-5: 28px; --r-pill: 999px;

  /* ── Elevaciones ─────────────────────────────────────────────────── */
  --e-1: 0 1px 2px rgb(20 20 20 / .06), 0 1px 1px rgb(20 20 20 / .04);
  --e-2: 0 4px 12px rgb(20 20 20 / .08), 0 1px 3px rgb(20 20 20 / .06);
  --e-3: 0 16px 40px rgb(20 20 20 / .16), 0 4px 12px rgb(20 20 20 / .08);

  /* ── Espaciado (base 4 px) ───────────────────────────────────────── */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px;

  /* ── Tipografía ──────────────────────────────────────────────────── */
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --t-2xs: .6875rem; --t-xs: .75rem; --t-sm: .8125rem; --t-md: .9375rem; --t-lg: 1.0625rem; --t-xl: 1.25rem;
  --t-2xl: 1.5rem; --t-3xl: 2rem; --t-4xl: clamp(2.25rem, 4vw, 3.25rem);
  --lh-tight: 1.1; --lh-snug: 1.3; --lh-normal: 1.5;

  /* ── Movimiento ──────────────────────────────────────────────────── */
  --m-fast: 120ms; --m-base: 180ms; --m-slow: 260ms;
  --m-swap: 420ms;    /* un contenido reemplaza a otro: pestañas, indicador que se desliza */
  --m-enter: 720ms;   /* entradas y revelados por scroll (solo páginas de presentación; en la app, --m-base/--m-slow) */
  --m-ease: cubic-bezier(.2, .8, .2, 1); --m-ease-in: cubic-bezier(.4, 0, 1, 1);
  --m-ease-out: cubic-bezier(.16, 1, .3, 1);   /* «expo out»: llega rápido y se asienta; va con --m-swap y --m-enter */

  /* ── Capas ───────────────────────────────────────────────────────── */
  --z-base: 0; --z-sticky: 100; --z-panel: 200; --z-popover: 400; --z-sheet: 500; --z-dialog: 600; --z-toast: 700;

  /* ── Medidas de control ──────────────────────────────────────────── */
  --h-control: 36px; --h-control-lg: 44px; --h-touch: 44px;
}

/* Cortes de pantalla (referencia; CSS no admite variables en @media):
   móvil < 760px · tablet 760–1099px · escritorio ≥ 1100px · «pantalla baja» = max-height: 800px */

@media (prefers-reduced-motion: reduce) {
  :root { --m-fast: 0ms; --m-base: 0ms; --m-slow: 0ms; --m-swap: 0ms; --m-enter: 0ms; }
}
