/* ==========================================================================
   Construction Lead Reports — Modern Responsive Stylesheet
   ========================================================================== */

/* ---------- Reset & Box-Sizing ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- @font-face ---------- */
@font-face {
  font-family: 'Avenir';
  src: url('avenirltstd-medium-webfont.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Avenir';
  src: url('avenirltstd-heavy-webfont.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Custom Properties ---------- */
:root {
  --red: #a11c1e;
  --red-dark: #8a1719;
  --red-light: #c62828;
  --dark: #222;
  --gray-900: #333;
  --gray-700: #555;
  --gray-500: #777;
  --gray-300: #ccc;
  --gray-100: #f0f0f0;
  --bg: #f8f9fa;
  --white: #fff;
  --font: 'Avenir', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --base-size: 1rem;
  --leading: 1.6;
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --container: 1100px;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.12);
}

/* ---------- Base ---------- */
html { font-size: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: var(--base-size);
  line-height: var(--leading);
  color: var(--gray-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: var(--dark); }
h1 { font-size: 2rem; margin-bottom: var(--sp-md); }
h2 { font-size: 1.5rem; margin-bottom: var(--sp-md); }
h3 { font-size: 1.25rem; margin-bottom: var(--sp-sm); }
h4 { font-size: 1.1rem; margin-bottom: var(--sp-sm); }
h5 { font-size: 1rem; margin-bottom: var(--sp-sm); }
h6 { font-size: 0.875rem; margin-bottom: var(--sp-sm); text-transform: uppercase; letter-spacing: 0.05em; }
p { margin-bottom: var(--sp-md); }
a { color: var(--red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--red-dark); text-decoration: underline; }
ul, ol { margin: 0 0 var(--sp-md) var(--sp-lg); }
li { margin-bottom: var(--sp-xs); }
strong, b { font-weight: 700; }
small { font-size: 0.85em; }
blockquote { margin: 0 0 var(--sp-md) var(--sp-lg); padding-left: var(--sp-md); border-left: 3px solid var(--gray-300); }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-md); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 0.75rem 1.5rem; font-family: var(--font);
  font-size: 0.95rem; font-weight: 700; line-height: 1.2; text-align: center;
  text-decoration: none; border: none; border-radius: var(--radius); cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn-outline:hover { background: var(--red); color: var(--white); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: var(--sp-lg); transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card h3 { color: var(--red); }

/* ---------- Callout ---------- */
.callout {
  background: var(--white); border: 1px solid var(--gray-300); border-left: 4px solid var(--red);
  border-radius: var(--radius); padding: var(--sp-lg); margin-bottom: var(--sp-xl);
}
.callout h3, .callout h5 { color: var(--red); margin-bottom: var(--sp-sm); }

/* ---------- Pricing Tables ---------- */
.pricing-table { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-xl); font-size: 0.9rem; }
.pricing-table thead th,
.pricing-table thead td { background: var(--red); color: var(--white); font-weight: 700; padding: 0.75rem; text-align: left; }
.pricing-table tbody td { padding: 0.75rem; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.pricing-table tbody tr:hover { background: var(--gray-100); }
.pricing-table h3 { font-size: 1rem; margin-bottom: 0; color: var(--dark); }
.pricing-table .price { font-size: 1.5rem; font-weight: 700; color: var(--red); }
.pricing-table .price sup { font-size: 0.6em; vertical-align: super; }

/* ---------- Benefits DL ---------- */
.benefits dl { margin: 0; }
.benefits dt { font-weight: 700; color: var(--red); margin-top: var(--sp-md); }
.benefits dd { margin-left: 0; padding-left: 0; color: var(--gray-700); margin-bottom: var(--sp-sm); }

/* ---------- Topbar ---------- */
.topbar { background: var(--dark); color: var(--gray-300); font-size: 0.8rem; padding: var(--sp-sm) 0; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--sp-sm); }
.topbar a { color: var(--white); }
.topbar a:hover { text-decoration: underline; }

/* ---------- Site Header ---------- */
.site-header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--sp-sm); padding-bottom: var(--sp-sm); gap: var(--sp-md);
}
.site-header .logo img { height: 50px; width: auto; }
.site-header .header-cta { display: none; }
.site-header .header-actions { display: flex; align-items: center; gap: var(--sp-md); }

/* Hamburger */
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: var(--sp-sm);
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--dark); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Navigation (mobile-first: drawer) ---------- */
.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow-lg); z-index: 99; }
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li { border-bottom: 1px solid var(--gray-100); }
.main-nav a { display: block; padding: var(--sp-md) var(--sp-lg); color: var(--gray-900); font-weight: 500; }
.main-nav a:hover, .main-nav a.active { color: var(--red); background: var(--gray-100); text-decoration: none; }

/* ---------- Main Content ---------- */
.main { padding: var(--sp-xl) 0; min-height: 50vh; }
.page-header { margin-bottom: var(--sp-xl); }
.page-header h1 { font-size: 2rem; }
.page-header .subnav { display: block; font-size: 0.85rem; margin-bottom: var(--sp-sm); color: var(--gray-500); }
.page-header .subnav a { color: var(--red); }
.thesis { font-size: 1.1rem; color: var(--gray-700); margin-bottom: var(--sp-lg); }

/* Layout: split two-column */
.layout-split { display: grid; gap: var(--sp-xl); }
/* Layout: content + sidebar */
.layout-with-sidebar { display: grid; gap: var(--sp-xl); }
.sidebar { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--sp-lg); }
.sidebar img { margin-bottom: var(--sp-md); border-radius: var(--radius); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin-bottom: var(--sp-sm); }
.sidebar a { font-weight: 500; }
.content-section { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--sp-xl); margin-bottom: var(--sp-xl); }

