/*
 * G Pest Control — stylesheet
 *
 * Styles stay in their original order to preserve the CSS cascade.
 * Responsive adjustments follow the main styles; final overrides remain last.
 * Keep selectors in sync with index.html and script.js.
 */

/* Theme variables */
:root {
  /* Adobe Web Project provides Pelago Regular, Bold and matching italics. */
  --font-family: "pelago", sans-serif;
  --background: #fff;
  --foreground: #123b2c;
  --card: #fff;
  --card-foreground: #123b2c;
  --popover: #fff;
  --popover-foreground: #123b2c;
  --primary: #4cbb17;
  --primary-foreground: #fff;
  --secondary: #f3f5ed;
  --secondary-foreground: #123b2c;
  --muted: #f3f5ed;
  --muted-foreground: #546057;
  --accent: #e9efdf;
  --accent-foreground: #123b2c;
  --destructive: #b3261e;
  --border: #d4dbd0;
  --input: #d4dbd0;
  --ring: #426e2b;
  --radius: .6rem;
}

/* Base styles and typography */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  color: #123b2c;
  background: white;
  /* Pelago is loaded by the Adobe Fonts link in index.html. */
  font: 400 16px/1.65 var(--font-family);
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  touch-action: manipulation;
}

button,
a {
  transition: background .18s, color .18s;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
.brand {
  font-family: var(--font-family);
  font-weight: 700;
}

h1 {
  font-size: clamp(2.6rem, 4.6vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -.02em;
}

h2 {
  font-size: clamp(2.1rem, 3.3vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -.015em;
}

h3 {
  font-size: 1.32rem;
  line-height: 1.3;
}

p {
  color: #526056;
}

/* Shared page containers */
.container,
.navwrap,
.hero-inner {
  width: min(1200px, calc(100% - 80px));
  margin: auto;
}

/* Header, branding and navigation */
header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #edf0e8;
}

.navwrap {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  font-weight: bold;
  line-height: 1.2;
}

/* The supplied logo includes the wordmark; keep its original proportions. */
.brand img {
  display: block;
  object-fit: contain;
  width: 220px;
  max-width: 100%;
  height: auto;
}

/* Header logo: requested display size; footer retains its own sizing. */
header .brand img {
  width: 227px;
  height: 90px;
  max-width: none;
}

.brand small {
  display: block;
  font-family: var(--font-family);
  font-weight: normal;
  font-size: .78rem;
  margin-top: 4px;
  letter-spacing: .08em;
}

.navwrap nav,
footer nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.navwrap nav > a:not(.button):hover,
footer a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* Buttons and calls to action */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #4cbb17;
  color: #fff;
  padding: 13px 24px;
  border: 1px solid #4cbb17;
  border-radius: 9px;
  font-weight: 700;
  font-size: .95rem;
  min-height: 48px;
  line-height: 1.4;
}

.button:hover {
  background: #43a614;
  border-color: #43a614;
}

.button.outline {
  background: #4cbb17;
  color: #fff;
  border-color: #4cbb17;
}

.button.outline:hover {
  background: #43a614;
  border-color: #43a614;
}

/* Hero section */
.hero {
  background: #f6f7f1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 45px;
  align-items: center;
  padding: 50px 0 60px;
}

.eyebrow {
  font-size: .78rem;
  font-weight: bold;
  letter-spacing: .14em;
  color: #426e2b;
  margin-bottom: 20px;
}

/* Regular italic gives the introduction a softer, editorial tone. */
.lead {
  font-family: var(--font-family);
  font-style: italic;
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.5;
  max-width: 490px;
  margin-top: 23px;
}

.actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.heronote {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  margin-top: 24px;
}

.heroimage {
  height: 480px;
  border-radius: 85px 14px 85px 14px;
  overflow: hidden;
}

.heroimage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

/* Trust highlights */
.trust {
  background: #eef2e8;
  padding: 30px 0;
}

.trustgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.trustitem {
  display: flex;
  gap: 18px;
  align-items: center;
}

.trustitem:not(:last-child) {
  border-right: 1px solid #d2dacb;
  padding-right: 25px;
}

.trustitem h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.trustitem p {
  font-size: .91rem;
  line-height: 1.5;
}

.iconcircle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #dfe8d3;
  color: #426e2b;
  display: grid;
  place-items: center;
}

