/* Original work of All Bay Home Inspection Inc. Provenance: ABHI-1990-AB2026 */
/* All Bay Home Inspection Inc. — VERSION 2: single page, mobile-first.
   Navy authority + logo-color accents used sparingly. System fonts only. */

:root {
  --navy: #2A3B72;
  --navy-deep: #1E2B54;
  --ink: #1E2833;
  --slate: #5A6774;
  --paper: #FFFFFF;
  --tint: #F5F7FA;
  --line: #E4E8EE;
  --red: #D63A2F;
  --rust: #CD6B3A;
  --yellow: #F5B32C;
  --green: #3F8F3D;
  --house: #4A64A8;
  --serif: "Charter", "Iowan Old Style", Palatino, Georgia, serif;
  --heading: "Avenir Next", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --sans: -apple-system, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(30, 43, 84, 0.08);
  --shadow-md: 0 8px 28px rgba(30, 43, 84, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 17px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

strong { font-weight: 800; }

::selection { background: var(--yellow); color: var(--navy-deep); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff;
  padding: 10px 18px; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* Signature: thin five-color rule from the logo */
.rule {
  height: 4px;
  border: none;
  background: linear-gradient(90deg, var(--red) 0 20%, var(--rust) 0 40%, var(--yellow) 0 60%, var(--green) 0 80%, var(--house) 0 100%);
}

.rule-thin {
  height: 3px;
  width: 88px;
  border: none;
  margin: 0 0 26px;
  background: linear-gradient(90deg, var(--red) 0 20%, var(--rust) 0 40%, var(--yellow) 0 60%, var(--green) 0 80%, var(--house) 0 100%);
  border-radius: 2px;
}

/* ---------- Header ---------- */

.brand-bar { display: none; }

header.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 8px 16px;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  text-decoration: none;
}

.nav-lockup { height: 52px; width: auto; display: block; }

.mobile-cta { display: none; }

a.nav-cta {
  display: block;
  padding: 9px 16px;
  text-decoration: none;
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 8px;
  margin-left: auto;
  white-space: nowrap;
}

a.nav-cta:hover { background: var(--navy-deep); }

nav.main-nav { margin: 0 auto; }

@media (max-width: 860px) {
  nav.main-nav ul { display: none !important; }
}

@media (max-width: 640px) {
  .nav-inner { justify-content: center; }
  nav.main-nav { display: none; }
  a.nav-cta { display: none; }
  .nav-lockup { height: 44px; max-width: 92vw; object-fit: contain; }

  .mobile-cta {
    display: block;
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 120;
    text-align: center;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(30, 43, 84, 0.35);
  }

  body { padding-bottom: 130px; }
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

nav.main-nav a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--navy);
  font-size: 0.93rem;
  font-weight: 700;
  border-radius: 8px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}

nav.main-nav a:hover { border-bottom-color: var(--yellow); }



/* ---------- Sections ---------- */

section { padding: 72px 20px; }

.wrap { max-width: 1100px; margin: 0 auto; }

.narrow { max-width: 760px; margin: 0 auto; }

section.tinted { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

h1, h2, h3 { font-family: var(--heading); font-weight: 700; color: var(--navy); line-height: 1.15; letter-spacing: -0.01em; }

h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin-bottom: 14px; }

h3 { font-size: 1.28rem; margin: 36px 0 10px; }

.block h3, .form-card h3:first-child { margin-top: 0; }

p { color: var(--ink); }
p + p { margin-top: 15px; }

main a { color: var(--house); text-underline-offset: 3px; }
main a:hover { color: var(--navy); }

.kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 12px;
}

/* ---------- Hero ---------- */

.hero { padding: 88px 20px 80px; text-align: center; }

.hero h1 {
  font-size: clamp(2.7rem, 7.6vw, 4.9rem);
  margin: 0 auto 16px;
  letter-spacing: -0.028em;
  font-weight: 700;
  line-height: 1.07;
}

.hero h1 .line { display: block; }

.hero h1 .dot { color: var(--rust); }

.hero .sub {
  font-family: var(--heading);
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  font-weight: 700;
  color: var(--rust);
  margin-bottom: 26px;
}

.hero .lede {
  max-width: 62ch;
  margin: 0 auto;
  font-size: 1.12rem;
  color: var(--ink);
}

.hero .cta-row { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-star {
  width: min(500px, 88vw);
  height: auto;
  margin: 0 auto 34px;
  display: block;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--navy-deep); }

.btn-outline {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover { background: var(--tint); }

/* ---------- Core strengths ---------- */

.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

@media (min-width: 780px) { .pair { grid-template-columns: 1fr 1fr; gap: 34px; } }

.block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.block:hover { box-shadow: var(--shadow-md); border-color: #D3DAE5; }

/* ---------- Map ---------- */

.map-frame {
  width: 100%;
  height: min(68vh, 620px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  display: block;
  background: #fff;
}

.map-caption { text-align: center; font-size: 0.92rem; color: var(--slate); margin-top: 14px; }

/* ---------- Credentials ---------- */

.seal-row {
  display: flex;
  gap: 22px;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

.seal-row img {
  height: 148px;
  width: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 22px;
  box-shadow: var(--shadow-sm);
}

/* ---------- How we work ---------- */

ul.how {
  list-style: none;
  margin-top: 26px;
  display: grid;
  gap: 14px;
}

ul.how li {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

ul.how li:nth-child(5n+1) { border-left-color: var(--red); }
ul.how li:nth-child(5n+2) { border-left-color: var(--rust); }
ul.how li:nth-child(5n+3) { border-left-color: var(--yellow); }
ul.how li:nth-child(5n+4) { border-left-color: var(--green); }
ul.how li:nth-child(5n+5) { border-left-color: var(--house); }

ul.how strong { color: var(--navy); }

/* ---------- Who we serve ---------- */

.closing {
  border-left: 4px solid var(--yellow);
  background: var(--tint);
  border-radius: 0 14px 14px 0;
  padding: 24px 28px;
  margin-top: 28px;
}

.closing p {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.18rem;
  color: var(--navy);
  line-height: 1.55;
}

/* ---------- Form ---------- */

form .field { margin-bottom: 20px; }

label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--navy); margin-bottom: 6px; }

label .req { color: var(--rust); }

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  border: 1px solid #C9CFD8;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--house);
  box-shadow: 0 0 0 3px rgba(74, 100, 168, 0.18);
}

.field-row { display: grid; grid-template-columns: 1fr; gap: 14px; }

@media (min-width: 640px) { .field-row { grid-template-columns: 2fr 1fr 1fr; } .field-row.halves { grid-template-columns: 1fr 1fr; } }

.form-note { font-size: 0.88rem; color: var(--slate); margin-top: 7px; }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) { .form-card { padding: 24px 18px; } }

.notice { border-radius: 12px; padding: 18px 22px; margin-top: 24px; }
.notice-ok { background: #EAF4EA; border: 1px solid var(--green); color: #235C22; }
.notice-hold { background: #FDF4DC; border: 1px solid var(--yellow); color: #6B5406; }
.notice-err { background: #FBECEC; border: 1px solid var(--red); color: #7C2820; }
.notice[hidden] { display: none; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-deep); color: #B9C4DE; font-size: 0.9rem; }

.site-footer .footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 42px 20px 36px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 26px;
  flex-wrap: wrap;
}

.site-footer .footer-brand {
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.site-footer a { color: #D9E1F2; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.site-footer nav ul { list-style: none; display: grid; gap: 8px; }
