/*
Theme Name: D.J. Williams & Son Landscaping
Theme URI: https://djwilliamslandscaping.com/
Author: Tom Tash
Author URI: https://adventure29.com
Description: A custom WordPress theme for D.J. Williams & Son Landscaping LLC of Hampden, Maine. Showcases excavation, patios, retaining walls, bushhogging, brush cutting, snow plowing, and property maintenance work. Built mobile-first with a green/yellow Maine landscaping palette inspired by the company's business card.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: djwilliams
Tags: business, landscaping, custom-menu, custom-logo, featured-images, threaded-comments
*/

/* =====================================================
   1. Design tokens
   ===================================================== */
:root {
  --c-green-900: #1f3d11;
  --c-green-800: #275318;
  --c-green-700: #2f6b1f;
  --c-green-500: #4d9c3a;
  --c-green-100: #ecf5e7;
  --c-yellow-500: #f4c430;
  --c-yellow-600: #d9a91d;
  --c-yellow-100: #fff5d1;

  --c-ink: #1a1a1a;
  --c-text: #333;
  --c-mute: #6b6b6b;
  --c-line: #e6e6e6;
  --c-bg: #ffffff;
  --c-bg-soft: #faf8f3;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
  --shadow-lg: 0 14px 40px rgba(0,0,0,0.14);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --container: 1180px;

  --font-head: "Oswald", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =====================================================
   2. Reset / base
   ===================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--c-green-700); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus { color: var(--c-green-900); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: 0.01em;
  line-height: 1.18;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p  { margin: 0 0 1em; }

.container {
  width: 92%;
  max-width: var(--container);
  margin-inline: auto;
}

.section { padding: 72px 0; }
.section--soft { background: var(--c-bg-soft); }
.section--dark { background: var(--c-green-900); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .82rem;
  color: var(--c-green-700);
  margin-bottom: .8em;
}

.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head p { color: var(--c-mute); font-size: 1.07rem; }

/* =====================================================
   3. Buttons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 14px 26px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--c-yellow-500);
  color: var(--c-ink);
  border-color: var(--c-yellow-500);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--c-yellow-600);
  border-color: var(--c-yellow-600);
  color: var(--c-ink);
}
.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-secondary:hover {
  background: #fff;
  color: var(--c-green-900);
}
.btn-ghost {
  background: transparent;
  color: var(--c-green-800);
  border-color: var(--c-green-800);
}
.btn-ghost:hover { background: var(--c-green-800); color: #fff; }

/* =====================================================
   4. Header / nav
   ===================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.site-header__top {
  background: var(--c-green-900);
  color: #fff;
  font-size: .9rem;
}
.site-header__top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  gap: 12px;
  flex-wrap: wrap;
}
.site-header__top a { color: var(--c-yellow-500); }
.site-header__top a:hover { color: #fff; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--c-ink);
}
.site-brand:hover { text-decoration: none; }
.site-brand__mark {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--c-green-700);
  display: grid;
  place-items: center;
  color: var(--c-yellow-500);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  flex: none;
  box-shadow: var(--shadow-sm);
}
.site-brand__name {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.05;
  font-size: 1.15rem;
  color: var(--c-ink);
}
.site-brand__name span {
  display: block;
  font-size: .78rem;
  color: var(--c-mute);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.primary-nav { display: flex; align-items: center; gap: 14px; }
.primary-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: inline-block;
  padding: 10px 14px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  color: var(--c-ink);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.primary-nav a:hover,
.primary-nav .current_page_item a,
.primary-nav .current-menu-item a {
  background: var(--c-green-100);
  color: var(--c-green-800);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--c-ink);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    padding: 12px 0;
    display: none;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    width: 92%;
    margin: 0 auto;
    gap: 0;
  }
  .primary-nav a {
    display: block;
    padding: 12px 8px;
    border-bottom: 1px solid var(--c-line);
  }
  .primary-nav .btn { margin: 14px 4%; }
}

/* =====================================================
   5. Hero
   ===================================================== */
.hero {
  position: relative;
  background: var(--c-green-900);
  color: #fff;
  overflow: hidden;
  padding: clamp(80px, 14vw, 140px) 0;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(31,61,17,.78), rgba(31,61,17,.55) 60%, rgba(0,0,0,.45));
  z-index: 1;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.hero h1 { color: #fff; }
.hero h1 strong { color: var(--c-yellow-500); font-weight: 600; }
.hero p {
  font-size: 1.15rem;
  opacity: .92;
  margin-bottom: 1.6em;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__pillbar {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero__pillbar span {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .88rem;
}

/* =====================================================
   6. Services
   ===================================================== */
.services-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-card__media {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  background-color: var(--c-green-100);
}
.service-card__body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: .4em;
}
.service-card h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-yellow-500);
  border-radius: 2px;
  margin-right: .5em;
  transform: translateY(-2px);
}
.service-card p { color: var(--c-mute); font-size: .96rem; flex: 1; }
.service-card__more {
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  font-size: .85rem;
  letter-spacing: .08em;
  color: var(--c-green-700);
  margin-top: 12px;
}

/* =====================================================
   7. About / split section
   ===================================================== */
.split {
  display: grid;
  gap: 48px;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.split h2 { margin-bottom: .4em; }
.split__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.split__stat {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.split__stat strong {
  display: block;
  font-family: var(--font-head);
  color: var(--c-green-800);
  font-size: 1.6rem;
  line-height: 1;
}
.split__stat span {
  display: block;
  font-size: .86rem;
  color: var(--c-mute);
  margin-top: 4px;
}

/* =====================================================
   8. Gallery
   ===================================================== */
.gallery-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery-grid a {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--c-green-100);
  box-shadow: var(--shadow-sm);
}
.gallery-grid img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.gallery-grid a:hover img { transform: scale(1.04); }
.gallery-grid a::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.18), transparent 40%);
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-grid a:hover::after { opacity: 1; }