.iconcircle svg {
  width: 28px;
  height: 28px;
}

/* Shared section layout and service cards */
.section {
  padding: 80px 0;
}

.sectionhead {
  display: flex;
  justify-content: space-between;
  gap: 35px;
  align-items: flex-end;
  margin-bottom: 36px;
}

.sectionhead > p {
  max-width: 385px;
}

.servicegrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.servicecard {
  background: #f6f7f1;
  border-radius: 12px;
  overflow: hidden;
  align-self: start;
}

.servicecard > img {
  width: 100%;
  height: 175px;
  object-fit: cover;
}

.cardcopy {
  padding: 24px;
}

.cardcopy > p {
  font-size: .95rem;
  margin-top: 13px;
  min-height: 96px;
}

.service-more {
  font-size: .95rem;
  color: #426e2b;
  padding-bottom: 0;
  margin-top: 4px;
}

.service-detail {
  font-size: .92rem;
  line-height: 1.65;
  padding-top: 16px;
  color: #526056;
}

.textbutton {
  display: inline-block;
  border: 0;
  background: none;
  padding: 0;
  color: #426e2b;
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.service-detail .textbutton {
  display: block;
  margin-top: 15px;
  text-align: left;
}

/* How it works */
.process {
  background: #123b2c;
  color: white;
  padding: 65px 0;
}

.process .eyebrow {
  color: #d4e1c8;
}

.process h2 {
  font-size: clamp(2rem, 3vw, 2.9rem);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 38px;
  margin-top: 40px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.step > span {
  border: 1px solid #aabd9b;
  width: 65px;
  height: 65px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.step h3 {
  font-size: 1.17rem;
  margin: 4px 0 9px;
}

.step p {
  color: #e1e9dc;
  font-size: .95rem;
}

/* About section */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}

.about p+p {
  margin-top: 16px;
}

.about .textbutton {
  margin-top: 20px;
}

/* Quote section and form fields */
.quote-section {
  background: #f6f7f1;
  padding: 70px 0;
}

.quotegrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px;
  align-items: center;
}

.homeimage {
  width: 100%;
  height: 560px;
  object-fit: cover;
  border-radius: 16px;
}

.quoteintro {
  margin: 18px 0 25px;
}

.formrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

form > label {
  display: block;
}

form label,
.field > label {
  font-size: .88rem;
  font-weight: 700;
  display: block;
  color: #123b2c;
}

.formrow {
  margin-bottom: 16px;
}

input,
textarea {
  width: 100%;
  background: white;
  border: 1px solid #cbd4c7;
  border-radius: 7px;
  padding: 11px 13px;
  font-size: 1rem;
  line-height: 1.4;
  margin-top: 6px;
  color: #123b2c;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.pestselect {
  width: 100%;
  height: 47px;
  background: white;
  font-size: 1rem;
  margin-top: 6px;
  border-radius: 7px;
}

/* Form consent, feedback and utility styles */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
}

.consent button {
  margin-top: 4px;
  width: 19px;
  height: 19px;
}

.consent label {
  font-weight: normal;
  font-size: .87rem;
}

.privacy {
  font-size: .78rem;
  line-height: 1.5;
  margin-top: 10px;
}

.submit {
  width: 100%;
  margin-top: 18px;
}

.submit:disabled {
  opacity: .6;
  cursor: wait;
}

.error {
  background: #ffefed;
  color: #942c23;
  padding: 12px;
  border-radius: 6px;
  margin-top: 12px;
}

.success {
  background: #e9efdf;
  border: 1px solid #c6d6b8;
  padding: 28px;
  border-radius: 12px;
}

.success svg {
  color: #426e2b;
  margin-bottom: 15px;
}

.success p {
  margin-top: 12px;
}

.success .button {
  margin-top: 20px;
}

.honeypot {
  position: absolute;
  left: -9999px;
}

/* Footer */
footer {
  background: #123b2c;
  color: white;
  padding: 36px 0 20px;
}

.footergrid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footergrid p {
  font-size: .9rem;
  color: #cfdfbf;
}

