/* ============================================
   GROVE — Base CSS & Root Variables
   Reusable design tokens for all pages
   ============================================ */

/* --- Reset & Box Model --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Root Design Tokens --- */
:root {
  /* Brand colors only – use these everywhere */
  --vivid-azure: #00aeef;
  --vivid-azure-rgb: 0, 174, 239;
  --dark-azure: #00294b;
  --dark-azure-rgb: 0, 41, 75;
  --light-azure: #edf3f6;
  --light-azure-rgb: 237, 243, 246;

  /* Derived from brand */
  --primary-blue: var(--dark-azure);
  --primary-blue-dark: #001f38;
  --vivid-azure-hover: #009ad4;
  --white: #FFFFFF;
  --light-grey-bg: var(--light-azure);
  --section-bg-alt: var(--light-azure);
  --light-grey-border: #E8E8E8;
  --dark-text: #333333;
  --dark-text-soft: #555555;
  --description-grey: #8d8785;
  --light-text: #CCCCCC;
  --light-text-on-dark: rgba(255, 255, 255, 0.85);
  --overlay-dark: rgba(0, 41, 75, 0.75);
  --header-scrolled-bg: rgba(0, 41, 75, 0.92);

  /* Service page pastel icon circles */
  --icon-blue: #E6F2FA;
  --icon-green: #EAF9F1;
  --icon-teal: #E0F4F4;
  --icon-orange: #FFF2E5;
  --icon-purple: #F5EEFA;
  --icon-cyan: #E3F2FD;
  --impact-icon-bg: #F0F7FC;

  /* Typography (Brand: Poppins) */
  --font-sans: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --fs-base: 1rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 2rem;
  --fs-4xl: 2.5rem;
  --fs-5xl: 3rem;
  --fw-light: 300;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;
  --ls-tight: -0.02em;
  --ls-wide: 0.08em;

  /* Spacing (based on 4px grid) */
  --space-unit: 0.25rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --section-padding-y: clamp(3rem, 6vw, 5rem);
  --section-padding-x: clamp(1rem, 4vw, 2rem);
  --container-max: 75rem;
  --header-height: 4.5rem;
  --topbar-height: 2.5rem;

  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --border-width: 1px;
  --border-color: var(--light-grey-border);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);

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

  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
}

/* --- Base Elements --- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--dark-text);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (max-width: 47.99em) {
  .header__inner {
    flex-wrap: nowrap;
  }
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  opacity: 0.9;
}

ul,
ol {
  list-style: none;
}

/* --- Typography Base --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}

h1 { font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl)); }
h2 { font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-sm); }

p {
  margin-bottom: var(--space-4);
  line-height: var(--lh-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

/* --- Utility: Focus visible for a11y --- */
:focus-visible {
  outline: 2px solid var(--vivid-azure);
  outline-offset: 2px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
