/* Apex Premier Home Solutions — "weak baseline" template styles.
   Defects are intentional and mirror the research brief. Do not "fix" here:
   the Watcher rebuild replaces this file. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Open+Sans:wght@400;600&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-page);
}
h1, h2, h3 { font-family: var(--font-heading); color: var(--text-heading); margin: 0 0 .5em; }
h1 { font-size: 38px; letter-spacing: -0.01em; color: var(--text-inverse); font-weight: 700; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--color-primary); }
img { max-width: 100%; display: block; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
.section-alt { background: var(--bg-section-alt); }
.section-title { text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; max-width: 640px; margin: 0 auto 40px; }

/* ---------- Top utility bar (plain-text phone, not a tel: link) ---------- */
.utility-bar { background: var(--bg-section-alt); border-bottom: 1px solid var(--border-light); font-size: 13px; }
.utility-bar .container { display: flex; justify-content: space-between; padding-top: 6px; padding-bottom: 6px; }
.utility-bar span { color: var(--text-body); }

/* ---------- Header: NOT sticky ---------- */
.site-header { background: var(--bg-page); border-bottom: 3px solid var(--color-primary); position: static; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 40px; height: 40px; }
.logo-text { font-family: var(--font-heading); font-weight: 700; font-size: 17px; color: var(--color-primary); line-height: 1.1; }
.logo-text small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--text-muted-defect); letter-spacing: .04em; }
.main-nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.main-nav a { font-size: 14px; color: var(--color-primary); text-decoration: none; font-weight: 400; }
.main-nav a.active { font-weight: 600; border-bottom: 2px solid var(--color-secondary); }
.header-phone { font-size: 14px; color: var(--text-body); user-select: text; white-space: nowrap; }
.header-phone b { font-weight: 600; }
.hamburger { display: none; width: 36px; height: 36px; border: 1px solid var(--border-light); background: transparent; border-radius: var(--radius-template); color: var(--text-muted-defect); padding: 0; cursor: pointer; }
.hamburger svg { width: 18px; height: 18px; margin: auto; display: block; }

