/* ==========================================================================
   Allred brand tokens and base styles
   For the Salient-Allred child theme. Load after Salient's own stylesheets.

   Every colour pairing below has been measured against WCAG 2.2 SC 1.4.3.
   Ratios are noted inline. Do not substitute values without re-measuring.
   ========================================================================== */

:root {
  /* Anchors */
  --burgundy:        #943835;   /* 7.03:1 on paper  */
  --burgundy-deep:   #6E2926;   /* 10.07:1 on paper */
  --fir:             #0B4D12;   /* 9.70:1 on paper  */

  /* Tints — fills and rules only, never text */
  --clay:            #B39894;   /* 2.58:1 — fails as text */
  --moss:            #9DB394;   /* 2.17:1 — fails as text */
  --sand:            #E8E1DA;   /* 1.25:1 — surface only  */
  --border-ui:       #948F89;   /* 3.09:1 — the lightest border that clears
                                   SC 1.4.11 for UI component boundaries.
                                   Sand at 1.25:1 is invisible as an edge. */
  --sky:             #DCE7F0;   /* 1.21:1 — surface only  */

  /* Accent */
  --sun:             #D9A441;   /* 2.17:1 — fills only    */
  --sun-deep:        #8B6623;   /* 5.03:1 — accent text   */

  /* Neutrals */
  --ink:             #1F261E;   /* 14.93:1 — body text    */
  --ink-muted:       #6E6C66;   /* 5.05:1  — captions     */
  --ink-subtle:      #767370;   /* 4.54:1  — metadata     */
  --paper:           #FAFBF8;   /* page background        */

  /* Dark-field variants */
  --period-on-dark:  #C4736F;   /* 4.45:1 on ink. Burgundy on ink is 2.12:1 and invisible */

  /* Type */
  --brand-sans: "Avenir Next", Avenir, "Nunito Sans", "Helvetica Neue", Arial, sans-serif;

  /* Rhythm */
  --rule-weight: 3px;
  --radius: 4px;
}

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */

body,
.container-wrap,
#ajax-content-wrap {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--brand-sans);
}

body { -webkit-font-smoothing: antialiased; }

/* --------------------------------------------------------------------------
   2. Headings
   Avenir Book with tight tracking. Heavy is reserved for the wordmark and
   must not appear in running text — that reservation is what lets the weight
   itself signal the mark.
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6,
.nectar-inherit-h1, .nectar-inherit-h2, .nectar-inherit-h3 {
  font-family: var(--brand-sans);
  color: var(--burgundy-deep);        /* 10.07:1 */
  font-weight: 400;
  letter-spacing: -0.008em;
}

h1 { letter-spacing: -0.014em; }
h4, h5, h6 { color: var(--ink); }

/* --------------------------------------------------------------------------
   3. Links
   -------------------------------------------------------------------------- */

a { color: var(--burgundy); }                    /* 7.03:1 */
a:hover, a:focus { color: var(--burgundy-deep); } /* 10.07:1 */

/* Body links carry an underline. Colour alone is not a sufficient
   distinguishing signal (WCAG 1.4.1). */
.container-wrap p a,
.container-wrap li a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

/* --------------------------------------------------------------------------
   4. Navigation
   The animated underline. This is the rule that has been overridden by hand;
   with Extra Color #2 set correctly in theme options it should inherit, but
   Salient's dynamic stylesheet lags behind option changes, so the override
   stays until you have confirmed a regenerated salient-dynamic-styles.css.
   -------------------------------------------------------------------------- */

#header-outer[data-lhe="animated_underline"] #top nav > ul > li > a .menu-title-text::after {
  border-color: var(--burgundy) !important;
  border-bottom-width: 2px !important;
}

#header-outer #top nav > ul > li > a { color: var(--ink); }
#header-outer #top nav > ul > li > a:hover { color: var(--burgundy); }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.nectar-button.regular,
.nectar-button.see-through-2,
input[type="submit"],
button {
  font-family: var(--brand-sans);
  letter-spacing: 0.04em;
  border-radius: var(--radius);
}

