/* ================================================================
   Meridian Intelligence Group — Stylesheet
   ================================================================ */

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

:root {
  --navy:    #0b1d3a;
  --dark:    #132744;
  --accent:  #3c7ec2;
  --accent2: #5a9bd6;
  --gold:    #c9a84c;
  --light:   #f4f6f9;
  --white:   #ffffff;
  --text:    #2a2e35;
  --muted:   #6b7280;
  --border:  #d1d5db;
  --radius:  6px;
  --max-w:   1120px;
  --font:    'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Utility ──────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── Header / Navigation ──────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--gold);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
}
.logo img {
  height: 40px;
  width: auto;
}
.logo span { color: var(--gold); }

.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav a.active { color: var(--gold); text-decoration: none; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--dark) 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero .subtitle {
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  border: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent2); }

.btn-outline { background: transparent; border: 1.5px solid rgba(255,255,255,0.5); color: var(--white); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #b8953f; }

/* ── Sections ─────────────────────────────────────────────── */
.section {
  padding: 4.5rem 1.5rem;
}

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

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.section-lead {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: 1rem;
}

/* ── 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(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }

.card h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

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

/* ── Capabilities list ────────────────────────────────────── */
.cap-list {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
}

.cap-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.98rem;
}

.cap-list li::before {
  content: "▸";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Method / process steps ───────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.step h4 { font-size: 1rem; color: var(--navy); margin-bottom: 0.35rem; }
.step p { font-size: 0.9rem; color: var(--muted); }

/* ── Page header (inner pages) ────────────────────────────── */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: rgba(255,255,255,0.72);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Services list ────────────────────────────────────────── */
.service-block {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: none; }

.service-block h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.service-block p { color: var(--muted); max-width: 720px; }

/* ── Reports grid ─────────────────────────────────────────── */
.report-card {
  border-left: 3px solid var(--accent);
}

.report-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.report-card .teaser {
  font-size: 0.93rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.report-card .btn { font-size: 0.85rem; padding: 0.45rem 1rem; }

/* ── About ────────────────────────────────────────────────── */
.about-content { max-width: 720px; margin: 0 auto; }
.about-content h2 { font-size: 1.4rem; color: var(--navy); margin: 2rem 0 0.5rem; }
.about-content p { margin-bottom: 1rem; color: var(--text); }

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

.principle {
  background: var(--light);
  padding: 1.25rem;
  border-radius: var(--radius);
}

.principle h4 { color: var(--navy); font-size: 1rem; margin-bottom: 0.3rem; }
.principle p { font-size: 0.92rem; color: var(--muted); margin: 0; }

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

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(60,126,194,0.15);
}

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

.form-group .error-text {
  color: #d32f2f;
  font-size: 0.82rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea { border-color: #d32f2f; }
.form-group.has-error .error-text { display: block; }

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] { width: auto; margin-top: 0.2rem; }
.checkbox-group label { font-weight: 400; font-size: 0.9rem; }

/* Honeypot — visually hidden */
.ohnohoney { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* Form messages */
.form-status {
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  display: none;
}

.form-status--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; display: block; }
.form-status--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; display: block; }

.contact-info h3 { font-size: 1.15rem; color: var(--navy); margin-bottom: 0.75rem; }
.contact-info p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
}

.site-footer a { color: var(--gold); }

.footer-nav {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-nav a { color: rgba(255,255,255,0.7); font-size: 0.88rem; }
.footer-nav a:hover { color: var(--gold); }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1rem 1.5rem;
  }

  .main-nav.open { display: block; }

  .main-nav ul { flex-direction: column; gap: 0.75rem; }

  .hero { padding: 3rem 1.5rem; }

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

/* ── Loading spinner on button ────────────────────────────── */
.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.btn.loading::after {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--white);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  top: 50%;
  left: 50%;
  margin: -0.55rem 0 0 -0.55rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Blog ─────────────────────────────────────────────────── */
.blog-card {
  border-left: 3px solid var(--gold);
}

.blog-card h3 { margin-bottom: 0.4rem; }

.blog-card h3 a {
  color: var(--navy);
  text-decoration: none;
}
.blog-card h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.blog-card .teaser {
  font-size: 0.93rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.read-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}
.read-more:hover { color: var(--gold); }

/* Blog post content */
.blog-content {
  max-width: 760px;
  margin: 0 auto;
}

.blog-content h2 {
  font-size: 1.35rem;
  color: var(--navy);
  margin: 2rem 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.blog-content h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin: 1.5rem 0 0.4rem;
}

.blog-content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.blog-content ul,
.blog-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--text);
}

.blog-content li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.blog-content strong { color: var(--navy); }

.blog-content em { color: var(--muted); }

.blog-content blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--light);
  color: var(--muted);
  font-style: italic;
}

.post-meta {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-category {
  color: var(--gold);
  font-weight: 600;
}