/* ---------- Hero carousel ---------- */
.hero { position: relative; height: 560px; overflow: hidden; color: var(--text-inverse); padding: 0; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease; }
.slide.active { opacity: 1; }
.slide::after { content: ""; position: absolute; inset: 0; background: var(--overlay-hero); }
.hero-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 20px; }
.hero-content p { font-size: 17px; max-width: 620px; color: #E2E8F0; }
.hero-buttons { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.btn { display: inline-block; font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: var(--radius-template); text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-fill { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.carousel-dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.carousel-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); padding: 0; cursor: pointer; }
.carousel-dots button.active { background: #fff; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,.15); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.carousel-arrow.prev { left: 18px; } .carousel-arrow.next { right: 18px; }

/* ---------- Services grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-template); padding: 28px 22px; text-align: center; }
.card .icon { width: 54px; height: 54px; margin: 0 auto 16px; color: var(--color-secondary); }
.card p { font-size: 14px; }
.learn-more { font-size: 13px; font-weight: 600; color: var(--text-muted-defect); text-decoration: none; }

/* ---------- About split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius-template); width: 100%; height: auto; }
.counters { display: flex; gap: 28px; margin-top: 24px; }
.counter strong { display: block; font-family: var(--font-heading); font-size: 30px; color: var(--color-primary); }
.counter span { font-size: 13px; color: var(--text-body); }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { background: #fff; border: 1px solid var(--border-light); padding: 26px; border-radius: var(--radius-template); }
.quote p { font-style: italic; }
.quote cite { font-style: normal; font-size: 13px; color: var(--text-muted-defect); }
.quote .qmark { font-family: Georgia, serif; font-size: 42px; color: var(--border-input); line-height: 1; }

/* ---------- Newsletter band ---------- */
.newsletter { background: var(--color-primary); color: #fff; padding: 44px 0; }
.newsletter .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.newsletter h2 { color: #fff; font-size: 22px; margin: 0; }
.newsletter p { margin: 4px 0 0; color: #CBD5E1; font-size: 14px; }
.newsletter form { display: flex; gap: 8px; }
.newsletter input { padding: 10px 12px; border: 1px solid var(--border-input); border-radius: var(--radius-template); width: 260px; font-family: inherit; }
.btn-promo { background: var(--color-accent-promo); color: #fff; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-footer); color: #CBD5E1; padding: 56px 0 0; font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-family: var(--font-heading); color: #fff; font-size: 15px; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #CBD5E1; text-decoration: none; }
.socials { display: flex; gap: 10px; margin-top: 12px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; color: var(--text-muted-defect); }
.socials svg { width: 16px; height: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding: 18px 0; font-size: 12px; color: var(--text-muted-defect); }
.footer-bottom .container { display: flex; justify-content: space-between; }

/* ---------- Promo modal (fires within seconds) ---------- */
.promo-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: none; align-items: center; justify-content: center; z-index: 900; }
.promo-backdrop.open { display: flex; }
.promo { background: #fff; width: min(440px, 92vw); padding: 34px 30px 28px; border-radius: var(--radius-template); text-align: center; position: relative; }
.promo h3 { font-size: 30px; color: var(--color-accent-promo); margin-bottom: 4px; }
.promo input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-input); border-radius: var(--radius-template); margin: 14px 0 10px; font-family: inherit; }
.promo .close { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 18px; color: var(--text-muted-defect); cursor: pointer; width: 28px; height: 28px; }
.promo small { display: block; margin-top: 10px; font-size: 11px; color: var(--text-muted-defect); }

/* ---------- Chat bubble ---------- */
.chat-bubble { position: fixed; right: 22px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; background: var(--color-secondary); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; z-index: 800; display: grid; place-items: center; }
.chat-bubble svg { width: 26px; height: 26px; }
.chat-badge { position: absolute; top: -2px; right: -2px; background: #E53E3E; color: #fff; font-size: 11px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.chat-window { position: fixed; right: 22px; bottom: 92px; width: 300px; background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 800; display: none; overflow: hidden; font-size: 13px; }
.chat-window.open { display: block; }
.chat-window header { background: var(--color-secondary); color: #fff; padding: 12px 14px; font-weight: 600; }
.chat-window .msg { margin: 14px; background: var(--bg-section-alt); padding: 10px 12px; border-radius: 8px; }
.chat-window .typing { margin: 0 14px 14px; color: var(--text-muted-defect); font-style: italic; }

/* ---------- Interior pages ---------- */
.page-banner { background-color: var(--color-primary); background-size: cover; background-position: center; padding: 70px 0; text-align: center; }
.page-banner h1 { font-size: 34px; margin: 0; }
.breadcrumb { color: #CBD5E1; font-size: 13px; margin-top: 6px; }
.prose { max-width: 820px; margin: 0 auto; }
.prose ul { padding-left: 20px; }
.svc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.svc-item { border: 1px solid var(--border-light); padding: 24px; border-radius: var(--radius-template); }
.svc-item ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-template); }
.gallery-grid figcaption { font-size: 12px; color: var(--text-muted-defect); margin-top: 6px; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post { border: 1px solid var(--border-light); border-radius: var(--radius-template); overflow: hidden; }
.post img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post .body { padding: 18px; }
.post time { font-size: 12px; color: var(--text-muted-defect); }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.value { text-align: center; padding: 20px; }

/* ---------- Contact form: no labels, no focus ring ---------- */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-stack .field { position: relative; }
.form-stack input, .form-stack select, .form-stack textarea {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--text-body);
  border: 1px solid var(--border-input); background: #fff; border-radius: var(--radius-template);
  padding: 10px 12px; outline: none;
}
.form-stack input:focus, .form-stack select:focus, .form-stack textarea:focus { outline: none; box-shadow: none; }
.form-stack ::placeholder { color: #94A3B8; }
.form-stack select { color: #94A3B8; }
.form-stack textarea { min-height: 120px; resize: vertical; }
.captcha { display: flex; align-items: center; justify-content: space-between; border: 1px solid #D3D3D3; background: #F9F9F9; border-radius: 3px; padding: 14px 12px; width: 300px; font-size: 14px; color: #333; }
.captcha label { display: flex; align-items: center; gap: 10px; }
.captcha input { width: 24px; height: 24px; }
.captcha .cap-logo { font-size: 9px; color: #888; text-align: center; line-height: 1.2; }
.btn-submit { background: #64748B; color: #fff; border: 0; padding: 10px 18px; font-size: 14px; border-radius: var(--radius-template); width: 120px; cursor: pointer; font-family: inherit; }
.form-error { display: none; background: #FFF5F5; border: 1px solid #FEB2B2; color: #9B2C2C; font-size: 13px; padding: 10px 12px; border-radius: var(--radius-template); }
.form-ok { display: none; background: #F0FFF4; border: 1px solid #9AE6B4; color: #276749; font-size: 13px; padding: 10px 12px; border-radius: var(--radius-template); }
.info-box { background: var(--bg-section-alt); padding: 26px; border-radius: var(--radius-template); font-size: 14px; }
.info-box h3 { font-size: 16px; }
.map { margin-top: 18px; border-radius: var(--radius-template); overflow: hidden; border: 1px solid var(--border-light); }

/* ---------- "Responsive" (desktop-first, shrinks down) ---------- */
@media (max-width: 960px) {
  .main-nav, .header-phone { display: none; }
  .hamburger { display: block; }
  .main-nav.open { display: block; position: absolute; top: 120px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border-light); z-index: 50; }
  .main-nav.open ul { flex-direction: column; gap: 0; padding: 10px 20px; }
  .main-nav.open a { display: block; padding: 8px 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 26px; } h2 { font-size: 22px; }
  .hero { height: 480px; }
  .card-grid, .quotes, .split, .svc-list, .gallery-grid, .posts, .values, .contact-layout { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .newsletter input { width: 100%; }
  .counters { gap: 16px; }
  .utility-bar .container span:last-child { display: none; }
  .footer-bottom .container { flex-direction: column; gap: 6px; }
  .captcha { width: 100%; }
}
