/* Mocheku Landscapers — design tokens + site styles
   Brand greens sampled from the company's own logo artwork.
   --lime and --olive fail WCAG AA at normal text sizes — never used for
   body copy or small links, only large text (>=24px), icons, borders, fills. */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --forest-deep: #1F5223;
  --forest: #24602A;
  --lime: #80A030;
  --olive: #6C8C04;
  --ink: #1C1C1C;
  --slate: #5A5F58;
  --slate-light: #7A7F76;
  --tint: #E8F0D8;
  --tint-strong: #D7E4C2;
  --paper: #FFFFFF;
  --paper-alt: #F4F6F0;
  --border: #DCE3D2;
  --warn: #9A5B12;
  --warn-bg: #FBEEDC;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 3px rgba(20, 40, 20, 0.08), 0 1px 2px rgba(20, 40, 20, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 40, 20, 0.12);
  --shadow-lg: 0 20px 48px rgba(20, 40, 20, 0.18);

  --container: 1180px;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
picture { display: block; }
a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--forest-deep); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 1.6rem + 2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 1.35rem + 1.1vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 var(--space-4); }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.3em; }
li { margin-bottom: var(--space-2); }

.kicker {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--forest);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-3);
}
/* On dark backgrounds, override with --tint (not --lime/--olive — both fail
   WCAG AA contrast at this font size against the dark green sections). */
.section-dark .kicker, .hero .kicker { color: var(--tint); }

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

.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;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--forest-deep);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-4); color: #fff; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-deep); color: #fff; }
.btn-outline { background: transparent; border-color: currentColor; color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: #fff; }
.btn-on-dark { background: #fff; color: var(--forest-deep); }
.btn-on-dark:hover { background: var(--tint); color: var(--forest-deep); }
.btn-outline-on-dark { background: transparent; border-color: #fff; color: #fff; }
.btn-outline-on-dark:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.98);
  border-bottom: 1px solid var(--border);
}
/* Note: intentionally no backdrop-filter here — it would establish a new
   containing block for the position:fixed mobile nav panel below (a
   descendant of this element), breaking it out of the viewport and
   collapsing its height to the header's own ~84px box. */
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand img { height: 48px; width: auto; }
.brand-name { font-weight: 700; color: var(--ink); font-size: 1.05rem; line-height: 1.2; }
.brand-name span { display: block; color: var(--olive); font-weight: 600; font-size: 0.95rem; }

.main-nav ul {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--forest);
  border-bottom-color: var(--lime);
  text-decoration: none;
}
/* No-JS fallback for current-page nav highlight (JS also sets aria-current) */
body[data-page="home"] .main-nav a[data-nav="home"],
body[data-page="about"] .main-nav a[data-nav="about"],
body[data-page="services"] .main-nav a[data-nav="services"],
body[data-page="cares"] .main-nav a[data-nav="cares"],
body[data-page="projects"] .main-nav a[data-nav="projects"],
body[data-page="contact"] .main-nav a[data-nav="contact"] {
  color: var(--forest);
  border-bottom-color: var(--lime);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--forest);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--forest);
  font-weight: 600;
  cursor: pointer;
}

.header-cta { display: flex; align-items: center; gap: var(--space-4); }
.header-phone {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--forest-deep);
  font-size: 0.95rem;
}
.header-phone svg { width: 18px; height: 18px; flex-shrink: 0; }

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--paper);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
    overflow-y: auto;
    padding: var(--space-6) var(--space-5);
    border-top: 1px solid var(--border);
  }
  .main-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
  }
  .main-nav ul { flex-direction: column; gap: var(--space-2); }
  .main-nav a { display: block; padding: var(--space-3) 0; font-size: 1.1rem; }
  .nav-toggle { display: inline-flex; }
  .header-phone span { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: var(--space-9) 0 var(--space-8);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(15,38,18,0.92) 0%, rgba(31,82,35,0.82) 45%, rgba(31,82,35,0.55) 100%);
  z-index: -1;
}
.hero-inner { max-width: 640px; }
.hero .kicker { color: var(--tint); font-style: italic; font-weight: 500; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.15rem; color: rgba(255,255,255,0.92); max-width: 54ch; }
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-6); }

.page-hero {
  position: relative;
  color: #fff;
  padding: var(--space-8) 0 var(--space-7);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(15,38,18,0.93) 0%, rgba(31,82,35,0.85) 60%, rgba(31,82,35,0.7) 100%);
  z-index: -1;
}
.page-hero h1 { color: #fff; margin-bottom: var(--space-3); }
.page-hero p { color: rgba(255,255,255,0.9); max-width: 60ch; font-size: 1.1rem; margin-bottom: 0; }
.breadcrumb { font-size: 0.9rem; color: rgba(255,255,255,0.75); margin-bottom: var(--space-4); }
.breadcrumb a { color: rgba(255,255,255,0.85); }

/* ---------- Credentials strip ---------- */
.credentials {
  background: var(--forest-deep);
  color: #fff;
  padding: var(--space-5) 0;
}
.credentials .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5) var(--space-7);
  justify-content: center;
  align-items: center;
}
.credential-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
}
.credential-item svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--lime); }

