:root {
  --navy: #14263f;
  --navy-light: #23415f;
  --green: #6b7a4a;
  --green-dark: #55603a;
  --bg: #14263f;
  --text: #1a1f29;
  --muted: #5b6472;
  --light-text: #d7dee8;
  --light-muted: #9fb0c3;
  --card-bg: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 37, 64, 0.08);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--light-text); line-height: 1.5; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-weight: 800; margin: 0 0 12px; color: #fff; }
h2 { font-size: 2rem; text-align: center; margin-bottom: 32px; }
p { color: var(--light-muted); margin: 0 0 12px; }
a { color: var(--green); text-decoration: none; }

/* Header */
.site-header { background: var(--navy); padding: 16px 0; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { height: 40px; width: auto; display: block; }
.logo { color: #fff; font-weight: 800; font-size: 1.4rem; }
.logo-accent { color: var(--green); }
.header-phone { color: #fff; font-weight: 600; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); padding: 60px 0 90px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.hero-copy h1 { color: #fff; font-size: 2.5rem; line-height: 1.15; }
.hero-sub { color: #d7dee8; font-size: 1.1rem; }
.hero-stats { list-style: none; padding: 0; display: flex; gap: 24px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats li { color: #fff; display: flex; flex-direction: column; }
.hero-stats strong { color: var(--green); font-size: 1.3rem; }
.hero-stats span { color: #b9c3d2; font-size: 0.85rem; }

.hero-form-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.hero-form-card h3 { color: var(--text); }
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Service buttons. Three across with slightly smaller text, so the form
   stays short as trades are added (each extra row holds three trades).
   Narrow screens drop to two across; see the rules right below. */
.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.option-btn {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 5px 10px;
  border: 2px solid #e3e7ee;
  background: #fff;
  color: var(--text);
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.15;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  overflow-wrap: break-word;
}
/* Two across where the form card is narrow: small laptops (form sits
   beside the headline) and phones. */
@media (min-width: 861px) and (max-width: 1000px) {
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .option-btn { min-height: 40px; }
}
@media (max-width: 400px) {
  .hero-form-card { padding: 22px 18px; }
  .option-btn { font-size: 0.8rem; padding: 5px 8px; }
}
.option-btn:hover { border-color: var(--green); }
.option-btn.selected { border-color: var(--green); background: #f0f3e9; color: var(--green-dark); }

.hero-form-card label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 14px; color: var(--text); }
.hero-form-card input {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #e3e7ee;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
}
.hero-form-card input:focus { outline: none; border-color: var(--green); }

/* Lead form step 2: "Tell us a little bit more" box */
.hero-form-card .notes-input {
  display: block;
  width: 100%;
  min-height: 110px;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #e3e7ee;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
  resize: vertical;
}
.hero-form-card .notes-input:focus { outline: none; border-color: var(--green); }
.hero-form-card .notes-input::placeholder { color: #9aa3af; }
.hero-form-card .step-hint { color: var(--muted); font-size: 0.85rem; margin: 8px 0 6px; }

.submit-btn, .nav-btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.submit-btn:hover, .nav-btn:hover { background: var(--green-dark); }
.form-error { color: #ffb4a8; font-size: 0.85rem; margin-top: 10px; }
.hero-form-card .form-error { color: #c0392b; }

.contractor-link { text-align: center; font-size: 0.85rem; margin-top: 16px; color: var(--muted); }
.contractor-link a { font-weight: 600; }

/* Sections */
.section { padding: 64px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card-bg); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.1rem; color: var(--text); }
.card p { color: var(--muted); }

.matchmaker .card-grid {
  grid-template-columns: repeat(2, 1fr);
  max-width: 800px;
  margin: 0 auto;
}

.section-sub { text-align: center; color: var(--light-muted); max-width: 560px; margin: 0 auto 32px; }
.contractor-form-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; max-width: 720px; margin: 0 auto; }
.contractor-form-card p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-bottom: 20px; }
.form-grid label { font-weight: 600; font-size: 0.9rem; color: var(--text); }
.form-grid input, .form-grid select {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #e3e7ee;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: var(--green); }
.form-success { color: #8fe3a8; font-size: 0.9rem; margin-top: 10px; }
.contractor-form-card .form-success { color: #1a7f37; }

.faq { background: #fff; }
.faq h2 { color: var(--text); }
.accordion { max-width: 760px; margin: 0 auto; }
.accordion details { border-bottom: 1px solid #e3e7ee; padding: 16px 0; }
.accordion summary { font-weight: 700; cursor: pointer; color: var(--text); }
.accordion p { margin-top: 10px; color: var(--muted); }

.site-footer { background: var(--navy); color: #b9c3d2; padding: 28px 0; text-align: center; font-size: 0.85rem; }
.site-footer a { color: var(--green); }

/* Responsive */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .two-col, .card-grid, .form-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 2rem; }
  .logo-icon { height: 32px; }
}

/* Rooted / Matchmaker / Repairs refresh */
.icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.icon-badge svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.rooted-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 24px;
}

.matchmaker .card, .repairs .card {
  border-top: 4px solid var(--green);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.matchmaker .card:hover, .repairs .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 37, 64, 0.2);
}

.rooted h2::after, .matchmaker h2::after, .repairs h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--green);
  margin: 12px auto 0;
  border-radius: 2px;
}


/* ===== Mobile layout fixes (phones only) ===== */
@media (max-width: 700px) {

  /* Header: keep logo and phone tidy on one line each */
  .site-header .logo { font-size: 1.05rem; line-height: 1.2; }
  .site-header .logo-icon { width: 40px; height: auto; }
  .site-header .header-phone { font-size: 0.9rem; white-space: nowrap; }

  /* Hero: smaller headline so the form shows up sooner */
  .hero { padding-top: 32px; padding-bottom: 32px; }
  .hero h1 { font-size: 1.9rem; line-height: 1.15; margin-bottom: 12px; }
  .hero .hero-sub { font-size: 1rem; margin-bottom: 20px; }

  /* Stats: compact 3-across row instead of a tall stack */
  .hero .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
  }
  .hero .hero-stats li { margin: 0; }
  .hero .hero-stats strong { font-size: 1.2rem; display: block; }
  .hero .hero-stats span { font-size: 0.72rem; line-height: 1.3; display: block; }

  /* Feature cards and two-column sections: stack to one column */
  .section .card-grid,
  .section .two-col,
  .contractor-form-card .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Tighter spacing between sections */
  .section { padding-top: 48px; padding-bottom: 48px; }
  .section h2 { font-size: 1.6rem; }
}

/* Mobile header: "South Jersey" on top, "Home Repairs" underneath */
@media (max-width: 700px) {
  .site-header .logo {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    white-space: nowrap;
  }
  .site-header .logo-accent {
    display: block;
  }
}


/* Hero tagline and contractor link */
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b9a5b;
  margin: 0 0 12px;
}
.hero-contractor-link {
  display: inline-block;
  margin: 0 0 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #8b9a5b;
  text-decoration: none;
}
.hero-contractor-link:hover {
  text-decoration: underline;
}
