/*
Theme Name: Wascer Theme
Theme URI: https://wascer.com/
Author: Wascer
Description: Tema customizado para central de ajuda (FAQ, Docs, News). Alinhado ao design system Sourei/Wascer Help Center.
Version: 2.1
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: wascer
*/

/*
 * Tokens base (espelham o design system Wascer/Sourei).
 * Estilos vivem em assets/css/* e são enfileirados em inc/assets.php.
 */

:root {
  /* ============ Brand ============ */
  --wascer-navy: #0a1f3d;
  --wascer-navy-soft: #122b52;
  --brand-gradient: linear-gradient(180deg, #122b52 0%, #0a1f3d 100%);
  --brand-cyan: #097aab;

  /* ============ Sourei design system (light) ============ */
  --background: oklch(0.9842 0.0034 247.8575);
  --foreground: oklch(0.21 0.04 260);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.21 0.04 260);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.21 0.04 260);
  --primary: oklch(0.21 0.04 260);
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.9276 0.0058 264.5313);
  --secondary-foreground: oklch(0.3729 0.0306 259.7328);
  --muted: oklch(0.967 0.0029 264.5419);
  --muted-foreground: oklch(0.551 0.0234 264.3637);
  --accent: oklch(0.945 0.012 260);
  --accent-foreground: oklch(0.21 0.04 260);
  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.8717 0.0093 258.3382);
  --input: oklch(0.8717 0.0093 258.3382);
  --ring: oklch(0.5567 0.2429 262.01);

  --sidebar: oklch(0.967 0.0029 264.5419);
  --sidebar-foreground: oklch(0.2795 0.0368 260.031);
  --sidebar-primary: oklch(0.5567 0.2429 262.01);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.9299 0.0334 272.7879);
  --sidebar-accent-foreground: oklch(0.3729 0.0306 259.7328);
  --sidebar-border: oklch(0.8717 0.0093 258.3382);

  /* ============ Aliases legados (mantêm o tema funcionando) ============ */
  --color-ink: var(--foreground);
  --color-ink-soft: var(--muted-foreground);
  --color-surface-muted: var(--muted);
  --color-surface-strong: var(--accent);
  --color-primary: var(--sidebar-primary);
  --color-primary-dark: var(--wascer-navy);
  --color-accent: var(--sidebar-primary);
  --color-accent-soft: oklch(0.9299 0.0334 272.7879 / 0.55);

  /* ============ Tipografia ============ */
  --font-primary:
    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: Merriweather, ui-serif, Georgia, serif;

  --body-size: 0.875rem;
  --body-lh: 1.5;

  --font-size-eyebrow: 0.78rem;
  --font-size-meta: 0.875rem;
  --font-size-card-title: 1.05rem;
  --font-size-section: clamp(1.6rem, 2.6vw, 2.1rem);
  --font-size-hero: clamp(2.2rem, 4.4vw, 3.4rem);
  --font-size-display: clamp(2rem, 3.6vw, 3rem);
  --line-height-tight: 1.05;
  --line-height-snug: 1.2;

  /* ============ Espaçamento (4px grid Sourei) ============ */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* ============ Raios (Sourei base 0.5rem) ============ */
  --radius: 0.5rem;
  --radius-sm: calc(var(--radius) - 2px);
  --radius-md: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-pill: 999px;

  /* ============ Sombras (HSL-based) ============ */
  --shadow-xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05);
  --shadow-sm:
    0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 1px 2px -2px hsl(0 0% 0% / 0.1);
  --shadow: var(--shadow-sm);
  --shadow-lg:
    0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 4px 6px -2px hsl(0 0% 0% / 0.1);
  --shadow-soft: var(--shadow-sm);

  /* ============ Layout ============ */
  --container: 1160px;
  --header-height: 4rem;

  /* ============ Motion ============ */
  --transition-base: 180ms ease;
  --transition-slow: 240ms ease;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --background: #081527;
  --foreground: #edf3ff;
  --card: #10213e;
  --card-foreground: #edf3ff;
  --popover: #0d1d37;
  --popover-foreground: #edf3ff;
  --primary: #5d8fff;
  --primary-foreground: #081527;
  --secondary: #162846;
  --secondary-foreground: #c9d7f1;
  --muted: #0f213b;
  --muted-foreground: #95a8c7;
  --accent: #132744;
  --accent-foreground: #edf3ff;
  --destructive: #ef6b73;
  --destructive-foreground: #fff;
  --border: rgba(151, 171, 200, 0.2);
  --input: rgba(151, 171, 200, 0.2);
  --ring: #6f97ff;

  --sidebar: #0f213b;
  --sidebar-foreground: #d6e0f6;
  --sidebar-primary: #5d8fff;
  --sidebar-primary-foreground: #081527;
  --sidebar-accent: #152846;
  --sidebar-accent-foreground: #edf3ff;
  --sidebar-border: rgba(151, 171, 200, 0.18);

  --color-accent-soft: rgba(93, 143, 255, 0.12);

  --shadow-xs: 0px 4px 8px -1px rgba(0, 0, 0, 0.28);
  --shadow-sm:
    0px 10px 18px -14px rgba(0, 0, 0, 0.55),
    0px 4px 8px -8px rgba(0, 0, 0, 0.32);
  --shadow: var(--shadow-sm);
  --shadow-lg:
    0px 18px 28px -18px rgba(0, 0, 0, 0.58),
    0px 6px 14px -10px rgba(0, 0, 0, 0.34);
  --shadow-soft: var(--shadow-sm);
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
