/* ==========================================================================
   PestMax Pest Control Solutions — design system
   Palette: max-red #EC1B23 / red-deep #B30A12 / ink #121212 / paper #FFFFFF
            fog #D8D8D8 (soft #F3F4F6) / shield-gold #F6C811 / cream #F6EED3
   Type:    Ultra (comic-poster slab display) + Barlow (body grotesque)
   ========================================================================== */

:root {
  --max-red: #EC1B23;
  --red-deep: #B30A12;
  --ink: #121212;
  --paper: #FFFFFF;
  --fog: #D8D8D8;
  --fog-soft: #F3F4F6;
  --line: #E2E4E8;
  --shield-gold: #F6C811;
  --cream: #F6EED3;
  --muted: #63666D;
  --green: #2E8B44;
  --shadow-lg: 0 24px 60px -18px rgba(18, 18, 18, .38);
  --shadow-md: 0 10px 30px -12px rgba(18, 18, 18, .22);
  --radius: 12px;
  --font-display: "Ultra", "Rockwell", "Georgia", serif;
  --font-body: "Barlow", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* height:auto keeps the width/height attributes as aspect-ratio hints only */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--red-deep); }

h1, h2, h3 { line-height: 1.1; text-wrap: balance; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .01em;
}

h1 { font-size: clamp(38px, 4.9vw, 62px); line-height: 1.04; }
h2 { font-size: clamp(27px, 3.4vw, 42px); }
h3 { font-family: var(--font-body); font-weight: 700; font-size: clamp(18px, 2vw, 21px); }

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

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

:focus-visible {
  outline: 3px solid var(--shield-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.eyebrow {
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--max-red);
  margin-bottom: 14px;
}

.eyebrow--gold { color: var(--shield-gold); }

.opt { font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; }

.fine { font-size: 13.5px; color: var(--muted); }
.fine a { color: var(--red-deep); font-weight: 600; }

.linklike {
  background: none; border: none; padding: 0;
  color: var(--red-deep); font: inherit; font-weight: 600;
  text-decoration: underline; cursor: pointer;
}

/* ----- buttons ----- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-weight: 700; font-size: 15.5px;
  padding: 12px 22px; border-radius: 8px;
  border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn--lg { padding: 15px 28px; font-size: 17px; }
.btn--max { background: var(--max-red); color: var(--paper); box-shadow: 0 3px 0 var(--red-deep); }
.btn--max:hover { background: var(--red-deep); box-shadow: 0 3px 0 #7A060C; }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #33353A; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { border-color: var(--max-red); color: var(--max-red); }
.btn--plain { background: transparent; color: var(--muted); font-weight: 600; }
.btn--plain:hover { color: var(--ink); }

.closer .btn--ghost, .safety a { color: var(--paper); }
.closer .btn--ghost { border-color: rgba(255, 255, 255, .55); }
.closer .btn--ghost:hover { border-color: var(--shield-gold); color: var(--shield-gold); }

/* ==========================================================================
   Header
   ========================================================================== */

.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: clamp(14px, 2.5vw, 34px);
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink);
}

.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; gap: 3px; }

.brand img { width: clamp(150px, 14vw, 190px); height: auto; }

.brand__caps {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav { display: flex; gap: clamp(12px, 1.8vw, 26px); margin-inline: auto; }

.nav a {
  text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 15px;
  padding: 6px 2px;
  border-bottom: 3px solid transparent;
}

.nav a:hover { border-bottom-color: var(--max-red); }

.header__actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }

.header__phone { text-decoration: none; text-align: right; line-height: 1.15; }
.header__phone-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--max-red); }
.header__phone-num { font-weight: 700; font-size: 21px; color: var(--ink); }

.navtoggle { display: none; }

/* ==========================================================================
   Hero — paper, fog diagonal wedge, gold halftone patch
   ========================================================================== */

.hero {
  position: relative;
  background: var(--paper);
  overflow: hidden;
}

/* fog wedge sweeping up from the bottom right — the mascot stands on it */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 0 54%, var(--fog) 54.2%);
  opacity: .55;
}

