/*
 * SHAX brand palette
 *
 * Green  #106e3c — primary, headings, brand text
 * Orange #e9850b — accent (CTAs, highlights)
 * Grey   #b6b6b6 — borders, faint UI
 * Near-white #fdfdfd — page background
 * Soft grey #f5f5f5–#f8f8f8 — section bands
 * White  #ffffff — surfaces / cards
 *
 * Admin can override via config/content.json → theme
 */
:root {
  /* Primary — brand green */
  --primary: #106e3c;
  --primary-hover: #0c5830;
  --primary-light: #e8f5ee;
  --primary-muted: rgba(16, 110, 60, 0.1);
  --primary-glow: rgba(16, 110, 60, 0.2);

  /* Secondary — deeper green for supporting UI */
  --secondary: #0c5830;
  --secondary-light: #e8f5ee;
  --secondary-muted: rgba(12, 88, 48, 0.1);

  /* Accent — brand orange */
  --accent: #e9850b;
  --accent-hover: #c97009;
  --accent-light: #fff4e6;
  --accent-muted: rgba(233, 133, 11, 0.12);
  --accent-glow: rgba(233, 133, 11, 0.22);

  --error: #dc2626;
  --error-muted: rgba(220, 38, 38, 0.08);

  /* Neutrals — near-white page, white surfaces */
  --bg: #ffffff;
  --bg-subtle: #f7f7f7;
  --bg-alt: #f2f2f2;
  --bg-elevated: #ffffff;
  --bg-muted: #ececec;
  --surface: #ffffff;
  --surface-hover: #f6f6f6;
  --surface-glass: rgba(255, 255, 255, 0.94);

  --brand-grey: #b6b6b6;

  /* Section bands — two near-white tones that gradients blend between */
  --band-light: #ffffff;
  --band-soft: #f2f2f2;
  --band-paper: var(--band-light);
  --band-mist: var(--band-soft);
  --band-sage: var(--band-light);
  --band-warm: var(--band-soft);
  --band-stone: var(--band-soft);
  --band-leaf: var(--band-light);

  /* Text — green for brand voice; darker grey for readable muted copy */
  --text: #106e3c;
  --text-secondary: #0c5830;
  --text-muted: #5c5c5c;
  --text-faint: #b6b6b6;
  --text-on-accent: #ffffff;

  --border: rgba(182, 182, 182, 0.55);
  --border-hover: rgba(182, 182, 182, 0.9);
  --border-accent: rgba(16, 110, 60, 0.35);

  --gradient-hero: radial-gradient(ellipse 80% 60% at 75% 15%, rgba(0, 0, 0, 0.03) 0%, transparent 55%),
                   radial-gradient(ellipse 60% 50% at 15% 85%, rgba(233, 133, 11, 0.05) 0%, transparent 50%),
                   radial-gradient(ellipse 40% 40% at 90% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 45%);

  --texture-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.35 0 0 0 0 0.35 0 0 0 0 0.34 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --texture-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='1' cy='1' r='0.7' fill='%239a9a9a' fill-opacity='0.18'/%3E%3C/svg%3E");

  --gradient-text: linear-gradient(135deg, #106e3c 0%, #0c5830 45%, #e9850b 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, #f59e0b 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);

  /* Typography — Sora (display) + Source Sans 3 (body): modern, clear, WCAG-friendly */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.1875rem;

  --leading-tight: 1.12;
  --leading-snug: 1.35;
  --leading-normal: 1.65;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.03em;
  --tracking-wide: 0.08em;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-section: clamp(5rem, 10vw, 8rem);

  --container-max: 1200px;
  --container-narrow: 720px;
  --header-height: 80px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-pill: 100px;
  --radius-round: 50%;

  --shadow-sm: 0 1px 2px rgba(16, 110, 60, 0.06);
  --shadow-md: 0 4px 20px rgba(16, 110, 60, 0.08);
  --shadow-lg: 0 12px 40px rgba(16, 110, 60, 0.1);
  --shadow-glow: 0 8px 32px var(--primary-glow);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-medium: 0.4s var(--ease-out);
  --transition-slow: 0.7s var(--ease-out);

  --z-header: 100;
  --z-mobile-nav: 200;
  --z-grain: 50;
}
