/* ==========================================================================
   TrueWinds site chrome: the one header and footer for every page on the site
   (the redesigned pages and the ones not yet rebuilt). Shipped by the
   "TrueWinds Site Chrome" WordPress plugin, built by tools/wp_chrome.py.

   Every rule is scoped to #tw-chrome / #tw-menu / #tw-footer and every class is
   tw- prefixed, so Flatsome, Elementor, and the redesigned pages' own styles can
   neither leak in nor be leaked into. Values mirror src/base.css.
   ========================================================================== */

#tw-chrome, #tw-menu, #tw-footer {
  --tw-navy: #0B2B4C; --tw-midnight: #071F38; --tw-canvas: #F8F5EC; --tw-white: #FFFDF7;
  --tw-sun: #33CCCC; --tw-sun-deep: #1E9E9E; --tw-grass: #4E9F2F; --tw-fog: #DEDACC;
  --tw-ink: #1E3048; --tw-on-dark-muted: #9FB1C1;
  --tw-display: 'Bricolage Grotesque', 'Arial Black', sans-serif;
  --tw-sans: 'Source Sans 3', -apple-system, 'Segoe UI', sans-serif;
  --tw-wrap: 1220px; --tw-nav-h: 88px;
}
/* reset inside the chrome: themes style bare a, ul, li, button, h2, p, img */
#tw-chrome *, #tw-menu *, #tw-footer * {
  box-sizing: border-box; margin: 0; padding: 0; border: 0; background: none; box-shadow: none;
  text-transform: none; letter-spacing: normal; text-decoration: none; text-shadow: none;
  font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit;
  min-height: 0; max-width: none; float: none; list-style: none;
}
#tw-chrome :focus-visible, #tw-footer :focus-visible { outline: 3px solid #0E7C7C; outline-offset: 3px; border-radius: 4px; }
#tw-menu :focus-visible, #tw-footer :focus-visible { outline-color: var(--tw-sun); }

/* skip link */
#tw-chrome .tw-skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 100001;
  background: var(--tw-navy); color: var(--tw-white); font-family: var(--tw-display); font-weight: 700; font-size: 16px;
  padding: 12px 18px; border-radius: 8px;
}
#tw-chrome .tw-skip-link:focus-visible { top: 12px; }

/* ============ HEADER ============ */
#tw-chrome .tw-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99990; height: var(--tw-nav-h);
  background: rgba(255,253,247,0.97); border-bottom: 3px solid var(--tw-fog);
  font-family: var(--tw-sans); line-height: 1.4;
  transition: height 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
#tw-chrome .tw-nav.is-scrolled { height: 78px; border-bottom-color: var(--tw-sun); box-shadow: 0 10px 24px -16px rgba(11,43,76,0.35); }
#tw-chrome .tw-nav-inner { max-width: var(--tw-wrap); margin: 0 auto; padding: 0 28px; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
#tw-chrome .tw-logo, #tw-footer .tw-logo { display: flex; align-items: center; gap: 12px; }
#tw-chrome .tw-logo-badge { width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
#tw-chrome .tw-logo-badge img, #tw-footer .tw-logo-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
#tw-chrome .tw-logo-name, #tw-footer .tw-logo-name { font-family: var(--tw-display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; display: flex; flex-direction: column; line-height: 1.02; color: var(--tw-navy); }
#tw-chrome .tw-logo-line2, #tw-footer .tw-logo-line2 { font-size: 11px; font-weight: 700; letter-spacing: 4.9px; margin-right: -4.9px; text-transform: uppercase; margin-top: 3px; }
#tw-chrome .tw-nav-links { display: flex; gap: 8px; }
#tw-chrome .tw-nav-links a {
  font-family: var(--tw-display); font-size: 17.5px; font-weight: 600; color: var(--tw-ink); white-space: nowrap;
  padding: 9px 15px; border-radius: 8px; display: inline-flex; min-height: 44px; align-items: center;
  transition: background-color 0.18s ease, color 0.18s ease;
}
#tw-chrome .tw-nav-links a:hover { background: var(--tw-sun); color: var(--tw-navy); }
#tw-chrome .tw-nav-links a[aria-current] { color: var(--tw-navy); font-weight: 700; box-shadow: inset 0 -3px 0 0 var(--tw-grass); border-radius: 8px 8px 0 0; }
#tw-chrome .tw-btn, #tw-menu .tw-btn {
  font-family: var(--tw-display); font-weight: 700; font-size: 16px; letter-spacing: 0.01em; white-space: nowrap;
  padding: 11px 22px; min-height: 48px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--tw-sun); color: var(--tw-navy); box-shadow: 0 4px 0 0 var(--tw-sun-deep); cursor: pointer;
  transition: box-shadow 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}
