/* ============================================
   Kibbee Investigations — Shared Stylesheet
   Mobile-first, light theme, professional
   ============================================ */

/* --- CSS Variables --- */
:root {
  --navy: #1a2744;
  --navy-light: #243656;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --teal-bg: #f0fdfa;
  --gray-50: #f8f9fb;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #ced4da;
  --gray-400: #adb5bd;
  --gray-500: #6c757d;
  --gray-600: #495057;
  --gray-700: #343a40;
  --gray-800: #212529;
  --white: #ffffff;
  --danger: #c92a2a;
  --danger-bg: #fff5f5;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);

  --max-width: 1100px;
  --nav-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--teal-light);
}

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong { color: var(--navy); }

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li { margin-bottom: 0.35rem; }

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--nav-height);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
}

.nav-logo:hover { color: var(--teal); }

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  color: var(--gray-600);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--navy);
  background: var(--gray-100);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--navy);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: 0.2s;
}

.nav-links-mobile {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-md);
  list-style: none;
}

.nav-links-mobile.open { display: block; }

.nav-links-mobile a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--gray-700);
  font-weight: 500;
  border-bottom: 1px solid var(--gray-100);
}

.nav-links-mobile a:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 50%, #1a3a3a 100%);
  color: var(--white);
  padding: 5rem 1.25rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--teal-light);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  color: var(--white);
  font-size: 2.6rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  line-height: 1.6;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--teal-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

@media (max-width: 600px) {
  .hero { padding: 3.5rem 1rem 3rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1rem; }
}

/* --- Sections --- */
.section {
  padding: 5rem 1.25rem;
}

.section-alt {
  background: var(--gray-50);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Cards Grid --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--teal-bg);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* --- Split Layout --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split-reverse {
  direction: rtl;
}

.split-reverse > * {
  direction: ltr;
}

@media (max-width: 768px) {
  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Feature List --- */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  color: var(--gray-700);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

/* --- Stat Bar --- */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem 1.25rem;
  border-radius: var(--radius-lg);
  text-align: center;
}

.stat {
  padding: 0.5rem;
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--teal-light);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.3rem;
}

/* --- Testimonial --- */
.testimonial {
  background: var(--white);
  border-left: 4px solid var(--teal);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.testimonial blockquote {
  font-style: italic;
  color: var(--gray-700);
  font-size: 1.05rem;
  margin: 0;
}

.testimonial cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--teal) 0%, #0f766e 100%);
  color: var(--white);
  text-align: center;
  padding: 3.5rem 1.25rem;
  border-radius: var(--radius-lg);
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}

.cta-banner .btn-primary {
  background: var(--white);
  color: var(--teal);
}

.cta-banner .btn-primary:hover {
  background: var(--gray-50);
  color: #0f766e;
}

.cta-banner .btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  margin-left: 0.75rem;
}

.cta-banner .btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1.25rem 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.footer a {
  color: rgba(255,255,255,0.6);
}

.footer a:hover {
  color: var(--teal-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* --- Page Header (subpages) --- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 1.25rem;
  text-align: center;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
}

/* --- About Page --- */
.about-image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--gray-200);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.badge {
  display: inline-block;
  background: var(--teal-bg);
  color: var(--teal);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  border: 1px solid rgba(13,148,136,0.15);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--gray-200);
}

.timeline li {
  padding-left: 2.75rem;
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--teal);
}

.timeline-year {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

.timeline-desc {
  color: var(--gray-700);
  font-size: 0.95rem;
}

/* --- Services Page --- */
.service-detail {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  background: var(--white);
  transition: box-shadow 0.2s;
}

.service-detail:hover {
  box-shadow: var(--shadow-sm);
}

.service-detail h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.service-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--teal-bg);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.service-detail p {
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.78rem;
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-weight: 500;
}

/* --- Coverage Map Placeholder --- */
.map-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--gray-500);
  text-align: center;
  padding: 1rem;
}

.map-placeholder .icon { font-size: 3rem; margin-bottom: 0.5rem; }

.towns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.town-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-align: center;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
  transition: all 0.15s;
}

.town-card:hover {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: var(--shadow-sm);
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.12);
}

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

.confidentiality-note {
  background: var(--teal-bg);
  border: 1px solid rgba(13,148,136,0.15);
  border-radius: var(--radius);
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--gray-700);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.confidentiality-note .lock-icon {
  font-size: 1.3rem;
  color: var(--teal);
  flex-shrink: 0;
}

.contact-info-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-info-card h3 {
  margin-bottom: 1.25rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.contact-info-item .ci-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--teal-bg);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* --- Print --- */
@media print {
  .nav, .footer, .hero, .cta-banner { display: none; }
  body { font-size: 12pt; }
}
