/* =========================================================
   County Line Earthworx LLC — styles
   ========================================================= */

:root {
  --black: #121110;
  --black-deep: #0a0908;
  --charcoal: #1c1a18;
  --gold: #c9982f;
  --gold-bright: #e0b04a;
  --gold-deep: #8f6a1f;
  --cream: #f5f1e6;
  --white: #ffffff;
  --gray-text: #6b665f;
  --border-soft: rgba(255,255,255,0.08);

  --font-head: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', system-ui, sans-serif;

  --container-w: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0;
}

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

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: var(--black-deep);
}
.btn-gold:hover { background: var(--gold-bright); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-lg { padding: 16px 32px; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,9,8,0.92);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
  gap: 20px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { height: 64px; width: auto; }

.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover { color: var(--gold); }

.nav-cta-group { display: contents; }

.header-cta { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.phone-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--cream);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.phone-link:hover { color: var(--gold); }
.icon-sm { width: 16px; height: 16px; fill: currentColor; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--cream);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  transform: scale(1.08);
  filter: saturate(1.05);
  will-change: transform;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,9,8,0.75) 0%, rgba(10,9,8,0.55) 45%, rgba(10,9,8,0.92) 100%),
    linear-gradient(100deg, rgba(10,9,8,0.55) 0%, rgba(10,9,8,0.15) 55%, rgba(10,9,8,0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 122px;
  padding-bottom: 60px;
  max-width: 780px;
}
.eyebrow {
  font-family: var(--font-head);
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 1.08rem;
  color: rgba(245,241,230,0.9);
  max-width: 560px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  font-family: var(--font-head);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cream);
}
.trust-strip li {
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 30px;
  white-space: nowrap;
}

/* ---------- Section shared ---------- */
section { padding: 96px 0; }
.section-kicker {
  font-family: var(--font-head);
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  margin: 0 0 10px;
}
.section-kicker--light { color: var(--gold-bright); }
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--black-deep);
  max-width: 720px;
  margin-bottom: 18px;
}
.section-title--light { color: var(--white); }
.section-lead {
  font-size: 1.05rem;
  color: var(--gray-text);
  max-width: 620px;
  margin: 0;
}
.section-lead--light { color: rgba(245,241,230,0.75); }

/* ---------- Services ---------- */
.services { background: var(--white); }
.services-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border-soft-light, #eae6db);
  border: 1px solid #eae6db;
}
.service-card {
  background: var(--white);
  padding: 40px 32px;
  transition: background-color 0.2s ease;
}
.service-card:hover { background: #faf8f2; }
.service-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 {
  font-size: 1.15rem;
  color: var(--black-deep);
  margin-bottom: 10px;
  text-transform: none;
}
.service-card p { margin: 0; color: var(--gray-text); font-size: 0.96rem; }
.services-cta { text-align: center; margin-top: 52px; }

/* ---------- Gallery ---------- */
.gallery { background: var(--black-deep); }
.gallery-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
}
.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  grid-column: span 1;
  grid-row: span 1;
}
.gallery-item--tall { grid-row: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), rgba(0,0,0,0));
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- About ---------- */
.about { background: var(--cream); }
.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-copy p { color: #4a453e; font-size: 1.02rem; }
.owner-byline {
  font-family: var(--font-head);
  color: var(--gold-deep) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem !important;
  font-weight: 600;
  margin: 0 0 14px !important;
}
.check-list {
  list-style: none;
  margin: 28px 0 32px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.check-list li {
  position: relative;
  padding-left: 30px;
  font-weight: 500;
  color: var(--black-deep);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 5px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 5px; top: 8px;
  width: 8px; height: 4px;
  border-left: 2px solid var(--black-deep);
  border-bottom: 2px solid var(--black-deep);
  transform: rotate(-45deg);
}
.about-media img {
  border-radius: 6px;
  box-shadow: 0 24px 48px -20px rgba(0,0,0,0.35);
}

/* ---------- Testimonial ---------- */
.testimonial { background: var(--white); padding: 60px 0; text-align: center; }
.testimonial blockquote { margin: 0 auto; max-width: 700px; }
.testimonial p {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  color: var(--black-deep);
  margin: 0 0 18px;
  text-transform: none;
  line-height: 1.35;
}
.testimonial cite {
  font-style: normal;
  color: var(--gold-deep);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ---------- Service Area ---------- */
.area { background: var(--charcoal); color: var(--white); }
.area .section-title { color: var(--white); }
.area .section-lead { color: rgba(245,241,230,0.7); }
.area .section-kicker { color: var(--gold-bright); }
.area-tags {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.area-tags span {
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--cream);
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-family: var(--font-head);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */
.contact { background: var(--white); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-phone {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--black-deep);
  margin: 26px 0 6px;
}
.contact-phone:hover { color: var(--gold-deep); }
.contact-ask-for {
  margin: 0 0 18px;
  color: var(--gray-text);
  font-size: 0.95rem;
  font-style: italic;
}
.contact-email {
  display: block;
  color: var(--gray-text);
  font-size: 1.05rem;
  margin-bottom: 26px;
}
.contact-email:hover { color: var(--gold-deep); }
.contact-badges { display: flex; gap: 12px; }
.contact-badges span {
  background: var(--cream);
  color: var(--black-deep);
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 3px;
}

.contact-form {
  background: var(--charcoal);
  padding: 40px;
  border-radius: 8px;
  display: grid;
  gap: 16px;
}
.contact-form label {
  color: var(--cream);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-head);
  margin-bottom: -8px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.98rem;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.09);
}
.contact-form button { margin-top: 6px; }
.hidden-field { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black-deep); color: rgba(245,241,230,0.7); padding: 56px 0 32px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.footer-logo { height: 58px; width: auto; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(245,241,230,0.8); }
.footer-nav a:hover { color: var(--gold); }
.footer-contact { font-size: 0.92rem; margin: 0; }
.footer-copy { font-size: 0.8rem; color: rgba(245,241,230,0.4); margin: 0; }

/* ---------- Mobile sticky call bar ---------- */
.mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10,9,8,0.96);
  border-top: 1px solid var(--border-soft);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--tall { grid-row: span 2; }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .about-media { order: -1; }
}

