/* Design tokens, reset, typography, buttons and the structural utilities.
 * The shared layer every other stylesheet here depends on, and the one that
 * moves to bundles-core -- which is why it must load first everywhere.
 *
 * One coupling worth knowing about: the `html` rule's scroll-padding-top is
 * the sticky site header's height, which lives in chrome.css. It stayed here
 * because splitting a rule's declarations would break the verbatim guarantee
 * this split rests on. Change the header's height and this follows.
 *
 * .tint-*, .text-* and .edge-* are composed at RUNTIME in
 * inc/partner-portal.php (the $tone variables) and applied by JS in
 * assets/js/location-finder.js (edge-teal). No grep will find those call
 * sites. Do not prune this palette.
 *
 * Split out of assets/css/main.css. Every rule below is verbatim from
 * that file and appears in its original relative order.
 */
/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --white:         #fff;
  --cream:         #faf6ef;
  --teal:          #084440;
  --teal-footer:   #0a4d47;
  --teal-deep:     #073b37;
  --teal-mid:      #0f452a;
  --red:           #7a2c14;
  --red-dark:      #52200e;
  --brown-dark:    #2b2420;
  --brown-med:     #463d35;
  --brown-muted:   #4d4436;
  --border:        #e9e0d2;
  --yellow-dark:   #573e07;

  --pastel-teal-bg:    #dcf1f1;
  --pastel-teal-mid:   #a9dbdd;
  --pastel-coral-bg:   #fce1d4;
  --pastel-coral-mid:  #f7c4ae;
  --pastel-yellow-bg:  #faecb8;
  --pastel-yellow-mid: #f9dd8f;
  --pastel-yellow-alt: #ffe9a8;
  --pastel-green-bg:   #dcefdd;
  --pastel-green-mid:  #bfe2c2;

  /* The four-colour brand strip — the hero slideshow's left edge, the split
     hero's divider, the mobile nav's edge and the finder's chrome rule are
     all the same band. Stops only, so each caller picks its own direction:
     linear-gradient(to bottom, var(--spectrum-stops)). */
  /* Height of the finder's chrome rule. Named because the bar's bottom
     padding has to account for it — see .lf-app-open .location-finder__controls. */
  --lf-rule-h: 6px;

  --spectrum-stops:
    var(--pastel-teal-mid)   0%  25%,
    var(--pastel-coral-mid)  25% 50%,
    var(--pastel-yellow-mid) 50% 75%,
    var(--pastel-green-mid)  75% 100%;

  --font-sans:   'Public Sans', sans-serif;
  --font-serif:  'Source Serif 4', serif;

  --radius-card: 18px;
  --radius-card-sm: 12px;
  --radius-banner: 20px;
  --radius-pill: 999px;
  --radius-input: 10px;

  --shadow-card: 0 1px 4px rgba(0,0,0,.06);
  --shadow-overlay: 0 10px 30px rgba(43, 36, 32, .15); /* floating menus/dropdowns/popdowns */

  /* ── Layout system ───────────────────────────────────────────────────── */
  /*
   * Every full-bleed row follows one pattern:
   *   - Outer element  → background color + padding-block (vertical only)
   *   - Inner content  → constrained by max-width + margin: auto
   *
   * For single-div blocks (wp:group patterns) we simulate the inner container
   * with dynamic horizontal padding: pad-h grows so content never exceeds
   * row-content-width regardless of viewport size.
   *
   * For two-div rows (header, hero) the inner div gets max-width directly.
   * Both techniques produce the same visual result. Change row-content-width
   * or row-gutter here and it propagates everywhere.
   */
  --row-content-width: 1920px;   /* max width of the content area */
  --row-gutter:        48px;     /* minimum horizontal padding inside a row */

  /* Derived — do not override directly */
  --pad-h: max(var(--row-gutter), calc((100vw - var(--row-content-width) + 2 * var(--row-gutter)) / 2));

  --pad-v:    72px;   /* section vertical padding — standard tier, desktop */
  --mob-v:    48px;   /* section vertical padding — standard tier, mobile */

  --pad-v-hero-top:    56px;  /* hero-style sections — desktop top and bottom */
  --pad-v-hero-bottom: 56px;
  --mob-v-hero-top:    40px;  /* hero-style sections — mobile top and bottom */
  --mob-v-hero-bottom: 40px;

  --pad-card:   28px;  /* card internal padding — vertical */
  --pad-card-h: 24px;  /* card internal padding — horizontal (callout-style cards) */
  --gap-col:  48px;   /* layout column gap */
  --gap-grid: 20px;   /* card grid gap */
  --mob-h:    20px;   /* horizontal gutter at ≤860px */

  /* z-index — shared app-chrome layers only. Values with a specific
     technical reason (clearing Leaflet's own 400–1000 stacking range,
     tiny local stacking inside one component) stay as raw numbers with
     their own explanatory comment in place — see .lf-suggest,
     .lf-marker.is-selected, .tc-photo-stack. */
  --z-sticky:    100;  /* sticky site header */
  --z-raised:    200;  /* dropdowns, mobile fullscreen overlays */
  --z-above-map: 1101; /* above Leaflet's own panes (z-index 400–1000) */

  /* Breakpoints (reference only — can't be used in @media)
     1100px  860px  540px */
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  background: var(--white);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--white);
  font-family: var(--font-sans);
  color: var(--brown-dark);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--red); }

