/* =====================================================
   Groundworks Excavation & Construction
   Design tokens pulled from the badge logo.
   ===================================================== */
:root {
  --navy: #2e2d22;        /* deep olive-brown base */
  --olive: #3b3a2c;       /* panel brown */
  --ink: #1c1b14;         /* darkest backdrop (header/hero/footer) */
  --cream: #efe9da;       /* text / mountains */
  --cream-dim: #c9c2b0;   /* muted text */
  --tan: #b7a579;         /* khaki accent */
  --rust: #c9663a;        /* CTA / action accent */
  --rust-hover: #d97a4d;

  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --radius: 10px;
  --container: 1120px;
  --header-h: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--cream);
  background: var(--navy);
}

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

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

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--cream);
}
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: 0.05em; }

p { margin: 0 0 1em; }

a { color: var(--tan); }
a:hover { color: var(--cream); }

:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 2px;
  border-radius: 3px;
}

.eyebrow {
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--tan);
  margin-bottom: 0.75em;
}

.section-lede {
  color: var(--cream-dim);
  max-width: 46rem;
  margin-bottom: 2.2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  padding: 0.85em 1.7em;
  border-radius: 6px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--rust);
  color: #fff;
}
.btn-primary:hover { background: var(--rust-hover); color: #fff; }

.btn-outline {
  border-color: var(--tan);
  color: var(--cream);
  background: transparent;
}
.btn-outline:hover { border-color: var(--cream); color: var(--cream); }

/* ---------- 1. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid rgba(239, 233, 218, 0.12);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.brand { display: flex; align-items: center; }
.brand-badge {
  width: 88px;
  height: auto;
  /* The provided logo file has a black background; lighten-blend melts it
     into the dark header without altering the artwork itself. */
  mix-blend-mode: lighten;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.site-nav a {
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  color: var(--cream-dim);
  text-decoration: none;
}
.site-nav a:hover { color: var(--cream); }
.site-nav .btn-nav { color: #fff; padding: 0.6em 1.3em; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 2. Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at 75% 20%, rgba(183, 165, 121, 0.10), transparent 55%),
    linear-gradient(180deg, var(--ink) 0%, var(--navy) 100%);
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid rgba(239, 233, 218, 0.08);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 2.5rem;
}
.hero-sub {
  color: var(--cream-dim);
  font-size: 1.15rem;
  max-width: 34rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}
.hero-badge img {
  width: min(380px, 80%);
  margin: 0 auto;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

.trust-stats {
  list-style: none;
  margin: 3.2rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid rgba(239, 233, 218, 0.12);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.trust-stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--tan);
}
.trust-stats span {
  color: var(--cream-dim);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--olive); }

/* ---------- 3. Services ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
/* Center a lone card left over in the final row (e.g. 7 services → 1 card alone) */
.card-grid > .card:last-child:nth-child(3n + 1) {
  grid-column: 2 / 3;
}
.card {
  background: var(--olive);
  border: 1px solid rgba(239, 233, 218, 0.10);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.section-alt .card { background: var(--navy); }
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(183, 165, 121, 0.5);
}
.card-icon {
  width: 46px;
  height: 46px;
  color: var(--tan);
  margin-bottom: 1rem;
}
.card-icon svg { width: 100%; height: 100%; }
.card p { color: var(--cream-dim); margin: 0; font-size: 0.98rem; }

