/*
Theme Name: Groundwork Excavation
Theme URI: https://example.com/themes/groundwork-excavation
Author: Codex
Author URI: https://example.com
Description: A bold, construction-focused WordPress theme tailored for excavation companies with strong calls-to-action and hero storytelling.
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: groundwork-excavation
Tags: construction, excavation, dark, responsive, landing page
*/

:root {
  --bg: #0b0b0b;
  --surface: #101010;
  --panel: #161616;
  --line: #222;
  --text: #f5f5f5;
  --muted: #cfcfcf;
  --accent: #f0b321;
  --accent-strong: #d99d0c;
  --accent-shadow: rgba(0, 0, 0, 0.38);
  --header-height: 86px;
  --heading-font: "Bebas Neue", "Barlow Condensed", "Barlow", sans-serif;
  --hero-font: "Bebas Neue", "Barlow Condensed", "Barlow", sans-serif;
  --ui-font: "Barlow Condensed", "Barlow", sans-serif;
  --body-font: "Source Sans 3", sans-serif;
}

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  background: var(--bg);
  padding-top: var(--header-height);
}

body.admin-bar main {
  padding-top: calc(var(--header-height) + 32px);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1200px, 100% - 3rem);
  margin: 0 auto;
}

h1,
h2,
h3 {
  font-family: var(--heading-font);
}

.brand-mark,
.button {
  font-family: var(--ui-font);
}

h1,
h2,
h3,
.brand-mark,
.button {
  letter-spacing: 0.01em;
}

h1 {
  margin: 0 0 1rem;
  font-family: var(--hero-font);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-size: clamp(2.8rem, 4vw, 3.9rem);
  line-height: 1.08;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
  background: var(--bg);
  scroll-margin-top: 90px;
}

.section-dark {
  background: var(--surface);
}

.section-panel {
  background: var(--panel);
}

.section-narrow {
  width: min(880px, 100%);
  margin: 0 auto;
}

.section-eyebrow {
  display: none;
}

.lead {
  font-size: 1.05rem;
  color: #eaeaea;
}

.scope-line {
  font-size: 1rem;
  font-weight: 600;
  color: #eaeaea;
}

.location-line {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.microcopy {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  padding: 0.85rem 0;
  background: #000;
  border-bottom: 1px solid var(--line);
}

/* Offset header for admin bar */
body.admin-bar .site-header {
  top: 32px;
}

.nav-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img.custom-logo {
  height: auto;
  max-height: 60px;
  width: auto;
}

.brand-mark {
  display: inline-flex;
  padding: 0.7rem 1rem;
  background: #0a0a0a;
  border: 2px solid var(--accent);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brand-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.nav-toggle {
  display: none;
  justify-self: end;
  padding: 0.65rem 0.85rem;
  background: #0c0c0c;
  color: #f3f3f3;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 0.4rem;
}

.nav-toggle__bars span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fdfdfd;
}

.primary-menu {
  justify-self: center;
  grid-column: auto;
}

.primary-menu .menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.primary-menu a {
  font-weight: 700;
  color: #f5f5f5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.primary-menu a:hover,
.primary-menu a:focus-visible {
  color: var(--accent);
}

.nav-cta {
  justify-self: end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.85rem 1.1rem;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.button-accent {
  background: var(--accent);
  color: #0a0a0a;
  box-shadow: 0 18px 30px -12px var(--accent-shadow), 0 2px 0 #c48402 inset;
}

.button-accent:hover,
.button-accent:focus-visible {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.button-ghost {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.button-ghost:hover,
.button-ghost:focus-visible {
  color: #0a0a0a;
  background: var(--accent);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  padding: 6.5rem 0 4rem;
  isolation: isolate;
  background: url("https://www.gardinerexcavating.com/wp-content/uploads/2026/01/excavator-hero.png") center/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 620px);
  gap: 1.25rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-actions {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.intro {
  text-align: center;
}

.intro p {
  color: #d8d8d8;
}

.intro .hero-actions {
  justify-content: center;
}

.intro.intro-photo-preview {
  background-image:
    linear-gradient(115deg, rgba(6, 7, 9, 0.84) 8%, rgba(6, 7, 9, 0.72) 45%, rgba(6, 7, 9, 0.82) 100%),
    url("assets/images/residential2.JPG");
  background-position: center, center;
  background-repeat: no-repeat;
  background-size: cover;
}

.intro.intro-photo-preview h2,
.intro.intro-photo-preview p {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.intro.intro-photo-preview p {
  color: rgba(245, 245, 245, 0.92);
}

.intro.intro-photo-preview .button-ghost {
  background: rgba(0, 0, 0, 0.35);
}

.intro.intro-photo-preview .button-ghost:hover,
.intro.intro-photo-preview .button-ghost:focus-visible {
  background: var(--accent);
}

.services .service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.25rem 1.1rem;
}

.service-card h3 {
  color: #fdfdfd;
}

.service-card ul li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.service-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.cta-strip {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.85rem 0;
}

.cta-strip__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.cta-strip__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.why .checklist {
  display: grid;
  gap: 0.65rem;
  margin: 1.25rem 0;
  padding: 0;
}

.why-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 2rem;
  align-items: center;
}

.why-content {
  min-width: 0;
}

.why-content p {
  max-width: 64ch;
  text-wrap: pretty;
}

.why-media {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--line);
  background: #0c0c0c;
  overflow: hidden;
  touch-action: pan-y;
  isolation: isolate;
}

.why-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.24) 100%);
  pointer-events: none;
}

.why-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 700ms ease;
}

.why-slide.is-active {
  opacity: 1;
}

