/* ============================================================
   Vetted Roof — Master stylesheet
   Production-ready. No build step needed.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Brand colors */
  --slate-50:  #F2F5F8;  --slate-100: #DDE4EB; --slate-200: #B7C4D1; --slate-300: #8197AB;
  --slate-400: #4F6C85;  --slate-500: #2E4D69; --slate-600: #0F2940; --slate-700: #0A1E31;
  --slate-800: #061625;

  --clay-50:   #FDEFE8;  --clay-100:  #FAD8C7; --clay-200:  #F4B197; --clay-300:  #EC8B66;
  --clay-400:  #E16E40;  --clay-500:  #D2542A; --clay-600:  #B0441F; --clay-700:  #8B3416;

  --cream:     #FAF7F2;  --cream-100: #F4EFE6; --cream-200: #EBE4D7;
  --warm-200:  #E5E0D8;  --warm-300:  #CFC8BC; --warm-400:  #A8A095; --warm-500:  #7B7468;
  --warm-600:  #5F5A52;

  --white: #FFFFFF;  --ink: #1B1B1B;

  --gold:        #F0A93B;   --gold-bg:     #FCEDD0;
  --verified:    #2E7D5B;   --verified-bg: #E0F0E7;
  --map-blue:    #2563A6;
  --danger:      #B83333;   --danger-bg:   #FCE8E8;

  /* Semantic */
  --bg: var(--cream); --bg-subtle: var(--cream-100); --surface: var(--white);
  --fg: var(--ink); --fg-muted: var(--warm-600); --fg-subtle: var(--warm-500);
  --border: var(--warm-200); --border-strong: var(--warm-300);
  --accent: var(--clay-500); --accent-hover: var(--clay-600); --accent-bg: var(--clay-50);
  --primary: var(--slate-600);

  /* Type */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --text-xs: 12px; --text-sm: 14px; --text-base: 16px; --text-md: 18px;
  --text-lg: 20px; --text-xl: 24px; --text-2xl: 30px; --text-3xl: 36px;
  --text-4xl: 44px; --text-5xl: 56px; --text-6xl: 72px;

  /* Radii / shadow / motion */
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 12px; --radius-lg: 20px; --radius-full: 999px;
  --shadow-xs: 0 1px 1px rgb(15 41 64 / 0.04);
  --shadow-sm: 0 1px 2px rgb(15 41 64 / 0.06), 0 1px 3px rgb(15 41 64 / 0.04);
  --shadow-md: 0 4px 16px rgb(15 41 64 / 0.08), 0 2px 4px rgb(15 41 64 / 0.04);
  --shadow-lg: 0 12px 32px rgb(15 41 64 / 0.14);
  --shadow-xl: 0 24px 56px rgb(15 41 64 / 0.18);
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* Layout */
  --container: 1240px;
  --nav-height: 72px;
}

/* ============================================================
   Reset + base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display); font-weight: 800;
  color: var(--slate-700); letter-spacing: -0.02em; line-height: 1.1; margin: 0;
}
h1 { font-size: var(--text-5xl); font-weight: 900; letter-spacing: -0.025em; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-md); font-weight: 700; }
p  { margin: 0 0 12px; line-height: 1.65; max-width: 70ch; }
small { font-size: var(--text-sm); color: var(--fg-muted); }

.eyebrow {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100; background: #fff;
  border-bottom: 1px solid var(--border); height: var(--nav-height);
  display: flex; align-items: center;
}
.nav__inner { display: flex; align-items: center; gap: 24px; width: 100%; }
.lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.lockup__stack { display: flex; flex-direction: column; line-height: 1; }
.lockup__eyebrow { font-family: var(--font-display); font-weight: 700; font-size: 9px; letter-spacing: 0.22em; color: var(--warm-600); margin-bottom: 3px; }
.lockup__hero { font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: -0.025em; color: var(--slate-700); }
.lockup--inverse .lockup__eyebrow { color: var(--clay-300); }
.lockup--inverse .lockup__hero    { color: var(--cream); }

.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__login { font-size: 13px; font-weight: 600; color: var(--slate-700); margin-right: 4px; white-space: nowrap; flex-shrink: 0; }
.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--slate-700); flex-shrink: 0; margin-left: auto; }
/* Resources and About are dropped from the horizontal desktop nav
   unconditionally — the real constraint is .container's fixed max-width
   (1240px), which caps available nav space the same on a 4K monitor as a
   1300px window; the full set never fits in a single row regardless of
   screen size. Both stay reachable via the footer on every page. */
