/* Tree Works page template (Option C: Photo-Led).
   Full-bleed photo hero, alternating color bands, split photo/text sections.
   Rules for combining blocks: vault > 02-wiki/entities/.../tree-works-llc/Page Template.md
   One stylesheet for every service and town page. Add a block here, never inline on a page. */

/* ---------- Tokens ---------- */
:root {
  --evergreen: #1F5A3D;
  --evergreen-dark: #163F2B;     /* hover */
  --evergreen-light: #A7D8B8;    /* links on dark bands only */
  --charcoal: #323232;
  --site-grey: #464646;
  --accent: #FFA500;        /* stars and sign-card borders only, never text */
  --text: #323232;
  --muted: #575757;
  --white: #FFFFFF;
  --surface: #F2F2F2;
  --border: #D9D9D9;
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --header-h: 60px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-padding-top: var(--header-h); scroll-behavior: smooth; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: var(--font); font-size: 18px; line-height: 1.6;
  padding-bottom: 64px; /* room for the mobile call bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--evergreen); }
a:hover { color: var(--evergreen-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: 1.8rem; }
p { margin: 0 0 1em; }

/* Utilities */
.nw { white-space: nowrap; }                              /* keep phone numbers on one line */
a.tel { color: inherit; text-decoration: underline; }     /* phone numbers in body copy (every number is a tel: link) */

/* ---------- Header (site-wide) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10; height: var(--header-h);
  display: flex; align-items: center; gap: 1rem; padding: 0 1rem;
  background: var(--evergreen);
}
.logo { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.5rem; margin-right: auto; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: flex; cursor: pointer; padding: 6px; }
.nav-toggle-label svg { width: 28px; height: 28px; fill: #fff; }
.site-header nav {
  position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--evergreen);
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  transform: scaleY(0); transform-origin: top; transition: transform 200ms ease-in-out;
}
.nav-toggle:checked ~ nav { transform: scaleY(1); }
.site-header nav ul { list-style: none; margin: 0; padding: .5rem 1.5rem 1rem; }
.site-header nav a, .nav-label { display: block; padding: .6rem 0; color: #fff; text-decoration: none; text-transform: uppercase; letter-spacing: .04em; }
/* Dropdowns (Services, Areas Served). Phone menu: always open, indented */
.nav-label { cursor: default; }
.site-header nav .nav-sub { padding: 0 0 .4rem 1rem; border-left: 2px solid rgba(255,255,255,.25); }
.site-header nav .nav-sub a { text-transform: none; letter-spacing: 0; padding: .4rem 0; opacity: .9; }
.site-header nav .nav-sub a[aria-current] { opacity: 1; font-weight: 700; }
.header-call { display: none; align-items: center; gap: .4rem; color: #fff; text-decoration: none; font-weight: 700; }
.header-call svg, .call-bar svg, .btn svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Hero ----------
   Per page, set the photo and its crops inline:
   <section class="hero" style="--hero-img:url('/images/x.jpg'); --hero-pos:0% 40%; --hero-size:125% auto">
   --hero-pos / --hero-size: desktop crop (Dave right of the text gradient).
   --hero-m-pos / --hero-m-size: mobile crop. Photo sits above the text and fades out
   from 260px to 500px down. Portrait photos work with the defaults; landscape photos
   need a height-based size, e.g. --hero-m-size:auto 480px; --hero-m-pos:40% top. */
.hero {
  --hero-img: url('/images/hero-top-cut.jpg');
  --hero-pos: 0% 40%;
  --hero-size: 125% auto;
  --hero-m-pos: center top;
  --hero-m-size: 100% auto;
  min-height: 82vh; display: flex; align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(30,30,30,0) 0, rgba(30,30,30,0) 260px, rgba(30,30,30,.85) 400px, #1e1e1e 500px),
    var(--hero-img) var(--hero-m-pos) / var(--hero-m-size) no-repeat, #1e1e1e;
  color: #fff; padding: 330px 1rem 2rem;
}
.hero-inner { max-width: 1140px; width: 100%; margin: 0 auto; }
.hero h1 { font-size: 2.4rem; text-shadow: 0 2px 12px rgba(0,0,0,.6); max-width: 14ch; }
.hero p { max-width: 620px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.lead { font-size: 1.15rem; }
.breadcrumb { font-size: .85rem; margin-bottom: 1rem; opacity: .9; }
.breadcrumb a { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--evergreen); color: #fff; text-decoration: none; font-weight: 700;
  padding: 14px 26px; border-radius: 10px; border: 2px solid var(--evergreen);
}
.btn:hover { background: var(--evergreen-dark); border-color: var(--evergreen-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn-lg { font-size: 1.2rem; padding: 18px 36px; }
.btn-outline { background: #fff; color: var(--evergreen); border-color: var(--evergreen); padding: 10px 20px; }
.btn-outline:hover { background: var(--evergreen); color: #fff; }
.btn-outline::after, .band-dark .btn-ghost::after, .band-evergreen .btn-ghost::after, .cta-photo .section-links .btn-ghost::after { content: "\2192"; }
/* Section links: the buttons that replace in-copy links, at the end of a section */
.section-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.cta-photo .section-links { justify-content: center; }
.section-links .btn-ghost { padding: 10px 20px; }

/* Proof strip: always 3 items, directly under the hero */
.proof-strip {
  list-style: none; margin: 0; padding: 0;
  background: var(--charcoal); color: #fff;
  display: grid;
}
.proof-strip li { padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 1rem; }
.stars { color: var(--accent); letter-spacing: .1em; margin-right: .35rem; }

/* ---------- Split sections (text + one photo) ---------- */
.split { max-width: 1140px; margin: 0 auto; padding: 3rem 1rem; display: grid; gap: 2rem; align-items: center; }
.split h2 { color: var(--evergreen); }
.split-photo { margin: 0; }
.split-photo img { border-radius: 14px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; max-height: 560px; }

/* ---------- Bands ---------- */
.band-inner { max-width: 1140px; margin: 0 auto; }
.band-inner.narrow { max-width: 760px; }
.band-dark { background: var(--site-grey); color: #fff; padding: 3.5rem 1rem; }
.band-dark a { color: var(--evergreen-light); }
.band-dark a:hover { color: #fff; }
.band-evergreen { background: var(--evergreen); color: #fff; padding: 3.5rem 1rem; }
.band-evergreen > .band-inner > p a { color: #fff; }
.band-light { background: var(--surface); padding: 3rem 1rem; }
.band-white { background: var(--white); padding: 3rem 1rem; }
.band-light h2, .band-white h2 { color: var(--evergreen); }

/* ---------- Band content blocks ---------- */
.two-col { display: grid; gap: 2rem; }
.list-intro { font-weight: 700; }

/* Sign cards: dark bands only (charcoal cards need white text) */
.sign-cards { list-style: none; padding: 0; display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.sign-cards li { background: var(--charcoal); border-left: 4px solid var(--accent); padding: .8rem 1rem; border-radius: 0 8px 8px 0; }
.photo-stack { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-content: start; }
.photo-stack img { border-radius: 10px; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

/* Big quotes: dark or teal bands only. On light backgrounds use .card */
.quote-row { display: grid; gap: 1rem; margin-top: 2rem; }
.big-quote { margin: 0; padding: 1.5rem; background: var(--charcoal); border-radius: 12px; }
.big-quote p { font-size: 1.15rem; font-style: italic; }
.big-quote cite, .card cite { font-style: normal; font-weight: 700; }
.big-quote cite::before, .card cite::before { content: "- "; }

/* Cards: white, work on any background. Row fits 1 to 4 across */
.card-row { display: grid; gap: 1rem; }
.card { margin: 0; background: #fff; color: var(--text); border-radius: 12px; padding: 1.5rem; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.card h3 { color: var(--evergreen); font-size: 1.2rem; }   /* service overview cards */
/* Whole-card link (service cards) */
a.card-link { display: block; text-decoration: none; border: 2px solid transparent; transition: border-color 150ms, transform 150ms; }
a.card-link strong, a.card-link h3 { color: var(--evergreen); }
a.card-link:hover { border-color: var(--evergreen); transform: translateY(-2px); color: var(--text); }
a.card-link .card-more { display: block; margin-top: .75rem; color: var(--evergreen); font-weight: 700; }
a.card-name { display: flex; align-items: center; padding: 1.25rem 1.5rem; }
a.card-name h3 { margin: 0; font-size: 1.1rem; }
a.card-name h3::after { content: " \2192"; }
.card p:last-child { margin-bottom: 0; }
.split-text > .card, .band-inner > .card { margin: 1.5rem 0; }   /* one review inside a section */
.card-row + p { margin-top: 1.5rem; }

.service-links { display: grid; gap: .6rem; margin-top: 1.5rem; }
.service-links a {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem 1.25rem; font-weight: 700; text-decoration: none;
}
.service-links a:hover { border-color: var(--evergreen); }

.timeline { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 1rem; }
.timeline li {
  counter-increment: step; position: relative;
  background: var(--surface); border-radius: 12px; padding: 3.75rem 1.25rem 1.25rem;
}
.timeline li::before {
  content: counter(step); position: absolute; left: 1.25rem; top: 1.1rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--evergreen); color: #fff; font-weight: 700; display: grid; place-items: center;
}
.timeline strong { display: block; color: var(--charcoal); margin-bottom: .3rem; }

.town-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.town-chips li { background: #fff; border: 1px solid var(--border); border-radius: 99px; padding: .35rem .9rem; font-size: .9rem; }

.faq-grid { display: grid; gap: 1.5rem; }
.faq-grid h3 { font-size: 1.15rem; color: var(--charcoal); margin-bottom: .4rem; }
.faq-grid > div { border-top: 3px solid var(--evergreen); padding-top: 1rem; }

/* Photo grid: gallery page. Square crops, each opens the full photo */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.photo-grid a { display: block; border-radius: 10px; overflow: hidden; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 200ms ease; }
.photo-grid a:hover img { transform: scale(1.04); }

/* Town map: Google Maps embed, town pages only, the band right before the closing CTA */
.map-embed { margin: 0; }
.map-embed iframe { display: block; width: 100%; height: 340px; border: 0; border-radius: 12px; }

/* ---------- Closing CTA (photo), per page: style="--cta-img:url('/images/x.jpg')" ---------- */
.cta-photo {
  --cta-img: url('/images/ridge-view.jpg');
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.6)), var(--cta-img) center / cover no-repeat;
  color: #fff; text-align: center; padding: 5rem 1rem;
}
.cta-inner { max-width: 640px; margin: 0 auto; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.cta-photo h2 { font-size: 2.2rem; }
.cta-photo a { color: #fff; }

/* ---------- Footer + mobile call bar (site-wide) ---------- */
.site-footer { background: var(--evergreen); color: #fff; padding: 1.25rem 1rem; text-align: center; font-size: .85rem; }
.site-footer p { margin: .2rem 0; }
.site-footer a { color: #fff; }

.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; align-items: center; gap: .5rem;
  height: 56px; background: var(--evergreen); color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none;
  box-shadow: 0 -2px 8px rgba(0,0,0,.25);
}

/* Drafts only. Drop from the real template. */
.draft-badge {
  position: fixed; right: 10px; bottom: 66px; z-index: 30;
  background: #000; color: #fff; font-size: .75rem; padding: 4px 10px; border-radius: 99px; text-decoration: none; opacity: .75;
}

/* ---------- Desktop ---------- */
@media (min-width: 800px) {
  body { padding-bottom: 0; }
  .call-bar { display: none; }
  .draft-badge { bottom: 10px; }
  .site-header { padding: 0 2rem; }
  .header-call { display: flex; }

  .hero {
    align-items: center; padding: 4rem 2rem 3.5rem;
    background:
      linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.55) 42%, rgba(0,0,0,.05) 68%),
      var(--hero-img) var(--hero-pos) / var(--hero-size) no-repeat, #222;
  }
  .hero h1 { font-size: 3.4rem; }
  .hero p { max-width: 540px; }
  .proof-strip { grid-auto-flow: column; grid-auto-columns: 1fr; }   /* 3 or 4 items */
  .proof-strip li { border-bottom: 0; border-right: 1px solid rgba(255,255,255,.12); padding: 1.5rem 2rem; }
  .proof-strip li:last-child { border-right: 0; }

  .split { grid-template-columns: 1.15fr .85fr; gap: 4rem; padding: 4.5rem 2rem; }
  .split-reverse .split-text { order: 2; }
  .two-col { grid-template-columns: 1.2fr .8fr; gap: 3rem; }
  .quote-row { grid-template-columns: 1fr 1fr; }
  .card-row { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .service-links { grid-template-columns: repeat(3, 1fr); }
  .timeline { grid-template-columns: repeat(4, 1fr); }
  .faq-grid { grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
  .map-embed iframe { height: 400px; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .band-dark, .band-evergreen { padding: 4.5rem 2rem; }
  .band-light, .band-white { padding: 4rem 2rem; }
}

/* ---------- Full desktop nav (needs the width for 6 items + phone) ---------- */
@media (min-width: 1100px) {
  .nav-toggle-label { display: none; }
  .site-header nav { position: static; transform: none; background: none; max-height: none; overflow: visible; }
  .site-header nav > ul { display: flex; gap: 1.75rem; padding: 0; }
  .site-header nav > ul > li { position: relative; display: flex; align-items: center; height: var(--header-h); }
  .site-header nav > ul > li > a, .nav-label { padding: .25rem 0; border-bottom: 3px solid transparent; }
  .site-header nav > ul > li > a:hover, .site-header nav > ul > li > [aria-current] { border-bottom-color: #fff; }
  .has-sub > a::after, .has-sub > .nav-label::after { content: "\25BE"; margin-left: .35em; font-size: .8em; }
  .site-header nav .nav-sub {
    display: none; position: absolute; top: 100%; left: -1.25rem; min-width: 270px;
    padding: .5rem 1.25rem .75rem; border-left: 0; background: var(--evergreen);
    border-radius: 0 0 10px 10px; box-shadow: 0 8px 20px rgba(0,0,0,.25);
  }
  .has-sub:hover .nav-sub, .has-sub:focus-within .nav-sub { display: block; }
  .site-header nav .nav-sub a { padding: .45rem 0; white-space: nowrap; }
  .site-header nav .nav-sub a:hover { opacity: 1; text-decoration: underline; }
  .header-call { margin-left: 1.5rem; padding-left: 1.5rem; border-left: 1px solid rgba(255,255,255,.4); }
}
