/*
 * OWLE Growth OS — Phase 1 foundation
 *
 * This file is the source of truth for the neutral visual language. Legacy
 * DGO variables remain available to avoid breaking page-specific behavior;
 * reusable primitives should consume the OWLE variables below.
 */
:root {
  --ow-black: #0b0b0b;
  --ow-white: #ffffff;
  --ow-gray-50: #fafafa;
  --ow-gray-100: #f7f7f8;
  --ow-gray-200: #eaecf0;
  --ow-gray-300: #d0d5dd;
  --ow-gray-400: #98a2b3;
  --ow-gray-500: #667085;
  --ow-gray-600: #475467;
  --ow-gray-700: #344054;
  --ow-gray-800: #1d2939;
  --ow-gray-900: #0b0b0b;

  /* Logo palette sampled from the OWLE brand artwork. */
  --ow-logo-ink: #0b0e12;
  --ow-logo-indigo: #4435fe;
  --ow-logo-lime: #bce33d;
  --ow-logo-white: var(--ow-white);
  --ow-brand-purple: var(--ow-logo-indigo);
  --ow-brand-lime: var(--ow-logo-lime);

  --ow-success: #237a4b;
  --ow-success-bg: #eef8f1;
  --ow-success-border: #bfe2ca;
  --ow-warning: #8a5a00;
  --ow-warning-bg: #fff8e6;
  --ow-warning-border: #efd89a;
  --ow-danger: #a33a3a;
  --ow-danger-bg: #fff1f1;
  --ow-danger-border: #e8baba;
  --ow-info: #3f5f86;
  --ow-info-bg: #f1f5fa;
  --ow-info-border: #cbd9e9;

  --ow-bg-page: var(--ow-gray-100);
  --ow-bg-surface: var(--ow-white);
  --ow-bg-subtle: var(--ow-gray-50);
  --ow-bg-muted: var(--ow-gray-200);
  --ow-bg-hover: #f2f4f7;
  --ow-bg-active: #eaecf0;
  --ow-text-primary: var(--ow-gray-900);
  --ow-text-secondary: var(--ow-gray-600);
  --ow-text-muted: var(--ow-gray-500);
  --ow-text-disabled: var(--ow-gray-400);
  --ow-border-default: var(--ow-gray-200);
  --ow-border-strong: var(--ow-gray-300);
  --ow-border-focus: var(--ow-black);
  --ow-disabled-bg: var(--ow-gray-100);
  --ow-disabled-border: var(--ow-border-default);
  --ow-disabled-text: var(--ow-text-disabled);

  --ow-font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ow-font-size-xs: 11px;
  --ow-font-size-sm: 13px;
  --ow-font-size-md: 15px;
  --ow-font-size-lg: 18px;
  --ow-font-size-xl: 24px;
  --ow-font-size-2xl: 32px;
  --ow-line-tight: 1.2;
  --ow-line-normal: 1.45;
  --ow-line-relaxed: 1.65;
  --ow-weight-regular: 400;
  --ow-weight-medium: 500;
  --ow-weight-semibold: 600;
  --ow-weight-bold: 700;
  --ow-weight-extrabold: 800;

  --ow-space-0: 0;
  --ow-space-1: 4px;
  --ow-space-2: 8px;
  --ow-space-3: 12px;
  --ow-space-4: 16px;
  --ow-space-5: 20px;
  --ow-space-6: 24px;
  --ow-space-7: 28px;
  --ow-space-8: 32px;
  --ow-space-9: 36px;
  --ow-space-10: 40px;
  --ow-space-11: 44px;
  --ow-space-12: 48px;
  --ow-space-14: 56px;
  --ow-space-16: 64px;

  --ow-radius-sm: 8px;
  --ow-radius-md: 12px;
  --ow-radius-lg: 16px;
  --ow-radius-xl: 20px;
  --ow-radius-pill: 999px;
  --ow-shadow-none: none;
  --ow-shadow-low: 0 1px 2px rgba(16, 24, 40, .04);
  --ow-shadow-card: 0 1px 2px rgba(16, 24, 40, .04);
  --ow-shadow-popover: 0 12px 24px rgba(16, 24, 40, .12);
  --ow-shadow-modal: 0 24px 56px rgba(16, 24, 40, .18);

  --ow-control-height: 44px;
  --ow-control-height-compact: 36px;
  --ow-focus-ring: 0 0 0 3px rgba(11, 11, 11, .16);
  --ow-motion-fast: 120ms;
  --ow-motion-standard: 160ms;
  --ow-motion-slow: 180ms;
  --ow-ease-standard: cubic-bezier(.2, .7, .2, 1);
  --ow-z-dropdown: 1080;
  --ow-z-modal: 1100;

  /* Shared application-shell geometry. Keep chrome and page content on one grid. */
  --ow-shell-sidebar-width: 240px;
  --ow-shell-topbar-height: 72px;
  --ow-shell-content-max: 1600px;
  --ow-shell-wide-max: 1680px;
  --ow-shell-focused-max: 1040px;
  --ow-shell-content-edit: 900px;

  /* Controlled compatibility bridge for the current sitewide layer. */
  --dgo-site-bg: var(--ow-bg-page);
  --dgo-site-surface: var(--ow-bg-surface);
  --dgo-site-surface-soft: var(--ow-bg-subtle);
  --dgo-site-border: var(--ow-border-default);
  --dgo-site-divider: var(--ow-gray-200);
  --dgo-site-ink: var(--ow-text-primary);
  --dgo-site-text: var(--ow-text-secondary);
  --dgo-site-muted: var(--ow-text-muted);
  --dgo-site-primary: var(--ow-black);
  --dgo-site-primary-hover: var(--ow-gray-800);
  --dgo-site-primary-text: var(--ow-white);
  --dgo-site-accent: var(--ow-black);
  --dgo-site-control: var(--ow-control-height);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body.dgo-body {
  background: var(--ow-bg-page);
  color: var(--ow-text-primary);
  font-family: var(--ow-font-family);
  font-size: var(--ow-font-size-sm);
  line-height: var(--ow-line-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.dgo-body a { color: inherit; }

body.dgo-body :focus-visible {
  outline: 2px solid var(--ow-border-focus);
  outline-offset: 2px;
}

body.dgo-body ::selection {
  color: var(--ow-white);
  background: var(--ow-black);
}

body.dgo-body :disabled,
body.dgo-body [aria-disabled="true"] {
  color: var(--ow-disabled-text);
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  body.dgo-body *,
  body.dgo-body *::before,
  body.dgo-body *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
