/**
 * Ugobest V2 design tokens (CSS custom properties).
 * Premium refinement v1.8.2 — brand red/navy, Inter/Poppins.
 */

:root,
[data-theme="light"] {
  /* Colour */
  --ugb-color-primary: #d10012;
  --ugb-color-primary-hover: #b00010;
  --ugb-color-primary-pressed: #8c000d;
  --ugb-color-primary-subtle: #fde8ea;
  --ugb-color-secondary: #081320;
  --ugb-color-secondary-hover: #050b12;
  --ugb-color-secondary-subtle: #eef1f4;
  --ugb-color-accent: #c48a3a;
  --ugb-color-accent-subtle: #f8f0e4;
  --ugb-color-ink: #081320;
  --ugb-color-ink-muted: #465563;
  --ugb-color-ink-subtle: #687280;
  --ugb-color-border: #e6e9ee;
  --ugb-color-border-strong: #c5ccd6;
  --ugb-color-background: #ffffff;
  --ugb-color-surface: #ffffff;
  --ugb-color-surface-muted: #f7f8fa;
  --ugb-color-success: #1f8a4c;
  --ugb-color-success-subtle: #e8f6ee;
  --ugb-color-warning: #c9850a;
  --ugb-color-warning-subtle: #fff6e5;
  --ugb-color-danger: #c62828;
  --ugb-color-danger-subtle: #fdecec;
  --ugb-color-focus: #081320;
  --ugb-color-on-primary: #ffffff;
  --ugb-color-on-secondary: #ffffff;
  --ugb-color-overlay: rgba(8, 19, 32, 0.62);

  /* Typography */
  --ugb-font-sans: "Inter", "Poppins", system-ui, -apple-system, sans-serif;
  --ugb-font-display: "Poppins", "Inter", system-ui, sans-serif;
  --ugb-fw-regular: 400;
  --ugb-fw-medium: 500;
  --ugb-fw-semibold: 600;
  --ugb-fw-bold: 700;
  --ugb-lh-tight: 1.15;
  --ugb-lh-normal: 1.5;
  --ugb-lh-relaxed: 1.65;

  --ugb-fs-display: 2.125rem;
  --ugb-fs-h1: 1.875rem;
  --ugb-fs-h2: 1.5rem;
  --ugb-fs-h3: 1.25rem;
  --ugb-fs-h4: 1.125rem;
  --ugb-fs-h5: 1rem;
  --ugb-fs-body-lg: 1.0625rem;
  --ugb-fs-body: 1rem;
  --ugb-fs-body-sm: 0.875rem;
  --ugb-fs-caption: 0.75rem;
  --ugb-fs-button: 0.9375rem;
  --ugb-fs-label: 0.8125rem;

  /* Spacing */
  --ugb-space-1: 0.25rem;
  --ugb-space-2: 0.5rem;
  --ugb-space-3: 0.75rem;
  --ugb-space-4: 1rem;
  --ugb-space-5: 1.5rem;
  --ugb-space-6: 2rem;
  --ugb-space-7: 2.75rem;
  --ugb-space-8: 3.5rem;
  --ugb-space-9: 4.5rem;
  --ugb-space-10: 5.5rem;
  --ugb-space-11: 6.5rem;
  --ugb-space-12: 8rem;

  /* Radius */
  --ugb-radius-xs: 0.25rem;
  --ugb-radius-sm: 0.5rem;
  --ugb-radius-md: 0.875rem;
  --ugb-radius-lg: 1.25rem;
  --ugb-radius-xl: 1.75rem;
  --ugb-radius-pill: 999px;

  /* Elevation */
  --ugb-elevation-0: none;
  --ugb-elevation-1: 0 1px 3px rgba(8, 19, 32, 0.06);
  --ugb-elevation-2: 0 6px 18px rgba(8, 19, 32, 0.08);
  --ugb-elevation-3: 0 14px 36px rgba(8, 19, 32, 0.12);
  --ugb-elevation-4: 0 24px 48px rgba(8, 19, 32, 0.16);

  /* Motion */
  --ugb-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ugb-ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ugb-duration-fast: 140ms;
  --ugb-duration-base: 220ms;
  --ugb-duration-slow: 320ms;

  /* Z-index */
  --ugb-z-base: 1;
  --ugb-z-header: 1000;
  --ugb-z-dropdown: 1100;
  --ugb-z-sticky-search: 1150;
  --ugb-z-drawer: 1200;
  --ugb-z-modal: 1300;
  --ugb-z-toast: 1400;

  /* Layout */
  --ugb-container-sm: 40rem;
  --ugb-container-md: 60rem;
  --ugb-container-lg: 75rem;
  --ugb-container-xl: 87.5rem;
  --ugb-gutter: 1rem;
  --ugb-header-height: 4.25rem;
  --ugb-touch-min: 2.75rem;

  /*
   * Astra global palette remap (hotfix 2.9.6).
   * Parent theme ships purple defaults (#8E43F0 / #6300E2); force Ugobest brand only.
   */
  --ast-global-color-0: #d10012;
  --ast-global-color-1: #b00010;
  --ast-global-color-2: #081320;
  --ast-global-color-3: #465563;
  --ast-global-color-4: #f7f8fa;
  --ast-global-color-5: #ffffff;
  --ast-global-color-6: #000000;
  --ast-global-color-7: #4b4f58;
  --ast-global-color-8: #f6f7f8;
}

@media (min-width: 768px) {
  :root {
    --ugb-fs-display: 2.75rem;
    --ugb-fs-h1: 2.25rem;
    --ugb-fs-h2: 1.75rem;
    --ugb-fs-h3: 1.375rem;
    --ugb-fs-body-lg: 1.125rem;
    --ugb-gutter: 1.25rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --ugb-fs-display: 3.25rem;
    --ugb-fs-h1: 2.75rem;
    --ugb-fs-h2: 2rem;
    --ugb-fs-h3: 1.5rem;
    --ugb-gutter: 1.5rem;
  }
}

@media (min-width: 1440px) {
  :root {
    --ugb-container-xl: 92rem;
  }
}

[data-theme="dark"],
.ugb-theme-dark {
  --ugb-color-ink: #f2f2f2;
  --ugb-color-ink-muted: #b3b3b3;
  --ugb-color-ink-subtle: #8a8a8a;
  --ugb-color-border: #3a3a3a;
  --ugb-color-border-strong: #555555;
  --ugb-color-background: #121212;
  --ugb-color-surface: #1e1e1e;
  --ugb-color-surface-muted: #2a2a2a;
  --ugb-color-overlay: rgba(0, 0, 0, 0.64);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ugb-duration-fast: 1ms;
    --ugb-duration-base: 1ms;
    --ugb-duration-slow: 1ms;
  }
}