.footergrid .brand img {
  border-radius: 0;
}

.footergrid nav {
  font-size: .9rem;
}

.copyright {
  font-size: .78rem;
  color: #bdd0b2;
  border-top: 1px solid #45634e;
  padding-top: 20px;
  margin-top: 30px;
}

/* Mobile menu, skip link and keyboard focus */
.menutoggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
}

.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 50;
  background: #123b2c;
  color: white;
  padding: 12px;
}

.skip:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid #729b44;
  outline-offset: 4px;
}

/* Responsive layout: screens up to 950px */
@media (max-width: 950px) {
  .container,
  .navwrap,
  .hero-inner {
    width: calc(100% - 48px);
  }

  .navwrap nav {
    gap: 20px;
  }

  .brand {
    font-size: 1.3rem;
  }

  .hero-inner {
    gap: 24px;
  }

  .heroimage {
    height: 440px;
  }

  .trustgrid {
    gap: 20px;
  }

  .trustitem {
    gap: 10px;
  }

  .iconcircle {
    width: 44px;
    height: 44px;
  }

  .trustitem:not(:last-child) {
    padding-right: 15px;
  }

  .servicegrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cardcopy > p {
    min-height: 55px;
  }

  .step {
    flex-direction: column;
    gap: 14px;
  }

  .quotegrid {
    gap: 30px;
  }

  .homeimage {
    height: 650px;
  }

  .formrow {
    grid-template-columns: 1fr;
  }

  .footergrid nav {
    gap: 18px;
  }

}

/* Responsive layout: screens up to 680px */
@media (max-width: 680px) {
  html {
    scroll-padding-top: 80px;
  }

  .container,
  .navwrap,
  .hero-inner {
    width: calc(100% - 36px);
  }

  .navwrap {
    min-height: 110px;
    gap: 12px;
  }

  .menutoggle {
    display: block;
  }

  .navwrap nav {
    display: none;
    position: absolute;
    top: 110px;
    left: 0;
    right: 0;
    background: white;
    padding: 22px;
    box-shadow: 0 10px 20px #123b2c15;
    align-items: stretch;
  }

  .navwrap nav.open {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .brand {
    font-size: 1.25rem;
  }

  .brand img {
    width: 180px;
  }

  .brand small {
    font-size: .7rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 35px 0;
  }

  .heroimage {
    height: 340px;
    border-radius: 50px 12px 50px 12px;
  }

  .herocopy .eyebrow {
    font-size: .7rem;
  }

  .desktopbreak {
    display: none;
  }

  h1 {
    font-size: 2.7rem;
  }

  .lead {
    font-size: 1.25rem;
  }

  .actions {
    gap: 12px;
  }

  .actions .button {
    padding: 12px 18px;
    font-size: .9rem;
  }

  .trustgrid {
    grid-template-columns: 1fr;
    gap: 23px;
  }

  .trustitem:not(:last-child) {
    border-right: 0;
    padding-right: 0;
  }

  .trustitem h3 {
    font-size: 1.18rem;
  }

  .trustitem p {
    font-size: .94rem;
  }

  .iconcircle {
    width: 52px;
    height: 52px;
  }

  .trustitem {
    gap: 18px;
  }

  .section {
    padding: 50px 0;
  }

  .sectionhead {
    display: block;
    margin-bottom: 27px;
  }

  .sectionhead > p {
    margin-top: 22px;
  }

  .servicegrid {
    gap: 15px;
  }

  .servicecard > img {
    height: 125px;
  }

  .cardcopy {
    padding: 16px;
  }

  .cardcopy h3 {
    font-size: 1.2rem;
  }

  .cardcopy > p {
    font-size: .88rem;
    min-height: 107px;
  }

  .service-more {
    font-size: .88rem;
  }

  .process {
    padding: 45px 0;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .step {
    flex-direction: row;
    gap: 18px;
  }

  .step > span {
    width: 55px;
    height: 55px;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 23px;
  }

  .quote-section {
    padding: 45px 0;
  }

  .quotegrid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .homeimage {
    height: 260px;
  }

  .formrow {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .footergrid {
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
  }

  .footergrid nav {
    flex-wrap: wrap;
  }

  .footergrid p br {
    display: none;
  }

  .footergrid p strong {
    margin-left: 5px;
  }

}

/* Responsive layout: screens up to 380px */
@media (max-width: 380px) {
  .servicegrid,
  .formrow {
    grid-template-columns: 1fr;
  }

  .cardcopy > p {
    min-height: 0;
  }

  .servicecard > img {
    height: 175px;
  }

  .actions {
    flex-direction: column;
  }

  .actions a {
    width: 100%;
  }

}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none!important;
    transition: none!important;
  }

}

/* Additional component styles (kept here to preserve cascade order) */
summary {
  cursor: pointer;
  color: #426e2b;
  font-weight: 700;
  font-size: .95rem;
  margin-top: 16px;
  padding: 8px 0;
}

select {
  width: 100%;
  background: white;
  border: 1px solid #cbd4c7;
  border-radius: 7px;
  padding: 11px 13px;
  font: inherit;
  margin-top: 6px;
  color: #123b2c;
  height: 47px;
}

.iconcircle {
  font-size: 1.7rem;
  font-weight: bold;
}

.step > span {
  font-size: 1.5rem;
  font-family: var(--font-family);
  font-weight: 700;
}

#form-status {
  margin-top: 15px;
  font-size: .9rem;
}

