/* ============================================================
   CoverCalc — styles.css
   Plain CSS. No framework. Edit colors in the :root block below.
   ============================================================ */

/* ---------- Theme tokens (EDIT colors here) ---------- */
:root {
  --brand: #2563eb;          /* primary blue — change to rebrand */
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --ink: #0f172a;            /* main text */
  --ink-soft: #475569;       /* secondary text */
  --line: #e2e8f0;           /* borders */
  --bg: #ffffff;             /* page background */
  --bg-alt: #f8fafc;         /* section background */
  --good: #16a34a;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --max: 1100px;             /* container width */
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  background: var(--brand); color: white;
  border-radius: 8px; font-weight: 800;
}
.brand-name { font-size: 1.05rem; letter-spacing: -0.01em; }
.nav-list { display: flex; gap: 22px; }
.nav-list a { color: var(--ink-soft); font-weight: 500; }
.nav-list a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 600px) { .nav-list { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 40px; background: linear-gradient(180deg, var(--brand-soft), white); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-copy .eyebrow {
  display: inline-block; margin: 0 0 12px;
  padding: 4px 10px; border-radius: 999px;
  background: white; border: 1px solid var(--line);
  font-size: 0.8rem; color: var(--ink-soft); font-weight: 500;
}
.lede { font-size: 1.1rem; max-width: 52ch; }
.hero-ctas { display: flex; gap: 12px; margin: 8px 0 18px; flex-wrap: wrap; }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px 22px; color: var(--ink-soft); font-size: 0.9rem; }
.trust-row li::before { content: "✓ "; color: var(--good); font-weight: 700; }
.hero-art { display: grid; place-items: center; }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 10px;
  font-weight: 600; font-size: 1rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .05s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: white; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-alt); text-decoration: none; }

