/* Windy City Mowers — colours taken from the logo */
@font-face { font-family: 'Montserrat'; font-weight: 400; font-display: swap; src: url('/fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; font-display: swap; src: url('/fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; font-display: swap; src: url('/fonts/montserrat-latin-800-normal.woff2') format('woff2'); }

:root {
  --navy: #1D4E89;        /* logo circle + lettering */
  --navy-dark: #143A68;
  --navy-tint: #E3ECF6;
  --lime: #A9E060;        /* logo grass — accent only, never text on light backgrounds */
  --lime-dark: #4F7A16;
  --bg: #F3F7FA;          /* logo background */
  --white: #FFFFFF;
  --text: #1B2A3A;
  --muted: #4A5B6E;
  --line: #D5DFEA;
  --error: #B42318;
  --error-bg: #FDECEA;
  --ok: #2F6B12;
  --ok-bg: #EAF6DC;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 58, 104, 0.08);
  --font-head: 'Montserrat', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font-body); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; background: var(--white); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { background: var(--white); border-bottom: 4px solid var(--lime); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; }
.brand img { height: 52px; width: auto; display: block; }
.nav-toggle { display: none; }
.nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--navy); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--navy-tint); }
.nav a.btn { color: var(--white); background: var(--navy); margin-left: 6px; }
.nav a.btn:hover { background: var(--navy-dark); }

@media (max-width: 820px) {
  .brand img { height: 42px; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: var(--white); border: 0; border-radius: 8px; padding: 10px 14px; font: 600 .95rem var(--font-head); cursor: pointer; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 4px solid var(--lime); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 8px 20px 16px; gap: 2px; }
  .nav a.btn { margin: 8px 0 0; text-align: center; }
  /* Without JavaScript, keep the menu visible */
  .no-js .nav { position: static; display: block; border: 0; }
  .no-js .nav-toggle { display: none; }
  .no-js .site-header .wrap { flex-wrap: wrap; }
}

