/* ==========================================================================
   Northeast Forest Services website
   Single-page responsive static site. No framework, no build step.
   Palette: forest greens + warm neutrals. Mobile-first.
   ========================================================================== */

:root {
  --green-900: #1d3a2a;
  --green-700: #2f5d43;
  --green-500: #4a8b63;
  --green-100: #e7f0ea;
  --bark:      #3a322b;
  --sand:      #f6f3ed;
  --sand-2:    #ede7db;
  --ink:       #23291f;
  --muted:     #5d6657;
  --white:     #ffffff;
  --amber:     #d98a2b;   /* CTA accent — warm, high-contrast against green */
  --amber-dk:  #b8721f;
  --radius:    10px;
  --shadow:    0 2px 10px rgba(29, 58, 42, 0.10);
  --shadow-lg: 0 8px 28px rgba(29, 58, 42, 0.16);
  --maxw:      1080px;

  /* Spacing scale — one rhythm for section padding, gutters, and stack gaps */
  --gutter:    1.25rem;   /* shared horizontal page gutter */
  --space-1:   0.5rem;
  --space-2:   0.8rem;
  --space-3:   1.25rem;
  --space-4:   2rem;
  --space-5:   3rem;
  --space-6:   3.5rem;
}

* { box-sizing: border-box; }

/* Media never exceeds its container — first line of defense against overflow */
img, picture, svg, video { max-width: 100%; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; color: var(--green-900); margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 7vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
a  { color: var(--green-700); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: var(--space-6) 0; }
.section--alt { background: var(--sand-2); }
.section__lead { max-width: 62ch; color: var(--muted); font-size: 1.05rem; }

/* Anchor-target offset so the sticky header doesn't cover section headings
   when the in-page nav / internal links jump to them (#services, #area, …). */
section[id], [id].card { scroll-margin-top: 72px; }

/* ---- Buttons / CTA -------------------------------------------------------- */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  font-size: 1rem;
}
.btn:active { transform: translateY(1px); }
.btn--cta { background: var(--amber); color: #2a1c06; box-shadow: var(--shadow); }
.btn--cta:hover { background: var(--amber-dk); color: var(--white); }
.btn--ghost { background: transparent; color: var(--green-900); border-color: var(--green-500); }
.btn--ghost:hover { background: var(--green-100); }
.btn--ghost-on-dark { color: var(--white); border-color: #cfe0d6; }
.btn--ghost-on-dark:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn--block { display: block; width: 100%; text-align: center; }

/* ---- Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 243, 237, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--sand-2);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.7rem var(--gutter); max-width: var(--maxw); margin: 0 auto;
}
/* min-width:0 lets the long brand name shrink/wrap instead of shoving the CTA
   off the right edge on narrow phones. */
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; min-width: 0; }
.brand__mark {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--green-700); color: var(--white);
  display: grid; place-items: center; font-weight: 800; letter-spacing: -1px;
}
.brand__name {
  font-weight: 800; color: var(--green-900);
  font-size: clamp(0.95rem, 3.4vw, 1.05rem); line-height: 1.15;
}
.nav { display: none; gap: 1.4rem; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--green-700); }
/* Actions keep their natural size; the brand yields space, not the CTA. */
.site-header__actions { display: flex; align-items: center; gap: 0.6rem; flex: 0 0 auto; }
.site-header .btn { padding: 0.6rem 1.1rem; white-space: nowrap; }

/* CTA label swaps to a compact "Quote" on narrow screens; full label ≥640px. */
.header-cta__full { display: none; }
.header-cta__short { display: inline; }
.header-phone {
  display: none; font-weight: 700; text-decoration: none; color: var(--green-900);
  white-space: nowrap; font-size: 0.95rem;
}
.header-phone:hover { color: var(--green-700); }

