/* TRADESMEN.ca
   Layout: dark job-site hero with the request form beside the pitch, then light bands
   for categories, provinces and the filterable directory. Signage type, hi-vis accent. */
:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --fg: #16202e;
  --muted: #586474;
  --line: #d6dce3;
  --hero-bg: #16202e;
  --hero-fg: #eef1f4;
  --hero-muted: #a9b4c1;
  --hivis: #ffc72c;
  --hivis-ink: #1a1405;
  --maple: #c8102e;
  --focus: #1f6feb;
  --rs-bg: #fbe9ec;
  --rs-fg: #9b0d24;
  --chip-bg: #e8ecf0;
  --ok: #1d7a46;
  --err: #b3261e;

  --f-display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --r: 6px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151d; --surface: #17202b; --fg: #e6eaef; --muted: #9aa6b4; --line: #2a3644;
    --hero-bg: #0a0f15; --hero-fg: #eef1f4; --hero-muted: #9aa6b4;
    --maple: #ff6b72; --focus: #6aa7ff; --rs-bg: #3a1a1f; --rs-fg: #ff9aa2; --chip-bg: #222d3a;
    --ok: #58c38a; --err: #ff8a80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f151d; --surface: #17202b; --fg: #e6eaef; --muted: #9aa6b4; --line: #2a3644;
  --hero-bg: #0a0f15; --hero-fg: #eef1f4; --hero-muted: #9aa6b4;
  --maple: #ff6b72; --focus: #6aa7ff; --rs-bg: #3a1a1f; --rs-fg: #ff9aa2; --chip-bg: #222d3a;
  --ok: #58c38a; --err: #ff8a80;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: 0.005em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--hivis); color: var(--hivis-ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 16px; }
.mono { font-family: var(--f-mono); font-size: 0.82em; letter-spacing: 0.04em; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--hero-bg); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--hero-bg); color: var(--hero-fg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 3px; flex: none;
  background: repeating-linear-gradient(135deg, var(--hivis) 0 6px, var(--hero-bg) 6px 12px);
  box-shadow: inset 0 0 0 2px var(--hivis);
}
.logo-word { font-family: var(--f-display); font-weight: 800; font-size: 1.55rem; letter-spacing: 0.06em; }
.logo-tld { color: var(--hivis); letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; font-weight: 500; font-size: 0.98rem; }
.nav a { text-decoration: none; color: var(--hero-muted); }
.nav a:hover { color: var(--hero-fg); }
.nav .nav-cta { color: var(--hivis-ink); background: var(--hivis); padding: 7px 14px; border-radius: var(--r); font-weight: 600; }
.nav .nav-cta:hover { color: var(--hivis-ink); filter: brightness(1.05); }
@media (max-width: 720px) {
  .nav a:not(.nav-cta) { display: none; }
}

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-fg); position: relative; overflow: hidden; }
.hero::after {
  /* hazard tape along the bottom edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
  background: repeating-linear-gradient(135deg, var(--hivis) 0 14px, var(--hero-bg) 14px 28px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; padding-block: 56px 72px; }
.hero-copy { min-width: 0; }
.eyebrow { font-family: var(--f-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--hivis); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
.lede { margin-top: 20px; font-size: 1.15rem; color: var(--hero-muted); max-width: 34em; }
.tally { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 32px 0 0; }
.tally div { display: flex; flex-direction: column-reverse; gap: 2px; border-left: 3px solid var(--hivis); padding-left: 12px; }
.tally dt { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--hero-muted); }
.tally dd { margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }

.request-card {
  background: var(--surface); color: var(--fg); border-radius: 10px; padding: 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35); min-width: 0;
  border-top: 6px solid var(--hivis);
}
.card-title { font-size: 1.9rem; font-weight: 700; text-transform: uppercase; }
.card-sub { color: var(--muted); margin-top: 4px; margin-bottom: 18px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 36px 56px; }
}
@media (max-width: 480px) { .request-card { padding: 20px; } }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); gap: 12px; }
@media (max-width: 420px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
label { font-weight: 600; font-size: 0.92rem; }
.opt { font-weight: 400; color: var(--muted); font-size: 0.85em; margin-left: 4px; }
input[type="text"], input[type="search"], select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--fg);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 11px 12px; min-height: 46px;
}
input::placeholder { color: var(--muted); opacity: 0.8; }
input:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.field.invalid input, .field.invalid select { border-color: var(--err); }
.error { color: var(--err); font-size: 0.88rem; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.btn { font: inherit; font-weight: 600; border: 0; border-radius: var(--r); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--hivis); color: var(--hivis-ink); font-family: var(--f-display); font-size: 1.25rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 13px 18px; margin-top: 4px; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--fg); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-sm { padding: 6px 12px; font-size: 0.9rem; }
.form-status { font-size: 0.95rem; padding: 12px 14px; border-radius: var(--r); background: var(--chip-bg); }
.form-status.ok { color: var(--ok); }
.form-status.bad { color: var(--err); }
.form-status.info { color: var(--fg); }

/* Bands */
.band { padding-block: 64px; }
.band-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; max-width: 46em; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; text-transform: uppercase; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 600px) { .band { padding-block: 44px; } }

