/* ==========================================================================
   ClearPath Brand CSS - Based on Landing Page Design System (May 2026)
   This is the source of truth for all pages.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper: #F4F1EA;
  --paper-2: #ECE7DD;
  --paper-3: #E3DDD0;
  --line: #D7D0BF;
  --line-soft: #E5DECE;
  --ink: #16150F;
  --ink-2: #2B2A23;
  --ink-mute: #6B6760;
  --ink-soft: #908B81;
  --accent: #2F4A33;
  --accent-2: #3E6244;
  --accent-tint: #DDE4D8;
  --warning-tag: #8A5A2B;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --radius: 4px;
  --radius-lg: 8px;
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11";
}
::selection { background: var(--accent); color: var(--paper); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; text-wrap: pretty; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Typography Utilities ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.eyebrow .dim { color: var(--ink-mute); }
.eyebrow .num { color: var(--accent); margin-right: 6px; }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.serif-i, .em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Logo / Wordmark ---------- */
.cp-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
}
.cp-word {
  font-family: var(--sans);
  font-size: 19px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.cp-word .c { font-weight: 200; }
.cp-word .p { font-weight: 500; }
.cp-logo.on-ink .cp-word { color: var(--paper); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #F4F1EA; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-on-ink { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-on-ink:hover { background: #fff; border-color: #fff; }
.btn-link {
  background: transparent; border: none; color: var(--ink); padding: 0;
  font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.btn-link:hover { color: var(--accent); }
.btn-sm { padding: 9px 14px; font-size: 14px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 234, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line-soft); }
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav-links { display: flex; gap: 32px; font-size: 14.5px; color: var(--ink-2); }
.nav-links a { position: relative; padding: 6px 0; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(80px, 10vw, 120px) 0; }
.section.is-tinted { background: var(--paper-2); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(24px, 4vw, 64px);
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head .lhs { display: flex; flex-direction: column; gap: 14px; }
.section-head h2 {
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 400;
}
.section-head h2 .em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.section-head .rhs p { font-size: 18px; color: var(--ink-2); max-width: 52ch; }

/* ---------- Hero (generic) ---------- */
.hero {
  padding: clamp(72px, 11vw, 128px) 0 clamp(80px, 11vw, 140px);
  position: relative;
}
.hero h1 {
  font-size: clamp(40px, 5.8vw, 78px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 400;
}
.hero h1 .em {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em;
}
.hero-sub {
  margin-top: 28px;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 54ch;
}
.hero-sub b { font-weight: 500; color: var(--ink); }
.hero-sub-i {
  margin-top: 16px;
  font-family: var(--serif); font-style: italic;
  font-size: 19px; color: var(--ink-mute);
  letter-spacing: -0.005em;
}
.hero-ctas { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card-featured {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.card-featured p { color: #B8B3A6; }

/* ---------- Status Badges ---------- */
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
}
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { background: var(--accent-tint); color: var(--accent); }
.status-future { background: rgba(138,90,43,0.10); color: var(--warning-tag); }

/* ---------- Forms ---------- */
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 15px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
input::placeholder, textarea::placeholder {
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 64px 0 40px;
  background: var(--paper-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}
.footer-section { display: flex; flex-direction: column; gap: 16px; }
.footer-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 14.5px;
  color: var(--ink-2);
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-mute);
}
.footer-legal a { color: var(--ink-mute); transition: color 0.15s ease; }
.footer-legal a:hover { color: var(--accent); }

/* Universal footer (injected via components.js) — these classes match the
   markup in components/footer.html. Kept in sync with the homepage footer,
   which carries an identical inline copy of these rules. */
.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links-list a {
  font-size: 14px;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links-list a:hover { color: var(--accent); }
.footer-legal-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-mute);
}
.footer-legal-row a { color: var(--ink-mute); text-decoration: none; transition: color 0.15s ease; }
.footer-legal-row a:hover { color: var(--accent); }
.social-link {
  display: flex;
  align-items: center;
  color: var(--ink-mute);
}
.social-link:hover { color: var(--accent); }
.footer-copyright {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}
.footer-copyright p { margin: 0 0 4px; }

/* ---------- Prose (for blog/legal pages) ---------- */
.prose {
  max-width: 70ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}
.prose h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 24px;
}
.prose h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--ink);
  margin-top: 48px;
  margin-bottom: 16px;
}
.prose h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 32px;
  margin-bottom: 12px;
}
.prose p {
  margin-bottom: 20px;
}
.prose a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-tint);
  transition: border-color 0.15s ease;
}
.prose a:hover {
  border-color: var(--accent);
}
.prose ul, .prose ol {
  margin: 20px 0;
  padding-left: 24px;
}
.prose li {
  margin-bottom: 8px;
}
.prose blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
}
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 3px;
}
.prose pre {
  background: var(--ink);
  color: var(--paper);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 24px 0;
}
.prose pre code {
  background: transparent;
  padding: 0;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}
.prose img {
  border-radius: var(--radius-lg);
  margin: 32px 0;
}
.prose .caption {
  font-size: 14px;
  color: var(--ink-mute);
  text-align: center;
  margin-top: -24px;
  margin-bottom: 32px;
}

/* ---------- Team / Founders ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 40px;
}
.team-member {
  display: flex;
  gap: 20px;
}
.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--paper-2);
  flex-shrink: 0;
  object-fit: cover;
}
.team-info { display: flex; flex-direction: column; gap: 4px; }
.team-name {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.team-name a {
  color: var(--accent);
  font-size: 14px;
}
.team-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.team-bio {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* ---------- Values Grid ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.value-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.value-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-tint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.value-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}
.value-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}
.value-desc {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Mobile Navigation ---------- */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.mobile-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper);
  padding: 24px var(--gutter);
  z-index: 49;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.mobile-nav.is-open {
  display: flex;
}
.mobile-nav a {
  display: block;
  padding: 16px 0;
  font-size: 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: color 0.15s ease;
}
.mobile-nav a:hover {
  color: var(--accent);
}
.mobile-nav-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.mobile-nav-cta .btn {
  width: 100%;
  justify-content: center;
}

/* ---------- Responsive Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}
.prose table {
  min-width: 500px;
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th, .prose td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.prose th {
  font-weight: 500;
  color: var(--ink);
  background: var(--paper-2);
}
.prose td {
  color: var(--ink-2);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .mobile-menu-toggle { display: flex; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-legal-row { flex-direction: column; gap: 12px; }
  .hero { padding: clamp(48px, 8vw, 80px) 0; }
  .section { padding: clamp(56px, 8vw, 80px) 0; }
  .team-member { flex-direction: column; text-align: center; }
  .team-avatar { margin: 0 auto; }
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding: 10px 12px; }
}
