/* Lawn Co-Pilot — design tokens + system.
   Every page consumes these. Nothing hardcodes a color. */

:root {
  /* Brand green sampled from the Lawn Co-Pilot logo mark: #307F44.
     The scale is built around it so the site and the logo are one system. */
  --green-50:  #f2f8f4;
  --green-100: #dceee2;
  --green-200: #b4dcc2;
  --green-400: #63be7a;
  --green-500: #3d9c55;
  --green-600: #307f44;   /* brand primary */
  --green-700: #266636;
  --green-900: #14331f;

  --ink-900: #0b1f16;
  --ink-800: #14301f;
  --ink-700: #1f4030;
  --ink-600: #3d5a4a;
  --ink-400: #6b8578;
  --ink-300: #9db0a5;
  --ink-200: #d5e0d9;
  --ink-100: #eaf1ed;
  --ink-50:  #f6faf8;

  /* Second tone: a warm clay that stops the page being green-on-green. Used
     for emphasis — numbers, eyebrows, the popular badge — never for buttons,
     so the primary action is never ambiguous. */
  --clay-50:  #fdf6f0;
  --clay-100: #f8e6d6;
  --clay-300: #e0a877;
  --clay-500: #c2703d;
  --clay-600: #a85c2e;
  --clay-700: #8a4a24;

  --accent:  var(--clay-500);
  --danger:  #dc2626;
  --info:    #0369a1;

  --bg: #ffffff;
  --bg-alt: var(--ink-50);
  --bg-warm: #fbf7f1;      /* the second surface, alternates with --bg-alt */
  --card: #ffffff;
  --line: var(--ink-200);
  --text: var(--ink-900);
  --text-mut: var(--ink-600);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(11,31,22,.06), 0 1px 3px rgba(11,31,22,.08);
  --shadow: 0 4px 6px -1px rgba(11,31,22,.07), 0 10px 24px -6px rgba(11,31,22,.12);
  --shadow-lg: 0 20px 50px -12px rgba(11,31,22,.22);

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px;

  /* One system stack, as before. Reverted from the webfont pairing — it also
     removes an external request, which the mobile budget benefits from.
     --font-display stays as a token so headings can be retargeted later
     without touching every rule that uses it. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.14; margin: 0 0 var(--space-4);
  font-weight: 700; letter-spacing: -0.025em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 700; }
p  { margin: 0 0 var(--space-4); }
.lead { font-size: clamp(1.05rem, 1.9vw, 1.3rem); color: var(--text-mut); }
.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: .12em; font-size: .74rem;
  font-weight: 700; color: var(--clay-600); margin-bottom: var(--space-3);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-5); }
.section { padding: var(--space-9) 0; }
.section--tint { background: var(--bg-alt); }
.section--warm { background: var(--bg-warm); }
.section--ink { background: var(--ink-900); color: #fff; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: var(--ink-200); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 14px 26px; border-radius: var(--radius-full); border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  min-height: 48px; font-family: var(--font-display); letter-spacing: -.01em;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--green-400); outline-offset: 2px; }
.btn--primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--green-700); }
.btn--ghost { background: transparent; color: var(--ink-900); border-color: var(--ink-200); }
.btn--ghost:hover { border-color: var(--green-600); color: var(--green-700); }
.btn--light { background: #fff; color: var(--ink-900); }
.btn--sm { padding: 9px 18px; font-size: .9rem; min-height: 40px; }
.btn--lg { padding: 18px 34px; font-size: 1.1rem; min-height: 56px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.card--raised { box-shadow: var(--shadow); }
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px;
  border-radius: var(--radius-full); font-size: .8rem; font-weight: 700;
  background: var(--green-100); color: var(--green-900);
}
.pill--warn { background: #fef3c7; color: #92400e; }
.pill--info { background: #e0f2fe; color: #075985; }
.pill--muted { background: var(--ink-100); color: var(--ink-600); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: var(--space-5); height: 74px; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink-900); }
.nav__logo:hover { text-decoration: none; }
.nav__links { display: flex; gap: var(--space-5); margin-left: auto; align-items: center; }
.nav__links a { color: var(--ink-700); font-weight: 600; font-size: .95rem; }
.nav__cta { display: flex; gap: var(--space-3); align-items: center; }

/* Hamburger: hidden on desktop, the only nav control on small screens. */
.nav__burger { display: none; margin-left: var(--space-3); width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; padding: 0; color: var(--ink-800); }
.nav__burger span { position: relative; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: background .15s ease; }
.nav__burger span::before, .nav__burger span::after { content: ""; position: absolute; left: 0; width: 18px;
  height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s ease, top .2s ease; }
.nav__burger span::before { top: -6px; } .nav__burger span::after { top: 6px; }
body.menu-open .nav__burger span { background: transparent; }
body.menu-open .nav__burger span::before { top: 0; transform: rotate(45deg); }
body.menu-open .nav__burger span::after { top: 0; transform: rotate(-45deg); }

/* The slide-down drawer, populated from the same links as the desktop nav. */
.nav__drawer { display: none; position: fixed; inset: 74px 0 auto 0; z-index: 55;
  background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  flex-direction: column; padding: var(--space-3) var(--space-4) var(--space-5); gap: 2px; }
.nav__drawer a { display: flex; align-items: center; min-height: 50px; color: var(--ink-800);
  font-weight: 600; font-size: 1.02rem; border-bottom: 1px solid var(--ink-50); }
.nav__drawer a:last-child { border-bottom: 0; }
.nav__drawer .btn { margin-top: var(--space-3); width: 100%; }
body.menu-open .nav__drawer { display: flex; }
body.menu-open { overflow: hidden; }

@media (max-width: 940px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .nav__burger { display: inline-flex; }
}

/* Mobile nav: the lockup must not wrap and the actions must stay on one line.
   A sticky bottom CTA already carries the primary action on small screens, so
   the nav keeps only the secondary one. */
@media (max-width: 700px) {
  .nav__inner { height: 62px; gap: var(--space-3); }
  .nav__logo { font-size: 1rem; min-width: 0; }
  .nav__logo img { height: 34px; width: auto; }
  .nav__logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav__cta .btn { padding: 8px 14px; min-height: 38px; font-size: .82rem; white-space: nowrap; }
  .nav__cta .btn--primary { display: none; }   /* lives in the sticky bar */
  .nav__drawer { top: 62px; }
  .section { padding: var(--space-7) 0; }
  h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  .wrap { padding: 0 var(--space-4); }
}

/* Every interactive target clears 44px on touch */
@media (pointer: coarse) {
  .btn, .nav__links a, summary { min-height: 44px; }
  .nav__links a { display: inline-flex; align-items: center; }
}

/* Footer */
.footer { background: var(--ink-900); color: var(--ink-200); padding: var(--space-8) 0 var(--space-6); }
.footer a { color: var(--ink-200); }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: var(--space-3); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--space-6); }
.footer__grid ul { list-style: none; padding: 0; margin: 0; }
.footer__grid li { margin-bottom: var(--space-2); font-size: .9rem; }
.footer__bottom {
  margin-top: var(--space-6); padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: var(--ink-400);
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between;
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } }


