/* ==========================================================================
   BOLD CREW — Design tokens
   --------------------------------------------------------------------------
   Todos los valores de color estan MUESTREADOS de los PDF suministrados
   (histograma sobre los renders de pagina). Ver docs/BRAND_ANALYSIS.md §2.
   ========================================================================== */

@font-face {
  font-family: 'Bebas Neue';
  src: url('/assets/fonts/BebasNeue-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/Archivo-Variable.woff2') format('woff2-variations'),
       url('/assets/fonts/Archivo-Variable.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sacramento';
  src: url('/assets/fonts/Sacramento-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- Color: muestreado del material ---------------------------------- */
  --orange:        #F4590C;  /* deck p.6, plano a sangre — color modal */
  --orange-bright: #FF5A00;  /* brief p.1, mismo naranja sin grano */
  --orange-deep:   #C4400A;  /* derivado: hover / pressed */
  --paper:         #F3EBDE;  /* deck p.1/p.3, crema base */
  --paper-light:   #FFF7EA;  /* brief p.1 */
  --paper-deep:    #E4D9C6;  /* derivado: bordes y superficies hundidas */
  --ink:           #000000;  /* titulares */
  --ink-soft:      #1A1613;  /* cuerpo de texto */
  --ink-mute:      #6B6259;  /* texto secundario */
  --whisky:        #C9752A;  /* ambar del producto */

  --line:        rgba(0, 0, 0, .14);
  --line-strong: rgba(0, 0, 0, .30);

  /* Estados. Verde y rojo desaturados hacia el terroso de la paleta para que
     no se lean como un dashboard SaaS generico. */
  --ok:     #1F7A46;
  --ok-bg:  #E3F0E7;
  --warn:   #A96A05;
  --warn-bg:#FBEEDA;
  --bad:    #B02718;
  --bad-bg: #FAE4E1;
  --info-bg:#EDE6DA;

  /* --- Tipografia ------------------------------------------------------- */
  --font-display: 'Bebas Neue', 'Oswald', 'Haettenschweiler', Impact, sans-serif;
  --font-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Sacramento', 'Brush Script MT', cursive;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;

  /* --- Escala ----------------------------------------------------------- */
  --step--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --step-0:  clamp(.95rem, .92rem + .15vw, 1.02rem);
  --step-1:  clamp(1.12rem, 1.05rem + .35vw, 1.3rem);
  --step-2:  clamp(1.4rem, 1.25rem + .7vw, 1.8rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.5vw, 2.7rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.4rem);
  --step-5:  clamp(3.4rem, 2.2rem + 6vw, 7rem);

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  /* Radio maximo 4px: la identidad es editorial y recta. Redondeos blandos
     entrarian en el terreno "infantil" que el brief prohibe (p.15). */
  --radius: 3px;
  --radius-lg: 4px;

  /* Sombras cortas y duras, de cartel pegado, no de material design. */
  --shadow-paper: 0 2px 0 rgba(0,0,0,.10), 0 10px 24px -14px rgba(0,0,0,.45);
  --shadow-lift:  0 3px 0 rgba(0,0,0,.14), 0 18px 36px -18px rgba(0,0,0,.5);

  --tap: 48px;             /* altura tactil minima */
  --wrap: 1180px;
  --wrap-narrow: 640px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 220ms;

  /* --- Texturas --------------------------------------------------------- */
  /* Papel arrugado: extraido de BOLD 2026-2027.pdf p.12 */
  --paper-texture: url('/assets/brand/paper-texture.jpg');
  /* Rasgado: extraido de BOLD 2026-2027.pdf p.9 */
  --torn-edge: url('/assets/brand/torn-edge.png');

  /* Grano del naranja: recreado con feTurbulence en lugar de un JPEG.
     Tileable, nitido a cualquier densidad y de coste practicamente cero. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* El backoffice atenua la identidad a proposito: es una herramienta de trabajo
   para revisar cientos de facturas, no una pieza de campana. Ver BRAND_ANALYSIS §6. */
.theme-admin {
  --paper: #F7F4EF;
  --paper-light: #FFFFFF;
  --paper-deep: #ECE7DF;
  --shadow-paper: 0 1px 2px rgba(0,0,0,.06), 0 1px 0 rgba(0,0,0,.04);
  --shadow-lift: 0 4px 16px -6px rgba(0,0,0,.2);
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 1ms; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
