/* ============================================================
   Rain City Carpet Cleaning — Styles v2
   Mobile-first, Inter font, blues + whites (PNW Rain City theme)
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --blue-dark:    #0a3d62;
  --blue-mid:     #1a6fa8;
  --blue-light:   #4fadd4;
  --blue-pale:    #d6eaf8;
  --blue-accent:  #2196f3;
  --bg-light:     #f0f6ff;
  --white:        #ffffff;
  --gray-text:    #4a5568;
  --gray-border:  #cbd5e0;
  --text-dark:    #1a202c;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 4px 20px rgba(10,61,98,0.10);
  --shadow-lg:    0 8px 40px rgba(10,61,98,0.15);
  --shadow-xl:    0 20px 60px rgba(10,61,98,0.20);
  --transition:   0.22s ease;
  --max-width:    1100px;
  --section-pad:  5.5rem 1.25rem;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
  max-width: 100%;
}

h1, h2, h3, h4 { line-height: 1.2; color: var(--blue-dark); }
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); font-weight: 900; letter-spacing: -1px; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -0.5px; }
h3 { font-size: 1.1rem; font-weight: 700; }

a { color: var(--blue-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }
a:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 3px; border-radius: 3px; }

img, svg { display: block; max-width: 100%; }
p { color: var(--gray-text); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

.section-header { margin-bottom: 2.75rem; }
.section-header h2 { margin-bottom: 0.6rem; }
.section-desc {
  color: var(--gray-text);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ---------- Scroll Reveal Animations ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-animate].visible {
  opacity: 1;
  transform: none;
}
[data-animate="hero-text"] {
  opacity: 0;
  transform: translateY(20px);
}
[data-animate="hero-text"].visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }

.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }

.btn-primary {
  background: var(--blue-mid);
  color: var(--white);
  border-color: var(--blue-mid);
  box-shadow: 0 4px 14px rgba(26,111,168,0.35);
}
.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(10,61,98,0.4);
}

.btn-outline {
  background: rgba(10,61,98,0.45);
  color: var(--white);
  border-color: var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.btn-outline:hover { background: var(--white); color: var(--blue-mid); border-color: var(--white); }

.btn-nav {
  background: var(--blue-mid);
  color: var(--white) !important;
  padding: 0.5rem 1.2rem;
  font-size: 0.875rem;
  box-shadow: none;
}
.btn-nav:hover { background: #1259a0; color: var(--white); transform: none; }

.btn-full { width: 100%; justify-content: center; }

/* ---------- Floating CTA ---------- */
.floating-cta {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s ease;
  pointer-events: none;
}
.floating-cta.visible {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.floating-cta[aria-hidden="false"] { pointer-events: auto; }
.floating-btn {
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(26,111,168,0.45);
  padding: 0.85rem 1.6rem;
}

@media (max-width: 500px) {
  .floating-cta { bottom: 1.25rem; right: 1.25rem; }
  .floating-btn { padding: 0.75rem 1.25rem; font-size: 0.9rem; }
}

/* ---------- Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(10,61,98,0.10);
  border-bottom: 2px solid var(--blue-pale);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  line-height: 0;
}
.nav-logo-img {
  height: 140px;
  width: auto;
  display: block;
  transition: opacity var(--transition), transform var(--transition);
}
.nav-logo:hover .nav-logo-img { opacity: 0.85; transform: scale(1.02); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}
.nav-links a {
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--blue-mid); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 740px) {
  .nav-logo-img { height: 110px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--blue-pale);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(10,61,98,0.12);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.8rem 1.5rem; font-size: 1rem; color: var(--blue-dark); }
  .btn-nav { margin: 0.5rem 1.5rem; width: calc(100% - 3rem); text-align: center; display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Main ---------- */
main { overflow-x: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 8rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,61,98,0.42) 0%,
    rgba(26,111,168,0.30) 50%,
    rgba(10,61,98,0.38) 100%
  );
}
.rain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}
.hero-text { max-width: 760px; margin: 0 auto; }


