/* Base element resets and typography */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: var(--body-line);
  color: var(--text);
  background-color: var(--bg);
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--lightBlue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--lightBlue);
  outline-offset: 2px;
}

button {
  font: inherit;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  font-family: var(--font-sans);
}

h2 {
  font-size: var(--h2);
}

p {
  margin: 0 0 1rem;
  line-height: 1.6;
  font-size: var(--body);
  color: var(--muted);
}

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

/* Utility classes */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--section-pad-x);
}

.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: 3rem;
}

.mb-lg {
  margin-bottom: 3rem;
}

/* Mobile-only global overrides */
@media (max-width: 1024px) {
  html,
  body {
    overflow-x: hidden;
  }

  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  img,
  svg,
  video,
  canvas {
    max-width: 100%;
    height: auto;
  }

  .site-shell,
  .site-main,
  .site-main section,
  .page-layout > *,
  .grid > *,
  .cards-grid > *,
  .feature-grid > *,
  .plans-grid > *,
  .pest-grid > *,
  .insights-grid > *,
  .testimonials-grid > *,
  .site-footer__inner > *,
  .site-footer__columns > * {
    min-width: 0;
  }

  .btn,
  button {
    max-width: 100%;
    min-height: 44px;
    height: auto;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .card,
  .feature-card,
  .pest-card,
  .insight-card,
  .plan-card,
  .testimonial-card,
  .contact-panel,
  .quote-card,
  .faq-item,
  .faq-contact-card,
  .site-footer__link,
  .faq-contact-card__link {
    max-width: 100%;
  }

  .container,
  .nav-bar__inner,
  .utility-bar__inner,
  .site-footer__inner,
  .page-hero .container,
  .section .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 767px) {
  .container,
  .nav-bar__inner,
  .utility-bar__inner,
  .site-footer__inner,
  .page-hero .container,
  .section .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1,
  h2,
  h3,
  h4,
  p,
  li,
  a,
  span {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  button,
  .btn,
  .site-nav__link,
  .mobile-menu__link,
  .site-footer__link,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .site-footer__inner,
  .site-footer__columns {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .site-footer__brand,
  .site-footer__col,
  .site-footer__meta {
    width: 100%;
  }

  .site-footer__brand {
    margin-bottom: 8px;
  }

  .site-footer__meta {
    grid-column: auto;
  }
}

