/* Global Brand Theme and Accessibility Overrides */

/*
 How to use:
 - Update --brand-* tokens below with your final brand hex codes.
 - These cascade to both Bootstrap (via --bs-primary) and custom CSS (via --primary, etc.).
 - One file change updates colors across the entire site.
*/
:root {
  /* Brand tokens (EDIT THESE) */
  --brand-primary: #039d9f; /* current default: Bootstrap blue */
  --brand-primary-contrast: #ffffff;
  --brand-secondary: #6c757d;
  --brand-success: #198754;
  --brand-info: #0dcaf0;
  --brand-warning: #ffc107;
  --brand-danger: #dc3545;
  --brand-light: #f8f9fa;
  --brand-dark: #212529;

  /* Map brand tokens to Bootstrap CSS variables */
  --bs-primary: var(--brand-primary);
  /* NOTE: If you change --brand-primary, also update this RGB for best results */
  --bs-primary-rgb: 13, 110, 253; /* update to your brand RGB, e.g., 0, 107, 95 */
  --bs-secondary: var(--brand-secondary);
  --bs-success: var(--brand-success);
  --bs-info: var(--brand-info);
  --bs-warning: var(--brand-warning);
  --bs-danger: var(--brand-danger);
  --bs-light: var(--brand-light);
  --bs-dark: var(--brand-dark);

  /* App-level custom tokens used by landing.css and other views */
  --primary: var(--brand-primary);
  --primary-dark: color-mix(in srgb, var(--brand-primary) 85%, black); /* safe fallback below */
  --secondary: var(--brand-light);
  --dark: var(--brand-dark);
  --muted: #6c757d;
  --border: #dee2e6;
  --white: #ffffff;
  --success: var(--brand-success);
}

/* Fallback for color-mix unsupported browsers */
@supports not (color-mix(in srgb, #000, #fff)) {
  :root {
    /* heuristic darker variant if color-mix is not supported */
    --primary-dark: #0b5ed7;
  }
}

/* Utility overrides for consistency with brand tokens */
.text-primary { color: var(--brand-primary) !important; }
.bg-primary { background-color: var(--brand-primary) !important; }
.border-primary { border-color: var(--brand-primary) !important; }
.btn-primary {
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary);
  --bs-btn-hover-border-color: var(--brand-primary);
}

/* Global reduced-motion policy */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  /* Specific components that rely on transforms */
  .preview-card, .hero-image, .hero-glass {
    transform: none !important;
  }
  /* Particle/blobs in hero */
  .hero::before, .hero::after { animation: none !important; }
  .hero-buttons .btn-primary { animation: none !important; box-shadow: none !important; }
}