/* ---------- Homepage ---------- */
.hero { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--sp-xl); margin-bottom: var(--sp-xl); text-align: center; }
.hero h1 { font-size: 1.75rem; color: var(--red); }
.hero h2 { font-size: 1.15rem; font-weight: 500; color: var(--gray-700); margin-bottom: var(--sp-lg); }
.hero-content { display: grid; gap: var(--sp-xl); text-align: left; }
.hero-img { max-width: 280px; margin: 0 auto var(--sp-lg); }
.overview-grid { display: grid; gap: var(--sp-md); margin-bottom: var(--sp-xl); }
.overview-grid .card { text-align: center; }
.overview-grid .card h3 { font-size: 1.1rem; margin-bottom: var(--sp-sm); }
.overview-grid .card p { font-size: 0.9rem; color: var(--gray-700); margin-bottom: var(--sp-sm); }

/* ---------- Testimonials ---------- */
.testimonials { margin-bottom: var(--sp-xl); }
.testimonials h2 { text-align: center; margin-bottom: var(--sp-lg); }
.testimonial-grid { display: grid; gap: var(--sp-md); }
.testimonial { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--sp-lg); border-left: 4px solid var(--red); }
.testimonial blockquote { border: none; padding: 0; margin: 0 0 var(--sp-sm) 0; font-style: italic; color: var(--gray-700); }
.testimonial cite { display: block; font-style: normal; font-weight: 700; color: var(--dark); font-size: 0.9rem; }
.testimonial cite span { font-weight: 500; color: var(--gray-500); }

/* ---------- Report Info List ---------- */
.report-info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-xs); }
.report-info-list li { padding: var(--sp-sm) var(--sp-md); background: var(--gray-100); border-radius: var(--radius); margin-bottom: 0; }

/* ---------- CTA Banner ---------- */
.cta-banner { background: var(--red); color: var(--white); text-align: center; padding: var(--sp-xl) var(--sp-md); border-radius: var(--radius); margin-bottom: var(--sp-xl); }
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255,255,255,.9); }
.cta-banner .btn { background: var(--white); color: var(--red); font-weight: 700; }
.cta-banner .btn:hover { background: var(--gray-100); color: var(--red-dark); }
.cta-banner a:not(.btn) { color: var(--white); text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--gray-300); padding: var(--sp-2xl) 0 var(--sp-lg); margin-top: var(--sp-2xl); }
.footer-nav { display: grid; gap: var(--sp-lg); margin-bottom: var(--sp-xl); }
.footer-nav h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sp-sm); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: var(--sp-xs); }
.footer-nav a { color: var(--gray-300); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: var(--sp-lg); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-md); font-size: 0.8rem; }
.footer-bottom a { color: var(--gray-300); }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Legal Pages ---------- */
.legal-content { max-width: 800px; }
.legal-content ol { margin-bottom: var(--sp-lg); }
.legal-content li { margin-bottom: var(--sp-md); }

/* ---------- Error Page ---------- */
.error-page { text-align: center; padding: var(--sp-3xl) var(--sp-md); }
.error-page h1 { font-size: 3rem; color: var(--red); }
.error-page p { font-size: 1.2rem; color: var(--gray-700); }
.error-page ul { list-style: none; margin: var(--sp-xl) 0; padding: 0; }
.error-page li { margin-bottom: var(--sp-sm); }

/* ---------- Market Pages ---------- */
.market-list { list-style: none; margin: 0 0 var(--sp-xl) 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); }
.market-list li { margin: 0; }
.market-list a { display: block; padding: var(--sp-md); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 700; transition: box-shadow .2s, transform .1s; }
.market-list a:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); text-decoration: none; }

/* ---------- Contact Page ---------- */
.contact-info h3 { color: var(--red); margin-top: var(--sp-lg); }
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { margin-bottom: var(--sp-sm); }

/* ---------- Print ---------- */
@media print {
  .topbar, .site-header, .site-footer, .nav-toggle, .btn { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .main { padding: 0; }
  .content-section { box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* ==========================================================================
   Responsive — 640px
   ========================================================================== */
@media (min-width: 640px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-grid { grid-template-columns: 1fr 1fr; }
  .report-info-list { grid-template-columns: 1fr 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero h2 { font-size: 1.25rem; }
  h1 { font-size: 2.25rem; }
}

/* ==========================================================================
   Responsive — 768px
   ========================================================================== */
@media (min-width: 768px) {
  .layout-split { grid-template-columns: 1fr 1fr; }
  .layout-with-sidebar { grid-template-columns: 1fr 280px; }
  .hero-content { grid-template-columns: 1fr 1fr; align-items: center; }
  .hero { text-align: left; }
  .hero-img { margin: 0; }
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
  .site-header .header-cta { display: inline-block; }
}

/* ==========================================================================
   Responsive — 1024px
   ========================================================================== */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav { display: block; position: static; box-shadow: none; background: transparent; }
  .main-nav ul { display: flex; gap: 0; }
  .main-nav li { border: none; }
  .main-nav a { padding: var(--sp-sm) var(--sp-md); font-size: 0.9rem; border-radius: var(--radius); }
  .site-header .container { gap: var(--sp-lg); }
  .overview-grid { grid-template-columns: repeat(4, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
  .report-info-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Table responsive wrapper ---------- */
.table-wrap { overflow-x: auto; margin-bottom: var(--sp-xl); -webkit-overflow-scrolling: touch; }