address { font-style: normal; }

ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { margin: 0; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1 {
  font: 600 52px/1.1 var(--font-serif);
  color: var(--brown-dark);
}
h2 {
  font: 600 38px var(--font-serif);
  color: var(--brown-dark);
}
h3 {
  font: 600 26px var(--font-serif);
  color: var(--brown-dark);
}
p {
  font: 400 17px/1.65 var(--font-sans);
  color: var(--brown-med);
  margin: 0;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
/*
 * btn-primary / btn-secondary — canonical button styles.
 *
 * Plain HTML:  apply class directly to <a> or <button>.
 * WP blocks:   apply class to the wp:button wrapper div;
 *              visual styles flow to the inner .wp-block-button__link.
 *
 * The wrapper div is a layout container only — never receives visual styles.
 * See WP block wiring section near the bottom of this file.
 */

/* Shared shape — plain elements only (a / button, never a div wrapper) */
a[class*="btn-"], button[class*="btn-"] {
  display: inline-block;
  font: 700 15px/1 var(--font-sans);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
  white-space: nowrap;
}

/* Primary — filled teal */
a.btn-primary, button.btn-primary             { background: var(--teal); color: var(--white); border: none; padding: 15px 28px; }
a.btn-primary:hover, button.btn-primary:hover { background: var(--red);  color: var(--white); }

/* Primary — filled red */
a.btn-primary-red, button.btn-primary-red             { background: var(--red);      color: var(--white); border: none; padding: 15px 28px; }
a.btn-primary-red:hover, button.btn-primary-red:hover { background: var(--red-dark); color: var(--white); }

/* Primary — white fills (on dark backgrounds) */
a.btn-primary-white, button.btn-primary-white             { background: var(--white); color: var(--teal); border: none; padding: 15px 28px; font-weight: 800; }
a.btn-primary-white:hover, button.btn-primary-white:hover { opacity: .88; }

a.btn-primary-white-red, button.btn-primary-white-red             { background: var(--white); color: var(--red); border: none; padding: 15px 28px; font-weight: 800; }
a.btn-primary-white-red:hover, button.btn-primary-white-red:hover { opacity: .88; }

/* Secondary — outline teal */
a.btn-secondary, button.btn-secondary             { background: transparent; color: var(--teal); border: 2px solid var(--teal); padding: 13px 26px; }
a.btn-secondary:hover, button.btn-secondary:hover { color: var(--red); border-color: var(--red); }

/* Secondary — outline white (on dark backgrounds) */
a.btn-outline-white, button.btn-outline-white             { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.7); padding: 13px 26px; }
a.btn-outline-white:hover, button.btn-outline-white:hover { background: rgba(255,255,255,.12); border-color: var(--white); }

/* ─── Structural Utilities ───────────────────────────────────────────────── *
 * Additive classes — pair with a component's own class for shape/behavior.
 * The four-color decorative palette (teal / coral / yellow / green) recurs
 * across cards, pills, badges and accents throughout the theme; use these
 * instead of adding another one-off `--teal`/`--coral`/`--yellow`/`--green`
 * modifier to a new component.
 */
.tint-teal   { background: var(--pastel-teal-bg); }
.tint-coral  { background: var(--pastel-coral-bg); }
.tint-yellow { background: var(--pastel-yellow-bg); }
.tint-green  { background: var(--pastel-green-bg); }

.edge-teal   { border-color: var(--pastel-teal-mid); }
.edge-coral  { border-color: var(--pastel-coral-mid); }
.edge-yellow { border-color: var(--pastel-yellow-mid); }
.edge-green  { border-color: var(--pastel-green-mid); }

.text-teal   { color: var(--teal); }
.text-coral  { color: var(--red-dark); }
.text-yellow { color: var(--yellow-dark); }
.text-green  { color: var(--teal-mid); }

.fill-teal { background: var(--teal); }
.fill-red  { background: var(--red); }

/* Shape utilities — structure only, no color; pair with a tint/edge/text/
   fill utility above (or a component's own background) for the finish. */
.card {
  border-radius: var(--radius-card);
  padding: var(--pad-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pill {
  display: inline-block;
  font: 600 15px var(--font-sans);
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  line-height: 1.2;
}
/* Shape only — deliberately no padding, since usages range from full-bleed
   (page gutter, var(--pad-h)) to inner cards (fixed padding); pair with the
   component's own padding rule. */
.banner {
  border-radius: var(--radius-banner);
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--white);
}
.notice {
  border-radius: var(--radius-card-sm);
  padding: var(--pad-card) var(--pad-card-h);
}
.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px var(--pad-h);
}

/* Left-accent card: border-left-color comes from an edge-* utility */
.accent-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 6px solid;
  border-radius: var(--radius-card-sm);
  padding: var(--pad-card) var(--pad-card-h);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* Full-bleed row shell for block patterns — pair with .wp-block-group */
.section.wp-block-group {
  padding: var(--pad-v) var(--pad-h) !important;
}
.section--cream.wp-block-group { background: var(--cream); }
.section--white.wp-block-group { background: var(--white); }
@media (max-width: 860px) {
  .section.wp-block-group { padding: var(--mob-v) var(--mob-h) !important; }
}

/* Divider — thin rule, additive. Standalone dividers use this directly;
   :first-child/:first-of-type-driven rules (list-opening caps) stay as plain
   CSS since a class can't be conditioned on DOM position. */
.rule-top    { border-top: 1px solid var(--border); }
.rule-bottom { border-bottom: 1px solid var(--border); }


@media (max-width: 540px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
}


/* ── Eyebrow labels ───────────────────────────────────────────────────────── */
.eyebrow {
  font: 700 13px var(--font-sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px !important;
}