.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--blue-pale);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.hero h1 { color: var(--white); margin-bottom: 0.5rem; text-shadow: 0 2px 20px rgba(0,0,0,0.3); }

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  color: var(--blue-pale);
  margin: 0.5rem 0 1rem;
}
.hero-desc {
  color: rgba(255,255,255,0.82);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 2.25rem;
  line-height: 1.75;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
}

.hero-badges {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.badge {
  background: rgba(10,61,98,0.55);
  border: 1px solid rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.95);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 1;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 70px; }

/* ---------- Stats ---------- */
.stats {
  background: var(--bg-light);
  padding: 3.5rem 1.5rem;
  border-bottom: 1px solid var(--gray-border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }

.stat-item { padding: 0.5rem; }
.stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  color: var(--blue-mid);
  line-height: 1;
  margin-bottom: 0.4rem;
  letter-spacing: -1px;
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Services ---------- */
.services {
  padding: var(--section-pad);
  background: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(203,213,224,0.5);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }

.service-card-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: var(--blue-dark);
}
.service-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,61,98,0.08), rgba(10,61,98,0.18));
}

.service-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-icon {
  width: 42px;
  height: 42px;
  color: var(--blue-mid);
  margin-bottom: 1rem;
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 { margin-bottom: 0.5rem; }
.service-card p { flex: 1; margin-bottom: 1.25rem; font-size: 0.93rem; }

.card-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-mid);
  letter-spacing: 0.2px;
}
.card-link:hover { color: var(--blue-dark); }

/* ---------- Before / After ---------- */
.before-after-section {
  padding: var(--section-pad);
  background: var(--blue-dark);
}
.before-after-section .section-header h2 { color: var(--white); }
.before-after-section .section-desc { color: rgba(214,234,248,0.8); }

.ba-wrapper { max-width: 860px; }

.ba-slider {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4/3;
  background: var(--blue-dark);
}

.ba-after {
  position: absolute;
  inset: 0;
}

.ba-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* overflow+width reveals the before portion — more reliable than clip-path on Android */
.ba-before {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
}

.ba-before img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--ba-img-width, 100%);
  max-width: none;
  object-fit: cover;
  object-position: left center;
  display: block;
  pointer-events: none;
}

.ba-label {
  position: absolute;
  bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  pointer-events: none;
}
.ba-label-after  { right: 1rem; background: rgba(26,111,168,0.85); color: #fff; }
.ba-label-before { left: 1rem; background: rgba(0,0,0,0.55); color: #fff; }

.ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: col-resize;
  z-index: 10;
}
.ba-handle-line {
  flex: 1;
  width: 3px;
  background: rgba(255,255,255,0.9);
}
.ba-handle-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  color: var(--blue-mid);
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ba-handle:hover .ba-handle-btn,
.ba-handle:focus .ba-handle-btn {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.ba-handle:focus { outline: none; }
.ba-handle:focus .ba-handle-btn { outline: 3px solid var(--blue-light); }

.ba-hint {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: rgba(214,234,248,0.6);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ---------- Why Us ---------- */
.why-us {
  padding: var(--section-pad);
  background: var(--bg-light);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.why-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(203,213,224,0.4);
  transition: transform var(--transition), box-shadow var(--transition);
}
.why-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.why-icon-wrap {
  width: 58px;
  height: 58px;
  background: var(--bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--blue-mid);
  border: 2px solid var(--blue-pale);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.why-item:hover .why-icon-wrap {
  background: var(--blue-mid);
  border-color: var(--blue-mid);
  color: var(--white);
}

/* Keyframes — one per icon concept */
@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.25); }
}
@keyframes icon-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes icon-bounce {
  0%, 100% { transform: translateY(0); }
  35%      { transform: translateY(-7px); }
  65%      { transform: translateY(-3px); }
}
@keyframes icon-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* Shield → pulse, Clock → spin, Dollar → bounce, Check → pop */
.why-item:nth-child(1):hover .why-icon-wrap svg { animation: icon-pulse  0.5s ease; }
.why-item:nth-child(2):hover .why-icon-wrap svg { animation: icon-spin   0.55s ease; }
.why-item:nth-child(3):hover .why-icon-wrap svg { animation: icon-bounce 0.55s ease; }
.why-item:nth-child(4):hover .why-icon-wrap svg { animation: icon-pop    0.45s ease; }

.why-item h3 { margin-bottom: 0.4rem; font-size: 0.95rem; }
.why-item p { font-size: 0.88rem; }

/* ---------- Testimonials ---------- */
.testimonials {
  padding: var(--section-pad);
  background: var(--white);
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/baby.png') center/cover no-repeat;
  opacity: 0.35;
  z-index: 0;
}
.testimonials .container {
  position: relative;
  z-index: 1;
}

.carousel-wrap { max-width: 740px; }

.carousel {
  position: relative;
  overflow: hidden;
  min-height: 260px;
}

.testimonial-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.testimonial-slide.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  position: relative;
}
.testimonial-slide.leaving {
  opacity: 0;
  transform: translateX(-40px);
}

