/* ==========================================================================
   Agileworks Group Design System
   Version: 2.0.0 (May 2026)
   Warm Parchment + Engineering Charcoal. Work Sans throughout.
   Copper primary · Amber secondary · Navy (Connect) · Green (Finance)
   ========================================================================== */

:root {
  /* Parchment — primary light */
  --parchment: #F4F0E5;
  --parchment-warm: #EEE9DC;
  --parchment-cool: #F7F4EC;
  --parchment-near-white: #FBF9F3;

  /* Charcoal — primary dark */
  --charcoal: #323230;
  --charcoal-light: #4A4A47;
  --charcoal-deep: #1F1F1E;
  --charcoal-surface: #2A2A28;

  --border-light: #E6E1D4;
  --border-charcoal: #4A4A47;

  /* Copper — primary brand accent, Consult pillar, CTAs */
  --copper: #BE5D03;
  --copper-light-1: #C9702F;
  --copper-light-2: #E4BC9C;
  --copper-dim: #AB4903;
  --copper-glow: rgba(190, 93, 3, 0.12);

  /* Amber — secondary accent, used portfolio-wide */
  --amber: #F6B239;
  --amber-bright: #f8c66a;
  --amber-dim: #e39e2f;
  --amber-glow: rgba(246, 178, 57, 0.12);

  /* Navy — Connect pillar */
  --navy: #223C61;
  --navy-bright: #3F5599;
  --navy-dim: #1F2A5A;
  --navy-glow: rgba(34, 60, 97, 0.12);

  /* Green — Finance pillar */
  --green: #006E41;
  --green-bright: #307D61;
  --green-dim: #00583A;
  --green-glow: rgba(0, 110, 65, 0.12);

  /* Text */
  --text-dark: #323230;
  --text-mid: #6A6A66;
  --text-light: #8B8B86;
  --text-on-charcoal: #F4F0E5;
  --text-muted-charcoal: #8B8B86;

  /* Pillars */
  --pillar-consult: #BE5D03;
  --pillar-connect: #223C61;
  --pillar-finance: #006E41;

  /* Typography */
  --font-display: 'Work Sans', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 40px; --sp-6: 48px; --sp-8: 64px; --sp-10: 80px;
  --sp-12: 96px; --sp-16: 128px;

  /* Layout */
  --max-width: 1200px;
  --radius: 10px;
  --radius-box: 15px;
}

/* ====== RESET ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px; font-weight: 400; line-height: 1.65;
  color: var(--text-dark); background: var(--parchment);
  overflow-x: hidden;
}

/* Grain texture */
body::before {
  content: ''; position: fixed; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 9999; opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-dark); }
p { max-width: 68ch; }
.sec-header p, .ps-header p, .eco-intro p { max-width: none; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--sp-8); }

/* ====== HEADER ====== */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: 72px;
  background: rgba(31, 31, 30, 0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-charcoal); z-index: 100;
}
.header .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { height: 44px; width: auto; }
.nav { display: flex; gap: var(--sp-3); align-items: center; }
.nav a { font-size: 14px; color: var(--text-muted-charcoal); font-weight: 500; }
.nav a:hover { color: var(--copper-light-1); }
.nav a.btn-copper { color: #000; }
.nav a.btn-copper:hover { color: #000; }

/* ====== NAV DROPDOWN ====== */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 14px; color: var(--text-muted-charcoal); font-weight: 500;
  font-family: var(--font-body); display: flex; align-items: center; gap: 5px;
}
.nav-dropdown-toggle:hover { color: var(--copper-light-1); }
.nav-dropdown-toggle svg { transition: transform 0.2s; flex-shrink: 0; }
.nav-dropdown.active .nav-dropdown-toggle svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: 50%; margin-left: -110px;
  background: var(--charcoal-deep); border: 1px solid var(--border-charcoal);
  border-radius: var(--radius-box); padding: 6px; min-width: 220px;
  z-index: 200; opacity: 0; pointer-events: none;
  transform: translateY(-6px); transition: opacity 0.15s, transform 0.15s;
}
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.nav-dropdown-menu a {
  display: flex; flex-direction: column; padding: 10px 12px;
  border-radius: var(--radius); gap: 1px; color: var(--text-muted-charcoal);
}
.nav-dropdown-menu a:hover { background: var(--border-charcoal); color: var(--text-on-charcoal); }
.nav-dropdown-menu .dd-sub { font-size: 11px; color: var(--text-muted-charcoal); font-weight: 400; opacity: 0.7; }
.nav-dropdown-menu a:hover .dd-sub { opacity: 1; }

/* ====== MOBILE HAMBURGER ====== */
.nav-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-muted-charcoal); padding: 6px; border-radius: var(--radius);
}
.nav-hamburger:hover { color: var(--text-on-charcoal); }

