/*
  base.css: design tokens and shared building blocks for the whole page.
  Every section stylesheet builds on these; nothing here is specific to one section.

  Brand: the business has a logo (a gold tree of life on black) and a green and
  tan flyer, but no website. These tokens come from that material and from their
  own photos: freshly striped St. Augustine lawns, big Gulf-coast sky, logo gold.
  The signature motif is the mower stripe: two close greens side by side, used
  for photo reveals and as a quiet texture on the dark sections.
  Tone: daylight, tidy, neighborly. Not rugged-dark, not corporate, not cute.
  Type: Young Serif for headings (sturdy and warm, like the classic caps on their
  flyer) and Schibsted Grotesk for everything else.
  Motion: the owner should see a site with a wow effect, so the page moves on
  scroll (GSAP + Lenis). Every section is fully readable without it: motion only
  starts when <html> has the "motion-ready" class (set by src/scripts/base.js).
*/

:root {
  /* Colors */
  --paper: #f6f5ee;          /* page background */
  --mist: #e7ede2;           /* alternate light section, pale lawn */
  --ink: #132219;            /* body text (15:1 on paper) */
  --muted: #4a5a4f;          /* secondary text on light (6.9:1 on paper) */
  --line: #cdd5c8;           /* borders and dividers */
  --lawn: #2b6630;           /* brand: call buttons, links (6.9:1 white on it) */
  --lawn-deep: #153a1f;      /* dark sections */
  --stripe-a: #183f22;       /* mower-stripe texture on dark, decoration only */
  --stripe-b: #1d4a29;
  --gold: #d8b36c;           /* logo gold: stars and the call button on dark (8:1 on lawn-deep) */
  --gold-ink: #775a1d;       /* gold as small text on light (5.8:1 on paper) */
  --on-dark: #f3f1e6;        /* text on dark */
  --on-dark-muted: #c3cfc2;  /* secondary text on dark (8.8:1 on lawn-deep) */

  /* Type */
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --fs-sm: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.03rem + 0.45vw, 1.375rem);
  --fs-h3: clamp(1.5rem, 1.3rem + 0.9vw, 2.125rem);
  --fs-h2: clamp(2.25rem, 1.5rem + 3.2vw, 4.75rem);
  --fs-display: clamp(2.625rem, 1.4rem + 4.2vw, 5.75rem);

  /* Spacing scale (4 to 128) */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --radius: 4px;             /* no shadows: surfaces separate by color */
  --container: 1240px;
  --gutter: var(--s4);
  --header-h: 64px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --focus: var(--lawn);
}

@media (min-width: 640px) { :root { --gutter: var(--s5); } }
@media (min-width: 1024px) { :root { --gutter: var(--s6); --fs-body: 1.125rem; --header-h: 72px; } }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* overflow-x: clip on <main>, not <body>: on phones a body value is handed to
   the viewport and stops nothing. clip (not hidden) keeps position: sticky working. */
main { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
input, select, textarea, button { font: inherit; color: inherit; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }

/* Lenis smooth scrolling (rules from the Lenis package). */
html.lenis, html.lenis body { height: auto; scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

[id] { scroll-margin-top: calc(var(--header-h) + var(--s4)); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.15; }
p { text-wrap: pretty; }

a { color: var(--lawn); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Small label above headings: gold-ink caps with a short two-tone stripe. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 10px;
  background: linear-gradient(90deg, var(--lawn) 0 50%, #4f8b45 50% 100%);
  border-radius: 1px;
}
.on-dark .eyebrow { color: var(--gold); }

/* Buttons. The call button is the one action on every screen. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  min-height: 52px;
  padding: var(--s3) var(--s5);
  border-radius: var(--radius);
  font-weight: 650;
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-call { background: var(--lawn); color: #fff; }
.btn-call:hover { background: var(--lawn-deep); }
.on-dark .btn-call { background: var(--gold); color: var(--ink); }
.on-dark .btn-call:hover { background: #e6c587; }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Stars: five SVG stars; the gold fill is a separate layer so it can sweep in. */
.stars { position: relative; display: inline-block; width: 120px; height: 22px; flex: none; }
.stars svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stars .stars-empty { color: var(--line); }
.stars .stars-fill { color: var(--gold); }
.stars-gold-ink .stars-fill { color: #b8892f; }

/* Dark sections carry a faint mower-stripe texture. */
.on-dark {
  --focus: var(--gold);
  background-color: var(--lawn-deep);
  background-image: repeating-linear-gradient(90deg, var(--stripe-a) 0 72px, var(--stripe-b) 72px 144px);
  color: var(--on-dark);
}
.on-dark a:not(.btn) { color: var(--on-dark); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* HomeSampleNotice: the "sample website" strip above the header. */
.sample-notice {
  --focus: var(--gold);
  position: relative;
  z-index: 60;
  background: var(--ink);
  color: var(--on-dark);
  font-size: var(--fs-sm);
  line-height: 1.4;
  text-align: center;
}
.sample-notice p { padding-block: var(--s2); }
.sample-notice a { color: var(--on-dark); font-weight: 650; }

/* HomeHeader: sticky bar with wordmark, section links and the call button. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header-row {
  display: flex;
  align-items: center;
  gap: var(--s5);
  height: var(--header-h);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.wordmark-mark { width: 36px; height: 36px; flex: none; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark-name { font-family: var(--font-display); font-size: 1.375rem; }
.wordmark-sub { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
/* Very narrow phones: the sub-line would wrap next to the call button; the name alone is enough. */
@media (max-width: 359px) { .wordmark-sub { display: none; } }

.site-nav { display: none; margin-left: auto; gap: var(--s6); }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
  padding-block: var(--s3);
  background: linear-gradient(var(--lawn), var(--lawn)) left bottom / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease-out);
}
.site-nav a:hover { background-size: 100% 2px; }

.header-call { margin-left: auto; min-height: 44px; padding: var(--s2) var(--s4); }
.header-call-long { display: none; }

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .header-call { margin-left: var(--s4); }
  .header-call-short { display: none; }
  .header-call-long { display: inline; }
}

/* HomeHero: first screen. Copy column and the mower-pass photo. */
.hero { padding-block: var(--s5) var(--s8); }
.hero-grid { display: grid; gap: var(--s7); }

.hero-eyebrow { margin-bottom: var(--s4); }
.hero-title { font-size: var(--fs-display); line-height: 1; max-width: 17ch; }
.hero-lead { margin-top: var(--s5); font-size: var(--fs-lead); color: var(--muted); max-width: 46ch; }

.hero-rating { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.hero-rating p { color: var(--muted); }
.hero-score { color: var(--ink); font-weight: 700; white-space: nowrap; }
.hero .stars .stars-fill { color: #b8892f; }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* The photo frame. On desktop its height follows the viewport so the first screen holds everything. */
.hero-media { position: relative; margin: 0; }
.hero-photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  max-height: 78vh;
  width: 100%;
  background: var(--mist);
}
/* The image is taller than its frame (top -8%, height 116%) so the scroll parallax never shows an edge. */
.hero-photo img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; object-position: 50% 40%; }

.hero-tag {
  position: absolute;
  left: var(--s4);
  bottom: var(--s4);
  padding: var(--s2) var(--s4);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  font-weight: 650;
  font-size: var(--fs-sm);
}

/* Mower passes: seven bands over the photo, only drawn when motion will remove them. */
.hero-stripes { display: none; }
.motion .hero-stripes {
  position: absolute;
  inset: 0;
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  pointer-events: none;
}
.motion .hero-stripes span { flex: 1; background: var(--lawn-deep); transform-origin: 50% 0; }
.motion .hero-stripes span:nth-child(even) { background: #24552f; transform-origin: 50% 100%; }

@media (min-width: 960px) {
  .hero { padding-block: var(--s7) var(--s9); }
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--s8); }
  .hero-photo { aspect-ratio: auto; height: min(calc(100vh - var(--header-h) - 140px), 760px); min-height: 480px; max-height: none; }
}

/* HomeCanopy: "from the canopy down to the curb". A list on phones, a pinned stage on wide screens. */
.canopy { padding-top: var(--s9); background: var(--paper); }
.canopy-head { max-width: calc(var(--container) + 2 * var(--gutter)); }
.canopy-head h2 { margin-top: var(--s4); max-width: 16ch; }
.canopy-intro { margin-top: var(--s4); color: var(--muted); font-size: var(--fs-lead); max-width: 46ch; }

.canopy-stage { padding-block: var(--s7) var(--s9); }
.canopy-list { display: grid; gap: var(--s8); }

.canopy-figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--mist); aspect-ratio: 4 / 3; }
.canopy-figure img { width: 100%; height: 100%; object-fit: cover; }
/* The gravel in the ground photo is in its lower half; keep it in a landscape crop. */
.canopy-step:nth-child(3) .canopy-figure img { object-position: 50% 72%; }

