/* Roofing St. Louis — site styles. Palette taken from the existing logo
   (navy skyline/wordmark, red-orange roofline, silver Arch). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: optional; /* no late swap re-paint (LCP) — Inter is preloaded and usually ready */
  src: url(/assets/fonts/inter-latin-var.woff2) format('woff2');
}

:root {
  --navy: #14243f;
  --navy-900: #0c1629;
  --navy-700: #1e3558;
  --red: #c8321a;          /* 5.0:1 on white — safe for text and buttons */
  --red-600: #a92a15;
  --silver: #c5ccd6;
  --ink: #1b2330;
  --muted: #5a6475;
  --line: #e2e6ec;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --bg-warm: #f8f5f1;
  --focus: #2563eb;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px rgba(12, 22, 41, .10);
  --shadow-lg: 0 24px 60px rgba(12, 22, 41, .18);
  --wrap: 1180px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.15rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
h4 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 2px solid transparent; font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-600); color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-900); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--bg-soft); color: var(--navy); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-light:hover { background: #fff; color: var(--navy); }
.btn-block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--navy-900); color: #dbe2ec; font-size: .88rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 38px; }
.topbar a { color: #fff; font-weight: 600; text-decoration: none; }
.topbar a:hover { color: #ffd2c7; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 62px; height: 62px; }
.brand-name { display: none; font-weight: 800; color: var(--navy); font-size: 1.1rem; line-height: 1.1; }
.brand-name small { display: block; font-weight: 600; color: var(--muted); font-size: .72rem; letter-spacing: .02em; }
@media (min-width: 420px) { .brand-name { display: block; } }
.nav-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; font: 700 .95rem var(--font); color: var(--navy); cursor: pointer; }
.nav-toggle-bars { width: 18px; height: 2px; background: var(--navy); position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: var(--navy); }
.nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
.primary-nav { display: none; }
.primary-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 110px); overflow-y: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav > ul { padding: 10px 20px 20px; }
.primary-nav a { display: block; padding: 11px 4px; color: var(--navy); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.primary-nav a[aria-current="page"] { color: var(--red); }
.primary-nav .sub a { padding-left: 18px; font-weight: 500; }
.header-cta { display: none; }
.brand-name small { white-space: nowrap; }
.brand-name { white-space: nowrap; }
@media (min-width: 1080px) and (max-width: 1499px) { .brand-name small { display: none; } }
.prose h2 a, .prose h3 a { color: inherit; text-decoration: none; }
.prose h2 a:hover, .prose h3 a:hover { color: var(--red); }
@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .primary-nav a, .header-cta { white-space: nowrap; }
  .primary-nav, .primary-nav.is-open { display: block; position: static; box-shadow: none; border: 0; background: none; max-height: none; overflow: visible; }
  .primary-nav > ul { display: flex; gap: 4px; padding: 0; align-items: center; }
  .primary-nav > ul > li { position: relative; }
  .primary-nav a { border: 0; padding: 10px 11px; font-size: .95rem; border-radius: 8px; }
  .primary-nav a:hover { background: var(--bg-soft); color: var(--navy); }
  .primary-nav .has-sub > a::after { content: ''; display: inline-block; margin-left: 6px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
  .primary-nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; }
  .primary-nav .has-sub:hover .sub, .primary-nav .has-sub:focus-within .sub { display: block; }
  .primary-nav .sub a { padding: 9px 12px; }
  .header-cta { display: inline-flex; min-height: 44px; padding: 10px 18px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--navy-900); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(12,22,41,.94) 0%, rgba(12,22,41,.84) 45%, rgba(12,22,41,.55) 100%); }
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 34px; padding-top: 48px; padding-bottom: 52px; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 1.14rem; color: #e3e9f2; max-width: 36em; }
.eyebrow { display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #ffb8a8; margin-bottom: 12px; }
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 30px; color: #e8edf5; }
.checks li::before { content: ''; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' d='M5 10.5l3.2 3L15 6.8'/%3E%3C/svg%3E") center/14px no-repeat; }
@media (min-width: 980px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; align-items: center; padding-top: 64px; padding-bottom: 70px; } }
.page-hero { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; }
.page-hero .wrap { padding-top: 38px; padding-bottom: 42px; }
.page-hero h1 { color: #fff; margin-bottom: .35em; }
.page-hero p { color: #dfe6f0; font-size: 1.1rem; max-width: 46em; }
.page-hero .cta-row { margin-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: .88rem; margin-bottom: 14px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: '›'; margin-right: 6px; opacity: .7; }
.breadcrumbs a { color: inherit; opacity: .85; }
.page-hero .breadcrumbs, .page-hero .breadcrumbs a { color: #c9d4e4; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-warm { background: var(--bg-warm); }
.section-navy { background: var(--navy); color: #e3e9f2; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section-navy .section-head p { color: #c9d4e4; }
.grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 2px rgba(12,22,41,.04); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); margin-bottom: .8em; }
.card-link { position: relative; transition: box-shadow .15s, transform .15s, border-color .15s; }
.card-link:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #cfd6e0; }
.card-link a.stretched::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.card-link a.stretched { text-decoration: none; color: var(--navy); }
.card .more { font-weight: 700; color: var(--red); font-size: .95rem; }
.icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #fbe9e5; color: var(--red); margin-bottom: 14px; }
.icon svg { width: 24px; height: 24px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 12px; }
.steps h3 { font-size: 1.08rem; margin-bottom: .35em; }
.steps p { color: var(--muted); margin: 0; font-size: .97rem; }
.pill-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .95rem; }
.section-navy .pill-list li { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.tick-list { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 8px; }
.tick-list li { position: relative; padding-left: 28px; }
.tick-list li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 14px; height: 8px; border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg); }
@media (min-width: 700px) { .tick-list.cols { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
.split { display: grid; gap: 34px; align-items: center; }
@media (max-width: 919px) { .hero .checks { display: none; } }
@media (min-width: 920px) { .split { grid-template-columns: 1fr 1fr; } .split.reverse > :first-child { order: 2; } }
.photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { font-size: .85rem; color: var(--muted); padding: 10px 14px; background: #fff; }
.note { border-left: 4px solid var(--navy); background: var(--bg-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--muted); font-size: .96rem; }

/* ---------- Storm data table ---------- */
.stat-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 10px 0 24px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat strong { display: block; font-size: 2rem; line-height: 1; color: var(--navy); font-weight: 800; }
.stat span { color: var(--muted); font-size: .92rem; }
.section-navy .stat { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.section-navy .stat strong { color: #fff; } .section-navy .stat span { color: #c9d4e4; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); color: var(--navy); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.source { font-size: .85rem; color: var(--muted); margin-top: 10px; }

/* ---------- Article / prose ---------- */
.article-layout { display: grid; gap: 40px; padding: 44px 0 64px; }
@media (min-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.7em; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.prose h3 { margin-top: 1.4em; }
.prose h4 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .3em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose figure { margin: 1.6em 0; }
.prose .table-wrap { margin: 1.4em 0; }
.prose blockquote { margin: 1.4em 0; padding: 12px 20px; border-left: 4px solid var(--red); background: var(--bg-warm); }
.article-meta { color: var(--muted); font-size: .93rem; margin: -4px 0 22px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.aside-stack { display: grid; gap: 20px; align-content: start; }
@media (min-width: 1000px) { .aside-stack { position: sticky; top: 100px; } }
.aside-card { background: var(--navy); color: #e3e9f2; border-radius: var(--radius-lg); padding: 24px; }
.aside-card h2, .aside-card h3 { color: #fff; font-size: 1.3rem; }
.aside-card p { color: #c9d4e4; font-size: .97rem; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { display: block; padding: 10px 0; text-decoration: none; font-weight: 600; color: var(--navy); }
.link-list a:hover { color: var(--red); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 30px 16px 0; font-weight: 700; color: var(--navy); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 12px; font-size: 1.5rem; color: var(--red); font-weight: 600; }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 0 16px; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--red-600), var(--red)); color: #fff; }
.cta-band .wrap { display: grid; gap: 18px; padding-top: 44px; padding-bottom: 44px; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { color: #ffe6df; margin: 0; }
@media (min-width: 880px) { .cta-band .wrap { grid-template-columns: 1fr auto; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b9c4d4; font-size: .95rem; }
.site-footer .wrap { padding-top: 54px; padding-bottom: 28px; }
.footer-grid { display: grid; gap: 30px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1rem; letter-spacing: .02em; margin-bottom: .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: #dfe6f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .btn-primary, .site-footer .btn-primary:hover { color: #fff; text-decoration: none; }
.footer-legal a, .footer-disclaimer a { text-decoration: underline; text-underline-offset: 3px; }
.footer-brand img { width: 84px; height: 84px; border-radius: 12px; background: #fff; margin-bottom: 12px; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 22px; font-size: .86rem; line-height: 1.6; color: #97a4b8; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: .86rem; color: #97a4b8; }

/* ---------- Mobile sticky CTA ---------- */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(12,22,41,.1); transform: translateY(110%); transition: transform .2s; }
.mobile-cta.is-visible { transform: none; }
.mobile-cta .btn { width: 100%; }
@media (min-width: 900px) { .mobile-cta { display: none; } }
body.has-mobile-cta { padding-bottom: 76px; }
@media (min-width: 900px) { body.has-mobile-cta { padding-bottom: 0; } }

/* ---------- Roof Snapshot Pro (canonical hosted product, rendered inline) ---------- */
/* Placement only. Every page that offers Roof Snapshot Pro renders the real product here
   on load — never behind a button, a launcher or a link — and nothing in this file
   restyles, scales, clips or hides what the product draws inside its own frame. */
.eyebrow-dark { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.snapshot-embed { margin: 30px 0 0; scroll-margin-top: 100px; }
.snapshot-embed-bare { margin: 0; }
.snapshot-head h2 { margin-bottom: 14px; }
.snapshot-frame { display: block; width: 100%; height: 1180px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
@media (max-width: 700px) { .snapshot-frame { height: 1320px; border-radius: var(--radius); } }
/* Holds the product's own first-step height until its frame reports the real one. */
.snapshot-mount { display: block; min-height: 720px; }
.snapshot-mount:has(iframe) { min-height: 0; }
.snapshot-mount iframe { border-radius: var(--radius-lg); }
@media (max-width: 700px) { .snapshot-mount { min-height: 700px; } .snapshot-mount iframe { border-radius: var(--radius); } }
.snapshot-open { margin-top: 12px; font-size: .92rem; color: var(--muted); }
/* Sections whose job is to carry the product: frame it, nothing more. */
.section-product { padding: 26px 0 36px; }
.page-hero:has(+ .section-product) .wrap { padding-bottom: 30px; }
/* Home hero: the product sits beside the headline on desktop and directly under it on a
   phone, so the real product is in the opening screen either way — never a step away. */
.hero-product .wrap { padding-top: 32px; gap: 24px; }
.hero-head h1 { margin-bottom: 0; }
@media (min-width: 980px) {
  .hero-product .wrap {
    grid-template-columns: 1.05fr .95fr;
    grid-template-areas: 'head product' 'rest product';
    align-items: start;
    padding-top: 56px;
    column-gap: 34px; /* same track widths as the hero had before the product moved in */
    row-gap: 28px;
  }
  .hero-head { grid-area: head; }
  .hero-rest { grid-area: rest; }
  .hero-product .snapshot-embed { grid-area: product; }
}
.hero .snapshot-open { color: #b7c3d4; }
.hero .snapshot-open a { color: #fff; }
.hero-powered { font-size: .86rem; color: #b7c3d4; margin: 18px 0 0; }
.hero-powered a { color: #fff; }
@media (max-width: 979px) { .hero-powered { display: none; } }