/* ====== NAV OVERLAY ====== */
.nav-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.55);
  z-index: 97; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

/* ====== NAV DRAWER (slide in from right) ====== */
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 300px; max-width: 85vw;
  background: var(--charcoal-deep);
  border-left: 1px solid var(--border-charcoal);
  z-index: 98;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: var(--sp-5) var(--sp-4) var(--sp-8);
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-charcoal);
}
.nav-drawer-head img { height: 36px; width: auto; }
.nav-drawer-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted-charcoal); padding: 6px;
  border-radius: var(--radius); line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.nav-drawer-close:hover { color: var(--text-on-charcoal); }

.nav-drawer-section {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted-charcoal);
  padding: var(--sp-3) 0 var(--sp-1);
  margin-top: var(--sp-2);
}

.nav-drawer-link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 11px 0; font-size: 15px; font-weight: 600;
  color: var(--text-muted-charcoal);
  text-decoration: none;
}
.nav-drawer-link:hover { color: var(--text-on-charcoal); }

.nav-drawer-sub {
  font-size: 12px; font-weight: 400; font-family: var(--font-body);
  color: var(--text-muted-charcoal); opacity: 0.65;
}

.nav-drawer-cta {
  margin-top: var(--sp-5);
}
.nav-drawer-cta .btn {
  display: block; text-align: center; width: 100%; height: auto; padding: 14px;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 var(--sp-3);
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; transition: all 0.2s;
  border-radius: var(--radius);
}
.btn-copper { background: var(--copper); color: #000; font-weight: 700; }
.btn-copper:hover { background: var(--copper-light-2); color: #000; }
.btn-outline-light { background: transparent; color: var(--text-on-charcoal); border: 1px solid var(--border-charcoal); }
.btn-outline-light:hover { border-color: var(--copper-light-1); color: var(--copper-light-1); }
.btn-outline { background: transparent; color: var(--text-dark); border: 1px solid var(--border-light); }
.btn-outline:hover { border-color: var(--copper-light-1); color: var(--copper-light-1); }
.btn-lg { height: 52px; padding: 0 var(--sp-5); font-size: 15px; }

/* ====== CTA SECTION ====== */
.cta-section {
  padding: var(--sp-16) 0;
  background: var(--charcoal-deep); color: var(--text-on-charcoal);
  text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(190, 93, 3, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section .container { position: relative; z-index: 1; }
.cta-section h2 {
  font-size: 42px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-on-charcoal); margin-bottom: var(--sp-3);
}
.cta-section p { color: var(--text-muted-charcoal); font-size: 18px; margin: 0 auto var(--sp-6); max-width: 100%; }
.cta-buttons { display: flex; justify-content: center; gap: var(--sp-2); flex-wrap: wrap; }

/* ====== FOOTER ====== */
.footer {
  padding: var(--sp-8) 0;
  background: var(--charcoal-deep); color: var(--text-muted-charcoal);
  border-top: 1px solid var(--border-charcoal);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-8); margin-bottom: var(--sp-6); }
.footer-logo {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  color: var(--text-on-charcoal); margin-bottom: var(--sp-2); letter-spacing: 0.04em;
}
.footer-tagline { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted-charcoal); margin-bottom: var(--sp-3); }
.footer-brand p { font-size: 14px; color: var(--text-muted-charcoal); line-height: 1.55; max-width: 300px; }
.footer h4 { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--text-on-charcoal); margin-bottom: var(--sp-2); text-transform: uppercase; letter-spacing: 0.06em; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { font-size: 14px; color: var(--text-muted-charcoal); }
.footer a:hover { color: var(--copper-light-1); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--sp-4); border-top: 1px solid var(--border-charcoal);
  font-size: 13px;
}
.footer-bottom a { color: var(--text-muted-charcoal); }
.footer-legal { display: flex; gap: var(--sp-3); }

/* ====== ACCESSIBILITY ====== */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.skip-link { position: absolute; top: -100px; left: var(--sp-2); padding: var(--sp-2); background: var(--copper); border-radius: var(--radius); color: var(--text-on-charcoal); z-index: 1000; font-family: var(--font-body); }
.skip-link:focus { top: var(--sp-2); }

/* ====== RESPONSIVE BASE ====== */
@media (max-width: 1024px) {
  .container { padding: 0 var(--sp-5); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
  .cta-section h2 { font-size: 34px; }
  .nav .nav-link { display: none; }
  .nav-dropdown { display: none; }
  .nav > .btn-copper { display: none; }
  .nav-hamburger { display: flex; align-items: center; justify-content: center; }
}
@media (max-width: 640px) {
  .container { padding: 0 var(--sp-3); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .footer-bottom { flex-direction: column; gap: var(--sp-2); text-align: center; }
  .nav { gap: var(--sp-2); }
  .cta-section h2 { font-size: 28px; }
}
