/* ECA — Emerald Coast Associates Engineering
   Shared stylesheet
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --emerald-deep: #0b3b2e;
  --emerald: #1a5d4a;
  --emerald-soft: #2d7a63;
  --sand: #e8e1d3;
  --sand-light: #f5f1e8;
  --cream: #faf7f0;
  --charcoal: #1f2a26;
  --charcoal-soft: #4a544f;
  --gold: #b8945a;
  --white: #ffffff;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --container: 1200px;
  --container-narrow: 900px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--emerald);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--emerald-soft);
}

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

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ HEADER ============ */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid rgba(31, 42, 38, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(250, 247, 240, 0.95);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.header-logo img {
  height: 52px;
  width: auto;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-logo-text .name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}

.header-logo-text .sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav a {
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--emerald);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.nav a.active {
  color: var(--emerald);
}

.nav-cta {
  padding: 10px 22px !important;
  background: var(--emerald-deep);
  color: var(--cream) !important;
  border-radius: 2px;
  font-size: 13px !important;
}

.nav-cta::after { display: none; }
.nav-cta:hover {
  background: var(--emerald);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: 0.3s;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(11, 59, 46, 0.92), rgba(26, 93, 74, 0.85)),
    url('images/hero-bg.svg') center/cover;
  color: var(--cream);
  padding: 140px 0 120px;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

.hero .eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero .eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--sand);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 900px;
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: italic;
  color: var(--sand);
}

.hero p {
  font-size: 19px;
  max-width: 580px;
  color: rgba(245, 241, 232, 0.92);
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 16px 34px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}

.btn-primary {
  background: var(--cream);
  color: var(--emerald-deep);
}

.btn-primary:hover {
  background: var(--white);
  color: var(--emerald-deep);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(245, 241, 232, 0.5);
}

.btn-outline:hover {
  background: rgba(245, 241, 232, 0.1);
  color: var(--cream);
  border-color: var(--cream);
}

.btn-solid {
  background: var(--emerald-deep);
  color: var(--cream);
}

.btn-solid:hover {
  background: var(--emerald);
  color: var(--cream);
}

/* ============ STATS BAR ============ */
.stats-bar {
  background: var(--charcoal);
  color: var(--cream);
  padding: 32px 0;
}

.stats-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat {
  text-align: center;
  border-right: 1px solid rgba(245, 241, 232, 0.15);
}

.stat:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  color: var(--sand);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 8px;
  color: rgba(245, 241, 232, 0.7);
}

/* ============ SECTIONS ============ */
section {
  padding: 100px 0;
}

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--emerald);
}

.section-eyebrow.center {
  justify-content: center;
}

.section-eyebrow.center::before {
  display: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--charcoal);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: italic;
  color: var(--emerald);
}

.section-lede {
  font-size: 18px;
  color: var(--charcoal-soft);
  max-width: 640px;
  margin-bottom: 60px;
  line-height: 1.7;
}

.section-lede.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ============ INTRO / TWO-COLUMN ============ */
.intro {
  background: var(--cream);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.intro-grid img {
  border-radius: 2px;
  width: 100%;
  height: auto;
  box-shadow: 0 20px 50px rgba(11, 59, 46, 0.15);
}

.intro-content h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--charcoal);
}

.intro-content h2 em {
  font-style: italic;
  color: var(--emerald);
}

.intro-content p {
  color: var(--charcoal-soft);
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 1.8;
}

.intro-signature {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(31, 42, 38, 0.12);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--emerald);
  font-size: 18px;
}

/* ============ SERVICES PREVIEW ============ */
.services-preview {
  background: var(--sand-light);
  position: relative;
}

.services-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 20px;
}

.service-card {
  background: var(--cream);
  padding: 40px 32px;
  border-top: 2px solid var(--emerald);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(11, 59, 46, 0.1);
}

.service-card .num {
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 18px;
  letter-spacing: 0.08em;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 14px;
  line-height: 1.25;
}

.service-card p {
  color: var(--charcoal-soft);
  font-size: 15px;
  line-height: 1.7;
}

/* ============ CTA STRIP ============ */
.cta-strip {
  background: var(--emerald-deep);
  color: var(--cream);
  padding: 80px 0;
  text-align: center;
}

.cta-strip h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 500;
  margin-bottom: 18px;
  line-height: 1.2;
}

.cta-strip h2 em {
  font-style: italic;
  color: var(--sand);
}

.cta-strip p {
  font-size: 17px;
  max-width: 580px;
  margin: 0 auto 32px;
  color: rgba(245, 241, 232, 0.85);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--charcoal);
  color: rgba(245, 241, 232, 0.7);
  padding: 70px 0 30px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
}

.footer-brand img {
  height: 70px;
  width: auto;
  margin-bottom: 20px;
  filter: invert(1) brightness(1.1);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 241, 232, 0.6);
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--sand);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: rgba(245, 241, 232, 0.65);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--sand);
}

.footer-col p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 241, 232, 0.65);
}

