/* ==========================================================================
   Mark's Quality Lawn Care — landing page styles
   ========================================================================== */

:root {
  --green-900: #163a24;
  --green-800: #1d4a2e;
  --green-700: #276b3c;
  --green-600: #348a4b;
  --sand-100: #f4f6ee;
  --sand-200: #e7ebd9;
  --ink: #20241d;
  --ink-soft: #51584c;
  --line: #dfe3d3;
  --white: #ffffff;
  --amber: #e0a83c;
  --shadow-sm: 0 1px 2px rgba(22, 58, 36, .08), 0 4px 12px rgba(22, 58, 36, .06);
  --shadow-md: 0 8px 30px rgba(22, 58, 36, .14);
  --radius: 12px;
  --wrap: 1120px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Barlow Condensed", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--green-700); }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.08;
  letter-spacing: .01em;
  margin: 0 0 .4em;
  color: var(--green-900);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); text-transform: none; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: .5rem; left: .5rem;
  width: auto; height: auto;
  clip: auto;
  background: var(--green-900);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 8px;
  z-index: 200;
}

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--green-600);
  margin: 0 0 .6rem;
}

.stars { color: var(--amber); letter-spacing: .08em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .02em;
  text-decoration: none;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--green-700);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--green-900); }

.btn-ghost {
  background: transparent;
  color: var(--green-900);
  border-color: var(--green-700);
}
.btn-ghost:hover { background: var(--green-700); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--green-800);
  margin-right: auto;
}
.brand-mark { color: var(--green-700); display: inline-flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--green-900);
  letter-spacing: .02em;
}
.brand-text small {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .62rem;
  color: var(--ink-soft);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .98rem;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.nav-menu a:hover { color: var(--green-700); border-bottom-color: var(--green-600); }

.nav-toggle { display: none; }

.header-cta { padding: .55rem 1rem; font-size: .95rem; background: var(--sand-100); color: var(--green-900); }
.header-cta:hover { background: var(--sand-200); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(14, 32, 20, .92) 0%, rgba(14, 32, 20, .78) 45%, rgba(14, 32, 20, .42) 100%);
}
.hero-content {
  padding-top: clamp(3.5rem, 9vw, 6.5rem);
  padding-bottom: clamp(3.5rem, 9vw, 6.5rem);
  max-width: 720px;
}
.hero .eyebrow { color: #b6d9c1; }
.hero h1 { color: #fff; }
.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  color: #e9efe6;
  margin: 1rem 0 1.8rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: 1.8rem;
}
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero .btn-ghost:hover { background: #fff; color: var(--green-900); }

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: .55rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-size: .95rem;
}
.rating-badge .stars { font-size: 1rem; }
.rating-badge:hover { background: rgba(255, 255, 255, .2); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--sand-100); }
.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-sub { color: var(--ink-soft); font-size: 1.05rem; margin: .2rem 0 0; }

/* ---------- Services ---------- */
.service-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.service-card h3 { color: var(--green-900); margin-bottom: .4rem; }
.service-card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.section-alt .service-card { border-color: #e0e3d0; }

/* ---------- Gallery ---------- */
.gallery-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gallery-grid li { display: flex; }
.gallery-item {
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--sand-200);
  box-shadow: var(--shadow-sm);
  display: block;
}
.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.05); }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem .9rem .7rem;
  font-size: .85rem;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(14, 32, 20, .88), rgba(14, 32, 20, 0));
}
.gallery-note { margin: 1.4rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.gallery-note code {
  font-size: .82em;
  background: var(--sand-200);
  padding: .1rem .35rem;
  border-radius: 4px;
}

/* ---------- Reviews ---------- */
.review-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.review-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.review-card .stars { font-size: 1.05rem; margin: 0 0 .6rem; }
.review-card blockquote {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--ink);
}
.review-by {
  margin: auto 0 0;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--green-800);
}
.reviews-cta { margin-top: 2rem; text-align: center; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
}
.about-points {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: .6rem;
}
.about-points li {
  padding-left: 1.7rem;
  position: relative;
  color: var(--ink-soft);
}
.about-points li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--green-600);
  font-weight: 700;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 5vw, 3rem);
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
}
.contact-list {
  margin: 1.6rem 0;
  display: grid;
  gap: 1rem;
}
.contact-list > div { display: grid; grid-template-columns: 100px 1fr; gap: .6rem; }
.contact-list dt {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  color: var(--ink-soft);
  padding-top: .15rem;
}
.contact-list dd { margin: 0; font-weight: 500; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}
.field { display: flex; flex-direction: column; margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: .04em;
  font-size: .9rem;
  margin-bottom: .35rem;
  color: var(--green-900);
}
.field input,
.field textarea {
  font: inherit;
  padding: .7rem .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sand-100);
  color: var(--ink);
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--green-600);
  outline-offset: 1px;
  background: #fff;
}
.hp-field { position: absolute; left: -5000px; }
.form-fineprint { font-size: .85rem; color: var(--ink-soft); margin: 1rem 0 0; }

/* ---------- Thank-you page ---------- */
.thanks-section { text-align: center; }
.thanks-inner { max-width: 620px; margin: 0 auto; }
.thanks-inner .lede { color: var(--ink-soft); margin: 1rem auto 1.8rem; }
.thanks-inner .hero-actions { justify-content: center; }
.thanks-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin-bottom: 1.2rem;
  border-radius: 999px;
  background: var(--sand-100);
  color: var(--green-600);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-900);
  color: #d5e3da;
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: center;
}
.footer-brand {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: #fff;
  margin: 0 0 .2rem;
}
.site-footer p { margin: .1rem 0; font-size: .9rem; }
.footer-contact { display: flex; gap: 1.4rem; margin-left: auto; }
.footer-contact a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-contact a:hover { text-decoration: underline; }
.footer-legal { width: 100%; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; margin-top: .6rem; font-size: .82rem; color: #a7bfb1; }

.built-by { width: 100%; margin: 0; font-size: .84rem; color: #a7bfb1; }
.built-by a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #d5e3da;
  font-weight: 600;
  text-decoration: none;
}
.built-by a img { width: 22px; height: 22px; flex: none; }
.built-by a span { text-decoration: underline; text-underline-offset: 3px; }
.built-by a:hover { color: #fff; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(9, 18, 12, .93);
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox-figure { margin: 0; max-width: 1000px; text-align: center; }
.lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 8px;
  margin: 0 auto;
}
.lightbox-figure figcaption {
  color: #e9efe6;
  margin-top: .9rem;
  font-size: .95rem;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  line-height: 1;
  transition: background-color .15s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox-close {
  top: 1.2rem; right: 1.2rem;
  width: 44px; height: 44px;
  font-size: 1.6rem;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 2rem;
}
.lightbox-prev { left: clamp(.5rem, 3vw, 2rem); }
.lightbox-next { right: clamp(.5rem, 3vw, 2rem); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .about-media { order: 2; }

  .header-cta { display: none; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    position: relative;
    z-index: 120;
  }
  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: var(--green-900);
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bar::before { transform: translateY(-6px); }
  .nav-toggle-bar::after { transform: translateY(4px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(0) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-1px) rotate(-45deg); }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: .5rem 0;
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a {
    display: block;
    padding: .9rem clamp(1rem, 4vw, 2rem);
    border-bottom: 1px solid var(--line);
  }
  .site-nav { position: static; }
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .contact-list > div { grid-template-columns: 1fr; gap: .1rem; }
  .footer-contact { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
