/* ==========================================================================
   Nelson Funding Custom: tokens, reset, type, layout, header, footer.
   Values come from measurements of the Elementor site (theme-redo/audit/measure-el).
   Approved changes from the old site: one container width (1300px), one green,
   and companion colours where the brand green failed contrast.
   ========================================================================== */

:root {
  /* Brand */
  --c-charcoal: #2E2E2E;
  --c-navy: #1B1E2A;
  --c-navy-deep: #13161F;
  --c-navy-card: #232936;
  --c-green: #4F772E;          /* brand green: backgrounds, large headings on light */
  --c-green-hover: #355E3B;
  --c-green-on-dark: #6DA43F;  /* companion: green text and controls on charcoal or navy (4.5:1) */
  --c-gold: #D4AF37;
  --c-white: #FFFFFF;
  --c-black: #000000;

  /* Surfaces */
  --c-panel: #ECF0F0;
  --c-panel-2: #EFEFEF;
  --c-panel-3: #F3F4F6;
  --c-line: #E5E7EB;

  /* Text */
  --c-text: #333333;
  --c-heading: #2E2E2E;
  --c-muted: #555555;
  --c-muted-on-dark: #B0B0B0;

  /* Type */
  --f-head: "Oswald", "Arial Narrow", sans-serif;
  --f-body: "Montserrat", system-ui, sans-serif;
  --fs-h1: 42px;
  --fs-h2: 45px;
  --fs-h3: 28px;
  --fs-body: 18px;

  /* Layout */
  --container: 1300px;
  --gutter: 24px;
  --section-y: 75px;
  --radius: 9px;
  --shadow-bar: 1px 1px 9px #000;
  --header-h: 119px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-charcoal);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
p { margin: 0 0 14px; }
table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-weight: 400; color: var(--c-heading); margin: 0 0 20px; line-height: 1.1; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); font-weight: 500; line-height: 60px; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 18px; font-weight: 500; line-height: 1.2; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip-path: none; position: fixed !important; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; margin: 0; padding: 12px 18px; clip: auto;
  background: var(--c-white); color: var(--c-charcoal); font-weight: 700; text-decoration: none; border-radius: 4px;
}
:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }

/* ---------- Layout scaffolding: section > container > content ---------- */
.site-main { display: block; background: var(--c-white); }
.section { padding: var(--section-y) 0; position: relative; }
.section--plain { background: var(--c-white); }
.section--panel { background: var(--c-panel); }
.section--panel-2 { background: var(--c-panel-2); }
.section--panel-3 { background: var(--c-panel-3); }
.section--dark { background: var(--c-charcoal); color: var(--c-white); }
.section--navy { background: var(--c-navy); color: var(--c-white); }
.section--green { background: var(--c-green); color: var(--c-white); }
.section--dark :is(h1, h2, h3, h4, h5, h6),
.section--navy :is(h1, h2, h3, h4, h5, h6),
.section--green :is(h1, h2, h3, h4, h5, h6) { color: var(--c-white); }
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(900px + 2 * var(--gutter)); }
.text-center { text-align: center; }

