/* E&P Landscaping concept. Shell J, "Letterhead".
   Colours come from their logo: the sage back house, the bright leaf-green front house and
   leaf, and black serif type. Bright green is never used for text on white (too light);
   it is the accent on dark grounds only. */

:root {
  --ink: #141a16;
  --muted: #4a554d;
  --forest: #2f5a3e;        /* their sage, deepened for text and buttons on light grounds */
  --forest-900: #16261c;    /* dark bands */
  --forest-950: #0f1a13;    /* footer */
  --sage: #6f9c7b;          /* their back house: rules only */
  --leaf: #a6e16b;          /* their front house and leaf: accent on dark only */
  --leaf-hover: #bdec8c;
  --mist: #f1f5ef;
  --line: #d8e0d5;
  --white: #fff;
  --on-dark: #c9d6cb;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 32px);
  --section-pad: clamp(40px, 5vw, 72px);
  --radius: 3px;
  --callbar-h: 0px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
  scroll-padding-bottom: calc(var(--callbar-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
}

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

/* Keeps "957-1986" and "clean-up" in one piece. Whole buttons are left free to wrap, so a phone
   set to very large text still fits them on screen. */
.nobr { white-space: nowrap; }

a { color: var(--forest); text-underline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
}
.skip:focus { left: 8px; }

/* ---------- Buttons: square-ish, never pills ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 700 1.0625rem/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn--leaf { background: var(--leaf); border-color: var(--leaf); color: var(--forest-950); }
.btn--leaf:hover { background: var(--leaf-hover); border-color: var(--leaf-hover); }

.btn--ghost { border-color: rgba(255, 255, 255, 0.85); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }

.btn--forest { background: var(--forest); border-color: var(--forest); color: var(--white); }
.btn--forest:hover { background: var(--forest-900); border-color: var(--forest-900); }

.btn--line { border-color: var(--ink); color: var(--ink); background: var(--white); }
.btn--line:hover { border-color: var(--forest); color: var(--forest); }

.btn--full { width: 100%; }

/* ---------- Letterhead ---------- */

.masthead {
  position: relative;
  z-index: 20;
  background: var(--white);
}

.mast-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 5px;
}

.brand { display: block; flex: none; }
.brand img {
  /* Phones: his logo is the first thing he sees, so it leads the bar (the file is 451px wide). */
  width: 142px;
  /* The logo is a JPEG on white: multiply melts its white box into the page. */
  mix-blend-mode: multiply;
}

/* Quiet on purpose: the logo leads, the Menu button follows. */
.menu-btn {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--sage);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font: 600 1rem/1 var(--sans);
  cursor: pointer;
}
.menu-btn:hover { border-color: var(--forest); }

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 4px var(--gutter) 16px;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 30px rgba(15, 26, 19, 0.12);
}
.nav.is-open { display: block; }

.nav-list { margin: 0; padding: 0; list-style: none; }
.nav-list a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.nav-list--r li:last-child a { border-bottom: 0; }

@media (min-width: 560px) {
  .mast-in { padding-block: 8px; }
  .brand img { width: 148px; }
}

/* Desktop: logo centred, the menu split three and three either side of it. */
@media (min-width: 1100px) {
  .mast-in {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding-block: 14px;
  }
  .brand { grid-column: 2; grid-row: 1; z-index: 1; }
  .brand img { width: 164px; }
  .menu-btn { display: none; }

  .nav {
    display: grid;
    grid-template-columns: 1fr 200px 1fr;
    grid-column: 1 / -1;
    grid-row: 1;
    position: static;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
  }
  /* Both groups hang off the logo with the same gaps, so they mirror across the centre. */
  .nav-list {
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
  }
  .nav-list--l { grid-column: 1; justify-content: flex-end; padding-right: var(--nav-inner); }
  .nav-list--r { grid-column: 3; justify-content: flex-start; padding-left: var(--nav-inner); }
  .nav-list a {
    padding: 10px 4px;
    border: 0;
    font-size: 0.98rem;
    border-bottom: 2px solid transparent;
  }
  .nav-list a:hover { border-bottom-color: var(--sage); }
}
@media (min-width: 1100px) { :root { --nav-gap: 20px; --nav-inner: 18px; } }
@media (min-width: 1240px) { :root { --nav-gap: 36px; --nav-inner: 28px; } }