.why-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-media__controls {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.why-media__arrow {
  position: absolute;
  top: 50%;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(240, 179, 33, 0.82);
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.72);
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.96);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.why-media__arrow--prev {
  left: 0.85rem;
}

.why-media__arrow--next {
  right: 0.85rem;
}

.why-media:hover .why-media__arrow,
.why-media:focus-within .why-media__arrow {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.why-media__arrow:hover,
.why-media__arrow:focus-visible {
  background: var(--accent);
  color: #0a0a0a;
  transform: translateY(-50%) scale(1);
}

.why .checklist li {
  position: relative;
  padding-left: 1.1rem;
  color: #e0e0e0;
  line-height: 1.5;
}

.why .checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.about p + p {
  margin-top: 0.65rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.35rem 1.1rem;
}

.contact-info {
  display: grid;
  gap: 0.75rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.info-row strong {
  color: #f7f7f7;
  letter-spacing: 0.03em;
}

.info-row span,
.info-row a {
  color: var(--muted);
  font-weight: 600;
}

form {
  display: grid;
  gap: 0.85rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: #f0f0f0;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: #0c0c0c;
  border: 1px solid var(--line);
  color: #f5f5f5;
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Fluent Forms overrides to match theme */
.fluentform,
.fluentform form {
  color: var(--text);
}

.fluentform .ff-el-group label {
  color: #f0f0f0;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fluentform .ff-el-group .ff-el-input--content input,
.fluentform .ff-el-group .ff-el-input--content select,
.fluentform .ff-el-group .ff-el-input--content textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  background: #0c0c0c;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #f5f5f5;
}

.fluentform .ff-el-group .ff-el-input--content input:focus,
.fluentform .ff-el-group .ff-el-input--content select:focus,
.fluentform .ff-el-group .ff-el-input--content textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.fluentform .ff-el-group .ff-el-input--content textarea {
  min-height: 140px;
}

.fluentform .ff-btn-submit:not(.ff_btn_no_style),
.fluentform button.ff-btn:not(.ff_btn_no_style),
.fluentform .ff-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.85rem 1.4rem;
  border-radius: 4px;
  border: none;
  background: var(--accent) !important;
  color: #0a0a0a !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 18px 30px -12px var(--accent-shadow), 0 2px 0 #c48402 inset;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.fluentform .ff-btn-submit:not(.ff_btn_no_style):hover,
.fluentform button.ff-btn:not(.ff_btn_no_style):hover,
.fluentform .ff-btn-primary:hover,
.fluentform .ff-btn-submit:not(.ff_btn_no_style):focus,
.fluentform button.ff-btn:not(.ff_btn_no_style):focus,
.fluentform .ff-btn-primary:focus {
  background: var(--accent-strong) !important;
  transform: translateY(-1px);
}

.fluentform .ff-error-msg,
.fluentform .ff-message-error {
  color: var(--accent);
}

.fluentform .ff-message-success {
  color: #7dd79b;
}

.footer {
  padding: 2.5rem 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
  text-align: center;
  background: #0d0d0d;
  border-top: 1px solid var(--line);
}

.footer strong {
  color: #fff;
}

.footer a {
  color: var(--accent);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mobile-call {
  display: none;
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 22;
  text-align: center;
}

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

  .why-media {
    min-height: 360px;
  }
}

/* Tablet: 577px–768px */
@media (max-width: 768px) and (min-width: 577px) {
  .container {
    width: min(1100px, 100% - 2.5rem);
  }

  :root {
    --header-height: 82px;
  }

  .site-header {
    padding: 0.7rem 0;
  }

  .nav-bar {
    grid-template-columns: auto 1fr;
    justify-content: space-between;
    gap: 1rem;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    min-height: 82vh;
    padding: 5.5rem 0 3.25rem;
  }

  h1 {
    font-size: clamp(2.4rem, 4vw, 3.1rem);
  }

  .hero-grid {
    justify-items: center;
    text-align: center;
  }

  .intro.intro-photo-preview {
    background-position: center, 62% center;
  }

  .hero-copy {
    align-items: center;
    gap: 0.4rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .cta-strip__content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .why-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .why-media {
    order: -1;
    min-height: 320px;
  }

  .why-media__controls {
    display: none;
  }

  .services .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .service-card {
    padding: 1.1rem 1rem;
  }

  .mobile-call {
    display: none;
  }
}

/* Mobile: ≤576px */
@media (max-width: 576px) {
  :root {
    --header-height: 80px;
  }

  .container {
    width: min(1100px, 100% - 2rem);
  }

  .site-header {
    padding: 0.65rem 0;
  }

  main {
    padding-bottom: 5rem; /* extra space for mobile call button */
  }

  body.admin-bar .site-header {
    top: 46px;
  }

  body.admin-bar main {
    padding-top: calc(var(--header-height) + 46px);
    padding-bottom: 5rem; /* extra space for mobile call button */
  }

  .nav-bar {
    grid-template-columns: 1fr auto;
  }

  .brand {
    gap: 0.5rem;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .primary-menu {
    display: none;
    grid-column: 1 / -1;
    background: #0c0c0c;
    padding: 0.5rem 0.25rem;
    border-top: 1px solid var(--line);
  }

  .primary-menu.is-open {
    display: block;
  }

  .primary-menu .menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    margin: 0;
  }

  .cta-strip__content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .why-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .why-media {
    order: -1;
    min-height: 260px;
  }

  .why-media__controls {
    display: none;
  }

  .mobile-call {
    display: block;
  }

  .footer {
    padding-bottom: 4rem; /* avoid overlap with floating call button */
  }
}
