/* ==========================================================================
   Progressive Builders — global.css
   Design tokens, reset, and base typography. Loads on every page.
   Source of truth: wireframe.html "Color & Typography System".
   ========================================================================== */

:root {
  /* ==========================================================================
     Brand palette (rebrand) — red + tan, no blue anywhere.
     --pb-primary is for buttons/links/accents ONLY, never a section fill.
     --pb-secondary is reserved for CTA-band section backgrounds.
     --pb-dark replaces the old navy as the site's structural dark color
     (header, footer, hero, overlays).
     ========================================================================== */
  --pb-primary: #c0192b; /* Construction Red — buttons, links, accents */
  --pb-primary-dark: #8c131f; /* red, darker — hover/active states */
  --pb-primary-light: #dd8b96; /* red, lighter — light accents only, never a fill background */

  --pb-secondary: #bcae91; /* Craftsman Tan — CTA section backgrounds ONLY */
  --pb-secondary-dark: #9c8d6c; /* tan, darker */
  --pb-secondary-light: #dcd4c0; /* tan, lighter — subtle tints */

  --pb-dark: #1a1a1a; /* Ink — header, footer, hero, overlay base */
  --pb-dark-2: #0d0d0d; /* Ink, darker — gradient/overlay depth */

  /* Legacy names kept as aliases so every existing component/page stylesheet
     (already written against these tokens) picks up the rebrand automatically
     — no need to touch each file individually. */
  --pb-navy: var(--pb-dark);
  --pb-navy-dark: var(--pb-dark-2);
  --pb-amber: var(--pb-primary);
  --pb-amber-dark: var(--pb-primary-dark);
  --pb-sawdust: var(--pb-secondary);

  --pb-ivory: #f8f6f2; /* warm off-white page background */
  --pb-white: #ffffff; /* card / form surfaces */
  --pb-slate: #2a2622; /* warm dark body text */
  --pb-ash: #6b6355; /* warm muted secondary text */
  --pb-tint: #f4efe6; /* warm pale tint fills */
  --pb-light-text: #e6e0d3; /* warm pale text/caption color for dark surfaces */

  /* Support tokens */
  --pb-head: #1a1613; /* warm near-black heading ink */
  --pb-border: #e4dfd5; /* warm neutral border */
  --pb-border-navy: rgba(26, 26, 26, 0.2); /* dark-tinted border (alias name kept) */
  --pb-border-amber: rgba(192, 25, 43, 0.3); /* red-tinted border (alias name kept) */

  /* Typography */
  --pb-font-display: "Oswald", sans-serif;
  --pb-font-body: "Inter", sans-serif;
  --pb-font-mono: "Space Mono", monospace;

  /* Layout */
  --pb-container: 1440px;
  --pb-gutter: 24px;
  --pb-radius: 10px;
  --pb-radius-sm: 6px;

  /* Elevation */
  --pb-shadow-sm: 0 1px 3px rgba(20, 16, 12, 0.08);
  --pb-shadow-md: 0 8px 24px rgba(20, 16, 12, 0.1);
  --pb-shadow-lg: 0 18px 48px rgba(20, 16, 12, 0.16);
}

/* --- Reset ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* keep anchored sections clear of the sticky header */
  scroll-padding-top: 100px;
}

body.pb-body {
  margin: 0;
  font-family: var(--pb-font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--pb-slate);
  background: var(--pb-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Base typography --------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--pb-font-display);
  color: var(--pb-head);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.5px;
}

h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  text-transform: uppercase;
}
h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  text-transform: uppercase;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

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

a {
  color: var(--pb-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--pb-primary-dark);
}

/* WordPress / Astra add default list margin+padding — force them off.
   Scoped to .pb-body so it reliably out-specifies the parent theme rules. */
ul,
ol,
.pb-body ul,
.pb-body ol {
  margin: 0;
  padding: 0;
}

/* --- Layout helpers ---------------------------------------------------- */
.pb-container {
  width: 100%;
  max-width: var(--pb-container);
  margin-inline: auto;
  padding-inline: var(--pb-gutter);
}

/* Plain, light section surface by default — dark/photo treatment is reserved
   for the header, footer, and page heroes (.pb-page-hero), not ordinary
   content sections. A few pages still opt a specific section INTO the photo
   backdrop deliberately (e.g. testimonials) by setting their own background —
   see the page's own CSS file. */
.pb-section {
  padding-block: clamp(48px, 7vw, 96px);
  color: var(--pb-slate);
}
.pb-section--tight {
  padding-block: clamp(36px, 5vw, 64px);
}

/* Section heading kit (reused across pages) */
.pb-eyebrow {
  font-family: var(--pb-font-mono);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pb-primary);
  margin: 0 0 10px;
  display: block;
}

.pb-section-title {
  font-family: var(--pb-font-display);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 14px;
}

.pb-lead {
  font-size: 1.1rem;
  color: var(--pb-ash);
  max-width: 60ch;
}

.pb-center {
  text-align: center;
}
.pb-center .pb-lead {
  margin-inline: auto;
}

/* Data / credential text uses the mono face */
.pb-mono {
  font-family: var(--pb-font-mono);
}

/* --- Scroll-reveal animation ------------------------------------------ */
/* Base state applies only when JS has flagged support (html.pb-anim),
   so content is never hidden if JS fails to run. */
.pb-anim .pb-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  will-change: opacity, transform;
}
.pb-anim .pb-reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Staggered children (cards, pills, grid items) */
.pb-anim .pb-reveal--stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.pb-anim .pb-reveal--stagger.is-visible > * {
  opacity: 1;
  transform: none;
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    transition-duration: 0.001ms;
    scroll-behavior: auto;
  }
  .pb-anim .pb-reveal,
  .pb-anim .pb-reveal--stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Screen-reader only */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