/* ── Form fields ──────────────────────────────────────────────────────────
   Part of the design system, not a page. Every login, signup and settings
   form consumes these — defining them per-page is how the login screens ended
   up with unstyled browser-default inputs. */
.field { margin-bottom: var(--space-4); }
.field label {
  display: block; font-weight: 700; font-size: .88rem;
  margin-bottom: 6px; color: var(--ink-800);
}
.field input,
.field select,
.field textarea {
  width: 100%; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; font-size: 1rem; min-height: 48px;
  background: #fff; color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select { appearance: auto; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-300); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-100);
}
.field input:disabled { background: var(--ink-50); color: var(--ink-400); }
.field .hint { font-size: .8rem; color: var(--text-mut); margin-top: 5px; }
.field .err { font-size: .82rem; color: var(--danger); margin-top: 5px; display: none; }
.field.is-bad input,
.field.is-bad select,
.field.is-bad textarea { border-color: var(--danger); }
.field.is-bad .err { display: block; }

/* Checkbox / radio keep their native size inside a field */
.field input[type="checkbox"],
.field input[type="radio"] { width: auto; min-height: auto; }

/* Inline label+control rows (a checkbox with text beside it) */
.check {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: .88rem; color: var(--text-mut);
}
.check input { width: auto; min-height: auto; margin-top: 3px; }

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.center { text-align: center; }
.stack > * + * { margin-top: var(--space-4); }
.mut { color: var(--text-mut); }
.small { font-size: .875rem; }
.tiny { font-size: .8rem; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