/* ---------- Calculator ---------- */
.calculator { padding: 56px 0; }
.section-lede { color: var(--ink-soft); margin-bottom: 24px; }
.card {
  background: white; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-sm);
}
.calc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field select {
  padding: 12px 14px; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: white; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.hint { color: var(--ink-soft); font-size: 0.85rem; margin: 4px 0 0; }
.actions { display: flex; gap: 10px; margin-top: 4px; }
@media (max-width: 700px) {
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .field.full { grid-column: 1 / -1; }
}
@media (max-width: 460px) { .calc-grid { grid-template-columns: 1fr; } }

/* ---------- Result ---------- */
.result { margin-top: 18px; }
.result-card {
  background: var(--brand-soft); border: 1px solid #c7dbfe;
  border-radius: var(--radius); padding: 22px;
}
.result-eyebrow { color: var(--brand-dark); font-weight: 600; margin: 0 0 4px; }
.result-headline { font-size: 2rem; font-weight: 800; margin: 0 0 6px; color: var(--ink); }
.result-detail { color: var(--ink-soft); margin: 0 0 8px; font-size: 0.95rem; }
.result-tip { color: var(--ink); margin: 0 0 16px; font-size: 0.95rem; }

/* ---------- Affiliate buy row ---------- */
.buy-row { margin-top: 8px; padding-top: 16px; border-top: 1px solid #c7dbfe; }
.buy-label { font-weight: 600; color: var(--ink); margin: 0 0 10px; font-size: 0.95rem; }
.buy-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-btn {
  display: inline-block; padding: 10px 16px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  border: 1px solid transparent; transition: transform .05s ease, background .15s ease;
}
.buy-btn:hover { text-decoration: none; transform: translateY(-1px); }
.buy-amazon    { background: #ff9900; color: #111; }
.buy-amazon:hover    { background: #f59e0b; }
.buy-homedepot { background: #f96302; color: white; }
.buy-homedepot:hover { background: #e55300; }
.buy-lowes     { background: #004990; color: white; }
.buy-lowes:hover     { background: #003b75; }
.buy-disclosure { color: var(--ink-soft); font-size: 0.8rem; margin: 10px 0 0; }

/* ---------- Hire-a-pro (lead-gen) block ---------- */
.hire-row { margin-top: 16px; }
.hire-divider {
  position: relative;
  text-align: center;
  margin: 18px 0 14px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.hire-divider::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: #c7dbfe;
}
.hire-divider span {
  position: relative;
  background: var(--brand-soft);
  padding: 0 12px;
}
.hire-label { font-weight: 700; font-size: 1rem; color: var(--ink); margin: 0 0 4px; }
.hire-sub   { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 12px; }
.hire-btn {
  display: inline-block; padding: 12px 20px; border-radius: 10px;
  background: var(--ink); color: white; font-weight: 600; font-size: 1rem;
  text-decoration: none; transition: background .15s ease, transform .05s ease;
}
.hire-btn:hover { background: #1e293b; text-decoration: none; transform: translateY(-1px); color: white; }
.hire-disclosure { color: var(--ink-soft); font-size: 0.8rem; margin: 10px 0 0; }

/* ---------- How it works ---------- */
.how { padding: 56px 0; background: var(--bg-alt); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.steps li {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.step-num {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; background: var(--brand); color: white;
  border-radius: 999px; font-weight: 700; margin-bottom: 10px;
}
@media (max-width: 800px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Why ---------- */
.why { padding: 56px 0; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-grid article {
  background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
@media (max-width: 800px) { .why-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Guides ---------- */
.guides { padding: 56px 0; background: var(--bg-alt); }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.guide-card {
  display: block; background: white; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; color: var(--ink);
}
.guide-card:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow-md); }
.guide-card h3 { color: var(--brand); margin-bottom: 4px; }
.guide-card p { margin: 0; }
@media (max-width: 700px) { .guide-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { padding: 56px 0; }
.faq details {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary {
  font-weight: 600; cursor: pointer; list-style: none;
  padding: 4px 0; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; float: right; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq p { margin: 8px 0 4px; }

/* ---------- CTA strip ---------- */
.cta-strip { padding: 48px 0; background: var(--brand); color: white; }
.cta-strip h2 { color: white; margin: 0; }
.cta-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-strip .btn-primary { background: white; color: var(--brand); }
.cta-strip .btn-primary:hover { background: var(--brand-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 48px 0 24px; }
.site-footer .brand { color: white; }
.site-footer .brand-mark { background: white; color: var(--brand); }
.site-footer h4 { color: white; font-size: 0.95rem; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer ul li { margin: 6px 0; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: white; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-bottom { margin-top: 28px; border-top: 1px solid #1e293b; padding-top: 18px; }
.muted { color: #94a3b8; font-size: 0.9rem; margin: 0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Guide article pages ---------- */
.guide-article { padding: 40px 0 60px; }
.guide-container { max-width: 760px; }
.guide-header { margin: 16px 0 24px; }
.guide-header h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 8px; }
.guide-article .lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }
.guide-article p { font-size: 1.05rem; color: var(--ink); max-width: 70ch; }
.guide-article h2 { margin-top: 40px; }
.guide-article h3 { margin-top: 24px; }
.guide-article .eyebrow {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); border: 1px solid #c7dbfe;
  font-size: 0.8rem; color: var(--brand-dark); font-weight: 500;
}

/* Breadcrumbs */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 10px; font-size: 0.9rem; color: var(--ink-soft); }
.breadcrumbs li { display: inline; }
.breadcrumbs li + li::before { content: "›"; margin-right: 8px; color: var(--ink-soft); }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* Callouts */
.callout { border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.callout-title { margin: 0 0 6px; font-size: 1.1rem; }
.callout-answer { background: var(--brand-soft); border: 1px solid #c7dbfe; }
.callout-answer .callout-title { color: var(--brand-dark); }
.callout-buy { background: #fff7ed; border: 1px solid #fed7aa; }
.callout-buy h3 { margin-top: 0; color: #9a3412; }
.callout-buy .disclosure { color: var(--ink-soft); font-size: 0.82rem; margin: 10px 0 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 16px 0 8px; }
.data-table {
  width: 100%; border-collapse: collapse;
  background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.data-table thead { background: var(--bg-alt); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #f8fafc; }
.table-note { font-size: 0.88rem; color: var(--ink-soft); margin: 0 0 24px; }

/* Inline CTA (mid-article) */
.cta-inline {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 18px 22px; margin: 28px 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.cta-inline p { margin: 0; }

/* Formula and tip lists */
.formula-list, .tip-list { padding-left: 1.4em; margin: 12px 0 20px; }
.formula-list li, .tip-list li { margin: 8px 0; font-size: 1.05rem; color: var(--ink); max-width: 70ch; }

/* Guide cards inside the article (related links) */
.guide-article .guide-grid { margin-top: 16px; }

/* ---------- Accessibility helpers ---------- */
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
