/* Digital Roofing Company. Spacing uses only 0/2/4/8/12/16/24/32/40/48/64/80/96px.
   Type sizes follow the Tailwind scale. One typeface: Manrope. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/fonts/manrope-latin.woff2") format("woff2");
}

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-alt: #f2f0ea;
  --text: #141414;
  --muted: #595959;
  --line: #e5e1d8;
  --accent: #a84b1a;
  --accent-ink: #7f3712;
  --accent-soft: #f6e8de;
  --dark: #181818;
  --dark-alt: #272727;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --content: 720px;
  --wide: 1152px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { text-wrap: balance; font-weight: 700; margin: 0; }
p, li, dd, figcaption { text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
em, i, cite { font-style: normal; }

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--text); color: #fff; padding: 8px 12px; border-radius: var(--radius-lg);
  font-weight: 600; text-decoration: none;
  transition: transform 300ms var(--ease);
}
.skip-link:focus { transform: translateY(80px); color: #fff; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 50; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 16px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(20, 20, 20, 0.08);
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.06);
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none; font-weight: 700;
  font-size: 16px; line-height: 24px; white-space: nowrap; margin-right: 8px;
}
.brand svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.brand:hover { color: var(--text); }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 9999px;
  font-size: 14px; line-height: 20px; font-weight: 600;
  color: var(--text); text-decoration: none;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.nav-links a:hover { background: var(--surface-alt); color: var(--text); }
.nav-links a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.nav-links svg { width: 16px; height: 16px; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 9999px;
  background: var(--text); color: #fff; cursor: pointer; padding: 0;
  transition: transform 300ms var(--ease), background-color 300ms var(--ease);
}
.nav-toggle:hover { background: #333; }
.nav-toggle:active { transform: scale(0.96); }
.nav-toggle .bar {
  position: absolute; width: 16px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 500ms var(--ease), opacity 300ms var(--ease);
}
.nav-toggle .bar:nth-child(1) { transform: translateY(-4px); }
.nav-toggle .bar:nth-child(2) { transform: translateY(4px); }
.nav-open .nav-toggle .bar:nth-child(1) { transform: rotate(45deg); }
.nav-open .nav-toggle .bar:nth-child(2) { transform: rotate(-45deg); }
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

.menu-panel {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(250, 250, 247, 0.96);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  padding: 96px 24px 48px;
  overflow-y: auto;
  opacity: 0; pointer-events: none; visibility: hidden;
  transition: opacity 300ms var(--ease), visibility 0s linear 300ms;
}
.nav-open .menu-panel { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity 300ms var(--ease); }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel li {
  opacity: 0; transform: translateY(24px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.nav-open .menu-panel li { opacity: 1; transform: none; }
.menu-panel .menu-main a {
  display: block; padding: 8px 0; color: var(--text); text-decoration: none;
  font-size: 30px; line-height: 36px; font-weight: 700;
}
.menu-panel .menu-label {
  margin: 32px 0 8px; font-size: 12px; line-height: 16px; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em;
}
.menu-panel .menu-guides a {
  display: block; padding: 8px 0; color: var(--text); text-decoration: none;
  font-size: 18px; line-height: 28px; font-weight: 600;
}
.menu-panel a[aria-current="page"] { color: var(--accent); }
body.nav-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--radius-lg);
  font-family: inherit; font-size: 16px; line-height: 24px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 300ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.btn svg { width: 16px; height: 16px; transition: transform 300ms var(--ease); }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #333; color: #fff; transform: translateY(-1px); }
.btn-primary:hover svg { transform: translateX(2px); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: #cfc9bd; color: var(--text); transform: translateY(-1px); }
.btn-secondary:active { transform: scale(0.98); }

/* ---------- Main ---------- */
main { display: block; padding-top: 96px; }
.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 96px 0; } }
.section-alt { background: var(--surface-alt); }
.eyebrow {
  display: inline-block; margin: 0 0 12px;
  font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent);
}
.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head h2 { font-size: 30px; line-height: 36px; }
.section-head p { margin: 12px 0 0; color: var(--muted); font-size: 18px; line-height: 28px; }
@media (min-width: 768px) { .section-head h2 { font-size: 36px; line-height: 40px; } }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 64px; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .hero { padding: 64px 0 96px; } .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 64px; } }
.hero h1 {
  max-width: 680px; font-size: 36px; line-height: 40px; letter-spacing: -0.02em;
  background: linear-gradient(90deg, #000000, #666666);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (min-width: 768px) { .hero h1 { font-size: 60px; line-height: 1; } }
.hero .lead { max-width: 680px; margin: 24px 0 32px; font-size: 18px; line-height: 28px; color: var(--muted); }
@media (min-width: 768px) { .hero .lead { font-size: 20px; line-height: 28px; } }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.proof { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--muted); }
.proof svg { width: 16px; height: 16px; color: var(--accent); flex: none; }
.hero-media { border-radius: var(--radius-2xl); overflow: hidden; background: var(--surface-alt); aspect-ratio: 4 / 3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Guide cards ---------- */
.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-2xl);
  color: var(--text); text-decoration: none;
  transition: transform 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.card:hover { color: var(--text); transform: translateY(-2px); border-color: #cfc9bd; box-shadow: 0 8px 24px rgba(20, 20, 20, 0.06); }
.card:active { transform: scale(0.98); }
.card-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-lg);
  background: var(--accent-soft); color: var(--accent-ink);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 18px; line-height: 28px; font-weight: 600; }