button.menutoggle {
  font-size: 1.7rem;
  color: #123b2c;
}

/* Keep filled button labels white in every interaction state. */
.button,
.button:link,
.button:visited,
.button:hover,
.button:focus,
.button:active {
  color: #fff !important;
}

/* Apply the same family to native controls; typed text stays regular weight. */
button,
input,
select,
textarea {
  font-family: var(--font-family);
}

input,
select,
textarea {
  font-weight: 400;
  font-style: normal;
}

/* Navigation and field labels use the project's actual bold face. */
nav,
label {
  font-weight: 700;
}

/* Visit and quote request form */
#quote .quotegrid { align-items: start; }
#quote .homeimage { position: sticky; top: 110px; }
#quote-form fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
#quote-form legend { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; padding: 0; }
#quote-form fieldset > label { display: block; margin-bottom: 16px; }
#quote-form .formrow { align-items: start; }
#quote-form .form-consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
#quote-form .form-consent input { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0 0; }
#quote-form .form-help { font-size: .85rem; line-height: 1.5; margin: 8px 0 16px; }
#quote-form .form-trap { display: none; }
#quote-form :is(input, select, textarea):focus-visible { outline: 3px solid #377f62; outline-offset: 2px; }
#quote-form button:disabled { opacity: .7; cursor: wait; }
@media (max-width: 800px) { #quote .homeimage { position: static; } }

#form-status:not(:empty) { padding: 14px; border-radius: 7px; }
#form-status[data-state="pending"] { background: #edf1f5; color: #243341; }
#form-status[data-state="success"] { background: #e6f4ea; color: #174b2d; }
#form-status[data-state="error"] { background: #fff0ec; color: #842c19; }

/* Keep form columns shrinkable and readable on narrow screens. */
#quote .quotegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#quote .quotegrid > *, #quote-form, #quote-form .formrow > * { min-width: 0; }
#quote-form .formrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#quote-form :is(input:not([type="checkbox"]), select, textarea) { min-width: 0; max-width: 100%; }
#quote-form label, #quote-form legend, #form-status { overflow-wrap: anywhere; }
@media (max-width: 950px) {
  #quote-form .formrow { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 680px) {
  #quote .quotegrid { grid-template-columns: minmax(0, 1fr); }
  #quote-form label, #quote-form :is(input, select, textarea, button) {
    font-size: 1.125rem;
    line-height: 1.5;
  }
  #quote-form legend { font-size: 1.25rem; line-height: 1.4; }
  #quote .quoteintro { font-size: 1.125rem; line-height: 1.6; }
  #quote-form :is(.privacy, .form-help), #form-status { font-size: 1rem; line-height: 1.6; }
  #quote-form :is(input:not([type="checkbox"]), select) { min-height: 54px; height: auto; }
  #quote-form select { padding-right: 30px; }
  #quote-form textarea { min-height: 150px; }
  #quote-form fieldset { margin-bottom: 28px; }
  #quote-form .form-consent { gap: 12px; }
  #quote-form .form-consent input { width: 24px; height: 24px; flex-basis: 24px; margin-top: 2px; }
  #quote-form .submit { white-space: normal; padding: 15px; }
}

