/* Kindred — shared brand system */

:root {
  /* Accent (kept for legacy references — maps to Kindred brand) */
  --mc-red: #1A1A1A;
  --mc-orange: #2D2D2A;
  --mc-yellow: #6B6B66;
  --mc-dark: #141413;

  /* Kindred brand */
  --k-black: #0A0A0A;
  --k-ink: #1A1A1A;
  --k-paper: #FAFAF7;
  --k-line: #E8E6DF;
  --k-muted: #6B6B66;
  --k-accent: #2D2D2A;

  /* Functional */
  --bg: #FAFAF7;
  --card: #FFFFFF;
  --text: #141413;
  --text-muted: #6B6B66;
  --border: #E8E6DF;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.06), 0 16px 40px rgba(0,0,0,0.08);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
}

a { color: inherit; text-decoration: none; }
pre { overflow-x: auto; }

/* Nav bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand-lockup .x {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 18px;
}

.kindred-mark {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--k-black);
  font-size: 26px;
  line-height: 1;
  font-variation-settings: "opsz" 144;
}

.mc-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Hide MC co-brand elements */
.topbar .mc-mark,
.mc-mark,
.mc-circles,
.mc-wordmark { display: none; }
.topbar .brand-lockup .x { display: none; }

.nav-links {
  display: flex;
  gap: 4px;
  font-size: 13px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.15s;
}
.nav-links a:hover { background: var(--k-line); color: var(--text); }
.nav-links a.active { background: var(--k-ink); color: #fff; }

/* Page layout */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.page-header {
  margin-bottom: 40px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

h1 {
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 16px;
}

h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 12px;
}

h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 0 0 8px;
}

p { line-height: 1.55; color: var(--text); margin: 0 0 12px; }
.lede { font-size: 17px; color: var(--text-muted); max-width: 720px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill.kindred { background: #0A0A0A; color: #fff; }
.pill.mastercard {
  background: var(--k-ink);
  color: #fff;
}
.pill.muted { background: var(--k-line); color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--k-ink); border-color: var(--k-ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.mc {
  background: var(--k-ink);
  border-color: transparent;
  color: #fff;
}

.muted { color: var(--text-muted); }
.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 12px; }

/* ============================================================
   SITE FOOTER — mirrors kindred.co footer
   ============================================================ */
.site-footer {
  background: #1E1E3F;
  color: #fff;
  margin-top: 80px;
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 32px 48px;
}
.site-footer .footer-brand {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: #fff;
  display: block;
  margin-bottom: 32px;
}
.site-footer .footer-cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border: 1.5px solid #fff;
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  margin-bottom: 48px;
}
.site-footer .footer-cta:hover {
  background: #fff;
  color: #1E1E3F;
}
.site-footer .footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.site-footer .footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer .footer-links a:hover { color: #fff; }
.site-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}
.site-footer .footer-bottom a {
  color: rgba(255,255,255,0.6);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.site-footer .footer-bottom a:hover { color: #fff; }

@media (max-width: 768px) {
  .site-footer-inner { padding: 40px 16px 32px; }
  .site-footer .footer-links { gap: 16px; }
}

.footer-note {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

/* JSON / code syntax highlight tokens — used in dark code panes */
.json-key { color: #88C0D0; }
.json-str { color: #A3BE8C; }
.json-num { color: #B48EAD; }
.json-bool { color: #EBCB8B; }
.json-null { color: #BF616A; }
.json-comment { color: #4C566A; font-style: italic; }
.json-warn { color: #FFA94D; }
.json-good { color: #4ADE80; }

/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 999;
  padding: 8px 16px;
  background: var(--k-ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Fraunces utility for headlines */
.serif {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
}

/* ============================================================
   MOBILE NOTICE BANNER · shows on screens < 768px
   Injected by mobile.js into the top of <body>.
   ============================================================ */
.mobile-notice {
  display: none;
}
/* Banner disabled — site is now mobile-friendly */

/* ============================================================
   HAMBURGER NAV · replaces .nav-links under 768px
   Hamburger button injected by mobile.js, shown only on mobile.
   ============================================================ */
.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.5);
  z-index: 100;
}
.mobile-nav-overlay.open { display: block; }

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 80vw;
  height: 100%;
  background: #fff;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.mobile-nav-panel a {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}
.mobile-nav-panel a:hover { background: var(--bg); }
.mobile-nav-panel a.active {
  background: var(--k-ink);
  color: #fff;
}
.mobile-nav-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .topbar .nav-links { display: none; }
  .topbar .hamburger-btn { display: inline-flex; }
  .topbar { padding: 14px 16px; }
  .page { padding: 24px 16px 64px; overflow-x: hidden; }
  h1 { font-size: 32px !important; }
  .kindred-mark { font-size: 22px; }
}

/* ============================================================
   INDEX PAGE responsive helpers
   ============================================================ */
.idx-metrics-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 36px;
  overflow: hidden;
}
.idx-metrics-row > div {
  padding: 18px 20px;
  border-right: 1px solid var(--border);
}
.idx-metrics-row > div:last-child { border-right: none; }

.idx-hero {
  background: linear-gradient(135deg, #0A0A0A, #1A1A17);
  color: #fff;
  border-radius: 16px;
  padding: 36px 40px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.idx-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.idx-hero-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.idx-value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.logo-ribbon {
  text-align: center;
  margin-bottom: 56px;
}
.logo-ribbon-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.logo-ribbon-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.logo-ribbon-row img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.45;
  transition: all 0.2s;
}
.logo-ribbon-row img:hover {
  filter: grayscale(0%);
  opacity: 0.85;
}

.idx-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .idx-value-grid { grid-template-columns: 1fr; }
  .idx-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .logo-ribbon-row { gap: 24px; }
  .logo-ribbon-row img { height: 30px; }
  .idx-metrics-row { grid-template-columns: repeat(2, 1fr); }
  .idx-metrics-row > div { border-right: none; border-bottom: 1px solid var(--border); }
  .idx-metrics-row > div:nth-child(odd) { border-right: 1px solid var(--border); }
  .idx-metrics-row > div:nth-last-child(-n+2) { border-bottom: none; }
  .idx-hero { padding: 28px 22px; }
  .idx-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .idx-hero h2 { font-size: 26px !important; }
  .idx-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .idx-metrics-row { grid-template-columns: 1fr; }
  .idx-metrics-row > div { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
  .idx-metrics-row > div:last-child { border-bottom: none !important; }
  .idx-hero-tiles { grid-template-columns: 1fr; }
  .logo-ribbon-row { gap: 16px; }
  .logo-ribbon-row img { height: 24px; }
}
