/* ==========================================================================
   Spectrum Consulting Engineers — Main Stylesheet (v2)
   ========================================================================== */

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

:root {
  --green: #77bb44;          /* logo green */
  --green-light: #8bc95a;
  --green-dark: #3f7d20;     /* links and text on light backgrounds */
  --green-darker: #2f6418;
  --dark: #2f2a28;           /* warm charcoal, for text on light backgrounds */
  --dark-green: #004628;     /* banner and footer backgrounds */
  --dark-light: #3d3633;
  --slate: #4a5568;
  --warm-grey: #6b7280;
  --light-grey: #f3f4f6;
  --border: #d1d5db;
  --white: #ffffff;
  --text: #1f2937;
  --text-light: #4b5563;
  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --max-width: 1100px;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.7;
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--green-dark);
  text-decoration: none;
}

a:hover {
  color: var(--green-darker);
  text-decoration: underline;
}

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

.section {
  padding: 4rem 0;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  color: var(--dark);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--green);
  color: var(--dark);
  border: 2px solid var(--green);
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--green-light);
  border-color: var(--green-light);
  color: var(--dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--green-dark);
}

.btn-outline:hover {
  background: var(--green);
  color: var(--dark);
}

/* --- Header --- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--green);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo {
  height: 48px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.nav-mobile-only {
  display: none;
}

.nav-cta {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.main-nav a {
  color: var(--slate);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--dark);
  border-bottom-color: var(--green);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: transform 0.2s;
}

/* --- Hero --- */
.hero {
  background: var(--dark-green);
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  margin-bottom: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn:hover {
  background: transparent;
  border-color: var(--green);
  color: var(--green);
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
}

.card h3 {
  color: var(--dark);
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.card a {
  font-size: 0.9rem;
  font-weight: 500;
}

/* --- Services Overview Section --- */
.services-overview {
  padding: 4rem 0;
  background: var(--light-grey);
}

.services-overview h2 {
  text-align: center;
}

/* --- Services Page --- */
.services-page h2 {
  scroll-margin-top: 6rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.services-page h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* --- Team Preview Section --- */
.team-preview {
  text-align: center;
}

.team-preview p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.team-member {
  background: var(--light-grey);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
}

.team-info h3 {
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.team-role {
  color: var(--warm-grey);
  font-size: 0.9rem;
  font-style: italic;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--dark-green);
  color: var(--white);
  text-align: center;
  padding: 4rem 0;
}

.cta-section h2 {
  color: var(--white);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

.cta-section .btn:hover {
  background: transparent;
  border-color: var(--green);
  color: var(--green);
}

/* --- Page Header --- */
.page-header {
  background: var(--dark-green);
  color: var(--white);
  padding: 3rem 0;
}

.page-header h1 {
  color: var(--white);
}

.page-header p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
}

/* --- Page Content --- */
.page-content {
  padding: 3rem 0;
}

/* --- Contact --- */
.office-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.office {
  max-width: 480px;
  background: var(--light-grey);
  border-radius: 6px;
  padding: 2rem;
}

.office h3 {
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.office p {
  margin-bottom: 0.25rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--dark-green);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.site-footer h4 {
  color: var(--white);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.8;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer-bottom {
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 0.75rem 0;
    border-bottom: none;
  }

  .site-header {
    position: relative;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .header-right {
    gap: 0.75rem;
  }

  .nav-cta {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
  }

  .nav-mobile-only {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .services-page h2 {
    scroll-margin-top: 1rem;
  }

  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.35rem; }
}

@media (max-width: 540px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}
