/* Stately brand palette — edit these four colours to update the whole website.
   Tints, hover states, image overlays and range accents derive from these values.
   The shared PHP head reads the relevant brand token for the browser theme colour. */
:root {
  --brand-stately: #1b2741;
  --brand-park-homes: #1b2741;
  --brand-lodges: #124250;
  --brand-crown-collection: #3c0e2a;

  /* Shared company surfaces remain navy, independently of the range masthead. */
  --brand-deep: color-mix(in srgb, var(--brand-stately) 84%, #000);
  --brand-ink: color-mix(in srgb, var(--brand-stately) 68%, #000);
  --brand-raised: color-mix(in srgb, var(--brand-stately) 95%, #fff);
  --brand-hover: color-mix(in srgb, var(--brand-stately) 88%, #fff);

  /* Champagne and bronze remain supporting accents across all three brands. */
  --brand-gold: #9b805b;
  --brand-gold-ink: #705c40;
  --brand-gold-feature: #806641;
  --brand-champagne: #dfcba8;
  --brand-champagne-hover: #f1e4ce;
  --brand-gold-outline: #d6c29e;
  --brand-gold-muted: #cbb895;
  --brand-gold-hover: #ddd0b8;
  --range-brand: var(--brand-park-homes);
}

/* Only range overviews and model pages declare a header range. Keep these
   derived values on the body so the navigation shade follows its chosen brand. */
body {
  --header-brand: var(--brand-stately);
  --header-nav-brand: color-mix(in srgb, var(--header-brand) 95%, #fff);
}
body[data-header-range="park-homes"] { --header-brand: var(--brand-park-homes); }
body[data-header-range="lodges"] { --header-brand: var(--brand-lodges); }
body[data-header-range="crown-collection"] { --header-brand: var(--brand-crown-collection); }

/* Apply data-range to a page, card or link. Derive colours at that scope so
   individual cards can retain their identity inside another range's page. */
:where([data-range]) {
  --range-tint: color-mix(in srgb, var(--range-brand) 5%, #fff);
  --range-line: color-mix(in srgb, var(--range-brand) 20%, #fff);
  --range-hover: color-mix(in srgb, var(--range-brand) 88%, #fff);
}
[data-range="park-homes"] { --range-brand: var(--brand-park-homes); }
[data-range="lodges"] { --range-brand: var(--brand-lodges); }
[data-range="crown-collection"] { --range-brand: var(--brand-crown-collection); }
