/* ============================================================
   2Flow — Global Stylesheet
   Covers: variables, reset, nav, mega menus, dropdowns,
           buttons, typography, footer, responsive.
   Page-specific CSS stays in each page's <style> block.
   ============================================================ */

/* Inter Bold — self-hosted for firewall safety and GDPR compliance */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/css/inter-bold.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── VARIABLES ── */
:root {
  --brand-primary:       #5CB800;
  --brand-primary-hover: #4a9200;
  --brand-navy:          #252525;
  --brand-charcoal:      #383838;
  --text-primary:        #111111;
  --text-secondary:      #555555;
  --text-tertiary:       #737373;
  --bg-white:            #ffffff;
  --bg-light:            #F7F9F3;
  --bg-dark:             #252525;
  --border-light:        #E4EBD6;
  --border-medium:       #d1d5db;
  --nav-height:          64px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-white);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; top: -48px; left: 0;
  background: #85B020; color: #fff;
  padding: 8px 16px; font-weight: 600; font-size: 14px;
  z-index: 10000; text-decoration: none;
  border-radius: 0 0 4px 0; transition: top 0.15s;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid #85B020; outline-offset: 2px; }

/* ── TYPOGRAPHY ── */
h1 { font-size: 60px; font-weight: 700; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1; letter-spacing: -0.07em; color: var(--text-primary); }
h2 { font-size: 30px; font-weight: 700; line-height: 1.25; color: var(--text-primary); }
h3 { font-size: 20px; font-weight: 700; line-height: 1.30; color: var(--text-primary); }
h4 { font-size: 16px; font-weight: 700; line-height: 1.40; color: var(--text-primary); }
.section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--brand-primary); margin-bottom: 14px;
}
.section-intro {
  font-size: 17px; color: var(--text-secondary);
  line-height: 1.7; margin-top: 14px; max-width: 600px;
}
.container { max-width: 1080px; margin: 0 auto; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--brand-primary); color: white;
  padding: 13px 28px; border-radius: 6px;
  font-weight: 600; font-size: 15px;
  text-decoration: none; display: inline-block;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--brand-primary-hover); }

.btn-ghost {
  background: transparent; color: var(--text-primary);
  padding: 12px 28px; border-radius: 6px;
  font-weight: 600; font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--border-medium);
  display: inline-block; transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--text-primary); }

.btn-ghost-light { color: white !important; border-color: rgba(255,255,255,0.45) !important; background: rgba(255,255,255,0.12); }
.btn-ghost-light:hover { border-color: white !important; background: rgba(255,255,255,0.20); }

/* ── TOP NAV ── */
#mainNav {
  background: transparent;
  padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height);
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 300;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
#mainNav.nav-scrolled {
  background: var(--bg-white);
  border-bottom-color: var(--border-light);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.nav-logo { text-decoration: none; }
.nav-logo img { height: 36px; width: auto; }
.nav-logo-dark  { display: none; }
.nav-logo-light { display: block; filter: brightness(0) invert(1); }
#mainNav.nav-scrolled .nav-logo-light { display: none; }
#mainNav.nav-scrolled .nav-logo-dark  { display: block; }

.nav-links { display: flex; align-items: stretch; height: var(--nav-height); }
.nav-item  { display: flex; align-items: center; position: static; }
.nav-item > a {
  color: rgba(255,255,255,0.9);
  text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 0 16px; height: var(--nav-height);
  display: flex; align-items: center; gap: 4px;
  transition: color 0.15s; white-space: nowrap;
}
.nav-item > a:hover { color: white; }
#mainNav.nav-scrolled .nav-item > a       { color: var(--text-secondary); }
#mainNav.nav-scrolled .nav-item > a:hover { color: var(--text-primary); }
.nav-item > a.nav-active { color: var(--brand-primary) !important; }

.nav-chevron { font-size: 9px; opacity: 0.6; }
.nav-cta-wrap { display: flex; align-items: center; }
.nav-cta {
  background: var(--brand-primary); color: white !important;
  padding: 9px 20px; border-radius: 6px;
  font-weight: 600; font-size: 14px;
  text-decoration: none; transition: background 0.15s;
}
.nav-cta:hover { background: var(--brand-primary-hover); }

/* hamburger */
.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: white; margin: 5px 0; transition: background 0.25s;
}
#mainNav.nav-scrolled .hamburger span { background: var(--text-primary); }