.nav__links a[href$="resources/"] { display: none; }
.nav__links a[href$="about/"] { display: none; }
.nav__links a { font-weight: 600; font-size: 14px; color: var(--slate-700); white-space: nowrap; flex-shrink: 0; }
.nav__links a:hover { color: var(--accent); }
.nav__phone { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--slate-700); padding: 6px 0; white-space: nowrap; flex-shrink: 0; }
.nav__phone:hover { color: var(--accent); }
.nav .btn { flex-shrink: 0; }
.nav__search-toggle { display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; padding: 8px; color: var(--slate-700); flex-shrink: 0; border-radius: var(--radius-full); transition: all 150ms var(--ease); }
.nav__search-toggle:hover { background: var(--cream-100); color: var(--accent); }
.nav__search {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  padding: 18px 24px; display: flex; align-items: flex-start; gap: 12px;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.nav__search.nav__search--open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.nav__search-inputwrap {
  position: relative; flex: 1; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--cream-100); border: 1.5px solid transparent; border-radius: var(--radius-full);
  padding: 11px 18px; transition: all 150ms var(--ease);
}
.nav__search-inputwrap:focus-within { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.nav__search-inputwrap > svg { color: var(--fg-muted); flex-shrink: 0; }
.nav__search-inputwrap input {
  flex: 1; width: 100%; border: none; outline: none; background: none;
  font-size: 15px; color: var(--ink); font-family: inherit;
}
.nav__search-inputwrap input::placeholder { color: var(--fg-muted); }
.nav__search-go { flex-shrink: 0; white-space: nowrap; }
.ac-list {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); list-style: none; padding: 6px; z-index: 50;
  max-height: 320px; overflow-y: auto;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 150ms var(--ease), transform 150ms var(--ease);
}
.ac-list.ac-list--open { display: block; opacity: 1; transform: translateY(0); }
.ac-list li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; transition: background 100ms var(--ease); }
.ac-list li:hover { background: var(--cream-100); }
.ac-list__icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}
.ac-list__icon--business { background: var(--accent-bg); color: var(--accent); }
.ac-list__icon--service { background: var(--slate-50); color: var(--slate-500); }
.ac-list__icon--location { background: var(--verified-bg); color: var(--verified); }
.ac-list__icon--zip { background: var(--gold-bg); color: var(--gold); }
.ac-list__text { display: flex; flex-direction: column; min-width: 0; }
.ac-list__label { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-list__sub { font-size: 12px; color: var(--fg-muted); }

/* Tablet and mobile: the horizontal nav genuinely cannot fit below this
   width even with Resources/About already removed (.container has no
   minimum width floor, so available space keeps shrinking with the
   viewport) — collapse into a real toggleable menu instead of the nav
   links just vanishing with no way to reach them, which is what this site
   shipped with before. */
@media (max-width: 1024px) {
  .nav__toggle { display: flex; align-items: center; }
  .nav__links {
    display: none;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px; box-shadow: var(--shadow-md);
    margin-left: 0;
  }
  .nav__links.nav__links--open { display: flex; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--cream-100); margin: 0; }
  .nav__login { margin: 4px 0 0; padding-top: 12px; }
  .nav__phone { display: none; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  padding: 11px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: all 200ms var(--ease); text-decoration: none;
  white-space: nowrap; font-size: 14px;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: var(--slate-600); color: #fff; }
.btn--secondary:hover { background: var(--slate-700); }
.btn--outline { background: #fff; color: var(--slate-700); border-color: var(--warm-300); }
.btn--outline:hover { background: var(--cream-100); border-color: var(--slate-400); }
.btn--ghost { background: transparent; color: var(--slate-700); }
.btn--ghost:hover { background: var(--cream-100); }
.btn--lg { padding: 15px 24px; font-size: 16px; }
.btn--sm { padding: 7px 12px; font-size: 13px; }

/* ============================================================
   Cards / pills / shared
   ============================================================ */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px;
  transition: all 200ms var(--ease);
}
.card:hover { border-color: var(--slate-400); box-shadow: var(--shadow-md); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-weight: 600; font-size: 13px;
  background: #fff; border: 1px solid var(--warm-300); color: var(--slate-700);
}
.pill--accent   { background: var(--accent-bg);   color: var(--clay-700); border-color: transparent; }
.pill--gold     { background: var(--gold-bg);     color: #8a5b10; border-color: transparent; }
.pill--verified { background: var(--verified-bg); color: var(--verified); border-color: transparent; }
.pill--solid    { background: var(--slate-600);   color: #fff; border-color: transparent; }
.pill--muted    { background: var(--cream-100);   color: var(--fg-muted); border-color: transparent; }

.crumbs { padding: 18px 0 12px; font-weight: 500; font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--fg-muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--warm-300); }
.crumbs .current { color: var(--slate-700); font-weight: 600; }

/* Stars (text-based for performance) */
.stars { color: var(--gold); letter-spacing: -1px; font-size: 15px; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--slate-700); color: var(--cream);
  padding: 64px 0 32px; margin-top: 80px;
}
.footer__cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 48px; }
.footer__brand p { color: var(--slate-200); font-size: 14px; line-height: 1.6; max-width: 280px; }
.footer h5 { color: #fff; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--slate-200); font-size: 14px; }
.footer ul a:hover { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--slate-500); font-size: 13px; color: var(--slate-300); }
.footer__bottom a { color: inherit; margin-left: 16px; }
.footer__bottom a:hover { color: #fff; }

/* ============================================================
   Answer Box / Hero / Stats / Tables (reused)
   ============================================================ */
.answer-box {
  background: var(--cream-100); border: 1px solid var(--border);
  border-left: 5px solid var(--accent); border-radius: var(--radius-md);
  padding: 22px 26px; max-width: 860px;
}
.answer-box__lbl {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 800; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.answer-box h2 { font-size: 22px; line-height: 1.2; margin: 0 0 10px; }
.answer-box p { font-weight: 500; font-size: 17px; line-height: 1.55; color: var(--fg); margin: 0; max-width: none; }
.answer-box strong { color: var(--slate-700); }
.answer-box__meta { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--fg-muted); flex-wrap: wrap; }
.badge-verified {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; background: var(--verified-bg); color: var(--verified);
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }
.stats__v { font-family: var(--font-display); font-weight: 900; font-size: 32px; letter-spacing: -0.02em; color: var(--slate-700); line-height: 1; }
.stats__l { font-size: 13px; color: var(--fg-muted); margin-top: 6px; }

table.data { width: 100%; border-collapse: collapse; }
table.data thead tr { background: var(--slate-700); color: #fff; }
table.data th { padding: 14px 16px; text-align: left; font-family: var(--font-display); font-weight: 800; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
table.data th.num, table.data td.num { text-align: right; }
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 500; font-size: 14px; }
table.data tbody tr.highlight { background: var(--accent-bg); }
table.data tbody tr.highlight td:first-child { font-weight: 700; }
table.data td.num { font-family: var(--font-mono); font-size: 13px; }
table.data td .sub { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }
.table-src { font-style: italic; font-size: 12px; color: var(--fg-muted); margin-top: 8px; }

/* FAQ */
.faq { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 22px; cursor: pointer; margin-bottom: 10px; }
.faq[open] { box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--slate-700); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 24px; color: var(--accent); font-weight: 400; flex-shrink: 0; }
.faq[open] summary::after { content: "−"; }
.faq p { font-weight: 400; font-size: 15px; line-height: 1.6; color: var(--fg); margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--border); }

/* Section heading */
section { margin-top: 64px; }
h2 + .deck { font-size: 17px; color: var(--fg-muted); max-width: 64ch; margin: 0 0 24px; line-height: 1.5; font-weight: 500; }

/* CTA band */
.cta-band {
  background: var(--slate-700); color: #fff; border-radius: var(--radius-lg);
  padding: 40px 48px; display: flex; gap: 32px; align-items: center;
  margin-top: 64px; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: var(--slate-200); margin: 0; }
.cta-band .pattern { position: absolute; inset: 0; opacity: 0.06; pointer-events: none; }
.cta-band .btn { background: var(--accent); color: #fff; padding: 14px 24px; }

/* Forms */
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate-700); }
.form-field input, .form-field select, .form-field textarea {
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  padding: 12px 14px; border: 1px solid var(--warm-300); border-radius: 6px;
  background: #fff; color: var(--ink); outline: none;
  transition: all 150ms var(--ease); width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgb(210 84 42 / 0.2);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  h1 { font-size: 44px; }
  h2 { font-size: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  h1 { font-size: 36px; }
  h2 { font-size: 24px; }
  h3 { font-size: 18px; }
  .nav__phone { font-size: 12px; }
  .nav { height: 64px; }
  .answer-box { padding: 18px 18px; }
  .answer-box h2 { font-size: 18px; }
  .answer-box p { font-size: 15px; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px; }
  .stats__v { font-size: 24px; }
  .footer__cols { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; gap: 12px; }
  .footer__bottom div:last-child a { margin-left: 0; margin-right: 16px; }
  section { margin-top: 48px; }
  table.data { font-size: 13px; }
  table.data th, table.data td { padding: 10px 12px; }
  table.data td .sub { font-size: 11px; }
}

/* ---- Latest Articles (homepage) ---- */
.latest-articles { padding: 56px 0; background: var(--cream-50); }
.latest-articles__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.latest-articles__head h2 { font-family: var(--font-display); font-size: 26px; margin: 0; color: var(--slate-700); }
.latest-articles__head a { font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.latest-articles__head a:hover { text-decoration: underline; }
.latest-articles__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.latest-articles__card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow 150ms var(--ease); }
.latest-articles__card:hover { box-shadow: var(--shadow-md); }
.latest-articles__img { aspect-ratio: 16 / 10; background-size: cover; background-position: center; background-color: var(--cream-100); }
.latest-articles__body { padding: 16px; }
.latest-articles__body h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--slate-700); margin: 0 0 8px; }
.latest-articles__body p { font-size: 13px; color: var(--fg-muted); line-height: 1.5; margin: 0; }
@media (max-width: 900px) { .latest-articles__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .latest-articles__grid { grid-template-columns: 1fr; } }

/* ---- Related Articles (category/city/state/contractor pages) ---- */
.related-articles__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.related-articles__card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow 150ms var(--ease); }
.related-articles__card:hover { box-shadow: var(--shadow-md); }
.related-articles__img { aspect-ratio: 16 / 10; background-size: cover; background-position: center; background-color: var(--cream-100); }
.related-articles__title { padding: 12px; font-size: 13px; font-weight: 600; color: var(--slate-700); }
@media (max-width: 700px) { .related-articles__grid { grid-template-columns: 1fr; } }