.canopy-text { margin-top: var(--s5); }
.canopy-num {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.canopy-num span { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0; color: var(--lawn); }
.canopy-text h3 { margin-top: var(--s3); max-width: 20ch; }
.canopy-text p:last-child { margin-top: var(--s3); color: var(--muted); max-width: 42ch; }
.canopy-text q { color: var(--ink); font-style: italic; }

.canopy-progress { display: none; }

/* Wide screens without motion: each step is a row, text beside its photo. */
@media (min-width: 960px) {
  .canopy-step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; }
  .canopy-text { margin-top: 0; }
  .canopy-figure { order: 2; } /* photo in the wide column, as in the pinned layout */
}

/* Wide screens with motion (HomeCanopy.js adds .is-pinned): one stage, texts
   stacked in the left cell, photos stacked in the right cell. */
.canopy.is-pinned .canopy-stage {
  height: calc(100vh - var(--header-h));
  padding-block: var(--s7);
  display: flex;
  align-items: center;
}
.canopy.is-pinned .canopy-stage > .container { position: relative; }
.canopy.is-pinned .canopy-list { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; }
.canopy.is-pinned .canopy-step { display: contents; }
.canopy.is-pinned .canopy-text { grid-area: 1 / 1; }
.canopy.is-pinned .canopy-figure {
  grid-area: 1 / 2;
  aspect-ratio: auto;
  height: calc(100vh - var(--header-h) - 2 * var(--s7));
  max-height: 820px;
}
.canopy.is-pinned .canopy-text h3 { font-size: clamp(2rem, 1.2rem + 1.6vw, 3rem); }
/* Pinned, the step number becomes a large gold-ink numeral that anchors the left column. */
.canopy.is-pinned .canopy-num { flex-direction: column; align-items: flex-start; gap: var(--s2); }
.canopy.is-pinned .canopy-num span { font-size: clamp(4.5rem, 2rem + 5vw, 8rem); line-height: 0.9; color: var(--gold-ink); }
.canopy.is-pinned .canopy-progress {
  display: flex;
  gap: var(--s2);
  position: absolute;
  left: var(--gutter);
  bottom: 0;
}
.canopy-progress span {
  width: 36px;
  height: 8px;
  background: var(--line);
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.canopy-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lawn);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* HomeCrew: dark free-estimate call-out with the full-width crew photo. */
.crew { padding-block: var(--s9); }
.crew-head h2 { margin-top: var(--s4); font-size: var(--fs-display); line-height: 1; max-width: 12ch; }

.crew-photo { margin: var(--s7) 0 0; position: relative; overflow: hidden; aspect-ratio: 3 / 2; }
.crew-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }

.crew-foot { display: grid; gap: var(--s6); margin-top: var(--s7); }
.crew-quote p { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.3; max-width: 30ch; }
.crew-quote footer { margin-top: var(--s4); color: var(--on-dark-muted); font-size: var(--fs-sm); }
.crew-call { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); }
.crew-note { color: var(--on-dark-muted); font-size: var(--fs-sm); }

@media (min-width: 768px) {
  .crew-photo { aspect-ratio: 16 / 8; }
}
@media (min-width: 960px) {
  .crew { padding-block: var(--s10); }
  .crew-foot { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: end; }
  .crew-call { align-items: flex-end; }
}

/* HomeWork: offset two-photo spread. */
.work { padding-block: var(--s9); background: var(--paper); }
.work-grid { display: grid; gap: var(--s7); }
.work-copy h2 { margin-top: var(--s4); max-width: 14ch; font-size: clamp(2.25rem, 1.6rem + 1.8vw, 3.5rem); }

.work-item { margin: 0; }
.work-frame { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 3 / 4; background: var(--mist); }
/* Taller than the frame (top -8%, height 116%) so the scroll drift never shows an edge. */
.work-frame img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; }
.work-item figcaption { margin-top: var(--s3); color: var(--muted); font-size: var(--fs-sm); }

.work-item-b { width: 82%; justify-self: end; }

@media (min-width: 960px) {
  .work-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 4fr) minmax(0, 4fr); gap: var(--s7); align-items: start; }
  .work-item-b { width: auto; justify-self: stretch; margin-top: var(--s10); }
  .work-item-a { margin-top: var(--s8); }
}