/* gold halftone dot patch, top right (echoes their POW asset) */
.hero::after {
  content: "";
  position: absolute; top: 0; right: 0;
  width: min(340px, 30vw); height: 230px;
  background-image: radial-gradient(circle, var(--shield-gold) 2.1px, transparent 2.7px);
  background-size: 22px 22px;
  clip-path: polygon(18% 0, 100% 0, 100% 82%);
  opacity: .8;
}

.hero__inner {
  position: relative; z-index: 1;
  max-width: 1220px; margin: 0 auto;
  padding: clamp(44px, 6.5vw, 84px) clamp(16px, 4vw, 48px) clamp(48px, 6.5vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(150px, 220px) minmax(340px, 420px);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.h1-red { color: var(--max-red); }

/* the POW burst behind the word "wrong" */
.pow { position: relative; display: inline-block; z-index: 0; }

.pow__burst {
  position: absolute; left: 50%; top: 50%;
  width: 132%; height: auto;
  /* squashed to a wide comic ellipse so the burst hugs the word's line box
     instead of swallowing the neighboring headline lines */
  transform: translate(-50%, -50%) scaleY(.6);
  z-index: -1;
  pointer-events: none;
}

.pow__word { position: relative; }

.hero__sub {
  margin-top: 20px;
  font-size: clamp(16.5px, 1.5vw, 18.5px);
  color: #3A3C41;
  max-width: 54ch;
}

.hero__cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero__trust {
  list-style: none;
  margin-top: 30px;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
}

.hero__trust li {
  font-size: 14.5px; font-weight: 500; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}

.hero__trust li strong { color: var(--ink); }

.hero__trust li::before { content: "\2605"; color: var(--shield-gold); font-size: 13px; }

.hero__mascot { align-self: end; justify-self: center; }

.hero__mascot img { width: min(100%, 210px); filter: drop-shadow(0 14px 22px rgba(18, 18, 18, .25)); }

/* ----- request card ----- */

.lead-card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px 24px;
  overflow: hidden;
  scroll-margin-top: 110px;
}

.lead-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 8px;
  background: linear-gradient(to right, var(--max-red) 0 78%, var(--shield-gold) 78% 100%);
}

.lead-card__badge {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px; border-radius: 8px;
}

.lead-card__head h2 { font-size: 25px; padding-right: 46px; }

.lead-card__head p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

.lead-card__progress {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin: 16px 0 18px;
}

.lead-card__progress span {
  height: 5px; border-radius: 99px;
  background: var(--line);
  transition: background .25s ease;
}

.lead-card__progress span.is-on { background: var(--max-red); }

.step { display: none; border: none; }
.step.is-active { display: block; }

.step legend {
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 14px;
}

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 7 chips: let the odd one span the full row */
.chips > .chip:last-child:nth-child(odd) { grid-column: 1 / -1; }

.chip {
  font-family: var(--font-body);
  font-size: 14.5px; font-weight: 600;
  padding: 13px 8px;
  background: var(--fog-soft);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  transition: border-color .15s, background .15s, color .15s;
  text-align: center;
}

.chip:hover { border-color: var(--max-red); }

.chip.is-selected {
  background: var(--max-red); color: var(--paper); border-color: var(--max-red);
}

.chips--small { grid-template-columns: repeat(3, 1fr); }
.chips--small .chip { padding: 10px 6px; font-size: 14px; }
.chips--two { grid-template-columns: 1fr 1fr; }