.prose { font-size: var(--fs-body); line-height: 1.5; }
.prose a { color: var(--c-green); text-decoration: underline; }
/* Long URLs in body copy wrap instead of pushing past the column on phones. */
.site-main p a, .site-main li a { overflow-wrap: anywhere; }
.section--dark .prose a, .section--navy .prose a { color: var(--c-white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 15px; border: 0; border-radius: 0;
  font-family: var(--f-body); font-size: 18px; font-weight: 400; line-height: 1; text-decoration: none; text-align: center;
  background: var(--c-green); color: var(--c-white); transition: background-color .3s, color .3s;
}
.btn:hover, .btn:focus-visible { background: var(--c-green-hover); color: var(--c-white); }
.btn--light { background: var(--c-white); color: var(--c-charcoal); }
.btn--light:hover, .btn--light:focus-visible { background: var(--c-panel); color: var(--c-charcoal); }
.btn--outline { background: transparent; color: var(--c-green); box-shadow: inset 0 0 0 2px var(--c-green); }
.btn--outline:hover, .btn--outline:focus-visible { background: var(--c-green); color: var(--c-white); }
.btn i { font-size: .95em; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 100; }
.site-header__bar { background: var(--c-charcoal); box-shadow: var(--shadow-bar); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 20px; }
.site-header__logo { display: block; padding: 24px 55px; flex: 0 0 auto; }
.site-header__logo img { width: 146px; height: auto; }
.site-header__call { font-family: var(--f-head); font-size: 32px; font-weight: 500; color: var(--c-white); text-decoration: none; }

.primary-nav { margin-left: auto; }
.primary-nav__list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.primary-nav__list > li { position: relative; display: flex; align-items: center; }
.primary-nav__list > li > a {
  display: block; padding: 13px 12px; font-size: 15px; font-weight: 600; line-height: 20px; color: var(--c-white); text-decoration: none; white-space: nowrap;
  transition: color .3s;
}
.primary-nav__list > li > a:hover,
.primary-nav__list > li.current-menu-item > a,
.primary-nav__list > li.current-menu-ancestor > a,
.primary-nav__list > li.current_page_parent > a { color: var(--c-green-on-dark); }
.primary-nav .submenu-toggle { background: none; border: 0; padding: 13px 10px 13px 0; margin-left: -4px; color: inherit; font-size: 13px; line-height: 20px; }
.primary-nav__list > li { color: var(--c-white); }
.primary-nav__list > li.current-menu-item, .primary-nav__list > li.current-menu-ancestor { color: var(--c-green-on-dark); }
.primary-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 260px; margin: 0; padding: 0; list-style: none; background: var(--c-white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 5;
}
.primary-nav li:hover > .sub-menu, .primary-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { display: block; padding: 13px 20px; font-size: 16px; font-weight: 500; line-height: 20px; color: #33373D; text-decoration: none; white-space: nowrap; }
.primary-nav .sub-menu a:hover, .primary-nav .sub-menu .current-menu-item > a { background: var(--c-green); color: var(--c-white); }
/* Third level flies out to the right of its parent row. */
.primary-nav .sub-menu li { position: relative; display: flex; align-items: stretch; color: #33373D; }
.primary-nav .sub-menu li > a { flex: 1 1 auto; }
.primary-nav .sub-menu .submenu-toggle { margin: 0; padding: 0 14px; color: inherit; }
.primary-nav .sub-menu .submenu-toggle i { transform: rotate(-90deg); }
.primary-nav .sub-menu li:hover, .primary-nav .sub-menu li:focus-within { background: var(--c-green); color: var(--c-white); }
.primary-nav .sub-menu li:hover > a, .primary-nav .sub-menu li:focus-within > a { color: var(--c-white); }
.primary-nav .sub-menu .sub-menu { top: 0; left: 100%; transform: translateX(6px); }
.primary-nav .sub-menu li:hover > .sub-menu, .primary-nav .sub-menu li.is-open > .sub-menu { transform: none; }

.menu-toggle { background: none; border: 0; padding: 4px 25px 4px 10px; display: inline-flex; align-items: center; color: var(--c-green-on-dark); font-size: 32px; line-height: 1; }

/* Tablet and desktop: the bar scrolls away with the page, then slides back down once the visitor is past the fold
   (site.js adds .is-stuck). The header element keeps its height so the page does not jump when the bar lifts out. */
@media (min-width: 768px) {
  .site-header { min-height: var(--header-h); }
  .site-header.is-stuck .site-header__bar { position: fixed; top: 0; left: 0; right: 0; animation: nfc-bar-in .3s ease both; }
}
/* Below desktop the inline menu gives way to the slide-out panel. */
@media (max-width: 1024px) {
  .primary-nav { display: none; }
  .menu-toggle { margin-left: auto; }
}
/* Home on desktop: transparent over the hero until scrolled. */
@media (min-width: 1025px) {
  .has-overlay-header .site-header { position: absolute; top: 0; left: 0; right: 0; }
  .has-overlay-header .site-header__bar { background: transparent; box-shadow: none; padding-top: 25px; }
  .has-overlay-header .site-header.is-stuck .site-header__bar { background: var(--c-charcoal); box-shadow: var(--shadow-bar); padding-top: 0; }
}
@keyframes nfc-bar-in { from { transform: translateY(-100%); } to { transform: none; } }
@media (max-width: 767px) {
  :root { --header-h: 100px; }
  .site-header__logo { padding: 15px 10px 15px 0; }
  .site-header__logo img { width: 126px; }
  .site-header__call { font-size: 22px; }
}

/* ---------- Slide-out menu ---------- */
.drawer { position: fixed; inset: 0; z-index: 200; }
.drawer[hidden] { display: none; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .8); opacity: 0; transition: opacity .5s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 29vw; min-width: 351px; max-width: 100vw; overflow-y: auto; padding: 0 10px 40px;
  background: var(--c-charcoal); color: var(--c-white); transform: translateX(100%); transition: transform .5s ease;
}
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer-open { overflow: hidden; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 40px 20px 30px 30px; }
.drawer__logo img { width: 150px; }
.drawer__close { background: none; border: 0; color: var(--c-white); font-size: 33px; line-height: 1; padding: 4px; }
.drawer-nav__list, .drawer-nav .sub-menu { list-style: none; margin: 0; padding: 0; }
.drawer-nav__list { padding: 0 30px; }
.drawer-nav__list > li { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 12px; border: 1px solid transparent; border-radius: var(--radius); }
.drawer-nav a { display: block; padding: 10px 20px; font-size: 21px; font-weight: 600; line-height: 20px; color: var(--c-white); text-decoration: none; }
.drawer-nav__list > li:hover, .drawer-nav__list > li:focus-within { border-color: var(--c-white); }
.drawer-nav__list > li.current-menu-item, .drawer-nav__list > li.current-menu-ancestor { background: var(--c-green); border-color: var(--c-white); }
.drawer-nav .submenu-toggle { background: none; border: 0; color: var(--c-white); font-size: 14px; padding: 10px; margin-left: -12px; transition: transform .2s; }
.drawer-nav li.is-open > .submenu-toggle { transform: rotate(180deg); }
.drawer-nav .sub-menu { display: none; flex: 0 0 calc(100% - 19px); margin-left: 19px; padding-bottom: 6px; }
.drawer-nav li.is-open > .sub-menu { display: block; }
.drawer-nav .sub-menu a { padding: 18px 20px; font-size: 18px; font-weight: 500; }
.drawer-nav .sub-menu a:hover { text-decoration: underline; }
.drawer-nav .sub-menu li { display: flex; flex-wrap: wrap; align-items: center; }
.drawer-nav .sub-menu .sub-menu a { padding: 12px 20px; font-size: 16px; font-weight: 400; }
.drawer__contact { padding: 30px 30px 0 55px; font-size: 15px; line-height: 1.5; color: #FCFCFC; }
.drawer__contact a { display: inline-block; padding: 4px 0; color: var(--c-white); text-decoration: none; }
.drawer__contact p:nth-child(2) a { font-size: 18px; }
.drawer__social { display: inline-block; font-size: 29px; margin-top: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-charcoal); color: var(--c-white); }
.site-footer__main { padding: 70px 0 0; border-bottom: 1px solid var(--c-white); }
.site-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr; align-items: center; padding-top: 34px; padding-bottom: 35px; }
.site-footer__heading { font-size: 32px; line-height: 32px; font-weight: 500; color: var(--c-white); margin: 0 0 20px 35px; }
.footer-nav { list-style: none; margin: 0; padding: 0 0 0 10px; display: flex; flex-wrap: wrap; }
.footer-nav li { min-width: 200px; }
.footer-nav a { display: block; padding: 10px 27px; font-size: 13px; line-height: 10px; color: var(--c-white); text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.site-footer__brand { display: flex; align-items: center; gap: 25px; padding: 10px 25px; }
.site-footer__brand img { width: 126px; }
.site-footer__social { font-size: 29px; color: var(--c-white); text-decoration: none; }
.site-footer__contact { padding: 10px 20px; font-size: 15px; line-height: 22.5px; color: #FCFCFC; }
.site-footer__call { font-family: var(--f-head); font-size: 25px; line-height: 33px; font-weight: 400; margin: 0 0 20px; }
.site-footer__call a { color: var(--c-white); text-decoration: none; }
.site-footer__legal { padding: 28px 0 60px; text-align: center; font-size: 10px; line-height: 15px; }
.site-footer__legal p { margin: 0 0 14px; }
.site-footer__notice { background: #F4F4F5; color: #555; border-top: 1px solid var(--c-line); padding: 12px 0; font-size: 13px; font-weight: 600; line-height: 1.5; text-align: center; }

@media (max-width: 767px) {
  .site-footer__cols { grid-template-columns: 1fr; gap: 10px; padding-top: 20px; }
  .site-footer__heading { margin-left: 20px; }
  .footer-nav { display: block; }
  .site-footer__brand { padding-left: 20px; }
  .drawer__panel { width: 90vw; min-width: 0; }
  .drawer__head { padding-left: 30px; }
  h2 { font-size: 34px; line-height: 1.2; }
  :root { --section-y: 50px; }
}

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