/* Category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.cat-card {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--fg); transform: translateY(-2px); }
.cat-card h3 { font-size: 1.45rem; font-weight: 700; text-transform: uppercase; }
.cat-card .cat-blurb { color: var(--muted); font-size: 0.95rem; }
.cat-card .cat-list { font-size: 0.9rem; color: var(--fg); }
.cat-card .cat-count { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* Province tiles */
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.prov {
  font: inherit; color: inherit; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 8px;
}
.prov:hover { border-color: var(--fg); }
.prov[aria-pressed="true"] { border-color: var(--hivis); background: color-mix(in srgb, var(--hivis) 16%, var(--bg)); }
.prov-code { font-family: var(--f-mono); font-weight: 500; font-size: 0.9rem; background: var(--fg); color: var(--bg); border-radius: 4px; padding: 3px 6px; min-width: 2.6em; text-align: center; }
.prov-name { font-weight: 500; line-height: 1.2; }

/* Directory */
.filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px 14px; align-items: end; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; min-height: 46px; white-space: nowrap; }
.check input { width: 18px; height: 18px; accent-color: var(--maple); }
@media (max-width: 860px) { .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .filter-search { grid-column: 1 / -1; } }
@media (max-width: 480px) { .filters { grid-template-columns: minmax(0, 1fr); } }
.result-count { margin: 18px 0 6px; color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

.dir-group { margin-top: 28px; }
.dir-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--fg); padding-bottom: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.dir-group-head h3 { font-size: 1.6rem; font-weight: 700; text-transform: uppercase; }
.dir-group-head span { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.trade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.trade {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.trade-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.trade h4 { margin: 0; font-family: var(--f-body); font-weight: 600; font-size: 1.08rem; line-height: 1.25; }
.trade p { color: var(--muted); font-size: 0.95rem; }
.trade .btn { margin-top: auto; align-self: flex-start; }
.trade-actions { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trade-area { font-size: 0.85rem; color: var(--muted); }

.badge { display: inline-block; font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; white-space: nowrap; flex: none; }
.badge-rs { background: var(--rs-bg); color: var(--rs-fg); }
.badge-example { background: var(--chip-bg); color: var(--muted); border: 1px dashed var(--muted); }
.note { margin-top: 28px; color: var(--muted); font-size: 0.92rem; max-width: 52em; }
.note .badge { margin-right: 6px; }
.empty { margin-top: 24px; padding: 20px; border: 1.5px dashed var(--line); border-radius: 8px; color: var(--muted); }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--fg); text-decoration: underline; cursor: pointer; }

/* Steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { counter-increment: step; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.steps li::before { content: "Step " counter(step); font-family: var(--f-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--maple); }
.steps h3 { font-size: 1.5rem; font-weight: 700; text-transform: uppercase; }
.steps p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* List your business */
.list-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 40px; align-items: center; }
.list-grid h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; text-transform: uppercase; margin-bottom: 12px; }
.list-grid > div > p { color: var(--muted); max-width: 36em; }
.contact-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px !important; color: var(--fg) !important; }
.contact-label { font-family: var(--f-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.contact-addr { font-weight: 600; font-size: 1.15rem; user-select: all; word-break: break-all; }
.listing-demo { margin: 0; }
.listing-demo figcaption { font-family: var(--f-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.listing { background: var(--surface); border: 1.5px dashed var(--line); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.listing-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.listing h3 { font-family: var(--f-body); font-size: 1.15rem; font-weight: 600; }
.listing-meta { color: var(--muted); font-size: 0.92rem; display: flex; gap: 8px; align-items: center; }
.listing-meta .mono { background: var(--chip-bg); color: var(--fg); padding: 2px 5px; border-radius: 3px; }
.listing-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.listing-tags span { background: var(--chip-bg); border-radius: 999px; padding: 3px 10px; font-size: 0.82rem; }
.listing-desc { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 820px) { .list-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* Footer */
.site-footer { background: var(--hero-bg); color: var(--hero-muted); }
.footer-inner { padding-block: 36px; display: flex; flex-direction: column; gap: 8px; }
.logo-small { font-size: 1.3rem; color: var(--hero-fg); }
.fine { font-size: 0.85rem; }

/* Thanks page */
.thanks { min-height: 60vh; display: flex; align-items: center; }
.thanks .wrap { padding-block: 64px; display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.thanks h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 800; text-transform: uppercase; }
.thanks p { color: var(--muted); font-size: 1.1rem; }
.thanks .btn { align-self: flex-start; padding: 12px 18px; }

/* For-sale banner (image) above the header */
.sale-banner { display: block; text-align: center; line-height: 0;
  background:
    repeating-linear-gradient(135deg, #16202e 0 12px, #ffc72c 12px 24px) top / 100% 8px no-repeat,
    repeating-linear-gradient(135deg, #16202e 0 12px, #ffc72c 12px 24px) bottom / 100% 8px no-repeat,
    #ffc72c; }
.sale-banner img { display: inline-block; width: 100%; max-width: 1200px; height: auto; }
@media (max-width: 640px) { .sale-banner img { max-width: 640px; } }
