/* Midwest Roof Connect — shared styles (mobile-first) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0b2a4a;
  --navy-dark: #071c32;
  --blue: #1a5f9e;
  --blue-light: #2b7bb9;
  --accent: #e87722;
  --accent-hover: #d06618;
  --green: #1a7a4c;
  --bg: #f5f7fa;
  --white: #ffffff;
  --text: #1a1a1a;
  --muted: #5a6570;
  --border: #d8dee6;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(11, 42, 74, 0.12);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ——— Header ——— */
.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.logo:hover { text-decoration: none; opacity: 0.95; }
.logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.logo span { line-height: 1.15; }
.logo .tag {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.02em;
}
.header-quote {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.header-quote:hover { background: var(--accent-hover); text-decoration: none; }

/* ——— Hero ——— */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--blue) 100%);
  color: var(--white);
  padding: 2rem 1rem 2.5rem;
}
.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 1.75rem;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: clamp(1.55rem, 5vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.hero-sub {
  font-size: 1.05rem;
  opacity: 0.92;
  margin-bottom: 1rem;
  max-width: 36em;
}
.disclosure {
  font-size: 0.85rem;
  opacity: 0.88;
  background: rgba(0,0,0,0.2);
  border-left: 3px solid var(--accent);
  padding: 0.65rem 0.85rem;
  border-radius: 0 6px 6px 0;
  max-width: 40em;
}
.disclosure strong { font-weight: 700; }

/* ——— Form card ——— */
.form-card {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.15rem 1.5rem;
}
.form-card h2 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.form-card .form-lead {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.form-group {
  margin-bottom: 0.85rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.form-group label .req { color: var(--accent); }
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6570' d='M1.4 0L6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 95, 158, 0.2);
}
.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0.5rem 0 1rem;
}
.consent input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--blue);
}
.btn-submit {
  display: block;
  width: 100%;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-submit:hover { background: var(--accent-hover); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.65rem;
}

/* ——— Sticky mobile CTA ——— */
.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy-dark);
  padding: 0.65rem 1rem;
  z-index: 99;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
  gap: 0.5rem;
}
.sticky-cta a {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.sticky-cta .form-link {
  background: var(--accent);
  color: var(--white);
}
.sticky-cta .form-link:hover { background: var(--accent-hover); text-decoration: none; }

/* ——— Sections ——— */
.section {
  padding: 2.25rem 1rem;
  max-width: 960px;
  margin: 0 auto;
}
.section h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
  text-align: center;
}
.section-lead {
  text-align: center;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* Trust grid */
.trust-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.trust-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(11, 42, 74, 0.06);
  border: 1px solid var(--border);
  text-align: center;
}
.trust-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
}
.trust-card h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.trust-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* How it works */
.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}
.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.15rem 3.5rem;
  border: 1px solid var(--border);
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 1.8rem;
  height: 1.8rem;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}
.step p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Service areas */
.areas {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}
.areas ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.areas li::before {
  content: "✓ ";
  color: var(--green);
  font-weight: 700;
}
.areas-note {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Issues / storm callouts */
.issue-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}
.issue-chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.issue-chip svg { width: 28px; height: 28px; }

/* Mid CTA band */
.cta-band {
  background: var(--navy);
  color: var(--white);
  padding: 2rem 1rem;
  text-align: center;
}
.cta-band h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}
.cta-band p {
  opacity: 0.9;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  max-width: 32em;
  margin-left: auto;
  margin-right: auto;
}
.btn-quote-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-quote-lg:hover { background: var(--accent-hover); text-decoration: none; }

/* FAQ */
.faq details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  padding: 0.9rem 1rem;
}
.faq summary {
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--blue);
  font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 2rem 1rem 5.5rem; /* extra bottom for sticky CTA on mobile */
  font-size: 0.85rem;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 1.25rem;
}
.footer-brand {
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.footer-links a {
  color: rgba(255,255,255,0.8);
}
.footer-links a:hover { color: var(--white); }
.footer-disclaimer {
  font-size: 0.75rem;
  line-height: 1.45;
  opacity: 0.7;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
  margin-top: 0.25rem;
}

/* Privacy page */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  background: var(--white);
}
.legal h1 {
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.legal .updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}
.legal h2 {
  font-size: 1.15rem;
  color: var(--navy);
  margin: 1.5rem 0 0.5rem;
}
.legal p, .legal li {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.legal ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

/* Storm page accent */
.hero.storm {
  background: linear-gradient(160deg, #1a2744 0%, #3a5080 55%, #5a6a8a 100%);
}
.storm-alert {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: rgba(232, 119, 34, 0.2);
  border: 1px solid rgba(232, 119, 34, 0.5);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.storm-alert svg { flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; }

/* Desktop */
@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2.5rem;
  }
  .hero { padding: 2.75rem 1.5rem 3rem; }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 1.25rem; padding-top: 3.5rem; }
  .step::before { top: 1.15rem; left: 1.15rem; }
  .issue-grid { grid-template-columns: repeat(4, 1fr); }
  .areas ul { grid-template-columns: repeat(3, 1fr); }
  .sticky-cta { display: none !important; }
  .site-footer { padding-bottom: 2rem; }
  .form-card { padding: 1.5rem; }
}

@media (max-width: 719px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 0; }
}

/* Netlify Forms honeypot — visually hidden from humans */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Thanks page */
.thanks-card {
  max-width: 560px;
  margin: 3rem auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
}
.thanks-card h1 {
  color: var(--navy);
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}
.thanks-card p {
  color: var(--muted);
  margin-bottom: 1rem;
}
.thanks-card .btn-home {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  margin-top: 0.5rem;
}
.thanks-card .btn-home:hover {
  background: var(--accent-hover);
  text-decoration: none;
}
