/* ============================================================
   RICHARDSON PLUMBING INC. — CORE STYLESHEET
   ============================================================
   Design tokens live in :root as CSS variables. To adjust the
   color palette or fonts sitewide, change the values here —
   every page and component reads from these variables.
   ============================================================ */

:root {
  /* ---- Color tokens ---- */
  --color-ink: #12283f;          /* primary navy — headers, nav, footer */
  --color-ink-light: #1c3a59;    /* lighter navy for hover/gradients */
  --color-copper: #b87333;       /* brass/copper accent — links, highlights */
  --color-copper-dark: #96591f;
  --color-emergency: #d64545;    /* reserved ONLY for emergency/call CTAs */
  --color-emergency-dark: #b23434;
  --color-bg: #f7f5f1;           /* warm off-white background */
  --color-bg-alt: #eee9e0;       /* slightly deeper warm section background */
  --color-surface: #ffffff;
  --color-text: #2c3540;         /* slate body text */
  --color-text-muted: #5c6773;
  --color-border: #e0dbd0;

  /* ---- Type tokens ---- */
  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* ---- Layout tokens ---- */
  --max-width: 1180px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(18, 40, 63, 0.08);
  --shadow-md: 0 4px 16px rgba(18, 40, 63, 0.12);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--color-copper-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

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

/* Visible keyboard focus (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-copper);
  outline-offset: 2px;
}

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

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--color-ink);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 16px;
}
.site-header__brand {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-header__brand:hover { text-decoration: none; }
.site-header__brand-mark {
  width: 34px; height: 34px; flex-shrink: 0;
}
.site-nav { display: none; }
.site-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 26px;
}
.site-nav a {
  color: #e8e6e0;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover { color: #fff; text-decoration: none; }
.site-nav .has-dropdown { position: relative; }
.site-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-surface);
  min-width: 260px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  margin-top: 10px;
}
.site-nav .has-dropdown:hover .dropdown,
.site-nav .has-dropdown:focus-within .dropdown { display: block; }
.site-nav .dropdown a {
  display: block;
  color: var(--color-text);
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 500;
}
.site-nav .dropdown a:hover { background: var(--color-bg-alt); text-decoration: none; }

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-call-header {
  background: var(--color-emergency);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  white-space: nowrap;
}
.btn-call-header:hover { background: var(--color-emergency-dark); text-decoration: none; }

.nav-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

@media (min-width: 900px) {
  .site-nav { display: block; }
  .nav-toggle { display: none; }
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  background: var(--color-ink-light);
  padding: 10px 20px 20px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a {
  display: block;
  color: #fff;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-weight: 600;
}
.mobile-nav a:hover { text-decoration: none; color: var(--color-copper); }

@media (min-width: 900px) {
  .mobile-nav { display: none !important; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-emergency); color: #fff; }
.btn-primary:hover { background: var(--color-emergency-dark); }
.btn-secondary { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn-secondary:hover { background: var(--color-ink); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: #fff; color: var(--color-ink); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(160deg, var(--color-ink) 0%, var(--color-ink-light) 100%);
  color: #fff;
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  gap: 32px;
  position: relative;
  z-index: 2;
}
.hero__eyebrow {
  font-family: var(--font-mono);
  color: var(--color-copper);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: inline-block;
}
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero__lede {
  font-size: 1.15rem;
  color: #d9dee5;
  max-width: 60ch;
  margin-bottom: 28px;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__pipe {
  position: absolute;
  right: -60px;
  top: 0;
  height: 100%;
  opacity: 0.18;
  z-index: 1;
}

@media (min-width: 900px) {
  .hero { padding: 96px 0 84px; }
}

/* ============================================================
   PIPE-ROUTE DIVIDER (signature motif)
   ============================================================ */
.pipe-divider {
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
}
.pipe-divider path {
  fill: none;
  stroke: var(--color-copper);
  stroke-width: 3;
  stroke-linecap: round;
}
.pipe-divider circle { fill: var(--color-copper); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 56px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-ink { background: var(--color-ink); color: #fff; }
.section-ink h2 { color: #fff; }
.section__head { max-width: 68ch; margin: 0 0 36px; }
.section__head p { color: var(--color-text-muted); font-size: 1.05rem; }

/* ---- Grids / Cards ---- */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.card p { color: var(--color-text-muted); margin-bottom: 0; }
.card a.card-link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-copper-dark);
}

.service-icon {
  width: 42px; height: 42px;
  color: var(--color-copper);
  margin-bottom: 14px;
}

/* ---- Trust strip ---- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
  justify-content: center;
  padding: 22px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---- Emergency CTA band ---- */
.emergency-band {
  background: var(--color-emergency);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}
.emergency-band h2 { color: #fff; margin-bottom: 10px; }
.emergency-band p { color: #ffe3e0; margin-bottom: 22px; }

/* ---- FAQ ---- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}
.faq-item summary {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-ink);
  cursor: pointer;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--color-copper);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 12px; color: var(--color-text-muted); }

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 14px 0;
}
.breadcrumbs a { color: var(--color-text-muted); font-weight: 600; }
.breadcrumbs span[aria-current] { color: var(--color-ink); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-ink);
  color: #c9d0d9;
  padding: 56px 0 24px;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.site-footer a { color: #c9d0d9; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-bottom {
  padding-top: 20px;
  font-size: 0.82rem;
  color: #8b95a3;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
}

/* ============================================================
   STICKY MOBILE CALL BAR
   ============================================================ */
.sticky-call-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-emergency);
  z-index: 200;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.18);
}
.sticky-call-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 14px;
  font-size: 1.05rem;
}
.sticky-call-bar a:hover { text-decoration: none; background: var(--color-emergency-dark); }
body { padding-bottom: 56px; }

@media (min-width: 900px) {
  .sticky-call-bar { display: none; }
  body { padding-bottom: 0; }
}

/* ============================================================
   CONTENT PHOTOS
   ============================================================ */
.content-photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin: 8px 0 0;
}
.content-photo-wrap { max-width: var(--max-width); margin: 28px auto 0; padding: 0 20px; }

/* ============================================================
   LEADSMART FORM EMBED
   ============================================================ */
.leadsmart-embed {
  max-width: 600px;
  margin: 0 auto;
}
.leadsmart-embed iframe {
  width: 100%;
  height: 545px;
  border: none;
  display: block;
  border-radius: var(--radius);
  background: #fff;
}
.leadsmart-embed-band {
  background: #fff;
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow-md);
}
@media (max-width: 480px) {
  .leadsmart-embed iframe { height: 620px; }
}

/* ---- Social icons ---- */
.footer-social {
  margin-top: 14px;
  display: flex;
  gap: 12px;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.footer-social a:hover { background: var(--color-copper); text-decoration: none; }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }

/* ---- Utility ---- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
