/* =============================================================
   TractBase — Shared Stylesheet
   ============================================================= */

/* Custom Properties */
:root {
  --navy:        #0f1f3d;
  --navy-light:  #162d56;
  --blue:        #1e5fa8;
  --blue-hover:  #164d8a;
  --blue-light:  #3b82c4;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --bg:          #ffffff;
  --bg-subtle:   #f1f5f9;
  --border:      #e2e8f0;
  --orange:      #d97706;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --radius:      8px;
  --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.08);
  --transition:  0.2s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-light); }
ul, ol { list-style: none; }
button { font-family: var(--font); }

/* Typography */
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; font-weight: 700; }
h3 { font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.5; font-weight: 500; }
h4 { font-size: 1rem; line-height: 1.4; font-weight: 600; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =====================
   Layout
   ===================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--subtle {
  background: var(--bg-subtle);
}

.section--dark {
  background: var(--navy);
  color: #fff;
}

.section--dark h2 { color: #f1f5f9; }
.section--dark h3 { color: #94a3b8; font-weight: 400; }
.section--dark p  { color: #94a3b8; }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p  { color: var(--text-muted); max-width: 680px; margin: 0 auto; }
.section--dark .section-header p { color: #94a3b8; }
.section--subtle .section-header h2 { color: var(--navy); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .grid-2  { grid-template-columns: 1fr; }
  .grid-3  { grid-template-columns: 1fr; }
  .split   { grid-template-columns: 1fr; gap: 2.5rem; }
  .section { padding: 3.5rem 0; }
}

/* =====================
   Navigation
   ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.nav__logo img {
  height: 34px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav__links a:hover { color: var(--navy); }
.nav__links a.active { color: var(--blue); font-weight: 600; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav__links.open { display: flex; }
  .nav__links a {
    padding: 0.75rem 0;
    font-size: 1rem;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .nav__links a:last-child { border-bottom: none; }
}

/* =====================
   Hero
   ===================== */
.hero {
  position: relative;
  background: var(--navy);
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 7rem 1.5rem;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,31,61,0.85) 0%, rgba(15,31,61,0.78) 100%);
}

.hero__inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.hero__logo {
  max-width: 260px;
  margin: 0 auto 2.5rem;
  opacity: 0.92;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: #f8fafc;
  letter-spacing: -0.025em;
}

.hero h2 {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: #94a3b8;
  margin-bottom: 2.5rem;
  letter-spacing: 0.01em;
}

.hero p {
  font-size: 1.1rem;
  color: #cbd5e1;
  max-width: 640px;
  margin: 1.5rem auto 0;
  line-height: 1.75;
}

/* =====================
   Buttons
   ===================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.875rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  border: 2px solid transparent;
}

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

.btn-primary {
  background: var(--blue);
  color: #fff !important;
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  box-shadow: 0 4px 12px rgba(30,95,168,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--blue) !important;
  border-color: var(--blue);
}
.btn-secondary:hover {
  background: var(--blue);
  color: #fff !important;
}

.btn-outline-white {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255,255,255,0.45);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
}

/* =====================
   Cards
   ===================== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1.5rem;
  font-size: 0.975rem;
  line-height: 1.75;
}

.card .btn { align-self: flex-start; }

/* Feature cards (icon + title + description) */
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: #dbeafe;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
  stroke: var(--blue);
}

.feature-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.625rem;
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Service blurb cards (icon + title + short desc) */
.blurb-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.blurb-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.blurb-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.blurb-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =====================
   Badges
   ===================== */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.725rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-orange { background: #fef3c7; color: #92400e; }

/* =====================
   County / Case Study Cards
   ===================== */
.county-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.county-card h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.county-card .county-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.county-card .county-size {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}

.county-card .county-docs {
  font-size: 0.775rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

/* =====================
   Progress / Comparison Bars
   ===================== */
.comparison {
  margin-top: 0.5rem;
}

.comparison-title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.comparison-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.progress-item {
  margin-bottom: 1.25rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.progress-track {
  height: 14px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.progress-fill--muted {
  background: #94a3b8;
}

/* =====================
   Section label (the "A" circle on service page)
   ===================== */
.section-label-badge {
  display: inline-flex;
  width: 52px;
  height: 52px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* =====================
   Content block (large text sections)
   ===================== */
.content-block {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.content-block h2 { margin-bottom: 1.25rem; }
.content-block h3 { color: var(--text-muted); font-size: 1.1rem; line-height: 1.7; }
.section--dark .content-block h3 { color: #94a3b8; }

/* =====================
   Contact Form
   ===================== */
.contact-wrapper {
  max-width: 580px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.975rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,95,168,0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =====================
   CTA Section (dark, centered)
   ===================== */
.cta-section {
  background: var(--navy);
  text-align: center;
  padding: 5.5rem 1.5rem;
}

.cta-section h2 { color: #f1f5f9; margin-bottom: 0.75rem; }
.cta-section p  { color: #94a3b8; font-size: 1.1rem; margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* =====================
   Footer
   ===================== */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #475569;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
}

.footer a { color: #64748b; }
.footer a:hover { color: #94a3b8; }

/* =====================
   Utilities
   ===================== */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