/* Buttons */
.btn { display: inline-block; background: var(--navy); color: var(--white); border: 2px solid var(--navy); border-radius: 10px; padding: 12px 22px; font: 600 1rem var(--font-head); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy-tint); color: var(--navy-dark); }
.btn-small { padding: 6px 12px; font-size: .88rem; border-radius: 8px; }
.btn-danger { background: var(--error); border-color: var(--error); }
.btn-danger:hover { background: #8A1A12; border-color: #8A1A12; }
.btn-lg { padding: 16px 28px; font-size: 1.1rem; }

/* Hero */
/* Photo: "Gräsmatta" by Moralist, Wikimedia Commons, public domain (see public/img/CREDITS.md) */
.hero {
  color: var(--white); padding: 72px 0 84px; position: relative; overflow: hidden;
  background-color: var(--navy);
  background-image:
    linear-gradient(90deg, rgba(20, 58, 104, 0.80) 0%, rgba(20, 58, 104, 0.70) 45%, rgba(20, 58, 104, 0.25) 100%),
    url('/img/hero-lawn.jpg');
  background-image:
    linear-gradient(90deg, rgba(20, 58, 104, 0.80) 0%, rgba(20, 58, 104, 0.70) 45%, rgba(20, 58, 104, 0.25) 100%),
    image-set(url('/img/hero-lawn.webp') type('image/webp'), url('/img/hero-lawn.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: center 60%;
}
.hero h1, .hero p { text-shadow: 0 1px 12px rgba(10, 30, 60, 0.45); }
@media (max-width: 820px) {
  /* Text covers the full width on phones, so tint evenly */
  .hero {
    padding: 48px 0 60px;
    background-image: linear-gradient(rgba(20, 58, 104, 0.76), rgba(20, 58, 104, 0.76)), url('/img/hero-lawn.jpg');
    background-image: linear-gradient(rgba(20, 58, 104, 0.76), rgba(20, 58, 104, 0.76)),
      image-set(url('/img/hero-lawn-900.webp') type('image/webp'), url('/img/hero-lawn.jpg') type('image/jpeg'));
  }
}
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--lime); }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero p { font-size: 1.15rem; max-width: 46ch; color: #E8EFF8; }
.hero .btn { background: var(--lime); border-color: var(--lime); color: var(--navy-dark); }
.hero .btn:hover { background: #BDEB80; border-color: #BDEB80; }
.hero .btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .badge { display: inline-block; background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px 14px; font: 600 .85rem var(--font-head); margin-bottom: 16px; color: var(--white); }

.section { padding: 48px 0; }
.section-alt { background: var(--white); }
.lead { font-size: 1.12rem; color: var(--muted); }

/* Cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.section-alt .card { background: var(--bg); box-shadow: none; }
.card h3 { margin-top: 0; }
.card .more { font-weight: 600; }
.service-card { border-top: 5px solid var(--lime); display: flex; flex-direction: column; }
.service-card p { flex: 1; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.steps li { background: var(--white); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); position: relative; padding-top: 56px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; top: 16px; left: 20px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--white); font: 800 1rem/32px var(--font-head); text-align: center; }
.callout { background: var(--navy-tint); border-left: 6px solid var(--navy); border-radius: 8px; padding: 16px 20px; }

/* Forms */
form .field { margin-bottom: 20px; }
label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .92rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--navy-tint); }
input[readonly] { background: var(--navy-tint); }
textarea { min-height: 120px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.checks { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
[data-cal] [hidden] { display: none !important; }
.cal-months { max-width: 420px; }
.cal-month { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin-bottom: 10px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { margin: 0; font-size: 1.1rem; }
.cal-nav { display: none; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--white); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--navy); }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-js .cal-nav { display: inline-block; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font: inherit; font-weight: 600; }
.cal-none { color: #B6BEC8; background: #F2F4F6; }
.cal-free { border: 2px solid var(--navy); background: var(--navy-tint); color: var(--navy-dark); cursor: pointer; padding: 0; }
.cal-free:hover { background: #fff; }
.cal-free.cal-selected { background: var(--navy); color: #fff; }
.cal-hint { display: none; margin: 4px 0 0; color: var(--muted); }
.cal-js .cal-hint { display: block; }
.cal-day { margin: 10px 0 4px; }
.slot-day-label { margin: 0 0 6px; font-weight: 600; }
.slot-times { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.check.slot { padding: 8px 10px; }
.slot-none { background: #FFF4D6; border-radius: 10px; padding: 12px; margin: 0; }
.visit-day { margin-bottom: 14px; }
.visit-picker .slot-times { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.check.slot.slot-off { opacity: .45; }
.visit-count { margin: 4px 0 0; }
.visit-options { margin: 0; padding-left: 18px; }
.visit-options li { margin-bottom: 6px; }
.visit-options form { display: inline; margin-left: 6px; }
.checks-days { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; background: var(--white); border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 400; cursor: pointer; margin: 0; }
.check:has(input:checked) { border-color: var(--navy); background: var(--navy-tint); }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--navy); flex: none; }
.field-error input, .field-error select, .field-error textarea, .field-error .check { border-color: var(--error); }
.error-text { color: var(--error); font-weight: 600; font-size: .95rem; margin-top: 6px; display: block; }
.alert { border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-weight: 600; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #F5C2BD; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #C9E6A8; }
.alert-warn { background: #FFF4D6; color: #6B4E00; border: 1px solid #F0DC9C; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-card { background: var(--white); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow); border: 1px solid var(--line); }
.gate { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-top: 20px; }
.privacy { font-size: .9rem; color: var(--muted); }

/* Blog */
.post-list { display: grid; gap: 20px; }
.post-card { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.post-card img { border-radius: 8px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.post-card.no-img { grid-template-columns: 1fr; }
@media (max-width: 600px) { .post-card { grid-template-columns: 1fr; } }
.meta { color: var(--muted); font-size: .92rem; }
.prose { font-size: 1.05rem; }
.prose img { border-radius: 8px; }
.prose blockquote { border-left: 4px solid var(--lime); margin: 1em 0; padding: .2em 1em; color: var(--muted); }
.prose pre { overflow-x: auto; background: var(--navy-tint); padding: 12px; border-radius: 8px; }
.cover { border-radius: var(--radius); margin-bottom: 24px; width: 100%; max-height: 420px; object-fit: cover; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #DCE6F2; padding: 40px 0 28px; margin-top: 48px; border-top: 8px solid var(--lime); }
.site-footer a { color: var(--white); }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer h2 { color: var(--white); font-size: 1.05rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .small { margin-top: 28px; font-size: .85rem; color: #B8C8DC; }
.site-footer .small a { color: #B8C8DC; }

/* Admin */
.admin-bar { background: var(--navy-dark); color: var(--white); }
.admin-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 60px; padding-top: 6px; padding-bottom: 6px; }
.admin-bar .brand-mini { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font: 800 1rem var(--font-head); }
.admin-bar .brand-mini img { width: 34px; height: 34px; }
.admin-bar nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.admin-bar nav a, .admin-bar nav button { color: var(--white); text-decoration: none; padding: 6px 10px; border-radius: 6px; font: 600 .92rem var(--font-head); background: none; border: 0; cursor: pointer; }
.admin-bar nav a:hover, .admin-bar nav a[aria-current="page"], .admin-bar nav button:hover { background: rgba(255,255,255,.14); }
.admin-bar .who { font-size: .88rem; color: #C9D7E8; }
.admin-main { padding: 28px 0 60px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; border: 2px solid var(--line); background: var(--white); font: 600 .9rem var(--font-head); }
.tabs a[aria-current="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); }
table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { background: var(--navy-tint); font-family: var(--font-head); font-size: .85rem; color: var(--navy); }
table.list tr:last-child td { border-bottom: 0; }
.stage { display: inline-block; border-radius: 999px; padding: 2px 10px; font: 600 .8rem var(--font-head); white-space: nowrap; }
.stage-open { background: #FFE9B0; color: #6B4E00; }
.stage-visiting { background: #FFE0CC; color: #7A3300; }
.stage-quoted { background: #E9DDF8; color: #4B2A7A; }
.stage-declined, .stage-expired { background: #ECEFF2; color: #4A5562; }
.stage-job_open { background: #D8F0D2; color: #1F5A17; }
.stage-job_taken { background: var(--navy-tint); color: var(--navy-dark); }
.stage-done { background: var(--ok-bg); color: var(--ok); }
.detail { display: grid; gap: 20px; grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { font-weight: 600; color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.history { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.history li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.inline-form { display: inline; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack > * + * { margin-top: 16px; }
.actions-box form + form { margin-top: 10px; }
.danger-zone { border-color: #F5C2BD; }
.preview { border: 2px dashed var(--line); border-radius: 10px; padding: 16px; background: var(--white); min-height: 120px; }
.login-box { max-width: 420px; margin: 40px auto; }
.muted { color: var(--muted); }
.mt0 { margin-top: 0; }

/* Pay invoice page */
.pay-summary { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 20px; }
.pay-summary dt { font-weight: 600; color: var(--muted); }
.pay-summary dd { margin: 0; }
.btn-pay { width: 100%; font-size: 1.2rem; padding: 16px 22px; background: #2E7D32; border-color: #2E7D32; }
.btn-pay:hover { background: #1F5E23; border-color: #1F5E23; }
.pay-secure { font-size: .9rem; margin-top: 8px; }
.pay-or { font-size: 1.1rem; margin-top: 28px; }
.pay-soon { background: #F1F4F7; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; color: var(--muted); }
.pay-bank dd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.05rem; }
.copy-btn { padding: 2px 10px; font-size: .8rem; }
.repeat-tag { display: inline-block; font-size: .78rem; background: var(--navy-tint); color: var(--navy-dark); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