/* ---- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    linear-gradient(rgba(29,58,42,0.72), rgba(29,58,42,0.86)),
    var(--green-700);
  color: var(--white);
}
.hero__inner {
  padding: 3.75rem 1.25rem; max-width: var(--maxw); margin: 0 auto;
  display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center;
}
.hero__content { min-width: 0; }
.hero h1 { color: var(--white); max-width: 16ch; }
.hero p { font-size: clamp(1.05rem, 4vw, 1.2rem); max-width: 38ch; color: #eaf3ed; }

/* Core-service chips — removal/pruning/woodscaping legible in the first screen */
.hero__services {
  list-style: none; margin: 1.4rem 0 0.45rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.hero__services li {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.28);
  color: var(--white); font-weight: 700; font-size: 0.92rem;
  padding: 0.35rem 0.85rem; border-radius: 999px;
}
.hero__services-more { font-size: 0.9rem; color: #cfe0d6; margin: 0; }

/* One button system: both CTAs share .btn sizing; primary filled, secondary
   outlined. On narrow screens they grow to fill the row and wrap to full-width
   stacked buttons; side-by-side once there's room. */
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: 1.6rem; }
.hero__cta .btn { flex: 1 1 200px; text-align: center; }
.hero__note { margin-top: 1.2rem; font-size: 0.9rem; color: #cfe0d6; max-width: 38ch; }

/* Published hero image. The crop is baked into the published derivatives with the
   climber centered, so the width drives the box (track width) and the height comes
   from aspect-ratio — never the reverse. (Using align-self:stretch here let a tall
   text column stretch the media's height, which transferred back through
   aspect-ratio into an over-wide box and overflowed the viewport at ~1024px.) */
.hero__media {
  min-width: 0;
  align-self: center;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: var(--shadow-lg);
  background: var(--green-900);
}
.hero__picture { display: block; width: 100%; height: 100%; }
.hero__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  max-height: 520px;
  object-fit: cover;
  object-position: center;
}

/* ---- Trust strip ---------------------------------------------------------- */
.trust-strip {
  background: var(--green-900); color: var(--white);
  padding: 0.85rem 0; border-bottom: 3px solid var(--amber);
}
.trust-strip__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem 0.9rem; text-align: center; font-size: 0.95rem;
}
.trust-item strong { color: var(--white); font-weight: 700; }
.trust-sep { color: var(--green-500); }

/* ---- Service grid --------------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem; border: 1px solid var(--sand-2); scroll-margin-top: 80px;
  display: flex; flex-direction: column;
}
.card > .btn { margin-top: auto; }
.card--feature { border-color: var(--green-500); border-width: 1px; box-shadow: var(--shadow-lg); }
.card h3 { display: flex; align-items: center; gap: 0.5rem; }
.card__tag {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--green-700); background: var(--green-100); padding: 0.15rem 0.5rem; border-radius: 999px;
}
.card__price { font-weight: 700; color: var(--bark); margin: 0.2rem 0 0.6rem; }
.card__note { font-size: 0.95rem; font-weight: 700; }
.card ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); }
.card ul li { margin-bottom: 0.3rem; }

/* ---- How it works --------------------------------------------------------- */
.how-it-works {
  display: grid; gap: 1rem; grid-template-columns: 1fr;
  margin-top: 1.75rem;
}
.how-it-works div {
  background: var(--white); border: 1px solid var(--sand-2); border-radius: 8px;
  padding: 1rem; box-shadow: var(--shadow);
}
.how-it-works strong { display: block; color: var(--green-900); margin-bottom: 0.25rem; }
.how-it-works span { color: var(--muted); font-size: 0.95rem; }

/* Mobile-services callout under the 3 core service cards */
.services-mobile-callout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.75rem; padding: 1.25rem 1.5rem;
  background: var(--green-100); border-radius: var(--radius); border: 1px solid #d3e3d8;
}
.services-mobile-callout p { margin: 0; color: var(--ink); }

