/* 365 Plumbing — palette + type per build/REBUILD_NOTES.md Design brief.
   Light mode only (niche convention); one hot accent reserved for call/book. */

:root {
  --bg: #f6f8fb;
  --fg: #152238;
  --card: #ffffff;
  --muted: #48556a;
  --navy: #16324f;
  --navy-deep: #0e2438;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-ink: #9a3412;
  --link: #155e97;
  --band: #e9eef5;
  --line: #c7d3e0;
  --star-on-navy: #f5a623;
  --star-on-light: #b45309;
  --success: #1a7f4e;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, sans-serif;
  /* 4px spacing scale */
  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 84px; scroll-padding-bottom: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  /* clear the sticky mobile call bar */
  padding-bottom: 76px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 var(--s4); }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 var(--s4); }

a { color: var(--link); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}
.hero a:focus-visible, .cta-band a:focus-visible, .site-footer a:focus-visible, .mobile-call-bar a:focus-visible {
  outline-color: #ffffff;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 768px) { .wrap { padding: 0 var(--s5); } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--s4); top: -100px;
  background: var(--card); color: var(--fg);
  padding: var(--s3) var(--s4); z-index: 100; border-radius: 4px;
}
.skip-link:focus { top: var(--s2); }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  padding: 14px 22px;           /* ≥44px tall */
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.btn-accent { background: var(--accent); color: #ffffff; }
.btn-accent:hover { background: var(--accent-hover); }
/* On navy surfaces the accent fill is only 2.53:1 vs navy — the white border
   carries the non-text contrast (WCAG 1.4.11). */
.btn-on-navy { border-color: #ffffff; }
.btn-outline-light { background: transparent; color: #ffffff; border-color: #ffffff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--band); }

.text-link { color: var(--accent-ink); font-weight: 600; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: var(--s4);
  min-height: 64px; flex-wrap: wrap; padding-top: var(--s2); padding-bottom: var(--s2);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  color: var(--navy); text-decoration: none; letter-spacing: 0.02em;
}
.wordmark span { color: var(--accent-ink); }
.site-header nav { margin-left: auto; }
.nav-list { display: flex; gap: var(--s4); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-list a { color: var(--fg); text-decoration: none; font-weight: 600; padding: var(--s2) 0; }
.nav-list a:hover { color: var(--accent-ink); text-decoration: underline; }
.header-call { white-space: nowrap; }
@media (max-width: 767px) {
  .header-call { display: none; } /* bottom bar covers mobile */
  .site-header nav { margin-left: 0; width: 100%; }
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--navy), var(--navy-deep));
  color: #ffffff;
  padding: var(--s8) 0;
}
.hero h1 { color: #ffffff; }
.hero-sub { font-size: 1.15rem; max-width: 34em; color: #dbe4ee; }
.hero-inner { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1fr auto; } }
.cta-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }

.badge-roundel {
  width: 180px; height: 180px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 auto;
}
.badge-number { font-family: var(--font-display); font-size: 4rem; font-weight: 700; line-height: 1; }
.badge-label {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
}
@media (max-width: 899px) { .hero-badge { display: none; } }

/* Trust bar */
.trust-bar { background: var(--navy-deep); color: #ffffff; padding: var(--s3) 0; }
.trust-inner { display: flex; gap: var(--s5); flex-wrap: wrap; font-weight: 600; }
.trust-item a { color: #ffffff; }
.trust-item [data-star] { color: var(--star-on-navy); }

/* Sections */
.section { padding: var(--s7) 0; }
@media (min-width: 768px) { .section { padding: var(--s8) 0; } }
.section-band { background: var(--band); }

.page-header { background: var(--navy); color: #ffffff; padding: var(--s7) 0; }
.page-header h1 { color: #ffffff; }
.page-header p { color: #dbe4ee; max-width: 44em; }
.page-header a { color: #ffffff; }
.page-header .text-link { color: #ffd9c4; }

/* Cards */
.card-grid { display: grid; gap: var(--s4); 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); } }
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: 6px;
  padding: var(--s5);
  color: var(--fg);
  text-decoration: none;
}
.card:hover { border-top-color: var(--accent); }
.card-featured { border-top: 3px solid var(--accent); }
.card p { color: var(--muted); }
.card-link { color: var(--accent-ink); font-weight: 700; }

/* Promise row */
.promise-row { display: grid; gap: var(--s5); grid-template-columns: 1fr; margin-bottom: var(--s5); }
@media (min-width: 640px) { .promise-row { grid-template-columns: repeat(3, 1fr); } }
.promise { text-align: center; }
.promise-number {
  display: block; font-family: var(--font-display);
  font-size: 3.25rem; font-weight: 700; color: var(--navy); line-height: 1.1;
}
.promise-label { color: var(--muted); font-weight: 600; }

/* Reviews */
.reviews-aggregate { font-weight: 700; font-size: 1.15rem; }
.reviews-grid { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 768px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
.review-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; padding: var(--s5);
}
.review-stars { color: var(--star-on-light); font-weight: 700; }
.review-author { color: var(--muted); font-weight: 600; margin-bottom: 0; }
.reviews-attribution { margin-top: var(--s5); color: var(--muted); }

/* FAQ */
.faq-item {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 6px; margin-bottom: var(--s3); padding: 0 var(--s4);
}
.faq-item summary {
  font-weight: 700; padding: var(--s4) 0; cursor: pointer; list-style-position: inside;
}
.faq-item p { color: var(--muted); }

/* Stage 1 placeholder blocks */
.stage1 {
  border: 2px dashed var(--accent-ink);
  border-radius: 6px;
  background: #fff7f2;
  padding: var(--s5);
  margin-top: var(--s5);
}
.stage1-tag {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.85rem; color: var(--accent-ink); margin-bottom: var(--s2);
}
.stage1-title { margin-bottom: var(--s2); }
.stage1 ul { margin: 0; padding-left: 1.2em; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--navy); color: #ffffff; padding: var(--s7) 0; }
.cta-band h2 { color: #ffffff; }

/* Lists */
.symptom-list, .fact-list { padding-left: 1.2em; }
.symptom-list li, .fact-list li { margin-bottom: var(--s2); }
.related-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.related-list a { font-weight: 600; }
.breadcrumbs { margin-bottom: var(--s4); color: #dbe4ee; }
.breadcrumbs a { color: #ffffff; }

/* Contact */
.contact-grid { display: grid; gap: var(--s6); grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 3fr 2fr; } }
.contact-form .field { margin-bottom: var(--s4); }
.contact-form label { display: block; font-weight: 700; margin-bottom: var(--s2); }
.contact-form .optional { font-weight: 400; color: var(--muted); }
.contact-form .req { color: var(--accent-ink); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px; font: inherit;
  border: 1px solid var(--muted); border-radius: 6px; background: var(--card);
}
.form-notice {
  background: var(--band); border-left: 4px solid var(--success);
  padding: var(--s4); border-radius: 4px;
}
.hours-list { list-style: none; padding: 0; color: var(--muted); }
.hours-list li { margin-bottom: var(--s2); }

/* Footer */
.site-footer { background: var(--navy-deep); color: #c9d6e2; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; gap: var(--s6); grid-template-columns: 1fr; padding: var(--s7) var(--s4); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-wordmark { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: #ffffff; }
.footer-heading {
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: #ffffff; margin-bottom: var(--s3);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s2); }
.site-footer address { font-style: normal; }
.footer-license { font-size: 0.95rem; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: var(--s4); padding-bottom: var(--s4); }

/* Sticky mobile call bar */
.mobile-call-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; gap: var(--s3);
  background: var(--navy-deep);
  padding: var(--s3) var(--s4);
  padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px));
}
.mobile-call-bar .btn { flex: 1; border-color: #ffffff; }
@media (min-width: 1024px) {
  .mobile-call-bar { display: none; }
  body { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