.step textarea, .field input {
  width: 100%;
  font: inherit;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

.step textarea { margin-top: 2px; }

.step textarea:focus, .field input:focus {
  outline: none; border-color: var(--max-red);
  box-shadow: 0 0 0 3px rgba(236, 27, 35, .12);
}

.dropzone {
  display: block;
  margin-top: 12px;
  border: 1.5px dashed #B9BEC7;
  border-radius: 8px;
  padding: 16px 14px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dropzone:hover, .dropzone.is-drag { border-color: var(--max-red); background: #FFF6F6; }
.dropzone svg { width: 26px; height: 26px; margin: 0 auto 6px; color: var(--max-red); }
.dropzone strong { display: block; color: var(--ink); font-size: 15px; }
.dropzone span { font-size: 13px; }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.thumbs .thumb { position: relative; }

.thumbs img {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line);
}

.thumbs button {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: var(--ink); color: var(--paper);
  font-size: 13px; line-height: 1; cursor: pointer;
}

.field { margin-bottom: 12px; }

.field label, .field__label {
  display: block;
  font-size: 12px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

.step__nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px;
}

.btn--submit { min-width: 170px; }

.form-error {
  margin-top: 12px;
  background: #FDEDEA; color: #A8271D;
  border: 1px solid #F3C8C1; border-radius: 8px;
  padding: 9px 12px; font-size: 14px;
}

.step--success { text-align: center; padding: 18px 4px 8px; }
.success__mark { width: 56px; margin: 0 auto 14px; }
.step--success h3 { font-size: 24px; }
.step--success p { margin: 8px 0 14px; }
.step--success .fine { margin-bottom: 16px; }

/* ==========================================================================
   Sting safety strip
   ========================================================================== */

.safety {
  background: var(--red-deep);
  color: var(--paper);
  text-align: center;
  padding: 14px clamp(16px, 4vw, 48px);
  font-size: 15.5px;
}

.safety a { font-weight: 700; }

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: clamp(56px, 8vw, 100px) clamp(16px, 4vw, 48px); }

.section__head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.section__sub { margin-top: 14px; color: var(--muted); font-size: 16.5px; }

.section__head--onink h2 { color: var(--paper); }

/* ----- services ----- */

.services__grid {
  max-width: 1180px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.svc {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-top: 4px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease, border-top-color .18s ease;
}

.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-top-color: var(--max-red); }

.svc svg { width: 36px; height: 36px; color: var(--max-red); }

.svc p { color: var(--muted); font-size: 15px; flex: 1; }

.svc__go {
  align-self: flex-start;
  background: none; border: none; padding: 0;
  font: inherit; font-weight: 700; font-size: 14.5px;
  color: var(--red-deep); cursor: pointer;
}

.svc__go::after { content: " \2192"; }
.svc__go:hover { text-decoration: underline; }

/* ----- 3 P's band ----- */

.threep {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(52px, 7vw, 88px) clamp(16px, 4vw, 48px);
}

.threep .section__head { margin-bottom: 40px; }

.threep__grid {
  max-width: 1000px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 4vw, 48px);
  text-align: center;
}

.pdiamond {
  display: grid; place-items: center;
  width: 74px; height: 74px;
  margin: 0 auto 22px;
  background: var(--max-red);
  border: 3px solid var(--paper);
  box-shadow: 6px 6px 0 var(--red-deep);
  transform: rotate(45deg);
}

.pdiamond span {
  transform: rotate(-45deg);
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--paper);
  line-height: 1;
}

.threep__item h3 {
  color: var(--fog);
  font-weight: 500; font-size: 15px;
  letter-spacing: .14em; text-transform: uppercase;
  line-height: 1.6;
}

.threep__item h3 em { display: block; font-style: normal; font-weight: 700; color: var(--shield-gold); }

/* ----- why ----- */

.why { background: var(--fog-soft); }

.why__inner {
  max-width: 1120px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .8fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.why__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.pillar {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--max-red);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}

.pillar h3 { margin-bottom: 8px; }
.pillar p { color: var(--muted); font-size: 14.5px; }

.why__shield { text-align: center; }

.why__shield img { width: min(100%, 200px); margin: 0 auto 16px; }

.why__quote {
  font-weight: 600; font-size: 16.5px;
  color: var(--ink);
  max-width: 30ch; margin: 0 auto 6px;
}

.badges {
  max-width: 1120px;
  margin: 44px auto 0;
  display: flex; flex-wrap: wrap; gap: 20px 36px;
  align-items: center; justify-content: center;
}

.badges a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  display: block;
}

.badges img { height: 44px; width: auto; }

/* ----- reviews ----- */

.reviews { background: var(--fog); }

.reviews .section__head { margin-bottom: 36px; }

.stars { color: var(--shield-gold); letter-spacing: .06em; text-shadow: 0 1px 0 rgba(18,18,18,.25); }

