:root {
  --ink: #14202b;
  --steel: #31556f;
  --muted: #5d6b78;
  --line: #dde5ec;
  --cloud: #f5f7fa;
  --white: #fff;
  --signal: #f15412;
  --ember: #ff8a1f;
  --green: #2f8f5b;
  --shadow: 0 18px 50px rgba(20, 32, 43, .12);
  font-family: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; color: var(--muted); }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: 0; }
h1 { font-size: clamp(2.4rem, 5vw, 5.3rem); max-width: 920px; }
h2 { font-size: clamp(2rem, 3.2vw, 3.45rem); }
h3 { font-size: 1.35rem; }
ul { margin: 0; padding-left: 1.25rem; color: var(--muted); }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar { background: var(--ink); color: #dce7ef; font-size: .9rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; flex-wrap: wrap; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 82px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 900; }
.logo img { width: 212px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 18px; font-size: .95rem; font-weight: 800; color: #334453; }
.nav-links a:hover { color: var(--signal); }
.nav-homeowner { border: 1px solid #cfe0ec; border-radius: 999px; color: var(--steel); padding: 8px 12px; background: #f8fbfd; }
.nav-homeowner:hover { border-color: #b7cbdc; background: #eef6fb; }
.nav-cta { min-height: 44px; padding: 0 18px; white-space: nowrap; }
.nav-item { position: relative; padding: 12px 0; }
.nav-trigger { appearance: none; border: 0; background: transparent; color: #334453; cursor: pointer; font: inherit; font-weight: 800; padding: 10px 0; }
.nav-trigger::after { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 8px; margin-bottom: 3px; }
.nav-menu { position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(4px); min-width: 285px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease; }
.nav-item:hover .nav-menu, .nav-item:focus-within .nav-menu { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-menu a { display: block; padding: 11px 12px; border-radius: 6px; color: #334453; }
.nav-menu a:hover { background: var(--cloud); color: var(--signal); }
.nav-menu strong { display: block; color: var(--ink); line-height: 1.1; }
.nav-menu span { display: block; color: var(--muted); font-size: .82rem; font-weight: 500; margin-top: 2px; }
.mobile-nav-toggle { display: none; }
.trust-strip { background: var(--white); border-bottom: 1px solid var(--line); }
.trust-strip .container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.trust-item { background: var(--white); padding: 18px 20px; }
.trust-item strong { display: block; color: var(--ink); }
.trust-item span { color: var(--muted); font-size: .92rem; }
.audience-card { border: 1px solid var(--line); border-radius: 8px; padding: 34px; background: var(--white); box-shadow: 0 8px 24px rgba(20,32,43,.05); }
.audience-card.homeowner { border-top: 5px solid var(--steel); }
.audience-card.contractor { border-top: 5px solid var(--signal); }
.mini-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: mini-step; }
.mini-step { border: 1px solid var(--line); border-radius: 8px; padding: 22px; background: var(--white); }
.mini-step h3::before { counter-increment: mini-step; content: counter(mini-step); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-right: 10px; background: #fff4ee; color: var(--signal); font-size: .9rem; }
.sponsor-grid { display: grid; grid-template-columns: 1.2fr repeat(2, minmax(0, 1fr)); gap: 18px; margin: 24px 0; }
.sponsor-card { border: 1px dashed #b9cad8; border-radius: 8px; padding: 24px; background: #f8fbfd; }
.sponsor-card.featured { border-style: solid; border-top: 5px solid var(--signal); background: var(--white); box-shadow: 0 8px 24px rgba(20,32,43,.05); }
.sponsor-card h3 { margin-bottom: 10px; }
.sponsor-meta { display: inline-flex; align-items: center; gap: 8px; color: #8a3a12; background: #fff4ee; border: 1px solid #ffd7c4; border-radius: 999px; padding: 5px 10px; font-size: .76rem; font-weight: 900; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .8px; }
.sponsor-card ul { margin-top: 12px; }
.ad-note { border-left: 4px solid var(--steel); background: var(--cloud); border-radius: 0 8px 8px 0; padding: 18px 22px; margin-top: 18px; }
.ad-note p { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 8px; background: var(--signal); color: var(--white); font-weight: 900; border: 2px solid var(--signal); box-shadow: 0 12px 24px rgba(241,84,18,.18); }
.btn:hover { background: #d9460d; border-color: #d9460d; transform: translateY(-1px); }
.btn.secondary { background: var(--white); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.dark { background: var(--ink); border-color: var(--ink); }

.hero { position: relative; min-height: 740px; display: grid; align-items: center; overflow: hidden; background: var(--ink); color: var(--white); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,32,43,.93) 0%, rgba(20,32,43,.78) 42%, rgba(20,32,43,.24) 100%), url("../images/roofing-lead-source-hero.png") center/cover no-repeat; }
.hero .container { position: relative; padding: 86px 0; }
.eyebrow { color: var(--ember); text-transform: uppercase; letter-spacing: 2px; font-weight: 900; font-size: .78rem; margin-bottom: 16px; }
.hero p { color: #e5edf4; font-size: 1.2rem; max-width: 720px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 42px; max-width: 800px; }
.metric { border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 18px; background: rgba(255,255,255,.08); }
.metric strong { display: block; color: var(--white); font-size: 2rem; line-height: 1; }
.metric span { color: #dce7ef; font-size: .92rem; }

.band { padding: 86px 0; }
.band.alt { background: var(--cloud); }
.section-head { display: flex; justify-content: space-between; gap: 26px; align-items: end; margin-bottom: 34px; }
.section-head p { max-width: 650px; }
.grid { display: grid; gap: 22px; }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 28px; background: var(--white); box-shadow: 0 8px 24px rgba(20,32,43,.05); }
.card h3 { margin-bottom: 12px; }
.card .link { color: var(--signal); font-weight: 900; }
.pill { display: inline-flex; border: 1px solid #ffd7c4; color: #9c3308; background: #fff4ee; padding: 6px 10px; border-radius: 999px; font-size: .78rem; font-weight: 900; margin-bottom: 14px; }
.checklist { list-style: none; padding: 0; display: grid; gap: 12px; }
.checklist li { padding-left: 30px; position: relative; color: #465766; }
.checklist li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--green); position: absolute; left: 0; top: 4px; box-shadow: inset 0 0 0 5px #dff2e8; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.quote { background: var(--ink); color: var(--white); border-radius: 8px; padding: 34px; }
.quote p { color: #dce7ef; font-size: 1.15rem; }
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { border-left: 4px solid var(--signal); padding: 18px 22px; background: var(--white); border-radius: 0 8px 8px 0; }
.step h3::before { counter-increment: step; content: counter(step) ". "; color: var(--signal); }

.page-hero { background: var(--ink); color: var(--white); padding: 82px 0; }
.page-hero p { color: #dce7ef; max-width: 780px; font-size: 1.12rem; }
.roof-404 { display: inline-flex; align-items: end; justify-content: center; min-width: 150px; min-height: 92px; margin-bottom: 24px; padding: 42px 22px 14px; color: var(--white); font-size: 2.4rem; font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--signal), var(--ember)); clip-path: polygon(50% 0, 100% 42%, 88% 42%, 88% 100%, 12% 100%, 12% 42%, 0 42%); box-shadow: 0 18px 42px rgba(0,0,0,.2); }
.breadcrumbs { color: #aebdca; font-size: .9rem; margin-bottom: 18px; }
.content { max-width: 860px; }
.content h2 { margin: 42px 0 16px; font-size: 2rem; }
.content h3 { margin: 28px 0 12px; }
.content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .95rem; }
.content th, .content td { border: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; }
.content th { background: var(--cloud); color: var(--ink); }

.cta { background: linear-gradient(135deg, var(--ink), #213a4d); color: var(--white); padding: 70px 0; }
.cta p { color: #dce7ef; max-width: 680px; }
.footer { background: #0d151d; color: #cbd6df; padding: 54px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 28px; }
.footer a { color: #cbd6df; display: block; margin: 8px 0; }
.footer a:hover { color: var(--ember); }
.footer .footer-phone { color: var(--ember); font-weight: 900; margin-top: 12px; }
.footer img { width: 210px; background: #fff; border-radius: 8px; padding: 4px; margin-bottom: 16px; }
.legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding-top: 18px; color: #8fa0ae; font-size: .88rem; }

form { display: grid; gap: 14px; }
.form-notice { border: 1px solid #b9dfc6; background: #f1fbf4; color: #145a2d; border-radius: 8px; padding: 14px 16px; font-weight: 800; margin-bottom: 16px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
.turnstile-widget { min-height: 65px; display: flex; align-items: center; }
.turnstile-error { border: 1px solid #f2b8a7; background: #fff4ee; color: #8a3a12; border-radius: 8px; padding: 12px 14px; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 14px 15px; font: inherit; color: var(--ink); background: var(--white); }
label { font-weight: 800; font-size: .92rem; }
textarea { min-height: 140px; resize: vertical; }

@media (max-width: 900px) {
  .nav { align-items: flex-start; padding: 16px 0; flex-direction: column; }
  .nav-links { flex-wrap: wrap; gap: 12px; align-items: center; }
  .nav-menu { position: static; transform: none; opacity: 1; pointer-events: auto; box-shadow: none; min-width: 100%; margin-top: 4px; }
  .nav-item:hover .nav-menu, .nav-item:focus-within .nav-menu { transform: none; }
  .nav-item { width: 100%; }
  .nav-trigger { width: 100%; text-align: left; }
  .nav.has-mobile-nav { align-items: center; flex-direction: row; flex-wrap: wrap; padding: 12px 0; gap: 12px; }
  .nav.has-mobile-nav .mobile-nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
  }
  .nav.has-mobile-nav .mobile-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }
  .nav.has-mobile-nav .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 0 4px;
  }
  .nav.has-mobile-nav.is-open .nav-links { display: flex; }
  .nav.has-mobile-nav .nav-links > a,
  .nav.has-mobile-nav .nav-trigger {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 10px;
  }
  .nav.has-mobile-nav .nav-homeowner { border-radius: 8px; }
  .nav.has-mobile-nav .nav-item { padding: 0; }
  .nav.has-mobile-nav .nav-menu {
    display: none;
    margin: 0 0 8px;
    border-radius: 8px;
  }
  .nav.has-mobile-nav .nav-item.is-open .nav-menu { display: block; }
  .hero { min-height: auto; }
  .metrics, .grid.three, .grid.two, .split, .footer-grid, .trust-strip .container, .mini-steps, .sponsor-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 28px, 1180px); }
  .logo img { width: 188px; }
  .nav-links { font-size: .9rem; }
  .band { padding: 62px 0; }
  .hero .container { padding: 68px 0; }
}