/* Larger type across the site on phones. */
@media (max-width: 680px) {
  body { font-size: 18px; line-height: 1.65; }
  h1 { font-size: clamp(2.9rem, 11vw, 3.3rem); }
  h2 { font-size: 2.3rem; }
  h3 { font-size: 1.45rem; }
  .lead { font-size: 1.4rem; }
  .eyebrow, .herocopy .eyebrow { font-size: .875rem; }
  .heronote { font-size: 1rem; }
  .button, .actions .button { font-size: 1.0625rem; }
  .trustitem h3 { font-size: 1.3rem; }
  .trustitem p, .cardcopy > p, .service-more, .service-detail,
  .step p, summary { font-size: 1.0625rem; }
  .cardcopy h3 { font-size: 1.35rem; }
  .cardcopy > p { min-height: 0; }
  .step h3 { font-size: 1.3rem; }
  .process h2 { font-size: 2.2rem; }
  .footergrid p, .footergrid nav { font-size: 1.0625rem; }
  .copyright { font-size: .9375rem; }
  .brand small { font-size: .875rem; }
  .navwrap nav { font-size: 1.125rem; }
  .sectionhead > *, .herocopy, .trustitem > *, .step > *, .cardcopy { min-width: 0; }
  .cardcopy, .step, .footergrid, .herocopy { overflow-wrap: anywhere; }
  .actions .button { text-align: center; white-space: normal; }
  .servicegrid { grid-template-columns: minmax(0, 1fr); }
  .servicecard > img { height: 190px; }
}

/* Compact mobile introduction with the complete technician photo. */
@media (max-width: 680px) {
  .hero-inner { padding: 16px 0 20px; gap: 16px; }
  .herocopy h1 { font-size: clamp(1.75rem, 7vw, 2.1rem); line-height: 1.12; }
  .herocopy .eyebrow { font-size: .8125rem; margin-bottom: 8px; letter-spacing: .1em; }
  .herocopy .lead { font-size: 1.125rem; line-height: 1.4; margin-top: 10px; }
  .herocopy .actions { margin-top: 12px; gap: 8px; }
  .herocopy .actions .button { padding: 10px 12px; min-height: 44px; font-size: 1rem; }
  .herocopy .heronote { margin-top: 10px; font-size: .9375rem; line-height: 1.4; }
  .heroimage { height: auto; border-radius: 20px; }
  .heroimage img { display: block; width: 100%; height: auto; object-fit: contain; }
}

/* Prevent content from forcing the page wider than the viewport. */
html { overflow-x: clip; }
img, video, iframe { max-width: 100%; }
.hero-inner > *, .trustgrid > *, .servicegrid > *, .steps > *,
.about > *, .sectionhead > *, .navwrap > *, .footergrid > * { min-width: 0; }
.hero-inner, .trustgrid, .servicegrid, .steps, .about { overflow-wrap: anywhere; }
header .brand { flex: 0 1 227px; }
header .brand img { max-width: 100%; height: auto; }
.menutoggle { flex-shrink: 0; }
.footergrid nav { flex-wrap: wrap; }
/* Collapse navigation before its links outgrow the header. */
@media (min-width: 681px) and (max-width: 950px) {
  .menutoggle { display: block; }
  .navwrap nav {
    display: none;
    position: absolute;
    top: 110px;
    left: 0;
    right: 0;
    background: white;
    padding: 22px;
    box-shadow: 0 10px 20px #123b2c15;
    align-items: stretch;
  }
  .navwrap nav.open { display: flex; flex-direction: column; gap: 20px; }
}
@media (max-width: 950px) {
  .footergrid { flex-wrap: wrap; }
  .hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .about { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .hero-inner, .about { grid-template-columns: minmax(0, 1fr); }
  .sectionhead, .footergrid { overflow-wrap: anywhere; }
}
