/* ============================================
   EMP2 — Global Styles
   Modern energy-engineering site
   Design system adapted from a clean consulting
   layout; palette per client brand colors.
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette */
  --coal:    #23312A;  /* darkest green — headings, footer */
  --forest:  #355247;  /* dark green — primary actions */
  --sage:    #6A8678;  /* medium green — secondary accents */
  --sky:     #A2CD3D;  /* logo bright green — highlight / accent */
  --cream:   #F4F4F1;  /* off-white — alt sections, page bg */
  --mist:    #C3CDC7;  /* muted green-gray — borders */

  /* Derived neutrals for readable text (tuned to palette) */
  --white:   #ffffff;
  --gray-100:#F4F4F1;
  --gray-200:#C3CDC7;
  --gray-400:#93a49b;
  --gray-600:#566a61;
  --gray-800:#2c3a33;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-pad: 6rem 2rem;
  --container: 1100px;

  /* Transitions */
  --ease: cubic-bezier(.25,.46,.45,.94);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--coal);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { max-width: 68ch; }

.section-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--sky);
  margin-bottom: 0.75rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow 0.3s var(--ease);
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(35,49,42,0.08); }

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--coal);
  display: inline-flex;
  align-items: center;
}
.nav-logo span { color: var(--sky); }

/* Logo image */
.logo-img { height: 46px; width: auto; display: block; }
.footer-logo .logo-img { height: 54px; }

.nav-menu { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--coal); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--sky);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--coal); margin: 5px 0;
  transition: all 0.3s var(--ease);
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed; top: 72px; left: 0; right: 0;
    background: var(--white);
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    transform: translateY(-130%);
    transition: transform 0.3s var(--ease);
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }
  .nav-menu.open { transform: translateY(0); display: flex; }
  .nav-links { flex-direction: column; gap: 1.25rem; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.8rem 1.8rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn-primary {
  background: var(--forest);
  color: var(--white);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--coal);
  box-shadow: 0 6px 20px rgba(53,82,71,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--coal);
  border: 2px solid var(--gray-200);
}
.btn-outline:hover {
  border-color: var(--sky);
  color: var(--sky);
}
.btn svg { width: 16px; height: 16px; }

/* --- Hero --- */
.hero {
  padding: 10rem 2rem 6rem;
  min-height: 82vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 85% 15%, rgba(162,205,61,0.14), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(106,134,120,0.12), transparent 45%),
    var(--cream);
}
.hero-content { max-width: 720px; }
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 .highlight { color: var(--sky); }
.hero p {
  font-size: 1.15rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero entrance animation (home) — staggered rise + accent reveal */
.hero .hero-content > * {
  opacity: 0;
  animation: heroRise 0.8s var(--ease) forwards;
}
.hero .hero-content > *:nth-child(1) { animation-delay: 0.15s; }
.hero .hero-content > *:nth-child(2) { animation-delay: 0.32s; }
.hero .hero-content > *:nth-child(3) { animation-delay: 0.5s; }
.hero .hero-content > *:nth-child(4) { animation-delay: 0.66s; }

@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero h1 .highlight {
  display: inline-block;
  animation: highlightReveal 0.7s var(--ease) 1s both;
}
@keyframes highlightReveal {
  0%   { color: var(--coal); transform: translateY(0) scale(1); }
  55%  { color: var(--sky);  transform: translateY(-2px) scale(1.04); }
  100% { color: var(--sky);  transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-content > *,
  .hero h1 .highlight { animation: none; opacity: 1; }
}

/* Compact hero for interior pages */
.page-hero {
  padding: 9rem 2rem 3.5rem;
  background:
    radial-gradient(circle at 90% 20%, rgba(162,205,61,0.14), transparent 42%),
    var(--cream);
}
.page-hero .hero-content { max-width: 780px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.page-hero p { color: var(--gray-600); font-size: 1.1rem; margin-top: 1rem; }

/* --- Sections --- */
.section { padding: var(--section-pad); }
.section-alt { background: var(--cream); }

/* Cursor-following green glow (hero sections only) */
.hero, .page-hero { position: relative; overflow: hidden; }
.hero::before,
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle 380px at var(--mx, 50%) var(--my, 50%),
              rgba(162,205,61,0.15), rgba(162,205,61,0.05) 48%, transparent 74%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.hero.glow-active::before,
.page-hero.glow-active::before { opacity: 1; }
.hero > *,
.page-hero > * { position: relative; z-index: 1; }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}
.section-header p {
  color: var(--gray-600);
  font-size: 1.05rem;
  margin: 0.75rem auto 0;
}

/* Two-column prose block */
.prose { max-width: 760px; }
.prose p { margin-bottom: 1.25rem; }
.prose p:last-child { margin-bottom: 0; }

/* --- Cards Grid --- */
.cards { display: grid; gap: 2rem; }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2.25rem;
  transition: all 0.3s var(--ease);
}
.card:hover {
  border-color: transparent;
  box-shadow: 0 8px 30px rgba(35,49,42,0.08);
  transform: translateY(-4px);
}
.card-icon {
  width: 48px; height: 48px;
  background: rgba(162,205,61,0.14);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--sky);
}
.card h3 { margin-bottom: 0.75rem; }
.card p { color: var(--gray-600); font-size: 0.95rem; }
.card ul { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--gray-600); font-size: 0.92rem; }
.card ul li { margin-bottom: 0.4rem; }

