/* ===========================================================
   Lahaie RegTech — Core Stylesheet
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* Color */
  --navy: #1F3864;
  --navy-deep: #162947;
  --mid-blue: #2E75B6;
  --light-blue: #D5E8F0;
  --paper: #F7F9FB;
  --white: #FFFFFF;
  --slate: #4A5A6B;
  --slate-light: #7D8CA0;
  --signal-green: #2F8F5B;
  --line: #DCE4EC;

  /* Type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --max-width: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  color: var(--navy-deep);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-deep);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { color: var(--slate); }

a { color: var(--mid-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--mid-blue);
  outline-offset: 3px;
}

/* Mono tag / eyebrow label */
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid-blue);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--signal-green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 251, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-deep);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--mid-blue); text-decoration: none; }

.nav-links a.active { color: var(--mid-blue); }

.nav-cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
}
.nav-cta:hover { background: var(--mid-blue); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-deep);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 16px 32px; width: 100%; border-top: 1px solid var(--line); }
  .nav-cta { margin: 16px 32px; display: inline-block; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--mid-blue); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); text-decoration: none; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 85%);
  opacity: 0.7;
}

.hero-inner {
  position: relative;
  padding: 0 0 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.hero h1 { margin: 18px 0 22px; }

.hero .lede {
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-diagram { width: 100%; height: auto; margin-top: 8px; max-width: 460px; justify-self: end; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 56px; }
  .hero-diagram { max-width: 320px; margin: 0 auto; }
}

/* ---------------- Sections ---------------- */
section { padding: 88px 0; }
.section-tint { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head h2 { margin-top: 14px; }
.section-head p { margin-top: 14px; font-size: 1.05rem; }

/* ---------------- Three-column value prop ---------------- */
.col-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 800px) {
  .col-3 { grid-template-columns: 1fr; }
}

.value-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
}
.value-card .tag { margin-bottom: 18px; }
.value-card h3 { margin-bottom: 10px; }
.value-card p { font-size: 0.96rem; }

/* ---------------- Case studies / cards ---------------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
@media (max-width: 800px) {
  .case-grid { grid-template-columns: 1fr; }
}

.case-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
}
.case-card .tag { margin-bottom: 16px; }
.case-card h3 { margin-bottom: 10px; }
.case-card .meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--slate-light);
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.case-card.pro-bono { border-left: 3px solid var(--signal-green); }

/* ---------------- Services list ---------------- */
.service-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 1px solid var(--line); }
.service-row h3 { margin-bottom: 10px; }
.service-row ul { margin-top: 14px; padding-left: 18px; color: var(--slate); font-size: 0.95rem; }
.service-row li { margin-bottom: 6px; }

@media (max-width: 700px) {
  .service-row { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------------- Team ---------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (max-width: 800px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
}
.team-card .role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mid-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  display: block;
}
.team-card h3 { margin-bottom: 14px; }
.team-card ul { padding-left: 18px; color: var(--slate); font-size: 0.92rem; }
.team-card li { margin-bottom: 6px; }

/* ---------------- Values strip ---------------- */
.values-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.value-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 10px 18px;
  border-radius: 999px;
  color: var(--navy);
}

/* ---------------- CTA band ---------------- */
.cta-band {
  background: var(--navy-deep);
  color: var(--white);
  text-align: left;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #C7D3E0; margin-top: 12px; max-width: 50ch; }
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}
.cta-band .btn-secondary { border-color: rgba(255,255,255,0.4); color: var(--white); }
.cta-band .btn-secondary:hover { background: var(--white); color: var(--navy-deep); }

/* ---------------- Contact form ---------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy-deep);
}
.field textarea { resize: vertical; min-height: 130px; }

.contact-info .tag { margin-bottom: 18px; }
.contact-info h3 { margin: 28px 0 10px; }
.contact-info a { color: var(--navy); font-weight: 500; }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}
.footer-brand { font-family: var(--font-display); font-weight: 700; color: var(--navy-deep); }
.footer-links { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.footer-links a { color: var(--slate); font-size: 0.9rem; }
.footer-meta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--slate-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------- Page hero (secondary pages) ---------------- */
.page-hero { padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-top: 14px; font-size: clamp(2rem, 4vw, 2.7rem); }
.page-hero p { margin-top: 16px; max-width: 55ch; font-size: 1.05rem; }