/* Placeholder image slot */
.imgslot {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(45deg, var(--green-100), var(--green-100) 12px, #dfeae2 12px, #dfeae2 24px);
  color: var(--green-700); border-radius: 8px; min-height: 150px; margin-bottom: 1rem;
  font-size: 0.85rem; font-weight: 600; border: 1px dashed var(--green-500);
}

/* ---- Woodscaping (differentiator) ----------------------------------------- */
.woodscape { display: grid; gap: 1.75rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
.woodscape__list { padding-left: 1.1rem; color: var(--ink); }
.woodscape__list li { margin-bottom: 0.45rem; }
.woodscape__img { min-height: 240px; margin-bottom: 0; }

/* ---- Owner story ---------------------------------------------------------- */
.owner { display: grid; gap: 1.75rem; grid-template-columns: 1fr; margin-top: 1.5rem; align-items: center; }
.owner__img { min-height: 220px; margin-bottom: 0; }

/* ---- Service area --------------------------------------------------------- */
.area-list {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: grid; gap: 0.6rem; grid-template-columns: 1fr;
}
.area-list li {
  background: var(--white); border: 1px solid var(--sand-2); border-radius: 8px;
  padding: 0.8rem 1rem; box-shadow: var(--shadow);
}
.area-list strong { color: var(--green-900); }

/* ---- Mobile-services module ---------------------------------------------- */
/* This whole block is self-contained — see HTML markers. Remove to delist. */
.faq { margin-top: 1rem; }
.faq details {
  background: var(--white); border: 1px solid var(--sand-2); border-radius: 8px;
  padding: 0.4rem 0.9rem; margin-bottom: 0.6rem;
}
.faq summary { cursor: pointer; font-weight: 600; color: var(--green-900); padding: 0.4rem 0; }
.faq details[open] summary { margin-bottom: 0.4rem; }

/* ---- Reviews -------------------------------------------------------------- */
.review-grid {
  display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.5rem;
}
.review-card {
  background: var(--white); border: 1px solid var(--sand-2); border-radius: 8px;
  padding: 1.2rem; box-shadow: var(--shadow);
}
.review-card p { color: var(--ink); font-style: italic; }
.review-card strong { color: var(--green-900); font-size: 0.9rem; }

/* ---- News / Notes (blog entry point) -------------------------------------- */
/* Self-contained. Entry point for a future /notes/ blog surface — no CMS in v0.
   The placeholder is the honest "just starting" contract; real posts later become
   .notes__card entries in the same .notes container. */
.notes { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
.notes__placeholder,
.notes__card {
  background: var(--white); border: 1px solid var(--sand-2); border-left: 4px solid var(--green-500);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; max-width: 68ch;
}
.notes__placeholder p,
.notes__card p { color: var(--ink); margin: 0 0 0.75rem; }
.notes__placeholder p:last-child,
.notes__card p:last-child { margin-bottom: 0; }
.notes__card h3 a { color: var(--green-900); text-decoration: none; }
.notes__card h3 a:hover { color: var(--green-700); text-decoration: underline; }
.notes__badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--green-700); background: var(--green-100);
  padding: 0.2rem 0.6rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.notes__cta-line { font-size: 0.95rem; color: var(--muted); }

/* ---- Contact form --------------------------------------------------------- */
.contact { background: var(--green-900); color: var(--white); }
.contact h2 { color: var(--white); }
.contact__lead { color: #d4e3da; max-width: 52ch; }
/* min-width:0 lets the grid children shrink below their content's intrinsic
   width (grid/flex children default to min-width:auto, a classic overflow source). */
.contact__grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin-top: 1.5rem; }
.contact__grid > * { min-width: 0; }
.form {
  background: var(--white); color: var(--ink); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-lg);
}
.form .row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.form .row > * { min-width: 0; }
.field { display: flex; flex-direction: column; margin-bottom: 1rem; min-width: 0; }
.field label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.field .req { color: var(--amber-dk); }
.field input, .field select, .field textarea {
  font: inherit; padding: 0.65rem 0.75rem; border: 1px solid #c9d3c9;
  border-radius: 8px; background: var(--sand); color: var(--ink);
  /* width:100% + min-width:0 stops wide intrinsic controls (notably the
     <input type=file>) from forcing the form wider than the viewport. */
  width: 100%; min-width: 0; max-width: 100%;
}
.field input[type="file"] { padding: 0.5rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--green-500); outline-offset: 1px; background: var(--white);
}
.field textarea { min-height: 110px; resize: vertical; }
.field__hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }
.checkrow { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; }
.checkrow input { margin-top: 0.25rem; }
.placeholder-block {
  border: 1px dashed #c9d3c9; border-radius: 8px; padding: 0.75rem;
  font-size: 0.82rem; color: var(--muted); background: var(--sand);
}
.form-status {
  min-height: 1.4rem; margin: 0.25rem 0 0.85rem;
  font-size: 0.9rem; font-weight: 600;
}
.form-status--success {
  color: var(--green-900); background: var(--green-100);
  border: 1px solid #c7ddcf; border-radius: 8px; padding: 0.7rem 0.8rem;
}
.form-status--error {
  color: #6f231b; background: #f8e6e1;
  border: 1px solid #e2b7ad; border-radius: 8px; padding: 0.7rem 0.8rem;
}
.contact__direct { font-size: 1.05rem; }
.contact__direct strong { color: var(--white); }
.contact__direct a { color: #e9c79a; }
.note-pill {
  display: inline-block; font-size: 0.75rem; background: rgba(255,255,255,0.12);
  color: #eaf3ed; padding: 0.15rem 0.6rem; border-radius: 999px; margin-bottom: 0.5rem;
}

/* ---- Footer --------------------------------------------------------------- */
.site-footer { background: var(--bark); color: #d8d2c7; padding: 2.5rem 0; font-size: 0.9rem; }
.site-footer a { color: #e9c79a; }
.footer__nap { color: #e7e1d6; font-weight: 500; }
.site-footer .placeholder-terms {
  border: 1px dashed #6b6256; border-radius: 8px; padding: 0.85rem; margin-top: 1rem;
  color: #b8b1a4; font-size: 0.82rem;
}

/* ---- Reserved future agent-chat mount (see HTML #chat-mount) -------------- */
/* Intentionally hidden in v0. A future custom chat widget mounts here without
   touching layout. Keep this rule + the empty container so v1 is non-invasive. */
#chat-mount { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
#chat-mount:empty { display: none; }

/* ---- Responsive ----------------------------------------------------------- */
@media (min-width: 560px) {
  .header-phone { display: inline-block; }
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .form .row { grid-template-columns: 1fr 1fr; }
  .area-list { grid-template-columns: repeat(2, 1fr); }
  .header-cta__full { display: inline; }
  .header-cta__short { display: none; }
  .how-it-works { grid-template-columns: repeat(3, 1fr); }
  .review-grid { grid-template-columns: repeat(3, 1fr); }
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .nav { display: flex; }
  .hero__inner { grid-template-columns: 1.15fr 0.85fr; padding: 4.5rem 1.25rem; }
  .hero__media { aspect-ratio: 3 / 4; }
  .hero__image { max-height: none; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .contact__grid { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .woodscape { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .owner { grid-template-columns: 1fr 1fr; }
  .area-list { grid-template-columns: repeat(3, 1fr); }
}

/* Visually-hidden utility (a11y) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Filled image wells (service-card / woodscape / owner photos) --------- */
.imgslot--filled {
  display: block; padding: 0; min-height: 0; border: none; background: none;
  aspect-ratio: 4 / 3; overflow: hidden;
}
.imgslot--filled picture { display: block; width: 100%; height: 100%; }
.imgslot--filled img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center;
}
