/* ==========================================================================
   CSS Custom Properties
   All design tokens: colours, typography, spacing, breakpoints, transitions
   ========================================================================== */

:root {
  /* ---- Colours ---- */
  --color-black: #000000;
  --color-white: #ffffff;
  --color-primary: #087fff;
  --color-primary-light: #6bb2ff;
  --color-primary-dark: #0066cc;
  --color-dark: #0a0a0a;
  --color-grey: #6b7280;
  --color-grey-light: #9ca3af;
  --color-grey-dark: #374151;
  --color-grey-border: #e5e7eb;

  /* Semantic colours */
  --color-bg: var(--color-white);
  --color-surface: var(--color-white);
  --color-surface-muted: #f5f5f5;
  --color-border: var(--color-grey-border);
  --color-bg-dark: var(--color-dark);
  --color-text: var(--color-dark);
  --color-text-light: var(--color-grey);
  --color-text-on-dark: var(--color-white);
  --color-link: var(--color-primary);
  --color-link-hover: var(--color-primary-dark);

  /* ---- Typography ---- */
  --font-family-base: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-family-heading: "Barlow", "Helvetica Neue", Arial, sans-serif;

  /* Font sizes — mobile-first, scale up at breakpoints */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-md: 1.125rem;   /* 18px */
  --font-size-lg: 1.25rem;    /* 20px */
  --font-size-xl: 1.5rem;     /* 24px */
  --font-size-2xl: 2rem;      /* 32px */
  --font-size-3xl: 2.5rem;    /* 40px */
  --font-size-4xl: 3rem;      /* 48px */
  --font-size-5xl: 3.5rem;    /* 56px */

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

  /* Line heights */
  --line-height-tight: 1.1;
  --line-height-snug: 1.3;
  --line-height-base: 1.6;
  --line-height-relaxed: 1.75;

  /* Letter spacing */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.05em;
  --letter-spacing-wider: 0.1em;

  /* ---- Spacing ---- */
  --space-2xs: 0.25rem;   /* 4px */
  --space-xs: 0.5rem;     /* 8px */
  --space-sm: 0.75rem;    /* 12px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */
  --space-5xl: 8rem;      /* 128px */

  /* ---- Layout ---- */
  --container-max: 100%;
  --container-wide: 100%;
  --container-padding: var(--space-md);
  --section-padding: var(--space-3xl);

  /* ---- Border radius ---- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* ---- Transitions ---- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* ---- Shadows ---- */
  --shadow-sm: 0 2px 8px rgba(8, 127, 255, 0.06);
  --shadow-md: 0 8px 24px rgba(8, 127, 255, 0.08);
  --shadow-lg: 0 16px 40px rgba(8, 127, 255, 0.12);
  --shadow-xl: 0 24px 60px rgba(8, 127, 255, 0.16);

  /* ---- Z-index scale ---- */
  --z-header: 1000;
  --z-overlay: 900;
  --z-modal: 1100;

  /* ---- Hero Dimensions (Sub-pages) ---- */
  --hero-height-mobile: 400px;
  --hero-height-tablet: 500px;
  --hero-height-desktop: 600px;
  
  --hero-padding-mobile: var(--space-5xl);
  --hero-padding-tablet: 12rem;
  --hero-padding-desktop: 16rem;

  /* ---- Gradients ---- */
  --gradient-hero: radial-gradient(circle at 20% 30%, rgba(8, 127, 255, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(8, 127, 255, 0.2) 0%, transparent 50%),
    linear-gradient(160deg, rgba(6, 13, 28, 0.85) 0%, rgba(6, 13, 28, 0.6) 50%, rgba(6, 13, 28, 0.85) 100%);
}

:root[data-theme="dark"] {
  --color-dark: #0a0a0a;
  --color-primary: #ffffff;
  --color-primary-light: #ffffff;
  --color-primary-dark: #eaf1ff;
  --color-grey: #d7e3ff;
  --color-grey-light: #eaf1ff;
  --color-grey-dark: #e2eaf8;
  --color-bg: #003bff;
  --color-surface: #003bff;
  --color-surface-muted: #0036e6;
  --color-border: rgba(180, 205, 244, 0.22);
  --color-bg-dark: #0a0a0a;
  --color-text: #f4f8ff;
  --color-text-light: #dbe6ff;
  --color-text-on-dark: #f4f8ff;
  --color-link: #ffffff;
  --color-link-hover: #eaf1ff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* ---- Responsive overrides ---- */

/* Tablet: 768px+ */
@media (min-width: 768px) {
  :root {
    --container-padding: var(--space-xl);
    --section-padding: var(--space-4xl);
  }
}

/* Desktop: 1280px+ */
@media (min-width: 1280px) {
  :root {
    --container-padding: var(--space-2xl);
    --section-padding: var(--space-5xl);
  }
}