/* --- Stats --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
  padding: 1rem 0;
}
.stat-number {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--forest);
  line-height: 1;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: 0.5rem;
}

/* --- Checklist (certifications, service lists) --- */
.check-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem 2.5rem;
}
.check-list { list-style: none; }
.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.7rem;
  color: var(--gray-800);
  font-size: 0.95rem;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

/* --- Testimonials / quotes --- */
.quote-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--sky);
  border-radius: 10px;
  padding: 2rem;
}
.quote-card blockquote {
  font-size: 1rem;
  color: var(--gray-800);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.quote-card cite {
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--forest);
}

/* --- Client list --- */
.client-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 2rem 2.25rem;
}
.client-panel h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--forest);
  margin-bottom: 1.25rem;
}
.client-list {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
}
.client-list li {
  font-size: 0.9rem;
  color: var(--gray-600);
  padding: 0.3rem 0 0.3rem 1rem;
  position: relative;
  break-inside: avoid;
}
.client-list li::before {
  content: '';
  position: absolute; left: 0; top: 0.85em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--mist);
}

/* --- CTA band --- */
.cta-band {
  background: var(--coal);
  color: var(--white);
  border-radius: 16px;
  padding: 3.5rem 2.5rem;
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--mist); margin: 1rem auto 2rem; font-size: 1.05rem; }

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-800);
  transition: border-color 0.2s var(--ease);
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--sky); }
.form-group textarea { min-height: 140px; resize: vertical; }

/* Netlify Forms honeypot — hidden from real users */
.hidden-field { position: absolute; left: -9999px; visibility: hidden; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.contact-detail-icon {
  width: 42px; height: 42px;
  background: rgba(162,205,61,0.14);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--sky);
  flex-shrink: 0;
}
.contact-detail .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-400); }
.contact-detail .value { font-size: 0.95rem; color: var(--gray-800); font-weight: 500; }

/* --- Footer --- */
.footer {
  background: var(--coal);
  color: var(--mist);
  padding: 4rem 2rem 2rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr; gap: 2rem; } }

.footer-brand p { margin-top: 1rem; font-size: 0.9rem; line-height: 1.6; max-width: 40ch; }
.footer-brand .contract { margin-top: 1rem; font-size: 0.8rem; color: var(--sage); }

/* SDVOSB badge (footer) */
.sdvosb { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.sdvosb-logo { height: 76px; width: auto; flex-shrink: 0; }
.sdvosb span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mist);
  line-height: 1.35;
  max-width: 22ch;
}

/* SDVOSB banner (page section) */
.sdvosb-banner {
  display: flex;
  align-items: center;
  gap: 2.75rem;
  background: var(--cream);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 2.75rem 3rem;
}
.sdvosb-chip {
  background: var(--coal);
  border-radius: 14px;
  padding: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sdvosb-banner-logo { width: 150px; height: auto; display: block; }
.sdvosb-banner p { color: var(--gray-600); }
@media (max-width: 640px) {
  .sdvosb-banner { flex-direction: column; text-align: center; padding: 2.25rem 1.5rem; }
}
.footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { font-size: 0.9rem; transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  max-width: var(--container);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* Fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
