/* ============================================
   EcoSteelRoofing.ca — Site Styles
   ============================================ */

:root {
  --steel-900: #16232e;
  --steel-800: #1f3240;
  --steel-700: #2b4459;
  --steel-600: #3a5a75;
  --steel-100: #e8eef3;
  --steel-050: #f4f7fa;
  --eco-600: #1d7a3f;
  --eco-500: #259a4f;
  --eco-100: #e2f3e8;
  --rust-500: #c0562b;
  --ink: #223039;
  --muted: #5c6f7c;
  --line: #d9e2e9;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(22, 35, 46, 0.08);
  --shadow-lg: 0 8px 30px rgba(22, 35, 46, 0.14);
  --max-w: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--steel-900);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo .leaf { color: var(--eco-500); }
.logo .tld { color: var(--eco-500); font-weight: 500; }

.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav a {
  color: #c6d4de;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover { background: var(--steel-700); color: var(--white); }
.main-nav a.active { background: var(--steel-700); color: var(--white); }

.main-nav a.nav-cta {
  background: var(--eco-600);
  color: var(--white);
  margin-left: 8px;
}
.main-nav a.nav-cta:hover { background: var(--eco-500); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--steel-900) 0%, var(--steel-700) 60%, var(--steel-600) 100%);
  color: var(--white);
  padding: 72px 0 88px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(105deg, transparent 0 90px, rgba(255,255,255,0.03) 90px 92px);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero h1 em { color: #7fd49c; font-style: normal; }

.hero p.lede {
  font-size: 1.15rem;
  color: #c6d4de;
  margin-bottom: 32px;
  max-width: 620px;
}

/* Search panel */
.search-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 12px;
  box-shadow: var(--shadow-lg);
}

.search-panel label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
}

.search-panel input:focus,
.search-panel select:focus {
  outline: 2px solid var(--eco-500);
  outline-offset: -1px;
}

.btn {
  display: inline-block;
  background: var(--eco-600);
  color: var(--white);
  border: none;
  padding: 12px 26px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { background: var(--eco-500); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--steel-600);
  color: var(--steel-700);
}
.btn-outline:hover { background: var(--steel-050); }

.search-panel .btn { align-self: end; white-space: nowrap; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-stats .stat strong {
  display: block;
  font-size: 1.7rem;
  color: #7fd49c;
  line-height: 1.2;
}

.hero-stats .stat span { font-size: 0.9rem; color: #a8bac6; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--steel-050); }

.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--eco-600);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--steel-900);
}

.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--eco-100);
  color: var(--eco-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--steel-900); }
.card p { color: var(--muted); font-size: 0.95rem; }
.card a.card-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--eco-600);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.card a.card-link:hover { text-decoration: underline; }

/* ---------- Province chips ---------- */
.province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.province-chip {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.province-chip:hover { border-color: var(--eco-500); box-shadow: var(--shadow); }
.province-chip strong { font-size: 1rem; color: var(--steel-900); }
.province-chip span { font-size: 0.85rem; color: var(--muted); }

/* ---------- Contractor directory ---------- */
.directory-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.filters {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 84px;
}

.filters h3 { font-size: 1rem; margin-bottom: 16px; color: var(--steel-900); }

.filter-group { margin-bottom: 18px; }

.filter-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.92rem;
}

.filter-group .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 6px;
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
}

.filter-group .check-row input { width: auto; }

.btn-clear {
  width: 100%;
  background: var(--steel-050);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 9px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-clear:hover { background: var(--steel-100); }

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.results-meta p { color: var(--muted); font-size: 0.95rem; }
.results-meta select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; }

.contractor-list { display: flex; flex-direction: column; gap: 16px; }

.contractor-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: start;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.contractor-card:hover { box-shadow: var(--shadow-lg); border-color: var(--steel-600); }

.contractor-avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--steel-800);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.contractor-body h3 { font-size: 1.15rem; color: var(--steel-900); margin-bottom: 2px; }

.contractor-body .location {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.contractor-body .desc { font-size: 0.95rem; color: var(--ink); margin-bottom: 10px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--steel-050);
  color: var(--steel-700);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 999px;
}

.tag.eco { background: var(--eco-100); color: var(--eco-600); border-color: #bfe5cc; }

.contractor-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 130px;
}

