/*
 * GeniusWeb Design System — Module 5.2 (2026-10-09)
 * CSS custom-property contract only. NO global element or component rules.
 * Legacy CSS remains visually authoritative until Modules 5.3–5.7.
 * Namespace: --gw-ds-*; do not collide with legacy --gw-*, --navy, --accent.
 */
:root {
    /* Identity: immutable starting point for this redesign. */
    --gw-ds-color-brand-primary: #ef6603;
    --gw-ds-color-brand-primary-hover: #c85300;
    --gw-ds-color-brand-primary-subtle: #fff1e6;
    --gw-ds-color-brand-secondary: #071527;
    --gw-ds-color-brand-secondary-soft: #102a41;
    --gw-ds-color-brand-highlight: #ffaf74;

    /* Neutrals: warm public backgrounds and cooler application surfaces. */
    --gw-ds-color-neutral-0: #ffffff;
    --gw-ds-color-neutral-25: #fffdfb;
    --gw-ds-color-neutral-50: #f8fafc;
    --gw-ds-color-neutral-100: #f1f5f9;
    --gw-ds-color-neutral-200: #e2e8f0;
    --gw-ds-color-neutral-300: #cbd5e1;
    --gw-ds-color-neutral-400: #94a3b8;
    --gw-ds-color-neutral-500: #64748b;
    --gw-ds-color-neutral-600: #475569;
    --gw-ds-color-neutral-700: #334155;
    --gw-ds-color-neutral-800: #1e293b;
    --gw-ds-color-neutral-900: #0f172a;

    /* Semantic foreground/background pairs; normal text uses the deep variant. */
    --gw-ds-color-success: #157347;
    --gw-ds-color-success-surface: #edf8f1;
    --gw-ds-color-success-border: #b4dfc7;
    --gw-ds-color-warning: #845000;
    --gw-ds-color-warning-surface: #fff7e5;
    --gw-ds-color-warning-border: #e9c982;
    --gw-ds-color-danger: #a12424;
    --gw-ds-color-danger-surface: #fff0ef;
    --gw-ds-color-danger-border: #eab9b6;
    --gw-ds-color-info: #165a87;
    --gw-ds-color-info-surface: #eef7ff;
    --gw-ds-color-info-border: #b4d5eb;

    /* Semantic aliases used by NEW components only. */
    --gw-ds-surface-page: var(--gw-ds-color-neutral-50);
    --gw-ds-surface-card: var(--gw-ds-color-neutral-0);
    --gw-ds-surface-soft: var(--gw-ds-color-neutral-100);
    --gw-ds-surface-inverse: var(--gw-ds-color-brand-secondary);
    --gw-ds-text-primary: var(--gw-ds-color-neutral-900);
    --gw-ds-text-secondary: var(--gw-ds-color-neutral-600);
    --gw-ds-text-inverse: var(--gw-ds-color-neutral-0);
    --gw-ds-border-default: var(--gw-ds-color-neutral-200);
    --gw-ds-border-strong: var(--gw-ds-color-neutral-300);
    --gw-ds-action-primary-bg: #b94d00; /* accessible small-text action; brand orange remains the accent */
    --gw-ds-action-primary-hover: #a43b00;
    --gw-ds-action-primary-text: var(--gw-ds-color-neutral-0);
    --gw-ds-link-default: #a74700;

    /* Module 5.3: self-hosted variable Inter, Greek and Latin. */
    --gw-ds-font-family-sans: "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --gw-ds-font-family-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    --gw-ds-font-size-xs: 0.75rem;
    --gw-ds-font-size-sm: 0.875rem;
    --gw-ds-font-size-base: 1rem;
    --gw-ds-font-size-lg: 1.125rem;
    --gw-ds-font-size-xl: 1.25rem;
    --gw-ds-font-size-2xl: 1.5rem;
    --gw-ds-font-size-3xl: 1.875rem;
    --gw-ds-font-size-4xl: 2.25rem;
    --gw-ds-font-size-5xl: 3rem;
    --gw-ds-font-weight-regular: 400;
    --gw-ds-font-weight-medium: 500;
    --gw-ds-font-weight-semibold: 600;
    --gw-ds-font-weight-bold: 700;
    --gw-ds-line-height-tight: 1.2;
    --gw-ds-line-height-heading: 1.3;
    --gw-ds-line-height-body: 1.6;
    --gw-ds-letter-spacing-heading: -0.025em;

    /* 4px spacing ramp: values intentionally reusable by all surfaces. */
    --gw-ds-space-0: 0;
    --gw-ds-space-1: 0.25rem;
    --gw-ds-space-2: 0.5rem;
    --gw-ds-space-3: 0.75rem;
    --gw-ds-space-4: 1rem;
    --gw-ds-space-5: 1.25rem;
    --gw-ds-space-6: 1.5rem;
    --gw-ds-space-8: 2rem;
    --gw-ds-space-10: 2.5rem;
    --gw-ds-space-12: 3rem;
    --gw-ds-space-16: 4rem;
    --gw-ds-space-20: 5rem;
    --gw-ds-space-24: 6rem;

    --gw-ds-radius-none: 0;
    --gw-ds-radius-sm: 0.25rem;
    --gw-ds-radius-md: 0.5rem;
    --gw-ds-radius-lg: 0.75rem;
    --gw-ds-radius-xl: 1rem;
    --gw-ds-radius-2xl: 1.5rem;
    --gw-ds-radius-pill: 9999px;

    --gw-ds-shadow-xs: 0 1px 2px rgb(7 21 39 / 5%);
    --gw-ds-shadow-sm: 0 4px 12px rgb(7 21 39 / 7%);
    --gw-ds-shadow-md: 0 10px 30px rgb(7 21 39 / 9%);
    --gw-ds-shadow-lg: 0 18px 48px rgb(7 21 39 / 13%);

    /* Documentation tokens: var() cannot be used within CSS media queries. */
    --gw-ds-breakpoint-sm: 640px;
    --gw-ds-breakpoint-md: 768px;
    --gw-ds-breakpoint-lg: 1024px;
    --gw-ds-breakpoint-xl: 1280px;
    --gw-ds-container-content: 1200px;
    --gw-ds-container-reading: 720px;

    --gw-ds-motion-fast: 120ms;
    --gw-ds-motion-normal: 200ms;
    --gw-ds-motion-slow: 320ms;
    --gw-ds-motion-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --gw-ds-focus-width: 3px;
    --gw-ds-focus-offset: 3px;
    --gw-ds-focus-color: #bf4f00;
    --gw-ds-focus-color-inverse: #ffaf74;
    --gw-ds-control-min-target: 44px;
}

/* Available for FUTURE inverse-surface components; no current markup selects it. */
[data-gw-ds-surface="inverse"] {
    --gw-ds-surface-card: var(--gw-ds-color-brand-secondary-soft);
    --gw-ds-text-primary: var(--gw-ds-color-neutral-0);
    --gw-ds-text-secondary: #cbd5e1;
    --gw-ds-border-default: #415164;
    --gw-ds-focus-color: var(--gw-ds-focus-color-inverse);
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --gw-ds-motion-fast: 0ms;
        --gw-ds-motion-normal: 0ms;
        --gw-ds-motion-slow: 0ms;
    }
}
