/* CSS Custom Properties (Variables) */
/* Calm, accessible colour palette suitable for disability services */

:root {
  /* Colours - inspired by Afterlight Support logo */
  /* Sage green from logo border and willow tree */
  --colour-primary: #8B9E7D;        /* Sage green - calm, natural, grounding */
  --colour-primary-dark: #6B7D5D;   /* Darker sage for hover states */
  --colour-primary-light: #A8B89A;  /* Lighter sage for backgrounds */
  --colour-primary-pale: #EDF0EB;   /* Very light sage for subtle backgrounds */

  /* Warm brown from logo illustration */
  --colour-secondary: #8B6F47;      /* Warm brown - trust, stability, earth */
  --colour-secondary-dark: #6B5337; /* Darker brown for hover */
  --colour-secondary-light: #A68A60;

  /* Cream/beige from logo background */
  --colour-accent: #B8956B;         /* Warm tan - welcome, gentle, accessible */
  --colour-accent-dark: #9A7A52;

  /* Neutral colours */
  --colour-text: #2C2C2C;           /* Near black - excellent readability */
  --colour-text-light: #5C5C5C;     /* Medium grey for secondary text */
  --colour-text-lighter: #8C8C8C;   /* Light grey for tertiary text */

  --colour-background: #FDFCF8;     /* Soft cream - warmth, gentle */
  --colour-background-alt: #F5F3ED; /* Light tan for alternating sections */
  --colour-background-dark: #EBE7DD;

  --colour-border: #D1D5DB;         /* Medium grey for borders */
  --colour-border-light: #E5E7EB;   /* Light grey for subtle borders */

  /* Status colours */
  --colour-error: #C13B3B;          /* Red for errors */
  --colour-error-bg: #FEF2F2;
  --colour-success: #3D7C3D;        /* Green for success */
  --colour-success-bg: #F0FDF4;
  --colour-warning: #D97706;
  --colour-info: #2563EB;

  /* Typography */
  --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-heading: var(--font-family-base);

  /* Font sizes - based on 16px root */
  --font-size-xs: 0.75rem;          /* 12px */
  --font-size-sm: 0.875rem;         /* 14px */
  --font-size-base: 1rem;           /* 16px */
  --font-size-lg: 1.125rem;         /* 18px */
  --font-size-xl: 1.25rem;          /* 20px */
  --font-size-2xl: 1.5rem;          /* 24px */

  /* Heading sizes */
  --font-size-h1: 2.5rem;           /* 40px */
  --font-size-h2: 2rem;             /* 32px */
  --font-size-h3: 1.5rem;           /* 24px */
  --font-size-h4: 1.25rem;          /* 20px */
  --font-size-h5: 1.125rem;         /* 18px */
  --font-size-h6: 1rem;             /* 16px */

  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line heights */
  --line-height-tight: 1.2;
  --line-height-snug: 1.4;
  --line-height-base: 1.6;
  --line-height-relaxed: 1.8;
  --line-height-loose: 2;

  /* Spacing scale */
  --spacing-xs: 0.25rem;            /* 4px */
  --spacing-sm: 0.5rem;             /* 8px */
  --spacing-md: 1rem;               /* 16px */
  --spacing-lg: 1.5rem;             /* 24px */
  --spacing-xl: 2rem;               /* 32px */
  --spacing-2xl: 2.5rem;            /* 40px */
  --spacing-3xl: 3rem;              /* 48px */
  --spacing-4xl: 4rem;              /* 64px */
  --spacing-5xl: 5rem;              /* 80px */
  --spacing-6xl: 6rem;              /* 96px */

  /* Layout */
  --container-width: 1200px;
  --container-width-narrow: 800px;
  --container-width-wide: 1400px;
  --container-padding: var(--spacing-md);
  --container-padding-mobile: var(--spacing-md);

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  /* Focus outline - meets WCAG 2.2 requirements */
  --focus-outline: 3px solid var(--colour-primary);
  --focus-outline-offset: 2px;
  --focus-ring: 0 0 0 3px rgba(44, 95, 141, 0.5);

  /* Transitions */
  --transition-fast: 100ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-in-out;

  /* Z-index scale */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
  :root {
    --font-size-h1: 2rem;           /* 32px on mobile */
    --font-size-h2: 1.5rem;         /* 24px on mobile */
    --font-size-h3: 1.25rem;        /* 20px on mobile */
    --font-size-h4: 1.125rem;       /* 18px on mobile */

    --container-padding: var(--spacing-md);

    --spacing-3xl: 2rem;            /* Reduce large spacing on mobile */
    --spacing-4xl: 2.5rem;
    --spacing-5xl: 3rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --colour-text: #000000;
    --colour-background: #FFFFFF;
    --colour-border: #000000;
  }
}

/* Dark mode support (optional, for future) */
@media (prefers-color-scheme: dark) {
  :root {
    /* Could add dark mode variables here if needed */
    /* For now, we'll keep light mode for NDIS context */
  }
}
