/* ==========================================================================
   Kentucky Restoration Pros - Design Variant 3 "Storm"
   Palette: deep indigo #1E1B4B + sky #0284C7, CTA crimson #BE123C
   Light header, bold hero overlay band, pill buttons, generous spacing.
   Mobile-first, system fonts, no external resources.
   ========================================================================== */

:root {
  --indigo-900: #1e1b4b;
  --indigo-800: #272160;
  --indigo-700: #322b78;
  --indigo-600: #423a97;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --sky-100: #e0f2fe;
  --sky-50: #f0f9ff;
  --crimson: #be123c;
  --crimson-dark: #9f1239;
  --ink: #171634;
  --body: #3f3d56;
  --muted: #6b6885;
  --line: #e2e0ee;
  --surface: #ffffff;
  --surface-alt: #f6f7fc;
  --white: #fff;

  /* Spacing scale (generous - Storm variant) */
  --s1: 0.5rem;
  --s2: 0.85rem;
  --s3: 1.25rem;
  --s4: 1.9rem;
  --s5: 2.8rem;
  --s6: 4rem;
  --s7: 5.25rem;

  --radius-pill: 999px;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(23, 22, 52, 0.06), 0 2px 6px rgba(23, 22, 52, 0.05);
  --shadow: 0 6px 20px rgba(23, 22, 52, 0.09);
  --wrap: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Keep anchor targets clear of the sticky header */
[id] { scroll-margin-top: 5.5rem; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.68;
  color: var(--body);
  background: var(--surface);
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }
svg { display: block; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 var(--s2);
  font-weight: 800;
  letter-spacing: -0.015em;
}
h1 { font-size: 1.95rem; }
h2 { font-size: 1.55rem; margin-top: var(--s5); }
h3 { font-size: 1.16rem; margin-top: var(--s4); }
h4 { font-size: 1.02rem; margin-top: var(--s3); }
p { margin: 0 0 var(--s3); }
p:last-child { margin-bottom: 0; }
a { color: var(--sky-700); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--indigo-900); }
ul, ol { margin: 0 0 var(--s3); padding-left: 1.15rem; }
li { margin-bottom: 0.45rem; }
strong { color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--indigo-900); color: #fff;
  padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--sky-600); outline-offset: 2px; border-radius: 4px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Buttons (pill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit; font-size: 0.98rem; font-weight: 700;
  padding: 0.72rem 1.35rem; border-radius: var(--radius-pill);
  border: 2px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-align: center; line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn-cta { background: var(--crimson); color: #fff; box-shadow: 0 4px 14px rgba(190, 18, 60, 0.28); }
.btn-cta:hover, .btn-cta:focus { background: var(--crimson-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: #fff; color: var(--indigo-900); border-color: #fff; }
.btn-outline { background: #fff; color: var(--indigo-900); border-color: var(--line); }
.btn-outline:hover { border-color: var(--sky-600); color: var(--sky-700); }
.btn-lg { font-size: 1.06rem; padding: 0.9rem 1.7rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header (light, sticky) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(6px);
}
.header-inner { display: flex; align-items: center; gap: var(--s2); min-height: 62px; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; color: var(--indigo-900); text-decoration: none; font-size: 1rem; }
.brand:hover { color: var(--indigo-900); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand span { display: none; }
.nav-toggle {
  margin-left: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 0.45rem 0.8rem; font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--ink);
  min-height: 44px; cursor: pointer;
}
.main-nav { display: none; }
.header-cta { margin-left: auto; font-size: 0.88rem; padding: 0.55rem 1rem; min-height: 44px; }
.nav-toggle + .header-cta { margin-left: 0; }
.main-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: var(--s2) 1rem var(--s3); box-shadow: var(--shadow);
}
.main-nav.is-open ul { list-style: none; margin: 0; padding: 0; }
.main-nav.is-open li { margin: 0; border-bottom: 1px solid var(--line); }
.main-nav.is-open li:last-child { border-bottom: 0; }
.main-nav.is-open a { display: block; padding: 0.68rem 0; font-weight: 600; color: var(--ink); text-decoration: none; }

/* ---------- Hero (bold overlay band) ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(120% 130% at 88% 6%, rgba(2, 132, 199, 0.75) 0%, rgba(2, 132, 199, 0) 58%),
    linear-gradient(160deg, var(--indigo-700) 0%, var(--indigo-900) 62%, #14123a 100%);
  padding: var(--s6) 0 var(--s6);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 10px;
  background: linear-gradient(90deg, var(--sky-600) 0%, var(--sky-600) 34%, var(--crimson) 34%, var(--crimson) 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-band {
  display: inline-block; background: var(--crimson); color: #fff;
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase;
  padding: 0.45rem 0.95rem; border-radius: var(--radius-pill); margin-bottom: var(--s3);
}
.hero h1 { color: #fff; font-size: 2.05rem; margin-bottom: var(--s3); }
.hero p.lede { font-size: 1.05rem; color: #dcdaf2; max-width: 40rem; margin-bottom: var(--s4); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.hero-actions .btn { flex: 1 1 15rem; }
.hero-note { margin-top: var(--s3); font-size: 0.9rem; color: #c3c0e4; }
.hero-stats { display: grid; gap: var(--s2); margin-top: var(--s5); }
.hero-stat { background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius); padding: var(--s3); }
.hero-stat b { display: block; color: #fff; font-size: 1.12rem; }
.hero-stat span { font-size: 0.88rem; color: #c3c0e4; }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--sky-50); border-bottom: 1px solid var(--sky-100); padding: var(--s4) 0; }
.trust-grid { display: grid; gap: var(--s3); }
.trust-item { display: flex; gap: 0.7rem; align-items: flex-start; }
.trust-item svg { width: 24px; height: 24px; flex: none; color: var(--sky-600); margin-top: 2px; }
.trust-item strong { display: block; color: var(--ink); font-size: 0.98rem; }
.trust-item span { font-size: 0.88rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: var(--s6) 0; }
.section-alt { background: var(--surface-alt); }
.section-indigo { background: var(--indigo-900); color: #d9d7ee; }
.section-indigo h2, .section-indigo h3 { color: #fff; }
.section-indigo a { color: #9ad6f7; }
.section-head { max-width: 46rem; margin-bottom: var(--s5); }
.section-head p { font-size: 1.02rem; color: var(--muted); }
.section-indigo .section-head p { color: #b9b6da; }
.eyebrow {
  display: inline-block; font-size: 0.73rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--sky-700); margin-bottom: var(--s1);
}
.section-indigo .eyebrow { color: #7dd3fc; }
.center { text-align: center; }
.center .section-head { margin-left: auto; margin-right: auto; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: var(--s3); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s4); box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 38px; height: 38px; color: var(--crimson); margin-bottom: var(--s2); }
.card-link { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 0.92rem; margin-top: var(--s2); }

.city-card { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; }
.city-card b { color: var(--ink); font-weight: 700; font-size: 0.96rem; }
.city-card small { display: block; color: var(--muted); font-size: 0.79rem; font-weight: 400; }
.city-card span.pop { color: var(--sky-700); font-size: 0.79rem; font-weight: 700; white-space: nowrap; }
.city-card:hover { border-color: var(--sky-600); background: var(--sky-50); }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; display: grid; gap: var(--s3); list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s4) var(--s3) var(--s3); margin: 0; box-shadow: var(--shadow-sm);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -15px; left: var(--s3);
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--indigo-900); color: #fff; font-weight: 800; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin-top: 0; font-size: 1.05rem; }
.steps p:last-child { margin-bottom: 0; }
.section-indigo .steps li { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.18); }
.section-indigo .steps li::before { background: var(--crimson); }

/* ---------- Benefits ---------- */
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.benefits li { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0; }
.benefits svg { width: 20px; height: 20px; flex: none; color: var(--sky-600); margin-top: 4px; }
.benefits strong { color: var(--ink); display: block; }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: var(--s2); }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; padding: 1rem 2.6rem 1rem 1.1rem; font-weight: 700; color: var(--ink);
  position: relative; list-style: none; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  font-size: 1.35rem; font-weight: 700; color: var(--crimson); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .faq-body { padding: var(--s3) 1.1rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }
.section-indigo .faq details { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.18); }
.section-indigo .faq summary { color: #fff; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: var(--s3) 0 0; font-size: 0.85rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--sky-700); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(150deg, var(--indigo-700), var(--indigo-900) 70%);
  color: #fff; padding: var(--s5) 0;
}
.page-hero h1 { color: #fff; margin-bottom: var(--s2); }
.page-hero p { color: #d3d1ec; max-width: 46rem; margin-bottom: var(--s3); }
.page-hero .btn { margin-top: var(--s1); }

/* ---------- Prose ---------- */
.prose { max-width: 46rem; }
.prose h2 { margin-top: var(--s5); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: var(--s4); }
.callout {
  background: var(--sky-50); border-left: 4px solid var(--sky-600);
  border-radius: 0 var(--radius) var(--radius) 0; padding: var(--s3) var(--s4); margin: 0 0 var(--s4);
}
.callout h3, .callout h2 { margin-top: 0; font-size: 1.05rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-crimson { background: #fff1f4; border-left-color: var(--crimson); }
.takeaways { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); margin-bottom: var(--s4); }
.takeaways h2 { margin-top: 0; font-size: 1.2rem; }
.takeaways ul { margin-bottom: 0; }
.takeaways li { margin-bottom: 0.55rem; }

/* ---------- Layout with sidebar ---------- */
.layout { display: grid; gap: var(--s5); }
.sidebar { display: grid; gap: var(--s3); align-content: start; }
.sidebar .card { padding: var(--s3) var(--s4); }
.sidebar h3 { font-size: 1rem; margin-bottom: var(--s2); }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin: 0; border-bottom: 1px solid var(--line); }
.sidebar li:last-child { border-bottom: 0; }
.sidebar li a { display: block; padding: 0.5rem 0; font-size: 0.92rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.sidebar li a:hover { color: var(--crimson); }

/* ---------- Final CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--indigo-800), var(--indigo-900) 55%, var(--sky-700) 160%);
  color: #fff; padding: var(--s6) 0; text-align: center;
}
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band p { color: #d3d1ec; max-width: 38rem; margin: 0 auto var(--s4); }
.cta-band .btn { font-size: 1.1rem; padding: 1rem 2rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin-bottom: var(--s4); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 30rem; }
caption { text-align: left; font-size: 0.86rem; color: var(--muted); padding-bottom: var(--s2); }
th, td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); }
th { background: var(--surface-alt); color: var(--ink); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--indigo-900); color: #b9b6da; padding: var(--s5) 0 var(--s6); font-size: 0.92rem; }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 var(--s2); }
.site-footer a { color: #9ad6f7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: var(--s4); margin-bottom: var(--s4); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; color: #fff; font-weight: 800; margin-bottom: var(--s2); }
.footer-brand svg { width: 28px; height: 28px; }
.footer-phone { font-size: 1.15rem; font-weight: 800; color: #fff !important; }
.footer-disc { border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: var(--s3); }
.footer-disc p { font-size: 0.8rem; color: #a5a2c9; margin-bottom: var(--s2); }
.footer-legal { font-size: 0.82rem; color: #a5a2c9; }

/* ---------- Mobile call bar ---------- */
.call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  background: #fff; border-top: 1px solid var(--line);
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 18px rgba(23, 22, 52, 0.12);
}
.call-bar span { font-size: 0.78rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.call-bar span small { display: block; font-weight: 500; color: var(--muted); }
.has-callbar { padding-bottom: 4.6rem; }

/* ---------- Utilities ---------- */
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.lede { font-size: 1.04rem; color: var(--muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0 0 var(--s3); list-style: none; }
.pill-row li { margin: 0; background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 0.3rem 0.8rem; font-size: 0.82rem; color: var(--ink); font-weight: 600; }
.post-meta { font-size: 0.84rem; color: var(--muted); margin-bottom: var(--s2); }
.post-list { display: grid; gap: var(--s3); list-style: none; padding: 0; margin: 0; }
.post-list li { margin: 0; }
.post-list .card p:last-of-type { margin-bottom: var(--s2); }

/* ---------- Responsive ---------- */
@media (min-width: 600px) {
  h1 { font-size: 2.3rem; }
  .hero h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  .btn { flex: 0 0 auto; }
  .hero-actions .btn { flex: 0 0 auto; }
  .grid-2, .trust-grid, .hero-stats, .steps { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .call-bar { display: none; }
  .has-callbar { padding-bottom: 0; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  h1 { font-size: 2.6rem; }
  .hero { padding: var(--s7) 0 var(--s7); }
  .hero h1 { font-size: 3rem; }
  h2 { font-size: 1.95rem; }
  .section { padding: var(--s7) 0; }
  .brand span { display: inline; }
  .nav-toggle { display: none; }
  .main-nav { display: block; margin-left: var(--s3); }
  .main-nav ul { display: flex; gap: var(--s3); list-style: none; margin: 0; padding: 0; }
  .main-nav li { margin: 0; }
  .main-nav a { font-size: 0.92rem; font-weight: 600; color: var(--ink); text-decoration: none; }
  .main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--crimson); }
  .header-cta { margin-left: auto; }
  .grid-2, .grid-3, .grid-4 { display: grid; gap: var(--s3); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .steps { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--s5); align-items: start; }
  .hero-stats { margin-top: 0; }
  .layout { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: var(--s5); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .faq { max-width: 52rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .btn:hover { transform: none; }
}

@media print {
  .site-header, .call-bar, .cta-band, .hero-actions { display: none; }
  body { color: #000; }
}
