/* ============================================================
   Carlisle Pest Control — styles.css
   ============================================================ */

:root {
  --white: #ffffff;
  --off-white: #f8f9fa;
  --green: #2d6a4f;
  --green-light: #40916c;
  --green-pale: #d8f3dc;
  --charcoal: #1a1a2e;
  --grey-mid: #6c757d;
  --grey-light: #dee2e6;
  --orange: #e76f51;
  --orange-dark: #c9562e;

  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --container: 1180px;
  --container-narrow: 820px;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.2;
  margin: 0 0 16px;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 12px; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 16px; }
.section-sub {
  color: var(--grey-mid);
  font-size: 1.05rem;
  margin-bottom: 40px;
  max-width: 720px;
}

/* ============ LAYOUT ============ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: var(--container-narrow); }
section { padding: 80px 0; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 44px;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-cta {
  background: var(--orange);
  color: var(--white);
}
.btn-cta:hover { background: var(--orange-dark); color: var(--white); }
.btn-lg { padding: 16px 28px; font-size: 1.1rem; min-height: 52px; }
.btn-block { width: 100%; }

/* ============ NAVBAR ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey-light);
  transition: box-shadow 0.2s ease;
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--green);
  font-weight: 400;
}
.nav-brand:hover { text-decoration: none; }
.nav-links {
  display: flex;
  gap: 24px;
}
.nav-links a {
  color: var(--charcoal);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 4px 0;
  position: relative;
}
.nav-links a.active { color: var(--green); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--green);
}
.nav-cta { padding: 10px 18px; font-size: 0.95rem; }

/* ============ HERO ============ */
.hero {
  position: relative;
  background: var(--white);
  padding: 60px 0 80px;
  overflow: hidden;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
}
.hero-stripe {
  position: absolute;
  right: -150px;
  bottom: -150px;
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, var(--green-pale) 0%, transparent 60%);
  transform: rotate(-20deg);
  z-index: 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}
.pill {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--grey-mid);
  margin-bottom: 28px;
  max-width: 600px;
}
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 32px;
}
.trust-badges li {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.hero-secondary {
  color: var(--green);
  font-weight: 500;
}
.hero-illus {
  display: flex;
  justify-content: center;
}
.hero-illus svg {
  width: 100%;
  max-width: 340px;
  height: auto;
}

/* ============ SERVICES ============ */
.services { background: var(--white); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  padding: 28px;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--green);
}
.service-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 { margin-bottom: 6px; }
.service-card p {
  font-size: 0.95rem;
  color: var(--grey-mid);
  margin: 0;
}
.services-banner {
  background: var(--green-pale);
  border-radius: var(--radius);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.services-banner p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--charcoal);
}

/* ============ CALCULATOR ============ */
.calculator-section { background: var(--off-white); }
.calculator-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  background: var(--white);
  border-radius: 12px;
  padding: 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--green-pale);
}
.calc-group { margin-bottom: 24px; }
.calc-group:last-child { margin-bottom: 0; }
.calc-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--charcoal);
}
.calc-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--charcoal);
}
.calc-input:focus { outline: 2px solid var(--green); outline-offset: 1px; }
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-toggle {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--charcoal);
  border: 1.5px solid var(--grey-light);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  transition: all 0.15s ease;
}
.btn-toggle small {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--grey-mid);
  margin-top: 4px;
}
.btn-toggle:hover { border-color: var(--green-light); }
.btn-toggle.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-toggle.active small { color: rgba(255,255,255,0.85); }