.reviews__grid {
  max-width: 1000px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.review {
  background: var(--paper);
  border: 1.5px solid #C7C9CD;
  border-radius: var(--radius);
  padding: 24px 24px 20px;
  box-shadow: var(--shadow-md);
}

.review p { font-size: 15.5px; color: #2B2D31; }

.review cite {
  display: block;
  margin-top: 14px;
  font-style: normal; font-weight: 700; font-size: 14px;
  color: var(--red-deep);
}

.review cite::before { content: "\2014\00a0"; color: var(--muted); }

.reviews__links { text-align: center; margin-top: 26px; font-size: 14.5px; color: #4A4C52; }
.reviews__links a { font-weight: 700; }

/* ----- story / areas ----- */

.story__inner {
  max-width: 1120px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.story__copy p { margin-top: 14px; color: #3A3C41; }

.story__area { margin-top: 26px; }

.story__area h3 { margin-bottom: 10px; }

.towns { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.towns li {
  background: var(--fog-soft);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 13.5px; font-weight: 600;
  padding: 5px 13px;
}

.story__art img {
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  box-shadow: 10px 10px 0 var(--max-red);
}

.story__art figcaption {
  margin-top: 16px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* ----- closer ----- */

.closer {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 48px);
}

.closer h2 { max-width: 20ch; margin: 0 auto; }
.closer p { color: var(--fog); margin: 14px auto 10px; max-width: 52ch; }

.closer__pow { display: block; width: min(86vw, 380px); margin: 6px auto 8px; }
.closer__pow img { width: 100%; }
.closer__pow:hover { filter: brightness(1.06); }

.closer__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ----- footer ----- */

.footer {
  background: var(--ink);
  border-top: 1px solid #2E3033;
  color: #C9CBCF;
  padding: 34px clamp(16px, 4vw, 48px) 96px;
}

.footer__inner {
  max-width: 1180px; margin: 0 auto 20px;
  display: flex; flex-wrap: wrap; gap: 28px 56px; align-items: flex-start;
}

.footer__brand { display: flex; flex-direction: column; gap: 8px; }
.footer__brand img { width: 160px; }
.footer__brand span { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }

.footer__col { display: grid; gap: 7px; font-size: 14.5px; }
.footer__col a { color: #C9CBCF; text-decoration: none; }
.footer__col a:hover { color: var(--paper); }

.footer__legal {
  max-width: 1180px; margin: 0 auto;
  font-size: 12.5px; color: #85878C;
  border-top: 1px solid #2E3033;
  padding-top: 16px;
}

/* ==========================================================================
   Mobile action bar
   ========================================================================== */

.mobilebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(18, 18, 18, .96);
  backdrop-filter: blur(8px);
  transform: translateY(110%);
  transition: transform .25s ease;
}

.mobilebar.is-show { transform: translateY(0); }
.mobilebar .btn { flex: 1; }
.mobilebar .btn--ink { border: 1.5px solid #4A4C52; }

/* ==========================================================================
   Chat
   ========================================================================== */

.chat-launch {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: flex; align-items: center; gap: 10px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(246, 200, 17, .5);
  border-radius: 99px;
  padding: 10px 20px 10px 12px;
  font: 700 15px var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform .18s ease, border-color .18s ease;
}

.chat-launch:hover { transform: translateY(-2px); border-color: var(--shield-gold); }

.chat-launch__mark, .chat__mark {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--paper);
  background: var(--max-red);
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  line-height: 1;
}

.chat-launch::after {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--shield-gold);
}

.chat[hidden] { display: none; }

.chat {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: min(400px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 40px));   /* fallback for browsers without dvh */
  height: min(620px, calc(100dvh - 40px));
  background: var(--paper);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Header, starters, input row and footer never shrink; only the log scrolls. */
.chat__head, .chat__starters, .chat__inputrow, .chat__foot { flex-shrink: 0; }

.chat__head {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 14px 16px;
}

.chat__head::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(to right, var(--max-red) 0 78%, var(--shield-gold) 78% 100%);
}

.chat__head strong { font-family: var(--font-display); font-weight: 400; font-size: 17px; display: block; line-height: 1.1; letter-spacing: .02em; }
.chat__head span { font-size: 12px; color: #B9BBBF; }

.chat__close {
  margin-left: auto;
  background: none; border: none; color: #B9BBBF;
  font-size: 26px; line-height: 1; cursor: pointer; padding: 2px 6px;
}

.chat__close:hover { color: var(--paper); }

.chat__log {
  flex: 1;
  min-height: 0; /* lets the log shrink inside the flex column so the input row stays visible */
  overflow-y: auto;
  padding: 16px 14px 8px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--fog-soft);
}

.msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 14.5px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.msg--user {
  align-self: flex-end;
  background: var(--max-red);
  color: var(--paper);
  border-bottom-right-radius: 4px;
}

.msg--bot {
  align-self: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--ink);
}

.msg--system {
  align-self: center;
  background: #EAF5EC;
  border: 1px solid #C2E2C9;
  color: #226635;
  font-size: 13px; font-weight: 600;
  padding: 7px 14px;
  border-radius: 99px;
}

.msg--bot.is-typing::after {
  content: "\2022 \2022 \2022";
  letter-spacing: 3px;
  color: var(--muted);
  animation: pulse 1.1s infinite;
}

@keyframes pulse { 50% { opacity: .35; } }

.chat__starters {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 4px 14px 10px;
  background: var(--fog-soft);
}

.chat__starters button {
  font: 500 13px var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 13px;
  cursor: pointer;
}

.chat__starters button:hover { border-color: var(--max-red); }

.chat__inputrow {
  display: flex; align-items: flex-end; gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--paper);
}

.chat__inputrow textarea {
  flex: 1;
  font: inherit; font-size: 16px;
  border: none; resize: none;
  max-height: 110px;
  padding: 8px 6px;
  background: transparent;
  color: var(--ink);
}

.chat__inputrow textarea:focus { outline: none; }

.chat__inputrow button {
  width: 38px; height: 38px;
  border: none; border-radius: 10px;
  background: var(--max-red); color: var(--paper);
  cursor: pointer;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.chat__inputrow button:hover { background: var(--red-deep); }
.chat__inputrow button svg { width: 18px; height: 18px; }
.chat__inputrow button:disabled { background: #B9BEC7; cursor: default; }

.chat__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.chat__foot a { color: var(--muted); text-decoration: none; }

.chat__handoff {
  background: none; border: none; padding: 0;
  font: 600 13px var(--font-body);
  color: var(--red-deep); cursor: pointer;
}

.chat__handoff:hover { text-decoration: underline; }

/* ==========================================================================
   Reveal animation
   ========================================================================== */

/* Progressive: elements only start hidden once JS has tagged <body class="js"> */
body.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
body.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.js .reveal { transition: opacity .3s ease; transform: none; }
  .svc, .btn, .chat-launch, .mobilebar { transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
  .hero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px); }
  .hero__mascot { display: none; }
}

@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero::before { background: linear-gradient(155deg, transparent 0 62%, var(--fog) 62.2%); }
  .lead-card { max-width: 560px; }
  .services__grid { grid-template-columns: 1fr 1fr; }
  .threep__grid { grid-template-columns: 1fr; gap: 34px; }
  .why__inner { grid-template-columns: 1fr; }
  .why__shield { padding-top: 6px; }
  .reviews__grid { grid-template-columns: 1fr; max-width: 640px; }
  .story__inner { grid-template-columns: 1fr; }
  .story__art { max-width: 560px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 64px 0 auto 0; z-index: 49;
    flex-direction: column; gap: 0;
    background: var(--paper);
    border-bottom: 3px solid var(--ink);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .header__phone { display: none; }
  .header__cta { display: none; }
  .navtoggle {
    display: grid; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
  }
  .navtoggle span { width: 22px; height: 3px; background: var(--ink); border-radius: 2px; }
  .mobilebar { display: flex; }
  .chat-launch { bottom: calc(74px + env(safe-area-inset-bottom)); right: 14px; padding: 9px 16px 9px 10px; }
  .chat { right: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
}

@media (max-width: 560px) {
  .services__grid { grid-template-columns: 1fr; }
  .chips { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { flex: 1; }
  .lead-card { padding: 24px 18px 18px; }
  .brand img { width: 132px; }
  .brand__caps { font-size: 7.5px; }
  .badges { gap: 12px; }
  .badges a { padding: 8px 12px; }
  .badges img { height: 36px; }
  .story__art img { box-shadow: 6px 6px 0 var(--max-red); }
}

/* desktop tel fallback toast */
.teltoast {
  position: fixed; left: 50%; bottom: 26px; z-index: 300;
  transform: translateX(-50%) translateY(8px);
  background: #1B1B22; color: #FFFFFF;
  font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.teltoast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
