/* ==========================================================================
   865-base.css — The 865 Company
   Mobile-first. No framework. No WordPress.
   ========================================================================== */

:root {
  --blue:   #04A4E3;
  --navy:   #042B54;
  --dark:   #0e1f34;
  --ink:    #0b1320;
  --slate:  #4A4A4A;
  --muted:  #6b7380;
  --line:   #e6edf3;
  --bg:     #f6fafd;
  --white:  #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(4, 43, 84, .08);
  --max-w:  1120px;
  --pad:    clamp(16px, 3vw, 28px);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }

/* ── Layout ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { border-radius: 8px; }
.brand-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: .9rem;
  letter-spacing: .05em;
  color: var(--navy);
}
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-desktop a {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 500;
  font-size: .95rem;
  color: var(--slate);
  transition: background .15s, color .15s;
}
.nav-desktop a:hover,
.nav-desktop a.active { background: var(--bg); color: var(--navy); }
.nav-cta {
  background: var(--blue) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  border-radius: 10px;
  padding: 9px 16px !important;
}
.nav-cta:hover { filter: brightness(.92); background: var(--blue) !important; }

/* ── Hamburger ── */
.hamburger {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .2s;
}

/* ── Mobile Menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 300;
  flex-direction: column;
  padding: 20px var(--pad);
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-close {
  align-self: flex-end;
  background: none;
  border: 0;
  font-size: 2rem;
  color: var(--navy);
  cursor: pointer;
  line-height: 1;
  margin-bottom: 16px;
}
.mobile-menu a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a.active { color: var(--blue); }
.mobile-section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
  padding: 16px 0 4px;
  text-transform: uppercase;
}
.mobile-cta {
  margin-top: 16px;
  background: var(--blue);
  color: var(--white) !important;
  text-align: center;
  border-radius: 12px;
  border: none !important;
  padding: 14px !important;
}

/* ── Main ── */
.site-main { min-height: 60vh; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.1;
  color: var(--navy);
  margin: 0 0 .5em;
}
.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  color: var(--navy);
  margin: 0 0 10px;
}
.section-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 68ch;
  margin: 0 0 28px;
  line-height: 1.65;
}

/* ── Hero ── */
.hero {
  padding: clamp(60px, 9vw, 100px) 0;
  background:
    linear-gradient(to bottom, rgba(4,43,84,.88), rgba(4,43,84,.68)),
    var(--hero-img, url('/static/img/865-hero.jpg')) center/cover no-repeat;
  color: var(--white);
}
.hero-inner { max-width: 800px; }
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 900;
  color: var(--white);
  margin: .5em 0 .3em;
  text-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.hero .lead {
  font-size: clamp(15px, 1.8vw, 18px);
  color: #d6eaf8;
  max-width: 58ch;
  margin: 0 0 24px;
}

/* ── Buttons ── */
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: filter .15s, background .15s, transform .1s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn--primary:hover { filter: brightness(.92); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--bg); }

/* ── Section base ── */
section { padding: clamp(48px, 7vw, 84px) 0; }
section.bg-white { background: var(--white); }
section.bg-soft  { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.bg-navy  { background: var(--navy); }
section.bg-dark  { background: var(--dark); }

section.bg-navy .section-title,
section.bg-navy h2,
section.bg-navy h3,
section.bg-navy p,
section.bg-dark .section-title,
section.bg-dark h2,
section.bg-dark h3,
section.bg-dark p { color: var(--white); }
section.bg-navy .section-sub,
section.bg-dark .section-sub { color: #b8d0e8; }

/* ── Grid ── */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Card ── */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(4,43,84,.12); }
.card h3 { color: var(--navy); font-size: 1.05rem; margin: 0 0 8px; }
.card p  { color: var(--muted); margin: 0; font-size: .95rem; line-height: 1.6; }
.card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

/* ── 865 Engine Flow ── */
.flow {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 16px;
}
@media (max-width: 900px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .flow { grid-template-columns: 1fr; } }
.flow-step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  flex: 0 0 auto;
  margin-top: 6px;
}
.flow-step h3 { font-size: .95rem; margin: 0 0 4px; color: var(--navy); }
.flow-step p  { font-size: .88rem; margin: 0; color: var(--muted); }

/* ── Footer ── */
.site-footer {
  background: var(--navy);
  color: #cde0ef;
  padding: 44px 0 28px;
}
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.footer-brand img { border-radius: 6px; }
.footer-brand strong { color: var(--white); display: block; font-size: .95rem; }
.footer-location { font-size: .82rem; color: #8aafc8; }
.footer-copy { font-size: .82rem; color: #7a9ab5; margin: 0; }
.footer-heading {
  display: block;
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.foot-link {
  display: block;
  color: #b0cce0;
  font-size: .9rem;
  margin-bottom: 6px;
  transition: color .15s;
}
.foot-link:hover { color: var(--white); }

/* ── Responsive nav hide/show ── */
@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .hamburger   { display: flex; }
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(36px, 5vw, 52px);
  color: var(--navy);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: .9rem;
  color: var(--muted);
}

/* ── List Items (bordered rows) ── */
.list-items { margin-top: 16px; }
.list-item {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
}

/* ── Contact / CRE Form ── */
.contact-form { margin-top: 8px; }
.form-row { margin-bottom: 16px; }
.form-row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 580px) { .form-row--2 { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .88rem; font-weight: 600; color: var(--navy); }
.req { color: #e05; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(4,164,227,.12);
}
.form-group textarea { resize: vertical; }

/* ── FAQ ── */
.faq-list { margin-top: 8px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--white);
  overflow: hidden;
}
.faq-item summary {
  padding: 14px 18px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '▸'; color: var(--blue); font-size: .9rem; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(90deg); }
.faq-item p { padding: 0 18px 14px; margin: 0; color: var(--muted); font-size: .95rem; }

/* ── Card image placeholders ── */
.img-roofing  { background: linear-gradient(135deg, #1a3a5c 0%, #04A4E3 100%); }
.img-realty   { background: linear-gradient(135deg, #042B54 0%, #2a6099 100%); }
.img-tech     { background: linear-gradient(135deg, #0e1f34 0%, #04A4E3 100%); }
.img-capital  { background: linear-gradient(135deg, #1a3a5c 0%, #042B54 100%); }
.img-map      { background: linear-gradient(135deg, #042B54 0%, #0d3b6e 100%); border-radius: var(--radius); min-height: 240px; }

/* ── Legal Page ── */
.legal-intro {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.legal-intro p { margin: 0; color: var(--slate); }
.legal-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px 8px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.legal-card h2 {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 8px;
}
.legal-card p { color: var(--slate); margin: 0 0 12px; }
.legal-note {
  font-size: .88rem;
  color: var(--muted);
  border-left: 3px solid var(--blue);
  padding-left: 12px;
  margin-top: 10px;
}
.legal-meta {
  font-size: .82rem;
  color: var(--muted);
  margin-top: 24px;
}

/* ── Utility ── */
.align-center { text-align: center; }
.align-center .section-sub { margin-left: auto; margin-right: auto; }
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 36px; }

/* Fix: restore dark text on white cards inside navy/dark sections */
.bg-navy .card h3, .bg-dark .card h3 { color: var(--navy); }
.bg-navy .card p, .bg-dark .card p { color: var(--muted); }
.bg-navy .card h2, .bg-dark .card h2 { color: var(--navy); }
.bg-navy .card a, .bg-dark .card a { color: var(--blue); }