.rating { color: #e8a33d; font-size: 0.95rem; white-space: nowrap; }
.rating .num { color: var(--ink); font-weight: 700; margin-left: 4px; }
.rating .count { color: var(--muted); font-weight: 400; font-size: 0.85rem; }

.badge-verified {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--eco-600);
  background: var(--eco-100);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.contractor-side .btn { padding: 9px 18px; font-size: 0.9rem; }

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- Styles guide ---------- */
.style-card { padding: 0; overflow: hidden; }

.style-swatch {
  height: 150px;
  position: relative;
}

.style-swatch.standing-seam {
  background: repeating-linear-gradient(90deg, #46647c 0 46px, #3a5568 46px 50px);
}
.style-swatch.steel-shingle {
  background:
    repeating-linear-gradient(0deg, #6b4f3a 0 28px, #5d4432 28px 30px),
    repeating-linear-gradient(90deg, transparent 0 55px, rgba(0,0,0,0.12) 55px 57px);
}
.style-swatch.metal-tile {
  background:
    repeating-radial-gradient(circle at 25% 0, #8a3b2a 0 18px, #7a3324 18px 36px);
}
.style-swatch.corrugated {
  background: repeating-linear-gradient(90deg, #9aa8b2 0 14px, #7d8c97 14px 28px);
}
.style-swatch.slate-look {
  background:
    repeating-linear-gradient(0deg, #3d4852 0 26px, #333d46 26px 28px),
    repeating-linear-gradient(90deg, transparent 0 48px, rgba(0,0,0,0.15) 48px 50px);
}
.style-swatch.shake-look {
  background:
    repeating-linear-gradient(0deg, #7d6248 0 24px, #6e5540 24px 26px),
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(0,0,0,0.1) 40px 42px);
}

.style-card .style-body { padding: 22px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 12px; }
.spec-table td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--muted); width: 45%; }
.spec-table tr:last-child td { border-bottom: none; }

/* Colour palette */
.colour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.colour-swatch {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.colour-swatch .chip { height: 72px; }
.colour-swatch .label { padding: 8px 10px; font-size: 0.82rem; }
.colour-swatch .label strong { display: block; color: var(--steel-900); }
.colour-swatch .label span { color: var(--muted); font-size: 0.75rem; }

/* ---------- Resources / FAQ ---------- */
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  color: var(--steel-900);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--eco-600); }
.faq-item[open] summary::after { content: "–"; }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item .faq-body { padding: 0 20px 18px; color: var(--muted); font-size: 0.97rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.info-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.info-table th {
  background: var(--steel-800);
  color: var(--white);
  text-align: left;
  padding: 12px 16px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.info-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.info-table tr:last-child td { border-bottom: none; }
.info-table tr:nth-child(even) td { background: var(--steel-050); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--eco-600), #14602f);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}

.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 10px; }
.cta-band p { color: #d4ecdd; opacity: 0.9; margin-bottom: 24px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .btn { background: var(--white); color: var(--eco-600); }
.cta-band .btn:hover { background: var(--eco-100); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--steel-900);
  color: #a8bac6;
  padding: 48px 0 24px;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 12px; }
.site-footer a { color: #a8bac6; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--steel-700);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: #7d93a3;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--steel-900), var(--steel-700));
  color: var(--white);
  padding: 48px 0;
}

.page-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); letter-spacing: -0.02em; margin-bottom: 8px; }
.page-hero p { color: #c6d4de; max-width: 640px; }

.breadcrumb { font-size: 0.85rem; color: #7d93a3; margin-bottom: 14px; }
.breadcrumb a { color: #a8bac6; text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }

/* ---------- Notice ---------- */
.demo-notice {
  background: #fff7e8;
  border: 1px solid #f0d9a8;
  color: #7a5a1e;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  border: 1px solid var(--steel-600) !important;
  border-radius: 6px;
  font-size: 0.85rem !important;
  padding: 6px 10px !important;
  margin-left: 6px;
}

/* ---------- Quote form ---------- */
.quote-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-field { display: flex; flex-direction: column; }
.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-field label .req { color: var(--rust-500); }

.form-field input,
.form-field select,
.form-field textarea {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.97rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--white);
}

.form-field textarea { resize: vertical; min-height: 110px; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--eco-500);
  outline-offset: -1px;
}

.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }

/* Multi-contractor matcher */
.match-meta { font-size: 0.88rem; color: var(--eco-600); font-weight: 600; margin-bottom: 8px; }

.match-list { display: flex; flex-direction: column; gap: 8px; }

.match-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  background: var(--steel-050);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
}

.match-item:hover { border-color: var(--eco-500); }
.match-item:has(input:checked) { background: var(--eco-100); border-color: var(--eco-500); }

.match-item input { width: auto; margin-top: 3px; accent-color: var(--eco-600); }

.match-item .m-name { font-weight: 600; color: var(--steel-900); margin-right: 6px; }
.match-item .m-meta { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

.match-hint { font-size: 0.9rem; color: var(--muted); padding: 4px 0; }

.form-success {
  background: var(--eco-100);
  border: 1px solid #bfe5cc;
  color: var(--eco-600);
  border-radius: 8px;
  padding: 16px 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ---------- Contractor detail ---------- */
.detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.detail-header .contractor-avatar { width: 72px; height: 72px; font-size: 1.6rem; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.detail-main .card { margin-bottom: 22px; }

.detail-aside .card { margin-bottom: 22px; }

.detail-aside .contact-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.detail-aside .contact-row:last-of-type { border-bottom: none; }
.detail-aside .contact-row span:first-child { color: var(--muted); }
.detail-aside .contact-row span:last-child { font-weight: 600; text-align: right; }

.detail-aside .btn { width: 100%; margin-top: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--steel-900);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .main-nav a.nav-cta { margin-left: 0; margin-top: 8px; text-align: center; }
  .nav-toggle { display: block; }

  .search-panel { grid-template-columns: 1fr; }
  .directory-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contractor-card { grid-template-columns: 1fr; }
  .contractor-card .contractor-avatar { display: none; }
  .contractor-side { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; flex-wrap: wrap; }
  .detail-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