/* ---------- Sections ---------- */
.section { padding: var(--space-8) 0; }
.section-alt { background: var(--paper-alt); }
.section-dark { background: var(--forest-deep); color: rgba(255,255,255,0.92); }
.section-dark h2 { color: #fff; }
.section-dark a:not(.btn) { color: var(--tint); }
.section-head { max-width: 700px; margin: 0 auto var(--space-7); text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-5);
  text-align: center;
}
.stat-num {
  font-size: clamp(2rem, 1.6rem + 1.2vw, 2.8rem);
  font-weight: 800;
  color: var(--forest);
  line-height: 1;
  margin-bottom: var(--space-2);
}
.section-dark .stat-num { color: var(--lime); }
.stat-label { font-size: 0.92rem; color: var(--slate); font-weight: 600; }
.section-dark .stat-label { color: rgba(255,255,255,0.82); }
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: var(--space-5); flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: var(--space-3); }
.card-body p { color: var(--slate); font-size: 0.96rem; margin-bottom: var(--space-4); }
.card-body ul { font-size: 0.94rem; color: var(--slate); margin-bottom: 0; }
.card-link { margin-top: auto; font-weight: 600; }

.icon-badge {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tint);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.icon-badge svg { width: 28px; height: 28px; color: var(--forest); }

/* ---------- Photo showcase / gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(15,38,18,0.85), transparent);
  color: #fff; font-size: 0.78rem; font-weight: 600;
  padding: var(--space-4) var(--space-3) var(--space-2);
}
@media (max-width: 980px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Tables (projects) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
table.projects { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.95rem; }
table.projects th, table.projects td { text-align: left; padding: var(--space-4); border-bottom: 1px solid var(--border); }
table.projects th { background: var(--forest-deep); color: #fff; font-weight: 600; white-space: nowrap; }
table.projects td.value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--forest-deep); white-space: nowrap; }
table.projects tbody tr:nth-child(even) { background: var(--tint); }
table.projects tbody tr:hover { background: var(--tint-strong); }
.status-pill {
  display: inline-block;
  background: var(--lime);
  color: #12300f;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.2em 0.7em;
  border-radius: 999px;
}

.filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-5); }
.filter-chip {
  background: var(--paper);
  border: 2px solid var(--border);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  cursor: pointer;
}
.filter-chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--forest);
  color: #fff;
  padding: var(--space-7) 0;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: var(--space-3); }
.cta-band p { color: rgba(255,255,255,0.92); max-width: 60ch; margin: 0 auto var(--space-5); }
.cta-actions { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: var(--space-4); max-width: 640px; }
.form-row { display: flex; flex-direction: column; gap: var(--space-2); }
.form-row label { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.form-row input, .form-row textarea, .form-row select {
  font: inherit;
  padding: 0.8em 1em;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--forest);
  outline: none;
}
.form-row textarea { resize: vertical; min-height: 140px; }
.form-note { font-size: 0.85rem; color: var(--slate-light); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); margin-bottom: var(--space-5); font-weight: 600; }
.alert-success { background: var(--tint); color: var(--forest-deep); border: 1px solid var(--lime); }
.alert-error { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }

/* ---------- Info blocks (contact, about) ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.info-list svg { width: 22px; height: 22px; color: var(--forest); flex-shrink: 0; margin-top: 2px; }
.info-list strong { display: block; color: var(--ink); }

.map-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
}
.map-frame img { width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: rgba(255,255,255,0.85); padding: var(--space-8) 0 var(--space-5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-6); margin-bottom: var(--space-7); }
.footer-brand img { height: 44px; margin-bottom: var(--space-4); }
.footer-brand p { color: rgba(255,255,255,0.75); font-size: 0.92rem; max-width: 32ch; }
.footer-heading { color: #fff; font-weight: 700; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: var(--space-3); }
.footer-col a { color: rgba(255,255,255,0.82); font-size: 0.94rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.badge-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.badge-list li {
  background: var(--tint);
  color: var(--forest-deep);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin: 0;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.two-col img, .two-col picture { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.two-col img { width: 100%; height: 100%; object-fit: cover; }
/* Used on the picture element within .two-col to flip it to the left
   (ahead of the text, which sits at the default order: 0). */
.order-2 { order: -1; }

.value-callout {
  background: var(--paper);
  border-left: 4px solid var(--lime);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.value-callout strong { color: var(--forest-deep); }

.founder-block { display: flex; gap: var(--space-5); align-items: flex-start; background: var(--paper-alt); border-radius: var(--radius-lg); padding: var(--space-6); }
.founder-block svg { width: 48px; flex-shrink: 0; color: var(--forest); }

noscript .js-only { display: none !important; }