/* =====================================================
   9. Service area / list strip
   ===================================================== */
.service-area {
  background: var(--c-green-900);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}
.service-area h2 { color: #fff; }
.service-area__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 18px;
}
.service-area__list span {
  border: 1px solid rgba(255,255,255,.3);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .92rem;
  color: rgba(255,255,255,.92);
}

/* =====================================================
   10. Contact / CTA band
   ===================================================== */
.cta-band {
  background:
    linear-gradient(135deg, rgba(39,83,24,.92), rgba(39,83,24,.85)),
    var(--c-green-700);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { font-size: 1.1rem; opacity: .92; max-width: 560px; margin: 0 auto 24px; }
.cta-band__phone {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--c-yellow-500);
  display: inline-block;
  margin-top: 6px;
  letter-spacing: .02em;
}
.cta-band__phone:hover { color: #fff; text-decoration: none; }

/* =====================================================
   11. Contact page
   ===================================================== */
.contact-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info ul {
  list-style: none;
  padding: 0; margin: 0;
}
.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-line);
}
.contact-info li:last-child { border-bottom: 0; }
.contact-info__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--c-green-100);
  color: var(--c-green-800);
  display: grid; place-items: center;
  font-weight: 700;
  flex: none;
  font-family: var(--font-head);
}
.contact-info__label {
  display: block;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-mute);
}
.contact-info__value { font-size: 1.05rem; color: var(--c-ink); font-weight: 500; }

.form-card {
  background: #fff;
  padding: 28px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.form-card label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--c-ink);
}
.form-card input,
.form-card textarea,
.form-card select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  font: inherit;
  margin-bottom: 16px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
  outline: 0;
  border-color: var(--c-green-700);
  box-shadow: 0 0 0 3px rgba(47,107,31,.18);
}
.form-card textarea { min-height: 130px; resize: vertical; }

/* =====================================================
   12. Single / page content
   ===================================================== */
.page-hero {
  background: var(--c-green-900);
  color: #fff;
  padding: 72px 0 56px;
  text-align: center;
}
.page-hero h1 { color: #fff; margin: 0; }
.page-hero p { color: rgba(255,255,255,.86); margin-top: 10px; }

.entry-content {
  max-width: 760px;
  margin: 48px auto;
}
.entry-content h2 { margin-top: 1.2em; }
.entry-content ul { padding-left: 1.2em; }

/* =====================================================
   13. Footer
   ===================================================== */
.site-footer {
  background: #0f1f08;
  color: #c9d6c0;
  padding: 56px 0 24px;
  font-size: .95rem;
}
.site-footer a { color: var(--c-yellow-500); }
.site-footer a:hover { color: #fff; }
/* Footer "Call Us" button — needs to outrank `.site-footer a { color: yellow }`
   and `.site-footer a:hover { color: #fff }`. Using `a.btn.btn-primary`
   (specificity 0,3,1) to comfortably win over both, plus !important as a
   defensive measure against page-builder / plugin overrides. */
.site-footer a.btn.btn-primary {
  color: var(--c-ink) !important;
  background: var(--c-yellow-500);
  border-color: var(--c-yellow-500);
}
.site-footer a.btn.btn-primary:hover,
.site-footer a.btn.btn-primary:focus {
  color: var(--c-ink) !important;
  background: var(--c-yellow-600);
  border-color: var(--c-yellow-600);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 24px; }
}
.site-footer h4 {
  color: #fff;
  margin: 0 0 14px;
  font-size: 1rem;
  letter-spacing: .04em;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { padding: 4px 0; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 40px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .85rem;
  opacity: .8;
}

/* =====================================================
   13b. Lightbox (used on Home + Gallery image grids)
   ===================================================== */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity .2s ease;
}
.lightbox-overlay.is-open { display: flex; opacity: 1; }
.lightbox-figure {
  margin: 0;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-figure img {
  max-width: 92vw;
  max-height: 84vh;
  width: auto; height: auto;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  background: #111;
}
.lightbox-figure figcaption {
  color: rgba(255,255,255,.8);
  margin-top: 14px;
  font-size: .92rem;
  text-align: center;
  max-width: 720px;
}
.lightbox-overlay button {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0;
  transition: background .2s ease, transform .15s ease;
}
.lightbox-overlay button:hover { background: rgba(255,255,255,.22); transform: scale(1.05); }
.lightbox-close { top: 22px; right: 22px; }
.lightbox-prev  { top: 50%; left: 18px; transform: translateY(-50%); }
.lightbox-next  { top: 50%; right: 18px; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-counter {
  position: absolute;
  top: 28px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: .85rem;
  font-family: var(--font-head);
  letter-spacing: .12em;
  text-transform: uppercase;
}
body.lightbox-open { overflow: hidden; }
@media (max-width: 600px) {
  .lightbox-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lightbox-prev  { left: 6px; width: 40px; height: 40px; }
  .lightbox-next  { right: 6px; width: 40px; height: 40px; }
}

/* =====================================================
   14. Misc utilities
   ===================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.alignwide { max-width: 1280px; margin-inline: auto; }
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  height: 1px; width: 1px; overflow: hidden;
}