.card p { margin: 4px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- Tagline reveal ---------- */
.tagline { padding: 96px 0; }
.tagline p {
  max-width: 820px; margin: 0; font-weight: 700; letter-spacing: -0.02em;
  font-size: 30px; line-height: 36px;
}
@media (min-width: 768px) { .tagline p { font-size: 48px; line-height: 1; } }
.tagline .w { color: rgba(20, 20, 20, 0.3); transition: color 500ms var(--ease); }
.tagline .w.on { color: var(--text); }

/* ---------- Article lists ---------- */
.list-cols { display: grid; gap: 0 40px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px) { .list-cols { grid-template-columns: repeat(2, 1fr); } }
.list-cols li { border-top: 1px solid var(--line); }
.list-cols a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; color: var(--text); text-decoration: none; font-weight: 600;
  transition: color 300ms var(--ease);
}
.list-cols a svg { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform 300ms var(--ease), color 300ms var(--ease); }
.list-cols a:hover { color: var(--accent); }
.list-cols a:hover svg { transform: translateX(4px); color: var(--accent); }

.post-grid { display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.post-card {
  display: flex; flex-direction: column; height: 100%;
  padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2xl);
  color: var(--text); text-decoration: none;
  transition: transform 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.post-card:hover { color: var(--text); transform: translateY(-2px); border-color: #cfc9bd; box-shadow: 0 8px 24px rgba(20, 20, 20, 0.06); }
.post-card:active { transform: scale(0.98); }
.post-card time { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.post-card h3 { margin: 8px 0 0; font-size: 18px; line-height: 28px; font-weight: 600; }
.post-card p { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px 0; cursor: pointer; list-style: none;
  font-size: 18px; line-height: 28px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform 500ms var(--ease); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .answer { padding: 0 0 24px; color: var(--muted); font-size: 16px; line-height: 24px; max-width: 680px; }
.faq .answer p { margin: 0; }

/* ---------- Final CTA ---------- */
.cta-final { text-align: left; }
.cta-box {
  padding: 48px 24px; border-radius: var(--radius-2xl); background: var(--dark); color: #fff;
}
@media (min-width: 768px) { .cta-box { padding: 64px; } }
.cta-box h2 { font-size: 30px; line-height: 36px; max-width: 680px; }
@media (min-width: 768px) { .cta-box h2 { font-size: 36px; line-height: 40px; } }
.cta-box p { margin: 16px 0 32px; color: #c9c6bf; font-size: 18px; line-height: 28px; max-width: 680px; }
.cta-box .btn-primary { background: #fff; color: var(--text); }
.cta-box .btn-primary:hover { background: #ece9e2; color: var(--text); }

/* ---------- Article ---------- */
.article-head { padding: 48px 0 32px; }
@media (min-width: 768px) { .article-head { padding: 64px 0 40px; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 14px; line-height: 20px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: #b3ada1; }
.article-head h1 { max-width: 820px; font-size: 30px; line-height: 36px; letter-spacing: -0.02em; }
@media (min-width: 768px) { .article-head h1 { font-size: 48px; line-height: 1; } }
.article-head .summary { max-width: 680px; margin: 16px 0 0; font-size: 18px; line-height: 28px; color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 16px; margin: 24px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 8px; }
.meta svg { width: 16px; height: 16px; }

.article-layout { display: grid; gap: 48px; padding-bottom: 64px; }
@media (min-width: 1024px) { .article-layout { grid-template-columns: minmax(0, var(--content)) 280px; justify-content: space-between; gap: 64px; } }
.toc { display: none; }
@media (min-width: 1024px) {
  .toc { display: block; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 128px); overflow-y: auto; }
}
.toc h2 { font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 4px 0; font-size: 14px; line-height: 20px; color: var(--muted); text-decoration: none; transition: color 300ms var(--ease); }
.toc a:hover, .toc a.active { color: var(--accent); }

.notice {
  margin: 0 0 32px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-xl);
  background: var(--surface); font-size: 14px; line-height: 20px; color: var(--muted);
}
.featured { margin: 0 0 40px; border-radius: var(--radius-2xl); overflow: hidden; background: var(--surface-alt); }
.featured img { width: 100%; }

.prose { font-size: 18px; line-height: 28px; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 24px; }
.prose h2 { margin: 48px 0 16px; font-size: 24px; line-height: 32px; }
.prose h3 { margin: 32px 0 12px; font-size: 20px; line-height: 28px; }
.prose h4 { margin: 24px 0 8px; font-size: 18px; line-height: 28px; }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 24px; }
.prose li { margin: 0 0 8px; }
.prose li::marker { color: var(--accent); }
.prose strong, .prose b { font-weight: 700; }
.prose img { border-radius: var(--radius-xl); margin: 0 auto; }
.prose figure, .prose .img { margin: 32px 0; }
.prose figcaption { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); text-align: center; }
.prose blockquote {
  margin: 32px 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 48px 0; }
.prose .table-wrap { overflow-x: auto; margin: 32px 0; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 24px; }
.prose th, .prose td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-weight: 600; background: var(--surface-alt); }
.prose .embed { position: relative; aspect-ratio: 16 / 9; margin: 32px 0; border-radius: var(--radius-xl); overflow: hidden; background: var(--dark); }
.prose .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose a.btn-amazon {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px;
  padding: 8px 12px; border-radius: var(--radius-lg); background: var(--text); color: #fff;
  font-size: 16px; line-height: 24px; font-weight: 600; text-decoration: none;
  transition: transform 300ms var(--ease), background-color 300ms var(--ease);
}
.prose a.btn-amazon:hover { background: #333; color: #fff; transform: translateY(-1px); }
.prose a.btn-amazon:active { transform: scale(0.98); }

.related { border-top: 1px solid var(--line); padding: 64px 0; }
.related h2 { font-size: 24px; line-height: 32px; margin: 0 0 24px; }

/* ---------- Article index ---------- */
.filter { max-width: 680px; margin: 0 0 32px; }
.filter label { display: block; margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.filter-box { position: relative; }
.filter-box svg { position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; color: var(--muted); pointer-events: none; }
.filter input {
  width: 100%; padding: 12px 16px 12px 48px; font: inherit; font-size: 16px; line-height: 24px;
  border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); color: var(--text);
  transition: border-color 300ms var(--ease);
}
.filter input:hover { border-color: #cfc9bd; }
.filter input:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.filter-count { margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.empty {
  padding: 48px 24px; border: 1px solid var(--line); border-radius: var(--radius-2xl); background: var(--surface); text-align: center;
}
.empty h2 { font-size: 20px; line-height: 28px; }
.empty p { margin: 8px 0 24px; color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #d6d3cc; padding: 64px 0 32px; }
.footer a { color: #d6d3cc; text-decoration: none; transition: color 300ms var(--ease); }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer .brand { color: #fff; }
.footer .brand:hover { color: #fff; }
.footer p { margin: 16px 0 0; font-size: 14px; line-height: 20px; color: #a9a59c; max-width: 320px; }
.footer h2 { font-size: 14px; line-height: 20px; font-weight: 600; color: #fff; margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 0 0 8px; font-size: 14px; line-height: 20px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--dark-alt); font-size: 14px; line-height: 20px; color: #a9a59c; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 300ms !important; animation: none !important; }
  .js [data-reveal] { transform: none; }
  .menu-panel li { transform: none; }
  .btn:hover, .card:hover, .post-card:hover { transform: none; }
}