/* ---------- Hero: their photo set into the page like a print ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(520px, calc(100svh - 150px), 680px);
  background: var(--forest-900);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}

@media (min-width: 900px) {
  .hero { margin-inline: 20px; }
}

.hero-bg,
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-bg { z-index: -1; }
.hero-bg img { object-fit: cover; object-position: 50% 55%; }

/* The photo itself is only lightly graded (see _build-assets.mjs), so the sky stays blue and the
   lawn stays green. The darkening sits only behind the centred text. Phones: a soft band the
   height of the text block (the text spans the full width there), so sky shows above it and the
   deck below it. 700px and up: one soft oval patch in the middle of the photo, where the text is.
   Measured against the photo pixels at 320 to 1920 (notes/coverage.md). */
.hero-in { position: relative; }
.hero-in::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(8, 16, 11, 0) 0,
    rgba(8, 16, 11, 0.5) 60px,
    rgba(8, 16, 11, 0.5) calc(100% - 70px),
    rgba(8, 16, 11, 0) 100%);
}
@media (min-width: 700px) {
  .hero-in::before { content: none; }
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse var(--patch-w) var(--patch-h) at 50% 52%,
      rgba(8, 16, 11, 0.72) 0%,
      rgba(8, 16, 11, 0.62) 45%,
      rgba(8, 16, 11, 0.3) 78%,
      rgba(8, 16, 11, 0) 100%);
  }
  .hero { --patch-w: 62%; --patch-h: 56%; }
}
@media (min-width: 1100px) { .hero { --patch-w: 46%; --patch-h: 58%; } }

.hero-in {
  padding-block: clamp(64px, 9vw, 104px);
  text-align: center;
}

.hero h1 {
  max-width: 11em;
  margin-inline: auto;
  font-size: clamp(2.45rem, 1.5rem + 4vw, 4.6rem);
  line-height: 1.02;
  text-shadow: 0 2px 24px rgba(5, 10, 7, 0.45);
}

.hero-towns {
  max-width: 36rem;
  margin: clamp(16px, 2vw, 22px) auto 0;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: #f4f7f2;
  text-shadow: 0 1px 14px rgba(5, 10, 7, 0.6);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 32px);
}
/* Phones: the pair fills one row, and if it has to stack, both buttons are the same width. */
@media (max-width: 559px) {
  .hero-cta,
  .est-cta { max-width: 400px; margin-inline: auto; }
  .hero-cta .btn,
  .est-cta .btn { flex: 1 1 auto; padding-inline: 18px; }
}

.hero-fave {
  display: inline-block;
  margin-top: clamp(26px, 3.4vw, 40px);
  padding-top: 14px;
  border-top: 1px solid rgba(166, 225, 107, 0.55);
}
.hero-fave-years { white-space: nowrap; }
@media (max-width: 559px) {
  .hero-fave-sep { display: none; }
  .hero-fave-years { display: block; }
}
.hero-fave a {
  display: inline-block;
  padding: 4px 2px;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 12px rgba(5, 10, 7, 0.7);
}
.hero-fave a:hover { text-decoration: underline; }
.hero :focus-visible { outline-color: var(--leaf); }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); }

.section-head {
  margin-bottom: clamp(20px, 2.6vw, 34px);
  text-align: center;
}
.section-head h2::before,
.about h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin: 0 auto 16px;
  background: var(--sage);
}
.section-head h2,
.about h2 { font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.75rem); }