@media (max-width: 760px) {
  .nav-cta-group { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .nav-cta-group {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 86px; left: 0; right: 0;
    background: var(--black-deep);
    padding: 20px 24px 28px;
    gap: 20px;
    border-top: 1px solid var(--border-soft);
    box-shadow: 0 16px 24px -8px rgba(0,0,0,0.4);
  }
  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .site-header.nav-open .header-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
  }
  .site-header.nav-open .header-cta .btn,
  .site-header.nav-open .header-cta .phone-link { justify-content: center; text-align: center; }

  section { padding: 64px 0; }
  .hero { min-height: 100vh; }
  .hero-content { padding-top: 112px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .trust-strip li { padding: 0 14px; font-size: 0.72rem; }

  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }

  .mobile-call-bar { display: block; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  body { padding-bottom: 68px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .contact-form { padding: 28px 22px; }
}

/* =========================================================
   Scroll reveal (progressive enhancement — see js-reveal class)
   ========================================================= */
.reveal {
  transition: opacity 0.7s cubic-bezier(0.2, 0.65, 0.3, 1), transform 0.7s cubic-bezier(0.2, 0.65, 0.3, 1);
}
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
}
html.js-reveal .reveal--left { transform: translateX(-36px); }
html.js-reveal .reveal--right { transform: translateX(36px); }
html.js-reveal .reveal.in-view {
  opacity: 1;
  transform: none;
}

.service-card.reveal:nth-child(1) { transition-delay: 0ms; }
.service-card.reveal:nth-child(2) { transition-delay: 70ms; }
.service-card.reveal:nth-child(3) { transition-delay: 140ms; }
.service-card.reveal:nth-child(4) { transition-delay: 210ms; }
.service-card.reveal:nth-child(5) { transition-delay: 280ms; }
.service-card.reveal:nth-child(6) { transition-delay: 350ms; }

.gallery-item.reveal:nth-child(1) { transition-delay: 0ms; }
.gallery-item.reveal:nth-child(2) { transition-delay: 60ms; }
.gallery-item.reveal:nth-child(3) { transition-delay: 120ms; }
.gallery-item.reveal:nth-child(4) { transition-delay: 180ms; }
.gallery-item.reveal:nth-child(5) { transition-delay: 240ms; }
.gallery-item.reveal:nth-child(6) { transition-delay: 300ms; }
.gallery-item.reveal:nth-child(7) { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-bg { transform: scale(1.03) !important; }
}
