/*
 * The Mindset Labs — design foundations
 * Tokens only: this file intentionally contains no component or layout rules.
 */

:root {
    /* Brand and neutral primitives */
    --tml-color-black: #000000;
    --tml-color-ink: #111111;
    --tml-color-off-white: #f7f5f0;
    --tml-color-white: #ffffff;
    --tml-color-sage: #7c8a76;
    --tml-color-sage-dark: #4a5241;
    --tml-color-beige: #d7c6ae;
    --tml-color-neutral-50: #f7f8fb;
    --tml-color-neutral-100: #eef1f5;
    --tml-color-neutral-200: #e5e7eb;
    --tml-color-neutral-400: #9ca3af;
    --tml-color-neutral-500: #6b7280;
    --tml-color-neutral-700: #374151;
    --tml-color-neutral-900: #111827;

    /* Semantic colors — light foundation */
    --tml-color-background-primary: var(--tml-color-off-white);
    --tml-color-background-secondary: var(--tml-color-neutral-100);
    --tml-color-surface-primary: var(--tml-color-white);
    --tml-color-surface-secondary: rgba(255, 255, 255, 0.72);
    --tml-color-surface-elevated: var(--tml-color-white);
    --tml-color-text-primary: var(--tml-color-neutral-900);
    --tml-color-text-secondary: var(--tml-color-neutral-700);
    --tml-color-text-muted: var(--tml-color-neutral-500);
    --tml-color-text-inverse: var(--tml-color-white);
    --tml-color-border-subtle: rgba(17, 24, 39, 0.10);
    --tml-color-border-strong: rgba(17, 24, 39, 0.22);
    --tml-color-accent-primary: var(--tml-color-sage);
    --tml-color-accent-secondary: var(--tml-color-beige);
    --tml-color-focus: var(--tml-color-sage-dark);
    --tml-color-success: #2e7d5b;
    --tml-color-warning: #b7791f;
    --tml-color-error: #c9342f;
    --tml-color-info: #2563eb;

    /* Health metric accents — reserve for data visualization */
    --tml-color-metric-sleep: #6d72c3;
    --tml-color-metric-water: #3b82b8;
    --tml-color-metric-energy: #d58b32;
    --tml-color-metric-activity: #3f8f68;
    --tml-color-metric-recovery: #9a6cae;

    /* Eight-point spacing scale with half-step utility */
    --tml-space-1: 4px;
    --tml-space-2: 8px;
    --tml-space-3: 12px;
    --tml-space-4: 16px;
    --tml-space-5: 20px;
    --tml-space-6: 24px;
    --tml-space-8: 32px;
    --tml-space-10: 40px;
    --tml-space-12: 48px;

    /* Shape */
    --tml-radius-xs: 8px;
    --tml-radius-sm: 12px;
    --tml-radius-md: 16px;
    --tml-radius-lg: 20px;
    --tml-radius-xl: 28px;
    --tml-radius-pill: 999px;

    /* Elevation */
    --tml-shadow-none: none;
    --tml-shadow-sm: 0 4px 14px rgba(17, 17, 17, 0.06);
    --tml-shadow-md: 0 12px 32px rgba(17, 17, 17, 0.09);
    --tml-shadow-lg: 0 24px 60px rgba(17, 17, 17, 0.12);

    /* Typography */
    --tml-font-family-sans: Inter, Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --tml-font-size-caption: 0.75rem;
    --tml-font-size-label: 0.875rem;
    --tml-font-size-body: 1rem;
    --tml-font-size-body-lg: 1.125rem;
    --tml-font-size-title-sm: 1.25rem;
    --tml-font-size-title-md: 1.75rem;
    --tml-font-size-title-lg: 2.25rem;
    --tml-line-height-caption: 1.35;
    --tml-line-height-label: 1.4;
    --tml-line-height-body: 1.6;
    --tml-line-height-body-lg: 1.55;
    --tml-line-height-title-sm: 1.3;
    --tml-line-height-title-md: 1.2;
    --tml-line-height-title-lg: 1.1;
    --tml-font-weight-regular: 400;
    --tml-font-weight-medium: 500;
    --tml-font-weight-semibold: 600;
    --tml-font-weight-bold: 700;

    /* Motion */
    --tml-motion-duration-instant: 1ms;
    --tml-motion-duration-fast: 160ms;
    --tml-motion-duration-standard: 240ms;
    --tml-motion-easing-standard: cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Accessibility and responsive foundations */
    --tml-size-touch-target: 44px;
    --tml-focus-ring-width: 2px;
    --tml-focus-ring-offset: 3px;
    --tml-breakpoint-mobile: 480px;
    --tml-safe-area-top: env(safe-area-inset-top, 0px);
    --tml-safe-area-right: env(safe-area-inset-right, 0px);
    --tml-safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --tml-safe-area-left: env(safe-area-inset-left, 0px);
}

/* Existing data-theme mechanism used by index.html and home.html. */
:root[data-theme="dark"] {
    --tml-color-background-primary: #0a0a0a;
    --tml-color-background-secondary: #111111;
    --tml-color-surface-primary: #171717;
    --tml-color-surface-secondary: rgba(28, 28, 30, 0.72);
    --tml-color-surface-elevated: #1c1c1e;
    --tml-color-text-primary: #ffffff;
    --tml-color-text-secondary: #d1d5db;
    --tml-color-text-muted: #8e8e93;
    --tml-color-text-inverse: #111111;
    --tml-color-border-subtle: rgba(255, 255, 255, 0.10);
    --tml-color-border-strong: rgba(255, 255, 255, 0.22);
    --tml-color-accent-primary: #8c997e;
    --tml-color-accent-secondary: var(--tml-color-beige);
    --tml-color-focus: #a4b395;
    --tml-color-success: #57a77d;
    --tml-color-warning: #d6a24d;
    --tml-color-error: #ff6961;
    --tml-color-info: #60a5fa;
    --tml-shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.22);
    --tml-shadow-md: 0 12px 32px rgba(0, 0, 0, 0.28);
    --tml-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.36);
}
