:root {
  --bg: #f4f7f1; --panel: #ffffff; --fg: #1d2a1a; --muted: #5b6956; --line: #dbe3d5;
  --brand: #2f7d32; --brand-dark: #1f5a22; --brand-fg: #ffffff; --bad: #b42318; --radius: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11170f; --panel: #1a2218; --fg: #e6eee2; --muted: #a3b19d; --line: #2e3a2b;
    --brand: #6abf69; --brand-dark: #1d3a1c; --brand-fg: #0d150c; --bad: #f87171; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.small { font-size: .875rem; color: var(--muted); }

.hero { color: #fff; padding: 72px 0 64px; min-height: clamp(420px, 62vh, 620px); display: flex; align-items: center;
  background-color: #1f3a1e;
  /* dark fade on the left keeps the text readable over the picture */
  background-image: linear-gradient(90deg, rgba(8, 20, 10, .82) 0%, rgba(8, 20, 10, .55) 38%, rgba(8, 20, 10, .05) 70%), url(/hero-lawn.svg);
  background-size: cover; background-position: 70% 88%; }
.hero .wrap { width: 100%; max-width: 1100px; }
.hero .brand { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; opacity: .95; margin: 0 0 10px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.08; margin: 0 0 14px; max-width: 13em; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.hero .area { margin: 0 0 24px; font-size: 1.15rem; opacity: .95; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
@media (max-width: 640px) {
  .hero { background-image: linear-gradient(180deg, rgba(8, 20, 10, .78) 0%, rgba(8, 20, 10, .55) 60%, rgba(8, 20, 10, .3) 100%), url(/hero-lawn.svg);
    background-position: 80% 92%; padding: 48px 0 150px; }
}
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; background: #fff; color: #1f5a22; font-weight: 700; text-decoration: none; }
.btn.ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.7); }

main { padding-top: 24px; padding-bottom: 8px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card h2 { margin: 0 0 12px; font-size: 1.3rem; }
.services { margin: 0; padding-left: 1.2em; columns: 2 240px; }
.services li { margin: 0 0 6px; break-inside: avoid; }

form label { display: block; font-size: .9rem; color: var(--muted); margin: 12px 0 0; }
form input, form textarea { display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; }
form textarea { min-height: 90px; resize: vertical; }
form input:focus, form textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 14px 0 0; }
legend { font-size: .9rem; color: var(--muted); padding: 0; }
label.check { display: flex; gap: 10px; align-items: center; color: var(--fg); font-size: 1rem; margin: 8px 0 0; }
label.check input { width: auto; min-height: 0; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
button { margin-top: 14px; font: inherit; font-weight: 700; padding: 12px 22px; border-radius: 10px; border: 0;
  background: var(--brand); color: var(--brand-fg); cursor: pointer; min-height: 48px; }
.error { color: var(--bad); font-weight: 600; }
footer { padding-bottom: 32px; }

/* Google reviews: a strip of cards across the bottom, swipe / scroll sideways when they don't fit */
.reviews { padding: 8px 0 4px; }
.reviews h2 { margin: 0 0 4px; font-size: 1.3rem; }
.reviews-sum { margin: 0 0 12px; }
.stars { color: #e3a008; letter-spacing: 1px; }
.review-strip { list-style: none; margin: 0 auto; padding: 4px 16px 12px; max-width: 1100px; display: flex; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.review { flex: 0 0 min(300px, 82vw); scroll-snap-align: start; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.review p { margin: 8px 0 0; }
.review p.small { margin-top: auto; padding-top: 10px; }
.reviews-src { margin-top: 0; }

/* customer portal */
.bar-top { background: var(--brand-dark); color: #fff; }
.bar-top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand-link { color: #fff; font-weight: 800; text-decoration: none; }
.bar-top form { margin: 0; }
button.link { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); margin: 0; min-height: 36px; padding: 6px 12px; font-weight: 600; }
.portal main { padding-top: 20px; }
.portal h1 { font-size: 1.6rem; margin: 0 0 16px; }
.portal h3 { font-size: 1rem; margin: 16px 0 6px; }
.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.notice { background: var(--panel); border: 1px solid var(--brand); border-radius: 10px; padding: 10px 14px; }
ul.visits { list-style: none; margin: 0; padding: 0; }
ul.visits li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.visits li:last-child { border-bottom: 0; }
form.inline { margin: 0; }
.small-btn { margin: 0; min-height: 34px; padding: 4px 12px; font-size: .9rem; background: transparent; color: var(--brand); border: 1px solid var(--brand); }
select { display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px; }

/* portal invoice */
table.lines { width: 100%; border-collapse: collapse; margin: 12px 0; }
table.lines th, table.lines td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); }
table.lines .num { text-align: right; white-space: nowrap; }
table.lines tfoot td { border-bottom: 0; }
@media print { .bar-top, .no-print, footer { display: none !important; } body { background: #fff; color: #000; } .card { border: 0; } }

/* the owner's own header picture (Website screen); the drawn one stays as the default */
.hero { position: relative; isolation: isolate; }
.hero.custom { background-image: none; background-color: #1f3a1e; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero.custom::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8, 20, 10, .82) 0%, rgba(8, 20, 10, .55) 38%, rgba(8, 20, 10, .08) 72%); }
@media (max-width: 640px) { .hero.custom::before { background: linear-gradient(180deg, rgba(8, 20, 10, .78) 0%, rgba(8, 20, 10, .5) 60%, rgba(8, 20, 10, .3) 100%); } }
.hero-bg.f0 { object-position: 50% 0%; }
.hero-bg.f10 { object-position: 50% 10%; }
.hero-bg.f20 { object-position: 50% 20%; }
.hero-bg.f30 { object-position: 50% 30%; }
.hero-bg.f40 { object-position: 50% 40%; }
.hero-bg.f50 { object-position: 50% 50%; }
.hero-bg.f60 { object-position: 50% 60%; }
.hero-bg.f70 { object-position: 50% 70%; }
.hero-bg.f80 { object-position: 50% 80%; }
.hero-bg.f90 { object-position: 50% 90%; }
.hero-bg.f100 { object-position: 50% 100%; }

/* quote page */
details.decline { margin-top: 14px; }
details.decline summary { cursor: pointer; color: var(--muted); }
button.secondary { background: transparent; color: var(--fg); border: 1px solid var(--line); }

/* company logo: a white band across the top, logo centred (logos are usually made for a white background) */
.site-logo { background: #fff; display: flex; justify-content: center; align-items: center; padding: 14px 16px 12px;
  border-bottom: 4px solid #0b5229; box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  position: sticky; top: 0; z-index: 20; transition: padding .2s ease; }
.site-logo a { display: inline-block; line-height: 0; }
.site-logo img { display: block; height: clamp(76px, 13vw, 150px); width: auto; max-width: min(92vw, 520px); object-fit: contain; transition: height .2s ease; }
/* anchored at the top: once the page scrolls, the band slims down so it doesn't cover the page */
.site-logo.compact { padding: 6px 16px 5px; }
.site-logo.compact img { height: 52px; }
@media (prefers-reduced-motion: reduce) { .site-logo, .site-logo img { transition: none; } }

/* platform front page (lawncare.ccsnwa.com) */
.wrap.wide { max-width: 1100px; }
.center { text-align: center; }
.front main section { margin-bottom: 28px; }
.front main h2.center { font-size: 1.6rem; margin: 8px 0 14px; }
.features, .plans, .addons { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.features .card, .plans .card, .addons .card { margin: 0; }
.features h3, .plans h3, .addons h3 { margin: 0 0 6px; font-size: 1.1rem; }
.features p { margin: 0; color: var(--muted); }
.plans { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.plans .card { position: relative; }
.plans .best { border: 2px solid var(--brand); }
.plans .tag { position: absolute; top: -12px; left: 16px; margin: 0; background: var(--brand); color: var(--brand-fg); font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.plans .price { margin: 4px 0; }
.plans .price strong { font-size: 2rem; }
.plans ul { margin: 10px 0 0; padding-left: 1.2em; }
.plans li li { margin: 0 0 4px; }
.addons { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 10px; }
.addons p { margin: 0; color: var(--muted); }
.demo { border: 2px solid var(--brand); }
.demo .login { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 16px; }
.demo .login dt { color: var(--muted); }
.demo .login dd { margin: 0; }
.demo code { font-size: 1rem; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; user-select: all; }
.btn.solid { background: var(--brand); color: var(--brand-fg); }
.btn.line { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
form select { display: block; width: 100%; margin-top: 4px; }

/* platform pages: privacy, terms, QuickBooks disconnected (src/legal.js) */
.hero.slim { min-height: 0; padding: 22px 0; }
.hero.slim .brand { margin: 0; }
.hero.slim .brand a { color: inherit; text-decoration: none; }
.legal main { padding-top: 24px; }
.legal article h1 { font-size: 1.8rem; margin: 0 0 4px; }
.legal article h2 { font-size: 1.2rem; margin: 26px 0 8px; }
.legal article p, .legal article li { line-height: 1.6; }
.legal article ul { padding-left: 22px; }

/* ---- trades (src/trade.js): HVAC blue, plumbing teal; <html class="t-hvac"> / "t-plumbing". Lawn uses the colours above. */
html.t-hvac { --bg: #f3f6fa; --fg: #172231; --muted: #566273; --line: #d6dee8; --brand: #1d5fa6; --brand-dark: #154679; }
html.t-plumbing { --bg: #f2f7f8; --fg: #16282c; --muted: #536a70; --line: #d3e2e5; --brand: #0e7490; --brand-dark: #0b5569; }
@media (prefers-color-scheme: dark) {
  html.t-hvac { --bg: #0e141c; --panel: #161e29; --fg: #e3eaf3; --muted: #9eabbb; --line: #2a3644; --brand: #6aa6e8; --brand-dark: #16324f; --brand-fg: #0b1420; }
  html.t-plumbing { --bg: #0d1517; --panel: #152024; --fg: #e1edef; --muted: #9bb2b7; --line: #283b40; --brand: #5ec3d9; --brand-dark: #0f3a44; --brand-fg: #0a1416; }
}
.t-hvac .hero { background-color: #15263a;
  background-image: linear-gradient(90deg, rgba(6, 14, 26, .82) 0%, rgba(6, 14, 26, .55) 38%, rgba(6, 14, 26, .05) 70%), url(/hero-hvac.svg); }
.t-plumbing .hero { background-color: #11292e;
  background-image: linear-gradient(90deg, rgba(5, 18, 21, .82) 0%, rgba(5, 18, 21, .55) 38%, rgba(5, 18, 21, .05) 70%), url(/hero-plumbing.svg); }
@media (max-width: 640px) {
  .t-hvac .hero { background-image: linear-gradient(180deg, rgba(6, 14, 26, .78) 0%, rgba(6, 14, 26, .55) 60%, rgba(6, 14, 26, .3) 100%), url(/hero-hvac.svg); }
  .t-plumbing .hero { background-image: linear-gradient(180deg, rgba(5, 18, 21, .78) 0%, rgba(5, 18, 21, .55) 60%, rgba(5, 18, 21, .3) 100%), url(/hero-plumbing.svg); }
}
.t-hvac .hero.custom, .t-plumbing .hero.custom { background-image: none; }
/* only the plain white button takes the trade colour; ghost (white text on the picture), solid and line keep theirs */
.t-hvac .btn:not(.ghost):not(.solid):not(.line) { color: #154679; }
.t-plumbing .btn:not(.ghost):not(.solid):not(.line) { color: #0b5569; }

/* a preview page (company.site_preview): a plain strip across the top */
.preview-strip { margin: 0; padding: .5rem 1rem; text-align: center; font-size: .9rem; background: #fff4c2; color: #4a3b00; border-bottom: 1px solid #e6d27a; }
@media (prefers-color-scheme: dark) { .preview-strip { background: #3a3000; color: #ffe9a3; border-bottom-color: #5c4d10; } }

/* ---- page sections (src/sections.js): full-width bands, each with a .wrap inside */
main.home-main { padding-top: 0; padding-bottom: 0; }
.sec { padding: 44px 0; }
.sec.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec h2, .cta-band h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.2; margin: 0 0 10px; }
.sec h3 { font-size: 1.15rem; margin: 0 0 6px; }
.sec .lead { color: var(--muted); font-size: 1.05rem; max-width: 46em; }
.kicker { margin: 0 0 6px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.sec .wrap, .reviews .wrap, .site-foot .wrap { max-width: 1100px; }
.narrow-form { max-width: 760px !important; }
.sec .card { margin: 0; }
.services { margin: 0; padding-left: 1.2em; columns: 2 240px; }

/* service cards: picture beside the words, alternating sides on wide screens */
.svc-list { display: grid; gap: 22px; margin-top: 18px; }
.svc { display: grid; gap: 18px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.svc.has-pic { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.svc.has-pic.flip img { order: 2; }
.svc img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.svc p { margin: 0 0 8px; }
@media (max-width: 720px) { .svc.has-pic { grid-template-columns: 1fr; } .svc.has-pic.flip img { order: 0; } }

/* gallery: picture cards */
.gallery { list-style: none; margin: 18px 0 10px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gallery li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #fff; }
.gallery li div { padding: 12px 14px 14px; }
.gallery p { margin: 0; color: var(--muted); }
.gallery .kicker { margin-bottom: 4px; }

/* plans and reasons: small cards in a grid */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 16px; }
.card.plan { border: 2px solid var(--brand); }
.card.plan .price { font-size: 1.4rem; font-weight: 800; color: var(--brand); margin: 0 0 8px; }
.card p { margin: 0 0 8px; }

/* towns as chips */
.towns { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.towns li { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; font-weight: 600; }
.sec.alt .towns li { background: var(--bg); }

/* about: optional picture beside the words */
.about-pic { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; align-items: start; }
.about-pic img { width: 100%; border-radius: var(--radius); display: block; }
@media (max-width: 720px) { .about-pic { grid-template-columns: 1fr; } }

/* questions: open one at a time by tapping */
details.faq { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin: 10px 0 0; }
details.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: outside; }
details.faq[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
details.faq p { margin: 0 0 12px; }

/* closing call to action */
.cta-band { background: var(--brand-dark); color: #fff; padding: 44px 0; text-align: center; }
.cta-band .wrap { max-width: 760px; }
.cta-band p { opacity: .95; }
.cta-band .cta { justify-content: center; margin-top: 14px; }

/* hero extras */
.hero .lede { margin: 0 0 18px; font-size: 1.12rem; max-width: 36em; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.badges { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.5); border-radius: 99px; padding: 5px 12px; font-weight: 700; font-size: .9rem; }
.btn.accent { background: var(--brand); color: var(--brand-fg); border: 2px solid var(--brand); }

/* menu bar (Page sections > Menu bar): logo left, section links, main button right */
.site-logo.with-nav { justify-content: space-between; gap: 16px; padding: 8px 20px; flex-wrap: wrap; }
.site-logo.with-nav .home { display: inline-flex; align-items: center; text-decoration: none; }
.site-logo.with-nav .home img { height: clamp(48px, 7vw, 76px); max-width: min(60vw, 340px); }
.site-logo.with-nav .name { font-weight: 800; font-size: 1.2rem; color: #1d2a1a; }
.site-logo.with-nav nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; }
.site-logo.with-nav nav a { color: #1d2a1a; text-decoration: none; font-weight: 600; }
.site-logo.with-nav nav a:hover { color: var(--brand); text-decoration: underline; }
.site-logo.with-nav .btn { padding: 9px 16px; }
.site-logo.with-nav.compact { padding: 4px 20px; }
.site-logo.with-nav.compact .home img { height: 44px; }
@media (max-width: 760px) { .site-logo.with-nav nav { order: 3; width: 100%; overflow-x: auto; } .site-logo.with-nav nav ul { flex-wrap: nowrap; padding-bottom: 4px; } }
@media (prefers-color-scheme: dark) { .site-logo.with-nav .name, .site-logo.with-nav nav a { color: #1d2a1a; } }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 20px 0 32px; margin-top: 0; }
.site-foot p { margin: 6px 0; }
.social a { font-weight: 600; }
