/*
  Pearsall Ecological Consulting: site layer. Loaded after the theme (unlayered), so anything here wins.
  Put this site's design here, not in the shared maw-starter theme.

  1. Tokens: override --maw-* variables (full list in user/themes/maw-starter/css/tokens.css).
  2. Site-wide rules: typography, header/footer tweaks.
  3. Per-block styling: user/site/css/blocks/<type>.css is loaded only when that block is on the page.

  Palette (client approved, Nov 2026). The site is light only, so the same tokens apply whatever
  colour mode a browser has stored.

  How the colours are used:
    Deep Pacific band   ivory type, Sea Glass accents      hero, contact band
    Warm Sand band      Deep Pacific headings, teal details services, biography
    Eucalyptus panel    Deep Pacific text, Arbutus accents  callouts
*/

/* ── 1. Tokens ─────────────────────────────────────────────────────────────── */
:root,
:root[data-theme="dark"] {
  --pec-deep-pacific: #244653;   /* primary: headings, text, dark bands */
  --pec-sea-glass: #548c8a;      /* secondary: accents, secondary buttons */
  --pec-sea-glass-deep: #376765; /* Sea Glass darkened so small text passes contrast on ivory and sand */
  --pec-eucalyptus: #b5c9be;     /* supporting: callout panels */
  --pec-warm-sand: #e9ddc9;      /* neutral section background */
  --pec-ivory: #f6f4ee;          /* main background */
  --pec-ivory-raised: #fbfaf6;
  --pec-arbutus: #bd795c;        /* accent */
  --pec-line: #d8d2c3;
  --pec-muted: #4a656f;          /* Deep Pacific, lightened for secondary copy */

  --maw-accent: var(--pec-arbutus);
  --maw-accent-contrast: var(--pec-ivory);
  --maw-accent-hover: #a96549;
  --maw-accent-soft: var(--pec-eucalyptus);
  --maw-bg: var(--pec-ivory);
  --maw-bg-alt: var(--pec-warm-sand);
  --maw-bg-inverse: var(--pec-deep-pacific);
  --maw-surface: var(--pec-ivory-raised);
  --maw-text: var(--pec-deep-pacific);
  --maw-text-muted: var(--pec-muted);
  --maw-text-inverse: var(--pec-ivory);
  --maw-border: var(--pec-line);
  --maw-link: var(--pec-sea-glass-deep);
  --maw-focus: color-mix(in oklab, var(--pec-sea-glass) 65%, transparent);

  --maw-leading: 1.647;          /* 17 / 28 */
  --maw-leading-tight: 1.12;
  --maw-text-xs: 0.75rem;        /* 12 label */
  --maw-text-sm: 0.9375rem;      /* 15 */
  --maw-text-base: 1.0625rem;    /* 17 body */
  --maw-text-lg: 1.1875rem;      /* 19 lead */
  --maw-text-xl: 1.625rem;       /* 26 card titles */
  --maw-text-2xl: clamp(2rem, 3.5vw, 2.75rem);    /* section titles */
  --maw-text-3xl: clamp(2rem, 3.5vw, 2.75rem);
  --maw-text-4xl: clamp(2.75rem, 6.2vw, 4.75rem); /* display */

  --maw-gutter: 1.5rem;
  --maw-section-sm: 3rem;
  --maw-section-md: clamp(4rem, 2.5rem + 4vw, 6rem);
  --maw-section-lg: clamp(4rem, 2.5rem + 4vw, 6rem);
  --maw-header-h: 6rem;

  --maw-radius: 2px;
  --maw-radius-sm: 2px;
  --maw-radius-lg: 0;            /* photographs and colour fields are square */
  --maw-shadow-sm: none;
  --maw-shadow: none;
  --maw-shadow-lg: none;

  color-scheme: light;
}

/* ── 2. Site-wide rules ────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 400; letter-spacing: 0; }
h3, h4 { font-weight: 500; line-height: 1.25; }
h1 em, h2 em { font-style: italic; color: var(--maw-accent); }

a:hover { color: var(--maw-text); }

/* Small section labels: body face, small and spaced (no monospace) */
.eyebrow {
  font-family: var(--maw-font-body);
  font-size: var(--maw-text-xs);
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--pec-sea-glass-deep);
}

.lead { color: var(--maw-text-muted); }