.testimonial-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  border: 1px solid var(--blue-pale);
  box-shadow: var(--shadow);
}

.stars {
  color: #f6c90e;
  font-size: 1.15rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.testimonial-card blockquote {
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 1.5rem;
  quotes: "\201C" "\201D";
}
.testimonial-card blockquote::before { content: open-quote; }
.testimonial-card blockquote::after  { content: close-quote; }

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-mid);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.testimonial-author strong { display: block; font-size: 0.95rem; color: var(--blue-dark); }
.testimonial-author span  { font-size: 0.82rem; color: var(--gray-text); }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gray-border);
  background: var(--white);
  color: var(--blue-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.carousel-btn:hover {
  border-color: var(--blue-mid);
  background: var(--bg-light);
  transform: scale(1.05);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}
.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gray-border);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), width 0.3s ease;
  padding: 0;
}
.carousel-dot.active {
  background: var(--blue-mid);
  width: 24px;
  border-radius: 100px;
  transform: none;
}

/* ---------- FAQ ---------- */
.faq {
  padding: var(--section-pad);
  background: var(--bg-light);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 800px;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(203,213,224,0.5);
  transition: box-shadow var(--transition);
}
.faq-item[open] { box-shadow: var(--shadow-lg); }

.faq-item summary {
  cursor: pointer;
  padding: 1.2rem 1.5rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--blue-mid);
  flex-shrink: 0;
  line-height: 1;
  transition: transform 0.3s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary h3 { margin: 0; font-size: 0.97rem; color: var(--blue-dark); }
.faq-item summary:hover { background: var(--bg-light); }

.faq-body {
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid var(--blue-pale);
}
.faq-body p { margin-top: 1rem; font-size: 0.93rem; line-height: 1.75; }
.faq-body a { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact {
  padding: var(--section-pad);
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.contact-info h2 { margin-bottom: 0.75rem; }
.contact-info > p { margin-bottom: 2rem; }

.contact-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2rem;
}
.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.93rem;
  color: var(--gray-text);
}
.contact-icon {
  color: var(--blue-mid);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.contact-details a { color: var(--blue-mid); text-decoration: underline; }

.contact-cta-box {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--blue-pale);
}
.contact-cta-box p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--blue-dark);
}

/* Form */
.contact-form-wrap {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--blue-pale);
}

.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

label { font-size: 0.83rem; font-weight: 700; color: var(--blue-dark); letter-spacing: 0.3px; text-transform: uppercase; }
label span { color: #e53e3e; margin-left: 2px; }

input, textarea, select {
  width: 100%;
  padding: 0.72rem 1rem;
  border: 2px solid var(--gray-border);
  border-radius: var(--radius);
  font-size: 0.97rem;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(26,111,168,0.15);
}
input.invalid, textarea.invalid { border-color: #e53e3e; }
textarea { resize: vertical; min-height: 100px; }

.field-error { font-size: 0.78rem; color: #e53e3e; min-height: 1em; font-weight: 600; }

/* ---- Form tab bar ---- */
.form-tab-bar {
  display: flex;
  border: 2px solid var(--blue-mid);
  border-radius: var(--radius);
  overflow: hidden;
}
.tab-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: var(--white);
  color: var(--blue-mid);
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.3px;
}
.tab-btn + .tab-btn { border-left: 2px solid var(--blue-mid); }
.tab-btn.active { background: var(--blue-mid); color: var(--white); }
.tab-btn:hover:not(.active) { background: var(--blue-pale); }

/* ---- Residential grid ---- */
.spaces-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--blue-dark);
  margin-bottom: 0.75rem;
}
.res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 400px) { .res-grid { grid-template-columns: 1fr; } }