/* HomeReviews: score column and quotes. Pale lawn background. */
.reviews { padding-block: var(--s9); background: var(--mist); }
.reviews-grid { display: grid; gap: var(--s8); }

.reviews-big {
  font-family: var(--font-display);
  font-size: clamp(6rem, 3rem + 12vw, 11rem);
  line-height: 0.9;
  margin-top: var(--s4);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.reviews-stars { width: 168px; height: 31px; margin-top: var(--s4); }
.reviews-count { margin-top: var(--s3); font-weight: 600; }
.reviews-link { display: inline-block; margin-top: var(--s3); padding-block: var(--s2); }

.reviews-lead { margin: 0; }
.reviews-lead p { font-family: var(--font-display); font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem); line-height: 1.18; }
.reviews-line {
  width: fit-content;
  background-image: linear-gradient(transparent 64%, rgb(216 179 108 / 0.55) 64%, rgb(216 179 108 / 0.55) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.reviews-lead figcaption { margin-top: var(--s4); color: var(--muted); font-size: var(--fs-sm); }

.reviews-list { display: grid; gap: var(--s6); margin-top: var(--s8); }
.reviews-list li { border-top: 2px solid var(--lawn); padding-top: var(--s4); }
.reviews-list blockquote p { max-width: 48ch; }
.reviews-who { margin-top: var(--s3); font-weight: 650; font-size: var(--fs-sm); color: var(--muted); }

@media (min-width: 720px) {
  .reviews-list { grid-template-columns: 1fr 1fr; column-gap: var(--s7); }
}
@media (min-width: 1024px) {
  .reviews-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s9); }
}

/* HomeContact: dark contact section with the big phone number and the hours table. */
.contact { padding-block: var(--s9); }
.contact-grid { display: grid; gap: var(--s8); }
.contact-main h2 { margin-top: var(--s4); max-width: 12ch; }

.contact-phone {
  display: inline-flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s6);
  padding: var(--s5) var(--s6);
  background: var(--gold);
  color: var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  will-change: transform;
}
.on-dark .contact-phone { color: var(--ink); }
.contact-phone:hover { background: #e6c587; }
.contact-phone-label { font-size: var(--fs-sm); font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; }
.contact-phone-number { font-family: var(--font-display); font-size: clamp(2rem, 1.3rem + 3vw, 3.75rem); line-height: 1; white-space: nowrap; }

.contact-details { display: grid; gap: var(--s5); }
.contact-details > div { border-top: 1px solid rgb(243 241 230 / 0.25); padding-top: var(--s4); }
.contact-details dt { font-size: var(--fs-sm); font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.contact-details dd { margin: var(--s2) 0 0; overflow-wrap: anywhere; }
.contact-details a { padding-block: var(--s2); display: inline-block; }

.contact-hours { border-collapse: collapse; width: 100%; max-width: 360px; }
.contact-hours th, .contact-hours td { padding: var(--s1) 0; text-align: left; font-weight: 400; }
.contact-hours td { text-align: right; color: var(--on-dark-muted); }
.contact-hours tr.is-today th, .contact-hours tr.is-today td { color: var(--on-dark); font-weight: 700; }
.contact-hours tr.is-today th::after {
  content: "Today";
  margin-left: var(--s3);
  padding: 0 var(--s2);
  background: var(--gold);
  color: var(--ink);
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
}

@media (min-width: 960px) {
  .contact { padding-block: var(--s10); }
  .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s9); align-items: start; }
}

/* HomeFooter: name, phone, back to top and the repeated sample notice. */
.site-footer { --focus: var(--gold); background: var(--ink); color: var(--on-dark); padding-bottom: var(--s6); }
.site-footer a { color: var(--on-dark); }
.footer-stripes {
  height: 12px;
  background: repeating-linear-gradient(90deg, var(--lawn) 0 72px, #4f8b45 72px 144px);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s5);
  padding-top: var(--s7);
}
.footer-name { font-family: var(--font-display); font-size: var(--fs-h3); }
.footer-meta { margin-top: var(--s2); color: var(--on-dark-muted); }
.footer-meta a { display: inline-block; padding-block: var(--s2); }
.footer-top { display: inline-block; padding-block: var(--s3); font-weight: 600; }
.footer-notice { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid rgb(243 241 230 / 0.2); font-size: var(--fs-sm); color: var(--on-dark-muted); }
.footer-notice a { font-weight: 650; }
