/* The public sites' shared scale: one source for webority.com, Government and Demo. Each site keeps only its own colours and fonts. */
:root {
  /* Type scale: fluid between phone and desktop */
  --fs-xs: clamp(0.85rem, 0.8rem + 0.2vw, 0.875rem);
  --fs-sm: clamp(0.875rem, 0.75rem + 0.625vw, 1rem);
  --fs-base: clamp(1rem, 0.85rem + 0.75vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 0.95rem + 0.875vw, 1.25rem);
  --fs-xl: clamp(1.25rem, 1.05rem + 1vw, 1.5rem);
  --fs-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 1.75rem);
  --fs-3xl: clamp(2rem, 1.65rem + 1.75vw, 2.375rem);
  --fs-4xl: clamp(2.625rem, 2.125rem + 2.5vw, 3rem);
  --fs-5xl: clamp(3rem, 2.4rem + 3vw, 3.75rem);
  --fs-6xl: clamp(3.875rem, 3rem + 4.375vw, 5rem);
  --fs-7xl: clamp(5.625rem, 4.375rem + 6.25vw, 7.25rem);
  --fs-8xl: clamp(7.5rem, 5.9rem + 8vw, 9.5rem);

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

  /* Line heights */
  --lh-none: none;
  --lh-tight: 1.25;
  --lh-normal: 1.35;
  --lh-medium: 1.375;
  --lh-base: 1.5;
  --lh-large: 1.625;
  --lh-xlarge: 2;

  /* Spacing scale: fluid between phone and desktop */
  --space-xxs: clamp(0.125rem, 0.1rem + 0.125vw, 0.25rem);
  --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --space-sm: clamp(0.375rem, 0.3rem + 0.375vw, 0.75rem);
  --space-md: clamp(0.5rem, 0.4rem + 0.5vw, 1rem);
  --space-lg: clamp(0.75rem, 0.6rem + 0.75vw, 1.5rem);
  --space-xl: clamp(1rem, 0.8rem + 1vw, 2rem);
  --space-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 3rem);
  --space-3xl: clamp(2rem, 1.6rem + 2vw, 4rem);
  --space-4xl: clamp(3rem, 2.4rem + 3vw, 6rem);

  /* Section padding, larger than the spacing scale */
  --section-pad-sm: clamp(4rem, 3.2rem + 4vw, 8rem);
  --section-pad-md: clamp(5rem, 4rem + 5vw, 10rem);
  --section-pad-lg: clamp(8rem, 6.4rem + 8vw, 16rem);

  /* Border radius */
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-pill: 999px;
}

/* The display sizes need a step per breakpoint: the fluid scale alone keeps hero text too large on phones. */
@media (max-width: 767px) {
  :root {
    --hero-title: var(--fs-4xl);
    --hero-subtitle: var(--fs-lg);
    --section-title: var(--fs-3xl);
    --section-subtitle: var(--fs-base);
    --hero-padding: var(--space-3xl);
    --section-padding: var(--space-2xl);
    --card-padding: var(--space-lg);
    --container-padding: var(--space-md);
    --nav-height: 3.5rem;
    --nav-font-size: var(--fs-base);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --hero-title: var(--fs-5xl);
    --hero-subtitle: var(--fs-lg);
    --section-title: var(--fs-3xl);
    --section-subtitle: var(--fs-base);
    --hero-padding: var(--space-4xl);
    --section-padding: var(--space-3xl);
    --card-padding: var(--space-xl);
    --container-padding: var(--space-lg);
    --nav-height: 4rem;
    --nav-font-size: var(--fs-base);
  }
}

@media (min-width: 1024px) {
  :root {
    --hero-title: var(--fs-6xl);
    --hero-subtitle: var(--fs-xl);
    --section-title: var(--fs-4xl);
    --section-subtitle: var(--fs-lg);
    --hero-padding: var(--section-pad-md);
    --section-padding: var(--section-pad-sm);
    --card-padding: var(--space-3xl);
    --container-padding: var(--space-2xl);
    --nav-height: 4.5rem;
    --nav-font-size: var(--fs-base);
  }
}

@media (min-width: 1440px) {
  :root {
    --hero-title: var(--fs-7xl);
    --hero-subtitle: var(--fs-2xl);
    --section-title: var(--fs-6xl);
    --section-subtitle: var(--fs-xl);
    --hero-padding: var(--section-pad-lg);
    --section-padding: var(--section-pad-md);
    --container-padding: var(--space-3xl);
  }
}

@media (min-width: 1920px) {
  :root {
    --section-subtitle: var(--fs-2xl);
  }
}

/* Touch widths: buttons, the menu toggle and close buttons are at least 44px, whatever each site's padding gives them. */
@media (max-width: 1023px) {
  .btn,
  .navbar-toggler {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navbar-toggler,
  .btn-close {
    min-width: 44px;
    min-height: 44px;
  }
}