blockquote {
  border: 0;
  padding: 0;
  font-family: var(--maw-font-heading);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.45;
  color: var(--pec-sea-glass-deep);
}

/* Buttons */
.btn { min-height: 3rem; padding: 0 1.5rem; font-size: var(--maw-text-base); font-weight: 600; }
.btn:hover { transform: none; }
.btn-lg { min-height: 3.25rem; padding: 0 1.75rem; }
.btn-primary, .btn-primary:hover { color: var(--maw-accent-contrast); }
.btn-secondary { background: transparent; border-color: var(--pec-deep-pacific); color: var(--pec-deep-pacific); }
.btn-secondary:hover { background: var(--pec-deep-pacific); border-color: var(--pec-deep-pacific); color: var(--pec-ivory); }
.button-row { margin-top: 0; }

/* Deep Pacific bands (block setting: custom colour #244653, light text):
   ivory type, an ivory primary button and a Sea Glass secondary button */
.section--text-light { color: var(--pec-ivory); --maw-text: var(--pec-ivory); --maw-text-muted: rgb(246 244 238 / 0.82); }
.section--text-light .eyebrow { color: var(--pec-eucalyptus); opacity: 1; }
.section--text-light :is(h1, h2) em { color: var(--pec-eucalyptus); }
.section--text-light .btn-primary { background: var(--pec-ivory); color: var(--pec-deep-pacific); }
.section--text-light .btn-primary:hover { background: #ffffff; color: var(--pec-deep-pacific); }
.section--text-light .btn-secondary { background: var(--pec-sea-glass); border-color: var(--pec-sea-glass); color: var(--pec-ivory); }
.section--text-light .btn-secondary:hover { background: #497b79; border-color: #497b79; color: var(--pec-ivory); }

/* Header */
.site-header::before { background: var(--maw-bg); backdrop-filter: none; }
.site-header__inner { gap: 0.75rem 1.5rem; padding-block: 0.75rem; }
.site-logo img { height: 4.5rem; }
.nav-list { gap: 0.25rem 0.5rem; }
.nav-list a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.625rem; font-size: var(--maw-text-sm); font-weight: 400; }
.nav-list a:hover { background: none; text-decoration: underline; text-underline-offset: 0.3em; }
.site-header__cta { min-height: 2.75rem; padding: 0 1.25rem; font-size: var(--maw-text-sm); }
.site-header__actions { margin-left: 0.5rem; }

@media (max-width: 860px) {
  :root { --maw-header-h: 5rem; }
  .site-logo img { height: 3.5rem; }
  .site-header__actions { margin-left: auto; }
  .nav-list a { display: flex; font-size: var(--maw-text-lg); }
}

/* Footer */
.site-footer { border-top: 0; padding-block: 3rem; color: var(--maw-text); font-size: 0.875rem; line-height: 1.25rem; }
.site-footer__inner { gap: 1.5rem 3rem; }
.site-footer .site-logo img { height: 6rem; }
.site-footer__tagline { max-width: 22em; font-family: var(--maw-font-heading); font-style: italic; font-size: 1.25rem; line-height: 1.75rem; }
.site-footer__contact { display: flex; flex-direction: column; gap: 0.25rem; }
.site-footer__copyright { margin-top: 0.5rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--maw-text-muted); }

/* Eucalyptus callouts (block setting: custom colour #b5c9be, dark text): Deep Pacific type */
.section--text-dark { color: var(--pec-deep-pacific); --maw-text: var(--pec-deep-pacific); --maw-text-muted: var(--pec-deep-pacific); --maw-link: var(--pec-deep-pacific); }

/* Header dropdown (Services) */
.nav-list ul { padding: 0.5rem; border-radius: 0; background: var(--pec-ivory-raised); box-shadow: 0 1rem 2rem -1rem rgb(36 70 83 / 0.35); }
.nav-list ul a { display: flex; min-height: 2.5rem; white-space: nowrap; }
.nav-list a[aria-current="page"], .nav-list .is-active > a { background: none; text-decoration: underline; text-decoration-color: var(--pec-sea-glass); text-decoration-thickness: 2px; text-underline-offset: 0.4em; }
@media (max-width: 860px) {
  .nav-list ul { background: transparent; box-shadow: none; }
  .nav-list ul a { font-size: var(--maw-text-base); white-space: normal; }
}
