/* ==========================================================================
   Heale design tokens — the single source of truth for every visual value.
   Components may only use these tokens. To change the look, change a token;
   to add a value, add a token here first (and record it in DESIGN.md).
   ========================================================================== */
:root {
  /* Color — palette (fixed values) */
  --color-brand: #173f39;
  --color-brand-hover: #24564e;
  --color-brand-pressed: #12352f;
  --color-brand-accent: #2f6253;
  --color-brand-light: #4b7c70;
  --color-brand-muted: #7c9185;
  --color-brand-tint: #dce8e3;
  --color-brand-wash: #e9efec;
  --color-neutral-900: #222;
  --color-neutral-700: #444;
  --color-neutral-600: #626262;
  --color-neutral-500: #888;
  --color-neutral-400: #aaa;
  --color-neutral-300: #d8d8d8;
  --color-neutral-200: #e8e8e8;
  --color-neutral-100: #f3f3f3;
  --color-white: #fff;
  --color-white-alpha: #ffffff55;
  --color-black: #000;
  --color-blue: #2563eb;
  --color-cream: #f8f7f2;
  /* Color — roles (sections and cards re-point these; components read them) */
  --color-text: var(--color-neutral-900);
  --color-text-muted: var(--color-neutral-900);
  --color-heading: var(--color-brand);
  --color-accent: var(--color-brand-accent);
  --color-border: var(--color-neutral-300);
  --color-focus: var(--color-blue);

  /* Typography */
  --font-ui: "Inter", "Segoe UI", Arial, sans-serif;
  --font-brand: "Roboto", Arial, sans-serif;
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-base: 15px;
  /* Text link beside a button: a half step above the button label (--text-md) so it reads at the same size. */
  --text-action-link: 14.5px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 20px;
  --text-3xl: 24px;
  --text-4xl: 28px;
  --text-5xl: 34px;
  --text-display: clamp(36px, 3.8vw, 46px);
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-body: 1.6;

  /* Spacing — 4px grid */
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-2-5: 10px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;

  /* Shape and elevation */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-control: 0 1px 3px #0000001a, 0 1px 2px #0000000f;
  --shadow-card: 0 3px 10px #00000008;
  --shadow-raised: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;
  --shadow-overlay: 0 12px 36px #00000010;
  --shadow-inset: inset 0 1px 2px #00000005;
  --ring-surface: 0 0 0 2px var(--color-white);
  --ring-field: 0 0 0 3px #00000014;
  /* Dim layer behind an open mobile menu: neutral gray (#222 at 40%), so the page reads as set back. */
  --color-scrim: #22222266;

  /* Layers */
  --z-control: 10;
  --z-dropdown: 20;
  --z-header: 30;
  --z-skip: 40;

  /* Motion */
  --motion-fast: 150ms;
  --motion-ui: 200ms;
  --motion-panel: 300ms;
  --ease-ui: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(0, 0, .2, 1);
  /* One transition for every interactive element (links, buttons, rows, tiles, fields). */
  --transition-interactive: background-color var(--motion-ui) var(--ease-ui), color var(--motion-ui) var(--ease-ui), border-color var(--motion-ui) var(--ease-ui), box-shadow var(--motion-ui) var(--ease-ui), text-decoration-color var(--motion-ui) var(--ease-ui);

  /* Layout */
  --page-width: 1072px;
  --page-gutter: 24px;
  --section-default-top: var(--space-12);
  --section-top: var(--section-default-top);
  --section-bottom: var(--space-20);
  --section-heading-gap: var(--space-6);
  --text-column-gap: var(--space-12);
  --photo-ratio: 5/4;
  --control-size: 44px;
  --marker-size: 36px;
  --checkbox-size: 13px;
  /* Intro + content splits (FAQ, Contact): same column widths so the FAQ list and form line up. */
  --split-intro-columns: minmax(0,1fr) minmax(0,2fr);
  --split-intro-gap: var(--space-14);
  /* Space a sticky element keeps below the floating header. */
  --header-clearance: 112px;
}

/* Phone density (600px and below): one place that compacts every page on phones.
   Type steps from 13px up and the large spacing steps shrink, so text, section padding, card
   padding, heading gaps and headings all tighten together. Small spacing steps (4-20px), the
   smallest text (11-12px) and icon-button tap targets (--control-size 44px) stay the same.
   Buttons are 40px tall. The side gutter drops to 16px. */
@media (max-width:600px) {
  :root {
    /* Text one step smaller on phones: body 15 -> 14, labels 14 -> 13, card titles 16/18 -> 15/16. */
    --text-sm: 12.5px;
    --text-md: 13px;
    --text-base: 14px;
    --text-action-link: 13.5px;
    --text-lg: 15px;
    --text-xl: 16px;
    --text-2xl: 18px;
    --text-3xl: 21px;
    --text-4xl: 24px;
    --text-5xl: 28px;
    --space-6: 20px;
    --space-7: 20px;
    --space-8: 24px;
    --space-10: 28px;
    --space-12: 32px;
    --space-14: 36px;
    --space-16: 40px;
    --space-20: 48px;
    --page-gutter: 16px;
    --section-heading-gap: var(--space-4);
  }
}

/* Component defaults still set globally (move into their component when it is next touched). */
:root {
  --service-pill-reserve: 136px;
  --service-title-gap: var(--space-3);
  --service-title-max: 17px;
  --service-title-measure: 12;
  --service-title-min: 14px;
}
