/* Mobile typography, spacing, and layout. Loaded last. */

:root {
  --ink: #14181f;
  --ink-soft: #3a414b;
  --muted: #5b6570;
  --paper: #f3f0ea;
  --paper-deep: #e6e1d8;
  --card: #ffffff;
  --line: #d7d2c8;
  --accent: #1b2a4a;
  --accent-dark: #121c33;
  --accent-soft: #e8edf5;
  --cta: #9a3b12;
  --cta-dark: #7a2d0d;
  --hero-1: #121c33;
  --hero-2: #1b2a4a;
  --shadow: 0 8px 24px rgba(18, 28, 51, 0.08);
  --radius: 16px;
  --pad: 20px;
  --header-h: 64px;
  --font-sans: "Avenir Next", Avenir, "Helvetica Neue", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, "Times New Roman", serif;
}

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

body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

.wrap {
  padding-left: var(--pad);
  padding-right: var(--pad);
}

header.site-header {
  background: rgba(243, 240, 234, 0.96);
}

.header-inner {
  padding: 10px var(--pad);
  gap: 12px;
  min-width: 0;
}

.wordmark { min-width: 0; }
.wordmark .name {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.header-referral {
  padding: 0 var(--pad) 10px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-soft);
}

.btn {
  min-height: 48px;
  padding: 12px 18px;
  font-size: 16px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  font-size: 16px !important;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  width: 100%;
  max-width: 100%;
}

.form-card {
  padding: 22px var(--pad);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.form-card h2 { font-size: 22px; margin: 0 0 16px; }

label {
  font-size: 14px;
  margin: 0 0 6px;
}

.field { margin: 0 0 14px; }

.consent {
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.45;
  margin: 12px 0 16px;
}

.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin: 1px 0 0;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: #fff;
  flex: 0 0 24px;
  cursor: pointer;
  position: relative;
}

.consent input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 7px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.consent input[type="checkbox"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.how-section { padding: 36px 0 28px; }
.how-section h2 { margin-bottom: 20px; font-size: clamp(24px, 5vw, 32px); }

.how-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.how-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.how-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-sans);
}

.how-card p {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section { padding: 32px 0; }
.section-tight { padding-top: 8px; }

.footer-disclosure { font-size: 14px; line-height: 1.5; }

.hero-premium {
  background: linear-gradient(160deg, var(--hero-1) 0%, var(--hero-2) 100%);
}
.hero-premium .hero-shade {
  background: linear-gradient(165deg, rgba(18, 28, 51, 0.82) 0%, rgba(18, 28, 51, 0.88) 100%);
}
.emergency-band {
  background: #ede8e0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.emergency-band .emergency-line {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.hero-premium .section-kicker,
.kicker-light {
  letter-spacing: 0.08em;
  font-size: 12px;
  white-space: nowrap;
  color: rgba(247, 243, 236, 0.82);
}

/* Mobile-first stack and type */
@media (max-width: 768px) {
  body { font-size: 16px; }

  .hero-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .hero-premium { padding: 28px 0 32px; }
  .hero-premium .hero-copy { min-width: 0; }
  .hero-premium h1,
  .hero h1 {
    font-size: clamp(34px, 9.2vw, 40px) !important;
    line-height: 1.15 !important;
    max-width: none !important;
    margin: 0 0 12px;
    letter-spacing: -0.03em;
  }
  .hero-premium .lede,
  .hero .lede {
    font-size: 16px;
    line-height: 1.45;
    margin: 0;
    max-width: none;
  }

  /* Closed header hides the header CTA so only the sticky bar shows. */
  .btn-hero-cta { display: none !important; }
  .btn-header-call { display: none !important; }
  .mobile-cta { display: block; transition: transform 0.2s ease; }
  .mobile-cta.is-form-visible { transform: translateY(120%); pointer-events: none; }
  /* Open menu: show Get a plumber inside the menu, hide the sticky so they do not stack. */
  header.site-header.is-open .btn-header-call {
    display: inline-flex !important;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    border-bottom: 0 !important;
  }
  body:has(header.site-header.is-open) .mobile-cta {
    transform: translateY(120%);
    pointer-events: none;
  }
  body.has-mobile-cta { padding-bottom: 0; }
  footer.site-footer { padding-bottom: 96px; }
  .site-footer .recording-note { color: rgba(255, 255, 255, 0.8); }
  html { scroll-padding-bottom: 88px; }
  #request-form { scroll-margin-top: 12px; scroll-margin-bottom: 24px; }

  nav.primary { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; min-height: 40px; }
  header.site-header.is-open nav.primary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 16px;
    gap: 0;
  }
  header.site-header.is-open nav.primary a {
    padding: 12px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }

  .form-card { width: 100%; max-width: none; margin-bottom: 8px; }
  .hero-premium { padding-bottom: 36px; }
  .cards-3, .cards-2, .footer-grid, .two-col, .field-row, .trust-grid, .cards-4 {
    grid-template-columns: 1fr !important;
  }

  .wordmark .name { font-size: 17px; }
  h2 { font-size: clamp(22px, 6vw, 30px); }
  .page-hero h1 { font-size: clamp(34px, 9.2vw, 40px) !important; max-width: none; }
  .page-hero .section-kicker { letter-spacing: 0.06em; white-space: nowrap; }

  .city-list { display: flex; flex-wrap: wrap; gap: 8px; }
  a.city-pill { font-size: 14px; }

}

@media (min-width: 769px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
  }
  .hero-premium h1 {
    font-size: clamp(36px, 4.5vw, 52px);
    line-height: 1.12;
  }
  .hero-premium .lede { font-size: 18px; max-width: 34ch; }
  .how-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .how-card {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 22px 22px 24px;
  }
  .mobile-cta { display: none !important; }
  body.has-mobile-cta { padding-bottom: 0; }
  .nav-toggle { display: none !important; }
  nav.primary { display: flex; }
}