/* ── MEGA MENUS ── */
.mega-menu {
  display: none; position: fixed; left: 0; right: 0;
  top: var(--nav-height);
  background: white;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  z-index: 200;
}
.mega-menu.active { display: block; }
.mega-inner {
  max-width: 1080px; margin: 0 auto;
  display: grid; padding: 28px 40px;
}
.mega-inner.deliver-grid   { grid-template-columns: repeat(3, 1fr); gap: 0; }
.mega-inner.solutions-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
.mega-inner.why-grid       { grid-template-columns: repeat(4, 1fr); gap: 0; max-width: 900px; }
.mega-col { padding: 0 32px 0 0; }
.mega-col:last-child { padding-right: 0; }
.mega-col-label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 2px solid currentColor;
}
.mega-col-label.green { color: #85B020; }
.mega-col-label.navy  { color: #1A1A1A; }
.mega-col-label.slate { color: #5C6673; }

.mega-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 6px; border-radius: 6px;
  text-decoration: none; transition: background 0.15s;
}
.mega-item:hover { background: var(--bg-light); }
.mega-item.active { background: var(--bg-light); }
.mega-item-icon {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: white;
}
.mega-item-icon.green-bg { background: #85B020; }
.mega-item-icon.navy-bg  { background: #1A1A1A; }
.mega-item-icon.slate-bg { background: #5C6673; }
.mega-item-text h4 {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary); margin: 0 0 2px 0; line-height: 1.3;
}
.mega-item-text p { font-size: 11px; color: var(--text-tertiary); margin: 0; line-height: 1.4; }
.mega-item:hover .mega-item-text h4,
.mega-item.active .mega-item-text h4 { color: var(--brand-primary); }

.mega-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-tertiary);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.mega-link {
  display: block; padding: 8px 0; text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}
.mega-link strong { display: block; font-size: 14px; color: var(--text-primary); font-weight: 500; }
.mega-link:hover strong { color: var(--brand-primary); }
.mega-link.active strong { color: var(--brand-primary); font-weight: 600; }
.mega-link:last-child { border-bottom: none; }

/* ── COMPACT DROPDOWN ── */
.nav-item.has-dropdown { position: relative; }
.dropdown {
  display: none; position: absolute;
  top: var(--nav-height); left: 0;
  background: white; border: 1px solid var(--border-light);
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  padding: 8px 0; min-width: 230px; z-index: 200;
}
.nav-item.has-dropdown:hover .dropdown { display: block; }
.dropdown a {
  display: block; padding: 10px 20px;
  font-size: 14px; color: var(--text-secondary);
  text-decoration: none;
}
.dropdown a:hover { background: var(--bg-light); color: var(--brand-primary); }

/* ── FOOTER ── */
footer { background: #0D0D0D; padding: 56px 40px 32px; }
.footer-inner { max-width: 1080px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand p {
  font-size: 14px; line-height: 1.7;
  margin-top: 16px; max-width: 280px;
  color: rgba(255,255,255,0.55);
}
.footer-social { margin-top: 20px; }
.footer-social a { color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.15s; }
.footer-social a:hover { color: var(--brand-primary); }
.footer-col h5 {
  font-size: 12px; font-weight: 700; color: white;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
.footer-subhead {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.28);
  margin: 14px 0 4px;
}
.footer-col h5 + .footer-subhead { margin-top: 0; }
.footer-col a {
  display: block; font-size: 13px;
  color: rgba(255,255,255,0.5); text-decoration: none;
  padding: 3px 0; transition: color 0.15s;
}
.footer-col a:hover { color: var(--brand-primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.35); text-decoration: none; }
.footer-bottom a:hover { color: white; }
.footer-bottom-links { display: flex; gap: 24px; }

/* ── FOOTER ADDRESS BLOCK ── */
.footer-address { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-address h5 { margin-bottom: 8px; }
.footer-address address {
  font-style: normal;
  font-size: 13px; line-height: 1.7;
  color: rgba(255,255,255,0.45);
}
.footer-contact-line {
  margin-top: 12px;
  font-size: 13px; line-height: 1.8;
  color: rgba(255,255,255,0.45);
}
.footer-contact-line a {
  color: rgba(255,255,255,0.55) !important;
  padding: 0 !important;
  display: inline !important;
}
.footer-contact-line a:hover { color: var(--brand-primary) !important; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  h1 { font-size: 36px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  #mainNav { padding: 0 20px; }
  .hamburger { display: block; }
  .nav-links {
    display: none; position: fixed;
    top: var(--nav-height); left: 0; right: 0; bottom: 0;
    background: #111111; flex-direction: column;
    padding: 20px; height: auto; overflow-y: auto;
    z-index: 250; align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-item { width: 100%; }
  .nav-item > a {
    color: white !important; height: auto;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
  }
  .mega-menu   { display: none !important; }
  .mega-menu.mob-open {
    display: block !important;
    position: static; box-shadow: none;
    background: rgba(255,255,255,0.05);
    border-radius: 8px; margin: 4px 0 8px;
    padding: 0;
  }
  .mega-menu.mob-open .mega-inner {
    display: flex; flex-direction: column;
    padding: 8px 12px; gap: 0;
  }
  .mega-menu.mob-open .mega-col { padding: 0; }
  .mega-menu.mob-open .mega-col-label,
  .mega-menu.mob-open .mega-group-title {
    font-size: 10px; padding: 10px 8px 4px;
    opacity: 0.6; letter-spacing: 0.08em;
  }
  .mega-menu.mob-open .mega-item {
    padding: 8px; border-radius: 6px;
  }
  .mega-menu.mob-open .mega-item-text h4 { color: white; font-size: 13px; }
  .mega-menu.mob-open .mega-item-text p  { display: none; }
  .mega-menu.mob-open .mega-link { padding: 8px; }
  .mega-menu.mob-open .mega-link strong { color: white; }
  .nav-cta-wrap { display: none; }
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
