:root {
  --blue: #4a72a8;
  --blue-dark: #2f4d78;
  --green: #8aa476;
  --ink: #26323f;
  --muted: #5f6b78;
  --line: #dde3ea;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue: #8fb0dc;
    --blue-dark: #b7cdea;
    --green: #a5c08f;
    --ink: #e6ebf1;
    --muted: #a3afbd;
    --line: #2d3947;
    --bg: #131a22;
    --bg-alt: #19222c;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { line-height: 1.2; color: var(--blue-dark); margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.brand { background: #fff; border-radius: 8px; padding: 2px 8px; line-height: 0; }
.brand img { height: 100px; width: auto; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 6px; font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg-alt); color: var(--blue-dark); }
.nav .btn { background: var(--blue); color: #fff; }
.nav .btn:hover { background: var(--blue-dark); color: #fff; }
.menu-toggle { display: none; }

/* hero */
.hero { position: relative; color: #fff; background: #1d2b3c center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,34,52,.82), rgba(20,34,52,.35)); }
.hero .wrap { position: relative; padding-top: 88px; padding-bottom: 88px; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { max-width: 52ch; font-size: 1.15rem; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; border: 2px solid var(--blue); cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.ghost { background: transparent; border-color: #fff; color: #fff; }
.btn.ghost:hover { background: rgba(255,255,255,.15); }

.page-title { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.page-title .wrap { padding-top: 40px; padding-bottom: 28px; }
.page-title h1 { margin: 0; }

section { padding: 48px 0; }
section.alt { background: var(--bg-alt); }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { border: 1px solid var(--line); border-radius: 10px; padding: 22px; background: var(--bg); }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.two-col { display: grid; gap: 32px; grid-template-columns: 1.3fr 1fr; align-items: start; }
.prose { max-width: 70ch; }
.prose ul, .card ul { padding-left: 1.2em; margin: 0 0 1em; }
.badges { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin-top: 8px; }
.badges img { height: 56px; width: auto; }
.note { font-size: .92rem; color: var(--muted); }
.callout { border-left: 4px solid var(--green); background: var(--bg-alt); padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 20px 0; }
.photo { border-radius: 10px; width: 100%; }

/* contractors */
.contractor h3 { margin-bottom: .2em; }
.contractor p { margin: 0; color: var(--muted); }

/* forms */
form { display: grid; gap: 16px; max-width: 640px; }
.row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
textarea { min-height: 120px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.status { padding: 12px 16px; border-radius: 8px; display: none; }
.status.ok { display: block; background: #e6f3e6; color: #1d5a1d; }
.status.err { display: block; background: #fbe7e7; color: #8a1f1f; }

/* footer */
.site-footer { background: #26323f; color: #d6dde5; padding: 36px 0 24px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { margin: 0 0 .5em; color: #fff; }
.site-footer p { margin: 0 0 .4em; }
.site-footer .legal { border-top: 1px solid #3a4858; margin-top: 24px; padding-top: 16px; font-size: .88rem; }

@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-block; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .hero .wrap { padding-top: 56px; padding-bottom: 56px; }
  .brand img { height: 72px; }
}

.nav .fb { display: inline-flex; align-items: center; padding: 0; margin-left: 8px; background: none; border-radius: 8px; }
.nav .fb:hover { background: none; opacity: .85; }

/* dropdown */
.has-sub { position: relative; }
.has-sub > a { display: block; }
.has-sub .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); z-index: 20; }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.has-sub .sub a { display: block; white-space: nowrap; }
@media (max-width: 820px) {
  .has-sub .sub { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
  .has-sub > a span { display: none; }
}