/* ---------- 4. Our Work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.work-tile { margin: 0; }
.work-ph {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px dashed rgba(239, 233, 218, 0.25);
  background:
    repeating-linear-gradient(-45deg,
      rgba(239, 233, 218, 0.045) 0 14px,
      transparent 14px 28px),
    var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-ph span {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--cream-dim);
}
.work-tile img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  width: 100%;
}
.work-tile figcaption,
.work-caption {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--cream-dim);
}

.work-cta {
  text-decoration: none;
  display: block;
}
.work-cta .work-ph {
  display: flex;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.work-cta:hover .work-ph {
  border-color: var(--rust);
}
.work-cta:hover .work-ph span,
.work-cta:hover .work-caption {
  color: var(--cream);
}
.work-cta .work-caption {
  color: var(--tan);
}

/* ---------- 5. Service Area ---------- */
.city-chips {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.city-chips li {
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  padding: 0.55em 1.2em;
  border: 1.5px solid var(--tan);
  border-radius: 999px;
  color: var(--cream);
  background: rgba(183, 165, 121, 0.08);
}
.area-note { color: var(--cream-dim); }

/* ---------- 6. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}
.about-grid p { color: var(--cream-dim); }

.trust-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 1.6rem 1.6rem;
  background: var(--navy);
  border: 1px solid rgba(239, 233, 218, 0.10);
  border-radius: var(--radius);
}
.trust-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 2rem;
  border-bottom: 1px solid rgba(239, 233, 218, 0.08);
}
.trust-list li:last-child { border-bottom: 0; }
.trust-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 16px;
  height: 9px;
  border-left: 3px solid var(--rust);
  border-bottom: 3px solid var(--rust);
  transform: rotate(-45deg);
}

/* ---------- 7. Reviews ---------- */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.review {
  margin: 0;
  background: var(--olive);
  border: 1px solid rgba(239, 233, 218, 0.10);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.review p { color: var(--cream); font-size: 1rem; }
.review footer { color: var(--cream-dim); font-size: 0.92rem; }
.todo-flag {
  display: inline-block;
  margin-left: 0.4em;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rust);
  border: 1px solid var(--rust);
  border-radius: 4px;
  padding: 0.05em 0.45em;
}

/* ---------- 8. Contact / Quote ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: start;
}
.contact-info p { color: var(--cream-dim); }
.contact-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}
.contact-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(239, 233, 218, 0.08);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-label {
  display: inline-block;
  width: 4.5rem;
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  color: var(--tan);
}

.quote-form {
  background: var(--navy);
  border: 1px solid rgba(239, 233, 218, 0.10);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--cream-dim);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  background: var(--ink);
  border: 1px solid rgba(239, 233, 218, 0.18);
  border-radius: 6px;
  padding: 0.7em 0.9em;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(201, 194, 176, 0.55); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--tan);
  outline-offset: 0;
  border-color: var(--tan);
}
.form-field input.field-error { border-color: var(--rust); }
.form-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cream-dim) 50%),
    linear-gradient(135deg, var(--cream-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
textarea { resize: vertical; }

/* Honeypot — visually removed, still in the DOM for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit { width: 100%; border: 0; }
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin: 0.9rem 0 0;
  font-size: 0.98rem;
  min-height: 1.4em;
}
.form-status.ok { color: #9fd49a; }
.form-status.err { color: var(--rust-hover); }

/* ---------- 9. Footer ---------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(239, 233, 218, 0.10);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand img { mix-blend-mode: lighten; }
.footer-brand p { color: var(--cream-dim); font-size: 0.95rem; margin-top: 0.8rem; }

.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a,
.footer-contact a {
  color: var(--cream-dim);
  text-decoration: none;
  font-size: 0.98rem;
}
.footer-nav a:hover,
.footer-contact a:hover { color: var(--cream); }

.footer-contact { display: flex; flex-direction: column; gap: 0.5rem; }
.license-note { color: var(--cream-dim); font-size: 0.85rem; margin: 0.5rem 0 0; }

.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(239, 233, 218, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--cream-dim);
  font-size: 0.88rem;
}
.footer-legal p { margin: 0; }
.credit a { color: var(--tan); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-badge { order: -1; }
  .hero-badge img { width: min(260px, 60%); }
  .card-grid, .review-grid, .work-grid { grid-template-columns: 1fr 1fr; }
  /* Center a lone card left over in the final row at 2 columns */
  .card-grid > .card:last-child:nth-child(2n + 1) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 0.7rem);
  }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--ink);
    border-bottom: 1px solid rgba(239, 233, 218, 0.12);
    padding: 1rem 20px 1.4rem;
    gap: 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav .btn-nav { text-align: center; }

  .card-grid, .review-grid, .work-grid { grid-template-columns: 1fr; }
  /* Single column: clear the lone-card centering so it spans normally */
  .card-grid > .card:last-child {
    grid-column: auto;
    justify-self: stretch;
    width: auto;
  }
  .trust-stats { grid-template-columns: 1fr 1fr; row-gap: 1.4rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; }
}