/* Services: three equal columns, their own words as the list. */
.svc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.svc {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 18px 20px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sage);
  border-radius: 0 0 var(--radius) var(--radius);
}
.svc h3 { font-size: 1.5rem; }

.svc-list {
  margin: 8px 0 8px;
  padding: 0;
  list-style: none;
}
.svc-list li {
  padding: 7px 0;
  text-wrap: pretty;
  border-bottom: 1px solid var(--line);
}
.svc-list li:last-child { border-bottom: 0; }

.svc-ask {
  justify-self: start;
  padding: 6px 0;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--sage);
  text-decoration-thickness: 2px;
}
.svc-ask:hover { color: var(--forest-900); text-decoration-color: currentColor; }

/* Phones: same words, less height. No rules between items, tighter rows and cards. */
@media (max-width: 719px) {
  .services .section-head { margin-bottom: 16px; }
  .svc-grid { gap: 10px; }
  .svc { padding: 12px 16px 8px; }
  .svc h3 { font-size: 1.35rem; }
  .svc-list { margin: 6px 0 2px; font-size: 1rem; }
  .svc-list li {
    position: relative;
    padding: 2px 0 2px 14px;
    border-bottom: 0;
    line-height: 1.45;
  }
  /* A small square sage bullet instead of a full rule, so each item still reads as its own line. */
  .svc-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 5px;
    height: 5px;
    background: var(--sage);
  }
  .svc-ask { padding: 6px 0 2px; }
}

@media (min-width: 720px) {
  .svc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto 1fr auto;
    gap: 22px;
  }
  .svc {
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
    padding: 26px 26px 22px;
  }
}

/* Tablets: three narrow columns, so a little less padding and type. */
@media (min-width: 720px) and (max-width: 979px) {
  .svc-grid { gap: 14px; }
  .svc { padding: 20px 16px 16px; }
  .svc h3 { font-size: 1.3rem; }
  .svc-list { font-size: 1rem; }
}

/* Project gallery. Their three photos first, then the badged stand-ins. */
.work { background: var(--mist); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.work-grid > li { min-width: 0; }

.shot { position: relative; margin: 0; }
.shot img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--line);
}
.shot figcaption {
  padding-top: 8px;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--muted);
}

/* Stand-ins: greyed, dimmed and flagged so nobody takes them for E&P's work. */
.shot--example img { filter: grayscale(0.5) contrast(0.95); opacity: 0.78; }
.shot-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  /* Never wider than its tile, even with very large text set on the phone. */
  max-width: calc(100% - 16px);
  overflow-wrap: anywhere;
  padding: 4px 8px;
  background: var(--white);
  color: var(--ink);
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-note {
  max-width: 40rem;
  margin: clamp(16px, 2vw, 22px) auto 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Phones: his three photos first and together (the deck full width, then two side by side),
   then the three stand-ins as a smaller row of three, so his work never sits next to stock. */
@media (max-width: 719px) {
  .work-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 10px; }
  .work-grid > li { grid-column: span 3; }
  .work-grid > li:first-child { grid-column: 1 / -1; }
  .work-grid > li.work-ex { grid-column: span 2; }
  .shot--example figcaption { font-size: 0.78rem; line-height: 1.3; padding-top: 6px; }
  .shot-flag {
    top: 4px;
    left: 4px;
    max-width: calc(100% - 8px);
    padding: 3px 5px;
    font-size: 0.6rem;
    letter-spacing: 0.04em;
  }
}

@media (min-width: 720px) {
  .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .shot figcaption { font-size: 0.95rem; }
}

/* About: one centred statement on the dark band. */
.about {
  background: var(--forest-900);
  color: var(--white);
}
.about-in {
  max-width: 50rem;
  text-align: center;
}
.about .kicker {
  margin-bottom: 14px;
  color: var(--leaf);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.about h2::before { background: var(--leaf); margin-bottom: 18px; order: -1; }
.about h2 { color: var(--white); }
.about p:last-child {
  margin-top: 16px;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.2rem);
  line-height: 1.65;
  color: var(--on-dark);
}
.about :focus-visible { outline-color: var(--leaf); }

