/*
 * NQN Place design tokens: the ONLY place where brand colors, fonts and spacing are defined.
 * Every other stylesheet must use these variables (var(--color-...)), never raw values.
 *
 * Contrast notes (WCAG AA, see CLAUDE.md §2):
 * - Brand orange #FF6B00 has 2.9:1 against white: use it only for decorative or large
 *   non-text elements (logo, highlights, borders, icons).
 * - For text and for button backgrounds with white text use --color-accent-strong
 *   (#C75300, 4.5:1 against white).
 * - Brand gray #A0A0A0 has 2.6:1 against white, below the 3:1 that form field borders and focus
 *   indicators need (WCAG 1.4.11): --color-border is a darker gray; the brand gray stays available
 *   as --color-border-decorative for purely decorative lines.
 * - The focus ring uses #C75300 on light backgrounds and the brand orange on dark ones (both >= 3:1).
 */

:root {
  /* Brand */
  --brand-blue: #1a3c7a;
  --brand-orange: #ff6b00;
  --brand-gray: #a0a0a0;

  /* Semantic colors: light theme (default) */
  --color-bg: #ffffff;
  --color-surface: #f4f6fa;
  --color-border: #7d8592; /* 3.7:1 against white */
  --color-border-decorative: var(--brand-gray);
  --color-border-subtle: #dde2ec;
  --color-text: #1b2333;
  --color-text-muted: #5b6474;
  --color-primary: var(--brand-blue);
  --color-primary-hover: #132d5c;
  --color-on-primary: #ffffff;
  --color-accent: var(--brand-orange);
  --color-accent-strong: #c75300;
  --color-accent-strong-hover: #a84600;
  --color-on-accent: #ffffff;
  --color-link: var(--brand-blue);
  --color-focus: var(--color-accent-strong);
  --color-success: #1f7a3d;
  --color-on-success: #ffffff;
  --color-whatsapp: #0a6e4f; /* darker than WhatsApp green so white text passes AA */
  --color-featured: #ffe8d6;
  --color-danger: #b42318;
  --color-danger-surface: #fdecea; /* #b42318 on it: 5.6:1 */

  /* Typography */
  --font-heading: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: clamp(1.875rem, 5vw, 2.75rem);

  /* Spacing, radius, shadows, layout */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgb(16 24 40 / 0.1);
  --container-max: 1200px;
  --gutter: 1rem;

  color-scheme: light;
}

/* Dark theme: follows the OS unless the user forces light with data-theme="light". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0e1626;
    --color-surface: #16223a;
    --color-border: #6b7689; /* 3.9:1 against the dark background */
    --color-focus: var(--brand-orange);
    --color-border-subtle: #26324a;
    --color-text: #e8ecf4;
    --color-text-muted: #a7b0c0;
    --color-primary: #8fb0ee;
    --color-primary-hover: #b3caf5;
    --color-on-primary: #0e1626;
    --color-accent-strong: #c75300;
    --color-accent-strong-hover: #e05e00;
    --color-link: #8fb0ee;
    --color-danger: #ff8a80;
  --color-danger-surface: #3b1d1d;
    --color-danger-surface: #3b1d1d;
    --color-featured: #3a2a1c;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --color-bg: #0e1626;
  --color-surface: #16223a;
  --color-border: #6b7689;
  --color-focus: var(--brand-orange);
  --color-border-subtle: #26324a;
  --color-text: #e8ecf4;
  --color-text-muted: #a7b0c0;
  --color-primary: #8fb0ee;
  --color-primary-hover: #b3caf5;
  --color-on-primary: #0e1626;
  --color-accent-strong: #c75300;
  --color-accent-strong-hover: #e05e00;
  --color-link: #8fb0ee;
  --color-danger: #ff8a80;
  --color-danger-surface: #3b1d1d;
  --color-featured: #3a2a1c;
  color-scheme: dark;
}