.calc-result {
  background: var(--green-pale);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: center;
}
.calc-result-inner { width: 100%; text-align: center; }
.calc-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 8px;
}
.calc-price {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  color: var(--charcoal);
  margin: 0 0 8px;
  line-height: 1.1;
}
.calc-subtext {
  font-size: 0.95rem;
  color: var(--grey-mid);
  margin-bottom: 16px;
}
.calc-note {
  font-size: 0.82rem;
  color: var(--grey-mid);
  margin-bottom: 20px;
  line-height: 1.5;
}
.calc-reassurance {
  margin-top: 32px;
  max-width: 820px;
  color: var(--grey-mid);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ============ AREAS ============ */
.areas { background: var(--off-white); }
.area-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.area-pills li {
  background: var(--white);
  color: var(--green);
  border: 1.5px solid var(--green);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}
.areas-seo {
  max-width: 860px;
  color: var(--grey-mid);
  line-height: 1.7;
  margin-bottom: 36px;
}
.areas-cta-strip {
  background: var(--green);
  color: var(--white);
  padding: 20px 28px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.areas-cta-strip p { margin: 0; font-size: 1.05rem; }

/* ============ WHY LOCAL ============ */
.why-local { background: var(--white); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}
.why-card { text-align: left; }
.why-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.why-icon svg { width: 32px; height: 32px; }
.why-card h3 { margin-bottom: 8px; }
.why-card p { color: var(--grey-mid); font-size: 0.98rem; margin: 0; }

/* ============ HOW IT WORKS ============ */
.how-it-works { background: var(--off-white); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 16.66%;
  right: 16.66%;
  border-top: 2px dashed var(--green);
  z-index: 0;
}
.step {
  text-align: center;
  position: relative;
  z-index: 1;
  background: var(--off-white);
  padding: 0 12px;
}
.step-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
}
.step-number {
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--grey-mid); font-size: 0.98rem; margin: 0; }

/* ============ FAQ ============ */
.faq { background: var(--white); }
.faq-list {
  margin-top: 32px;
  border-top: 1px solid var(--grey-light);
}
.faq-item { border-bottom: 1px solid var(--grey-light); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--charcoal);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-question:hover { color: var(--green); }
.faq-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--green);
  font-weight: 400;
  transition: transform 0.2s ease;
  line-height: 1;
}
.faq-question[aria-expanded="true"] .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  padding: 0 0 20px;
  margin: 0;
  color: var(--grey-mid);
  line-height: 1.7;
}

/* ============ CONTACT ============ */
.contact { background: var(--off-white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  margin-top: 40px;
}
.contact-phone {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--green);
  margin-bottom: 16px;
}
.contact-phone:hover { text-decoration: none; color: var(--orange); }
.contact-hours { font-size: 1.05rem; }
.contact-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}
.contact-trust li {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
}

.contact-form {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-light);
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--charcoal);
}
.form-group textarea { min-height: 90px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  border-color: var(--green);
}

/* ============ FOOTER ============ */
.footer {
  background: var(--charcoal);
  color: var(--white);
  padding: 32px 0 24px;
  font-size: 0.9rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}
.footer-left { text-align: left; }
.footer-center { text-align: center; }
.footer-right { text-align: right; color: rgba(255,255,255,0.75); }
.footer a { color: var(--white); }
.footer a:hover { color: var(--green-pale); }
.footer-seo {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
  line-height: 1.6;
}

/* ============ MOBILE STICKY CTA ============ */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  background: var(--orange);
  color: var(--white);
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  z-index: 200;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  min-height: 56px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.mobile-sticky-cta:hover { text-decoration: none; color: var(--white); background: var(--orange-dark); }
.mobile-sticky-cta.visible { display: flex; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  section { padding: 60px 0; }
  .hero { min-height: auto; padding: 50px 0 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-illus { order: -1; }
  .hero-illus svg { max-width: 260px; }
  .nav-links { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .calculator-card { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps::before { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  section { padding: 50px 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  .nav-cta { padding: 9px 14px; font-size: 0.85rem; }
  .nav-cta span { display: none; }
  .nav-inner { padding-top: 12px; padding-bottom: 12px; }
  .nav-brand { font-size: 1.1rem; }
  .hero-sub { font-size: 1.05rem; }
  .trust-badges { gap: 10px; }
  .trust-badges li { font-size: 0.9rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .hero-actions .btn { width: 100%; }
  .hero-secondary { text-align: center; }
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .services-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .services-banner .btn { width: 100%; }
  .areas-cta-strip { flex-direction: column; align-items: stretch; text-align: center; }
  .areas-cta-strip .btn { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  .footer-left, .footer-center, .footer-right { text-align: center; }
  .calc-price { font-size: 2rem; }
  .contact-phone { font-size: 1.6rem; }
  .btn-group { flex-direction: column; }
  .btn-toggle { flex: 1 1 100%; }
  /* leave room for sticky CTA bar */
  body { padding-bottom: 70px; }
}

@media (min-width: 769px) {
  .mobile-sticky-cta { display: none !important; }
}

@media (max-width: 768px) {
  .mobile-sticky-cta.visible { display: flex; }
}