.footer-bottom {
  max-width: var(--container);
  margin: 50px auto 0;
  padding: 24px 32px 0;
  border-top: 1px solid rgba(245, 241, 232, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(245, 241, 232, 0.5);
  letter-spacing: 0.04em;
}

/* ============ PAGE HEADER (non-home pages) ============ */
.page-header {
  background:
    linear-gradient(135deg, rgba(11, 59, 46, 0.92), rgba(26, 93, 74, 0.88)),
    url('images/page-header-bg.svg') center/cover;
  color: var(--cream);
  padding: 100px 0 80px;
  text-align: center;
}

.page-header .eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 18px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.page-header h1 em {
  font-style: italic;
  color: var(--sand);
}

.page-header p {
  font-size: 18px;
  max-width: 640px;
  margin: 0 auto;
  color: rgba(245, 241, 232, 0.9);
  line-height: 1.6;
}

/* ============ ABOUT PAGE ============ */
.about-story {
  background: var(--cream);
}

.about-story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-story-content p {
  color: var(--charcoal-soft);
  font-size: 16px;
  line-height: 1.85;
  margin-bottom: 20px;
}

.about-story-content p.lede {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  color: var(--emerald);
  margin-bottom: 32px;
  line-height: 1.5;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--emerald);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 2px var(--emerald);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--emerald);
  font-style: italic;
  margin-bottom: 6px;
}

.timeline-item p {
  color: var(--charcoal-soft);
  font-size: 15px;
  line-height: 1.7;
}

.values-section {
  background: var(--sand-light);
  text-align: center;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 20px;
  text-align: left;
}

.value-item h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--emerald-deep);
  margin-bottom: 14px;
}

.value-item p {
  color: var(--charcoal-soft);
  font-size: 15px;
  line-height: 1.7;
}

/* ============ SERVICES PAGE ============ */
.services-intro {
  background: var(--cream);
  text-align: center;
}

.services-list-section {
  background: var(--cream);
  padding-top: 0;
}

.service-detail {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 40px;
  padding: 48px 0;
  border-top: 1px solid rgba(31, 42, 38, 0.12);
  align-items: start;
}

.service-detail:last-child {
  border-bottom: 1px solid rgba(31, 42, 38, 0.12);
}

.service-detail-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 38px;
  font-weight: 500;
  color: var(--emerald);
}

.service-detail h3 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 12px;
  line-height: 1.2;
}

.service-detail p {
  color: var(--charcoal-soft);
  font-size: 16px;
  line-height: 1.75;
  max-width: 720px;
}

/* ============ CONTACT PAGE ============ */
.contact-section {
  background: var(--cream);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 24px;
}

.contact-info p {
  color: var(--charcoal-soft);
  margin-bottom: 28px;
  line-height: 1.7;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(31, 42, 38, 0.08);
}

.contact-detail:last-of-type { border-bottom: none; }

.contact-detail-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-detail-value {
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.5;
}

.contact-detail-value a {
  color: var(--charcoal);
}

.contact-detail-value a:hover {
  color: var(--emerald);
}

.contact-form {
  background: var(--sand-light);
  padding: 48px;
  border-top: 3px solid var(--emerald);
}

.contact-form h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.contact-form > p {
  color: var(--charcoal-soft);
  font-size: 15px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--cream);
  border: 1px solid rgba(31, 42, 38, 0.15);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--charcoal);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--emerald);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--emerald-deep);
  color: var(--cream);
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit:hover {
  background: var(--emerald);
}

.form-note {
  font-size: 12px;
  color: var(--charcoal-soft);
  margin-top: 14px;
  line-height: 1.5;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
  }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
    border-top: 1px solid rgba(31, 42, 38, 0.08);
  }
  .nav.open {
    max-height: 500px;
  }
  .nav a {
    padding: 16px 32px !important;
    text-align: center;
    border-bottom: 1px solid rgba(31, 42, 38, 0.05);
  }
  .nav a::after { display: none; }
  .nav-cta {
    margin: 12px 32px;
    background: var(--emerald-deep);
    color: var(--cream) !important;
    text-align: center;
  }

  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .stat:nth-child(2) { border-right: none; }

  .intro-grid,
  .about-story-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .services-grid,
  .values-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .service-detail {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 36px 0;
  }

  .service-detail-num {
    font-size: 28px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 32px 24px;
  }

  section { padding: 70px 0; }
  .hero { padding: 100px 0 80px; }
}

@media (max-width: 600px) {
  .container, .container-narrow { padding: 0 20px; }
  .header-inner { padding: 14px 20px; }
  .header-logo-text .name { font-size: 18px; }
  .header-logo img { height: 44px; }
  .stats-inner { grid-template-columns: 1fr; gap: 24px; }
  .stat { border-right: none; border-bottom: 1px solid rgba(245, 241, 232, 0.15); padding-bottom: 18px; }
  .stat:last-child { border-bottom: none; padding-bottom: 0; }
  .footer-inner { grid-template-columns: 1fr; }
}