/* ---- Commercial fields ---- */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-dark);
}
.checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--blue-mid);
  flex-shrink: 0;
}
.checkbox-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gray-text);
}

/* ---- Calculate button ---- */
.btn-calc {
  width: 100%;
  justify-content: center;
  background: var(--white);
  color: var(--blue-mid);
  border: 2px solid var(--blue-mid);
  font-size: 0.93rem;
  font-weight: 700;
  padding: 0.72rem 1rem;
  gap: 0.5rem;
  transition: background var(--transition), color var(--transition);
}
.btn-calc:hover:not(:disabled) {
  background: var(--blue-pale);
}
.btn-calc:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ---- Estimate banner ---- */
.quote-estimate {
  background: #e8f4fd;
  border-left: 4px solid var(--blue-mid);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.quote-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
}
.quote-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--blue-dark);
  flex-shrink: 0;
}
.quote-range {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue-dark);
}
.quote-minimum {
  font-size: 0.78rem;
  color: var(--blue-mid);
  font-weight: 600;
  margin: 0;
}
.quote-note {
  font-size: 0.73rem;
  color: var(--gray-text);
  margin: 0;
}

/* ---- Exact quote prompt ---- */
.exact-quote-prompt {
  text-align: center;
  padding: 0.25rem 0 0.5rem;
}
.exact-quote-prompt p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue-dark);
  margin-bottom: 0.65rem;
}

/* ---- Contact fields (collapsible) ---- */
.contact-fields {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.5s ease, opacity 0.35s ease;
}
.contact-fields.fading {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.contact-fields-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-fields.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.form-note { font-size: 0.78rem; color: var(--gray-text); text-align: center; }

.btn-success {
  background: #276749 !important;
  border-color: #276749 !important;
  color: #fff !important;
  pointer-events: none;
  gap: 0.6rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  max-width: calc(100vw - 2rem);
  transform: translateX(-50%) translateY(20px);
  background: #22543d;
  color: #fff;
  padding: 0.85rem 1.4rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.form-success {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #c6f6d5;
  color: #22543d;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.93rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-light);
  border-top: 2px solid var(--blue-pale);
  padding: 2.75rem 1.5rem;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.footer-logo-img {
  height: 160px;
  width: auto;
  margin-bottom: 0.25rem;
}
.footer-location { font-size: 0.88rem; color: var(--gray-text); }
.footer-nav { display: flex; gap: 1.5rem; margin: 0.6rem 0; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: var(--blue-mid); font-size: 0.88rem; }
.footer-nav a:hover { color: var(--blue-dark); }
.footer-copy { font-size: 0.78rem; color: var(--gray-text); opacity: 0.7; }

/* ---------- Mobile — phones in portrait (≤520px) ---------- */
@media (max-width: 520px) {
  /* Section padding */
  :root { --section-pad: 3.5rem 1.25rem; }

  /* Hero */
  .hero-content { padding: 3rem 0 2rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; text-align: center; justify-content: center; }

  /* Services — force single column */
  .services-grid { grid-template-columns: 1fr; }

  /* Contact section */
  .contact { padding: 3rem 1rem; }
  .contact-form-wrap { padding: 1.25rem 1rem; }
  .contact-form-wrap input,
  .contact-form-wrap textarea,
  .contact-form-wrap select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .contact-form { gap: 1rem; }
}

/* ---------- Mobile — small phones 360–375px (extends existing ≤400px rules) ---------- */
@media (max-width: 400px) {
  /* Stats */
  .stat-number { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .stats-grid { gap: 1rem; }

  /* Testimonial card */
  .testimonial-card { padding: 1.25rem; }
  blockquote { font-size: 0.93rem; }

  /* Footer */
  .footer-nav { gap: 1rem; }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  [data-animate] { opacity: 1; transform: none; }
}
