/* ============================================================================
   Bita Express · Design Tokens
   Fuente: design-system/MASTER.md + brand-spec.md + brand-manual/showcase
   ============================================================================ */

:root {
  /* ---- Brand · Primary (Naranja) ---- */
  --brand-primary: #FE6502;
  --brand-primary-ink: #C24400;
  --brand-primary-hover: #F35B03;
  --brand-primary-pressed: #E45700;
  --brand-primary-soft: #FFB174;
  --on-brand-primary: #12191D;

  /* ---- Brand · Secondary (Vino) ---- */
  --brand-secondary: #75022E;
  --brand-secondary-hover: #67022C;
  --brand-secondary-pressed: #4E011E;
  --brand-secondary-soft: #F7E7EE;
  --on-brand-secondary: #F6FAFB;

  /* ---- Brand · Accent (Amarillo señal) ---- */
  --brand-accent: #FFC247;
  --brand-accent-hover: #F2AD24;
  --brand-accent-soft: #FFF1C7;
  --on-brand-accent: #12191D;

  /* ---- Neutrales ---- */
  --neutral-0: #FFFFFF;
  --neutral-50: #F4F7F8;
  --neutral-100: #E8EEF0;
  --neutral-200: #CFD9DD;
  --neutral-300: #AEBBC1;
  --neutral-500: #66747A;
  --neutral-600: #4B5A61;
  --neutral-700: #263238;
  --neutral-900: #12191D;

  /* ---- Semánticas ---- */
  --semantic-success: #246B4A;
  --semantic-success-soft: #E8F4ED;
  --semantic-warning: #FFC247;
  --semantic-warning-soft: #FFF1C7;
  --semantic-error: #B42318;
  --semantic-error-soft: #FFF0ED;
  --semantic-info: #75022E;
  --semantic-info-soft: #F7E7EE;
  --semantic-active: #FE6502;
  --semantic-active-soft: #FFE2CC;

  /* ---- Superficie y texto · Modo claro ---- */
  --surface-page: #F4F7F8;
  --surface-raised: #FFFFFF;
  --surface-subtle: #E8EEF0;
  --text-primary: #12191D;
  --text-secondary: #4B5A61;
  --text-muted: #66747A;
  --text-link: #75022E;
  --border-default: #83939A;
  --border-subtle: #CFD9DD;
  --border-strong: 2px solid #75022E;
  --focus-ring: #75022E;

  /* ---- Superficie y texto · Modo oscuro (sección dark) ---- */
  --surface-inverse: #12191D;
  --surface-inverse-raised: #202B31;
  --text-inverse: #F6FAFB;
  --text-inverse-muted: #B7C3C8;
  --link-inverse: #FFC247;
  --border-inverse: #46545B;
  --focus-ring-inverse: #FFC247;

  /* ---- Tipografía ---- */
  --font-display: "Archivo Black", "Arial Black", sans-serif;
  --font-body: "Alegreya Sans", "Trebuchet MS", sans-serif;
  --font-mono: "Azeret Mono", "SF Mono", "Consolas", monospace;

  /* Escala tipográfica responsive */
  --display-2xl: clamp(3.5rem, 6vw + 1rem, 7.5rem);    /* 56 → 120 */
  --display-xl: clamp(3rem, 4.6vw + 1rem, 5.5rem);      /* 48 → 88 */
  --heading-h1: clamp(2.5rem, 3.6vw + 0.5rem, 4rem);    /* 40 → 64 */
  --heading-h2: clamp(2rem, 2.8vw + 0.5rem, 3rem);      /* 32 → 48 */
  --heading-h3: clamp(1.625rem, 1.6vw + 0.6rem, 2.25rem); /* 26 → 36 */
  --heading-h4: clamp(1.375rem, 1.2vw + 0.6rem, 1.75rem); /* 22 → 28 */

  --body-lg: clamp(1.125rem, 0.6vw + 0.9rem, 1.25rem);  /* 18 → 20 */
  --body-md: clamp(1rem, 0.4vw + 0.9rem, 1.125rem);     /* 16 → 18 */
  --body-sm: 0.875rem;

  --label-md: 0.75rem;          /* 12 */
  --label-sm: 0.75rem;          /* 12 */

  --line-display: 0.95;
  --line-heading: 1.1;
  --line-body: 1.6;
  --line-label: 1.35;

  --tracking-display: -0.02em;
  --tracking-heading: -0.01em;
  --tracking-label: 0.12em;

  /* ---- Espaciado (4px base) ---- */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4 */
  --space-2: 0.5rem;    /* 8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.25rem;   /* 20 */
  --space-6: 1.5rem;    /* 24 */
  --space-8: 2rem;      /* 32 */
  --space-10: 2.5rem;   /* 40 */
  --space-12: 3rem;     /* 48 */
  --space-16: 4rem;     /* 64 */
  --space-20: 5rem;     /* 80 */
  --space-24: 6rem;     /* 96 */
  --space-28: 7rem;     /* 112 */
  --space-32: 8rem;     /* 128 */
  --space-40: 10rem;    /* 160 */

  /* ---- Containers ---- */
  --container-main: 1280px;
  --container-content: 1120px;
  --container-reading: 720px;
  --container-form: 640px;
  --container-compact: 480px;

  /* ---- Layout ---- */
  --grid-gutter: 16px;
  --margin-x: 20px;

  /* ---- Radius ---- */
  --radius-none: 0;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* ---- Sombras ---- */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(18, 25, 29, 0.12);
  --shadow-md: 0 12px 32px rgba(18, 25, 29, 0.14);
  --shadow-lg: 0 20px 56px rgba(18, 25, 29, 0.18);
  --shadow-focus: 0 0 0 4px rgba(117, 2, 46, 0.22);

  /* ---- Z-index ---- */
  --z-base: 0;
  --z-route: 10;
  --z-sticky: 20;
  --z-dropdown: 40;
  --z-overlay: 60;
  --z-modal: 100;
  --z-toast: 200;

  /* ---- Motion ---- */
  --motion-instant: 100ms;
  --motion-fast: 160ms;
  --motion-base: 220ms;
  --motion-slow: 320ms;
  --motion-scene: 400ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
}

/* Responsive tokens */
@media (min-width: 480px) {
  :root {
    --grid-gutter: 20px;
    --margin-x: 24px;
  }
}

@media (min-width: 768px) {
  :root {
    --grid-gutter: 24px;
    --margin-x: 32px;
  }
}

@media (min-width: 1024px) {
  :root {
    --grid-gutter: 24px;
    --margin-x: 48px;
  }
}

@media (min-width: 1280px) {
  :root {
    --grid-gutter: 32px;
    --margin-x: 48px;
  }
}

@media (min-width: 1440px) {
  :root {
    --grid-gutter: 32px;
    --margin-x: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-instant: 0ms;
    --motion-fast: 0ms;
    --motion-base: 0ms;
    --motion-slow: 0ms;
    --motion-scene: 0ms;
  }
}