.nectar-button.regular,
input[type="submit"] {
  background-color: var(--burgundy) !important;
  color: var(--paper) !important;      /* 7.03:1 */
  border: none;
}

.nectar-button.regular:hover,
input[type="submit"]:hover {
  background-color: var(--burgundy-deep) !important;  /* 10.07:1 */
}

/* --------------------------------------------------------------------------
   6. Surfaces
   Sand is a surface, never a text colour. Note that --ink-muted drops to
   4.05:1 on sand and fails for body-size text there — use --ink instead.
   -------------------------------------------------------------------------- */

.sand-surface,
blockquote,
table tbody tr:nth-child(even) {
  background-color: var(--sand);
  color: var(--ink);                   /* 11.97:1 on sand */
}

blockquote {
  border-left: var(--rule-weight) solid var(--burgundy);
  border-radius: 0;                    /* single-sided borders never take a radius */
  padding: 1rem 1.25rem;
  font-style: normal;
}

hr,
.divider-border {
  border: 0;
  border-top: var(--rule-weight) solid var(--burgundy);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   7. Footer and dark sections
   -------------------------------------------------------------------------- */

#footer-outer {
  background-color: var(--ink) !important;
  color: var(--sand);                  /* 11.97:1 */
}

#footer-outer a { color: var(--sand); }
#footer-outer a:hover { color: var(--paper); }
#footer-outer .widget h4 { color: var(--paper); }

/* Never burgundy on ink — it measures 2.12:1 and disappears. */
#footer-outer .brand-period { color: var(--period-on-dark); }  /* 4.45:1 */

/* --------------------------------------------------------------------------
   8. Focus visibility
   Salient themes commonly suppress focus rings. Keyboard users need them
   (WCAG 2.4.7), and the ring must not rely on colour alone.
   -------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--burgundy);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   9. Accent
   -------------------------------------------------------------------------- */

.accent-text { color: var(--sun-deep); }   /* 5.03:1 */
.accent-fill { background-color: var(--sun); color: var(--ink); }  /* 6.89:1 */

/* --------------------------------------------------------------------------
   10. Utilities
   Add these as Extra Class Names on any WPBakery row, column or text block.
   They exist so the remaining palette tokens are reachable without writing
   new CSS every time, and so nobody reaches for a raw hex value.
   -------------------------------------------------------------------------- */

/* Surfaces — pair with ink text only */
.u-bg-sand  { background-color: var(--sand); color: var(--ink); }   /* 11.97:1 */
.u-bg-sky   { background-color: var(--sky);  color: var(--ink); }   /* 12.35:1 */
.u-bg-moss  { background-color: var(--moss); color: var(--ink); }   /*  6.87:1 */
.u-bg-clay  { background-color: var(--clay); color: var(--ink); }   /*  5.79:1 */
.u-bg-ink   { background-color: var(--ink);  color: var(--paper); } /* 14.93:1 */

/* Text */
.u-fir      { color: var(--fir); }          /*  9.70:1 on paper */
.u-muted    { color: var(--ink-muted); }    /*  5.05:1 on paper — not on sand */
.u-subtle   { color: var(--ink-subtle); }   /*  4.54:1 on paper */

/* Rules */
.u-rule-fir { border-top: var(--rule-weight) solid var(--fir); border-radius: 0; }
.u-rule-sun { border-top: var(--rule-weight) solid var(--sun); border-radius: 0; }

/* Inside a tinted surface, muted text no longer clears AA. Force ink. */
.u-bg-sand .u-muted,
.u-bg-sky  .u-muted,
.u-bg-moss .u-muted,
.u-bg-clay .u-muted { color: var(--ink); }

/* --------------------------------------------------------------------------
   11. Motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   12. Print
   Matches the letterhead: burgundy rule above the footer, no dark fields.
   -------------------------------------------------------------------------- */

@media print {
  body { background: #fff; color: #000; font-family: var(--brand-sans); }
  #header-outer, #footer-outer, nav, .nectar-button { display: none !important; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  h1, h2, h3 { color: #000; page-break-after: avoid; }
  blockquote, table { page-break-inside: avoid; }
}