/* Estimate: the ask on the left, the form on the right. */
.est-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
.est-copy h2 { font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.75rem); }
.est-copy h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-bottom: 16px;
  background: var(--sage);
}
.est-copy > p:not(.est-save) {
  margin-top: 14px;
  max-width: 30rem;
  font-size: 1.125rem;
}
.est-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.est-save { margin-top: 16px; }
.est-save a {
  display: inline-block;
  padding: 4px 0;
  font-weight: 600;
}

.quote-form {
  display: grid;
  gap: 12px;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field { display: grid; gap: 4px; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #9aa89d;
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
}
.field input:focus-visible,
.field select:focus-visible { outline-offset: 1px; }
.field .opt { font-weight: 400; color: var(--muted); }

.form-status { display: none; font-weight: 600; color: var(--forest-900); }
.form-status--on { display: block; }

@media (min-width: 560px) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .est-in {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
    align-items: center;
  }
}

/* Below the two-column layout the ask is centred, like every other section head. */
@media (max-width: 899px) {
  .est-copy { text-align: center; }
  .est-copy h2::before { margin-inline: auto; }
  .est-copy > p:not(.est-save) { margin-inline: auto; }
  .est-cta { justify-content: center; }
  .quote-form { max-width: 560px; width: 100%; margin-inline: auto; }
}

/* ---------- Footer ---------- */

.footer {
  /* The room the phone call bar needs lives in the footer, so the page always ends on dark green. */
  padding-block: 30px calc(34px + var(--callbar-h));
  background: var(--forest-950);
  color: var(--on-dark);
  text-align: center;
}
.foot-in { display: grid; gap: 6px; justify-items: center; }
.foot-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--white);
}
.foot-tel a {
  display: inline-block;
  padding: 4px 0;
  color: var(--leaf);
  font-weight: 700;
  text-decoration: none;
}
.foot-tel a:hover { text-decoration: underline; }
.footer :focus-visible { outline-color: var(--leaf); }
.concept-note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #a8b8ac;
}

/* ---------- Call bar: phones only ---------- */

.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--forest-900);
  border-top: 3px solid var(--leaf);
}
.callbar .btn { min-height: 50px; padding-inline: 10px; }
.callbar :focus-visible { outline-color: var(--leaf); }

/* One Call and Text pair on screen at a time: with script running, the bar stays tucked away
   while the hero's or the estimate section's own buttons are in view (script.js adds .is-shown).
   Without script it simply stays up. */
.js .callbar {
  transform: translateY(105%);
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
}
.js .callbar.is-shown {
  transform: none;
  visibility: visible;
  transition: transform 0.22s ease, visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .js .callbar,
  .js .callbar.is-shown { transition: none; }
}

/* Very narrow phones: the Call button takes the room it needs, so the number never splits. */
@media (max-width: 359px) {
  .callbar { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .callbar .btn { padding-inline: 12px; font-size: 1rem; }
}

@media (min-width: 900px) {
  .callbar { display: none; }
}

/* ---------- No JS ---------- */

.no-js .menu-btn { display: none; }
.no-js .nav { display: block; position: static; box-shadow: none; }
.no-js .mast-in { flex-wrap: wrap; }

@media (min-width: 1100px) {
  .no-js .nav { display: grid; }
}
.no-js .nav { width: 100%; padding-inline: 0; }

/* Before script.js measures it, assume the call bar's usual height on phones. */
@media (max-width: 899px) {
  :root { --callbar-h: 74px; }
}

/* a call button in every section (feature checklist: "A call or quote button in every section") */
.sec-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.sec-cta .btn { flex: 0 1 auto; }
@media (max-width: 480px) { .sec-cta .btn { flex: 1 1 100%; } }