#tw-chrome .tw-btn:hover, #tw-menu .tw-btn:hover { background: #5CD9D9; color: var(--tw-navy); box-shadow: 0 6px 0 0 var(--tw-sun-deep), 0 14px 30px -10px rgba(51,204,204,0.45); }
#tw-chrome .tw-btn:active, #tw-menu .tw-btn:active { box-shadow: 0 1px 0 0 var(--tw-sun-deep); transform: translateY(3px); }
#tw-chrome .tw-nav-burger { display: none; width: 50px; height: 50px; border: 2px solid rgba(11,43,76,0.4); border-radius: 8px; cursor: pointer; place-items: center; align-content: center; justify-items: center; }
#tw-chrome .tw-nav-burger:hover { border-color: var(--tw-navy); }
#tw-chrome .tw-nav-burger span { display: block; width: 22px; height: 3px; background: var(--tw-navy); border-radius: 2px; margin: 2.5px 0; transition: transform 0.25s ease, opacity 0.25s ease; }
#tw-chrome .tw-nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
#tw-chrome .tw-nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#tw-chrome .tw-nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* mobile menu */
#tw-menu { position: fixed; inset: 0; z-index: 99980; background: var(--tw-midnight); display: none; flex-direction: column; justify-content: safe center; padding: 110px 34px 44px; overscroll-behavior: contain; overflow-y: auto; font-family: var(--tw-sans); line-height: 1.4; }
#tw-menu.is-open { display: flex; }
#tw-menu .tw-m-link { font-family: var(--tw-display); font-weight: 800; font-size: clamp(34px, 9vw, 48px); color: var(--tw-canvas); padding: 10px 0; line-height: 1.1; }
#tw-menu .tw-m-link:hover, #tw-menu .tw-m-link[aria-current] { color: var(--tw-sun); }
#tw-menu .tw-btn { margin-top: 30px; align-self: flex-start; font-size: 18px; padding: 17px 34px; }
#tw-menu .tw-m-mail { margin-top: 22px; color: var(--tw-on-dark-muted); font-size: 16.5px; }
#tw-menu .tw-m-mail a { color: var(--tw-sun); text-decoration: underline; text-underline-offset: 3px; }

/* ============ FOOTER ============ */
#tw-footer { display: block; clear: both; }
#tw-footer .tw-site-footer { background: var(--tw-midnight); color: var(--tw-on-dark-muted); padding: 68px 0 44px; font-family: var(--tw-sans); font-size: 16.5px; line-height: 1.65; }
#tw-footer .tw-wrap { max-width: var(--tw-wrap); margin: 0 auto; padding: 0 28px; }
#tw-footer .tw-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 52px; }
#tw-footer h2 { font-family: var(--tw-display); font-size: 14px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tw-sun); margin-bottom: 16px; line-height: 1.3; }
#tw-footer li { padding: 3px 0; }
#tw-footer .tw-foot-grid a:not(.tw-logo) { color: var(--tw-on-dark-muted); display: inline-flex; min-height: 32px; align-items: center; overflow-wrap: anywhere; }
#tw-footer .tw-foot-grid a:not(.tw-logo):hover { color: var(--tw-sun); text-decoration: underline; text-underline-offset: 3px; }
#tw-footer .tw-foot-brand p { max-width: 34ch; margin-top: 14px; color: var(--tw-on-dark-muted); }
#tw-footer .tw-logo-badge { width: 48px; height: 48px; flex: none; background: var(--tw-white); border-radius: 10px; padding: 3px; display: grid; place-items: center; }
#tw-footer .tw-logo-name { color: var(--tw-canvas); }
#tw-footer .tw-logo-name .tw-winds { color: var(--tw-sun); }
#tw-footer .tw-foot-bottom { border-top: 1px solid rgba(159,177,193,0.25); padding-top: 26px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ============ PAGE INTEGRATION ============ */
/* pages not built on the canvas template start under the fixed header */
body.tw-chrome-on:not(.elementor-template-canvas) { padding-top: 88px; }
/* the old Elementor header and footer are replaced, not stacked */
body.tw-chrome-on .elementor-location-header, body.tw-chrome-on .elementor-location-footer,
body.tw-chrome-on [data-elementor-type="header"], body.tw-chrome-on [data-elementor-type="footer"] { display: none !important; }
/* logged-in editors: sit below the admin bar */
body.admin-bar #tw-chrome .tw-nav { top: 32px; }
body.admin-bar #tw-menu { top: 32px; }
@media (max-width: 782px) { body.admin-bar #tw-chrome .tw-nav, body.admin-bar #tw-menu { top: 46px; } }

/* ============ RESPONSIVE (matches base.css) ============ */
@media (max-width: 1279px) {
  #tw-chrome .tw-nav-links { gap: 2px; }
  #tw-chrome .tw-nav-links a { padding: 9px 11px; font-size: 16.5px; }
  #tw-chrome .tw-nav .tw-btn { padding: 11px 18px; }
}
@media (max-width: 1139px) {
  #tw-chrome .tw-nav-links { display: none; }
  #tw-chrome .tw-nav-burger { display: grid; }
}
@media (max-width: 1100px) { #tw-footer .tw-foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) {
  #tw-chrome { --tw-nav-h: 78px; }
  body.tw-chrome-on:not(.elementor-template-canvas) { padding-top: 78px; }
}
@media (max-width: 560px) {
  #tw-chrome .tw-nav-inner, #tw-footer .tw-wrap { padding-left: 20px; padding-right: 20px; }
  #tw-chrome .tw-nav .tw-btn { display: none; }
  #tw-footer .tw-foot-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  #tw-chrome *, #tw-menu * { transition-duration: 0.01ms !important; }
}
@media print { #tw-chrome, #tw-menu { display: none !important; } body.tw-chrome-on { padding-top: 0 !important; } }
