/* ==========================================================================
   Madihum Design System — canonical theme for madihum.com
   ==========================================================================
   This file is the source of truth for brand tokens and shared components
   (buttons, badge, tag, nav, footer) across every page on the site.

   If you're generating or editing a page with an external tool/design
   system: link this file and use these tokens/classes as-is. Do not
   introduce a parallel color/spacing system or invent new CSS variables
   for things already defined here — ask first if something is missing.

   Requires Google Fonts: Space Grotesk (weights 500;600;700) and
   Inter (weights 400;500;600;700;800), loaded by each page's <head>.
   ========================================================================== */

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

:root {
  /* Brand */
  --violet: #8b5cf6;
  --violet-lt: #c4b5fd;
  --violet-deep: #4c1d95;

  /* Neutrals — dark surfaces (default page background) */
  --ink: #0d0f14;
  --surface: #141720;
  --surface-2: #1b1f2b;
  --border: rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.13);

  --text: #e8e6e0;
  --text-secondary: #8a8880;
  --muted: rgba(245, 243, 250, 0.62);
  --dim: rgba(245, 243, 250, 0.4);

  /* Neutrals — light/white sections */
  --ink-on-white: #0a0714;
  --muted-on-white: #4b4560;
  --dim-on-white: #6b6580;

  /* Semantic accents */
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.12);
  --blue-brd: rgba(59, 130, 246, 0.3);
  --teal: #14b8a6;
  --teal-dim: rgba(20, 184, 166, 0.1);
  --teal-brd: rgba(20, 184, 166, 0.3);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.1);
  --green-brd: rgba(34, 197, 94, 0.3);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.1);
  --amber-brd: rgba(245, 158, 11, 0.3);
  --red: #f43f5e;
  --red-dim: rgba(244, 63, 94, 0.1);
  --red-brd: rgba(244, 63, 94, 0.3);
  --kyc: #a855f7;
  --kyc-dim: rgba(168, 85, 247, 0.1);
  --kyc-brd: rgba(168, 85, 247, 0.3);
  --vnd: #0ea5e9;
  --vnd-dim: rgba(14, 165, 233, 0.1);
  --vnd-brd: rgba(14, 165, 233, 0.3);
  --auth: #f97316;
  --auth-dim: rgba(249, 115, 22, 0.1);
  --auth-brd: rgba(249, 115, 22, 0.3);
  --accent: #6ee7ff;

  --critical: #e04040;
  --critical-dim: rgba(224, 64, 64, 0.15);
  --critical-glow: rgba(224, 64, 64, 0.35);
  --high: #e08030;
  --high-dim: rgba(224, 128, 48, 0.12);
  --medium: #c8b020;
  --medium-dim: rgba(200, 176, 32, 0.12);
  --low: #48a068;
  --low-dim: rgba(72, 160, 104, 0.12);
  --accent: #5570f0;
  --accent-dim: rgba(85, 112, 240, 0.15);
  --sf: #ff6b35;
  --sf-bg: rgba(255, 107, 53, 0.12);
  --m365: #00a36c;
  --m365-bg: rgba(0, 163, 108, 0.12);
  --goog: #4285f4;
  --goog-bg: rgba(66, 133, 244, 0.12);
  --ent: #8a8880;
  --ent-bg: rgba(138, 136, 128, 0.12);
  --disc: #9b6bf0;
  --disc-bg: rgba(155, 107, 240, 0.12);

  /* Shape */
  --radius: 14px;
  --radius-lg: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.section-label,
.badge,
.card-title,
.nav-name,
.footer-name {
  font-family: "Space Grotesk", sans-serif;
}

a {
  color: var(--violet-lt);
}

a:hover {
  color: var(--violet);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13px;
}

.btn-primary {
  background: var(--violet);
  color: #fff;
}

.btn-primary:hover {
  background: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--violet);
  background: rgba(139, 92, 246, 0.08);
}

.btn-white {
  background: #fff;
  color: var(--violet-deep);
  font-weight: 700;
}

.btn-white:hover {
  background: var(--violet-lt);
}

/* ── Badge / Tag ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--violet-lt);
  margin-bottom: 26px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--violet);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--violet-lt);
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 7, 20, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-back {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-back:hover {
  color: var(--violet-lt);
}

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

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--violet-lt) !important;
  font-weight: 700 !important;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-nav-cta {
  background: var(--violet);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-nav-cta:hover {
  background: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 5% 16px;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    width: 100%;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* ── Footer ── */
footer {
  background: var(--surface);
  color: var(--dim);
  padding: 40px 5%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
}
footer .footer-brand { justify-self: start; }
footer .footer-links { justify-self: center; }
footer .footer-copy { justify-self: end; }

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  font-size: 13px;
  color: var(--dim);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 12px;
}

@media (max-width: 768px) {
  footer {
    grid-template-columns: 1fr;
    text-align: center;
  }
  footer .footer-brand,
  footer .footer-links,
  footer .footer-copy {
    justify-self: center;
  }
}

/* ==========================================================================
   Preview additions — Network Grid / Technical direction (content-v2 refresh)
   Additive only. Nothing above this line is modified.
   ========================================================================== */

/* Grid backdrop for dark sections */
.grid-bg {
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Gradient-fill highlight card (used sparingly) */
.gradient-card {
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-deep) 100%);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
}

.gradient-card.blue {
  background: linear-gradient(135deg, var(--blue) 0%, #1e3a8a 100%);
}

.gradient-card .gc-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 8px;
}

.gradient-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  margin-bottom: 6px;
}

.gradient-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* Numbered stepper card for multi-step process flows (e.g. "How It Works").
   A connecting line runs behind numbered circles anchored to each card's
   top edge — the circle position is independent of card content/padding,
   so it stays aligned even where one step (.active) wraps a .gradient-card
   with different internal spacing. Pair with .gradient-card for the
   highlighted/"core" step — see .step-block.active overrides below. */
.step-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: left;
  position: relative;
  padding-top: 20px;
}

.step-row::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--border);
}

.step-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  position: relative;
  margin-top: 20px;
}

.step-circle {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--violet);
  color: var(--violet-lt);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.step-block h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.step-block .step-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Stack of labelled detail blocks inside a step card */
.step-block .step-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-block .step-item {
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  transition: border-color 0.2s;
}

.step-block .step-item:hover {
  border-color: var(--violet);
}

.step-block .step-item strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.step-block .step-item span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* Highlighted/"core" step — violet fill on the header strip only; the
   detail blocks below sit on the card's normal dark surface with a
   violet-tinted border/label, not on the gradient itself. */
.step-block.active {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
}

.step-block.active .step-circle {
  width: 40px;
  height: 40px;
  font-size: 16px;
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25);
}

.step-block.active .step-header {
  background: linear-gradient(135deg, var(--violet) 0%, var(--violet-deep) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px;
}

.step-block.active .step-header .gc-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 8px;
}

.step-block.active .step-header h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  color: #fff;
  margin-bottom: 6px;
}

.step-block.active .step-header p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin: 0;
}

.step-block.active .step-items {
  padding: 20px;
}

.step-block.active .step-item {
  background: var(--ink);
  border-color: rgba(139, 92, 246, 0.4);
}

.step-block.active .step-item:hover {
  border-color: var(--violet);
}

.step-block.active .step-item strong {
  color: var(--violet-lt);
}

.step-block.active .step-item span {
  color: var(--muted);
}

@media (max-width: 900px) {
  .step-row {
    grid-template-columns: 1fr;
  }
  .step-row::before {
    display: none;
  }
}

/* Checklist row of short labelled signals (e.g. trust signals, integration
   points) — a violet checkmark badge plus a line of text, wrapping to a
   centered row. */
.signals-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.signals-row .signal {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  text-align: left;
}

.signals-row .signal-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--violet);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .signals-row {
    flex-direction: column;
    gap: 14px;
  }
}

/* Deep-violet bridge band (used once, About TrustID) */
.bridge-band {
  background: linear-gradient(120deg, var(--surface-2) 0%, var(--ink) 100%);
  padding: 64px 5%;
  text-align: center;
}

/* Monospace utility for technical strings (MITRE codes, JWT, API terms) */
.mono {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Identity-type accent classes — solid dark card, neutral border, uniform violet label */
.id-human, .id-vendor, .id-machine, .id-agent {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--violet-lt);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.id-human:hover, .id-vendor:hover, .id-machine:hover, .id-agent:hover {
  border-color: var(--violet);
  transform: translateY(-2px);
}

/* MITRE / control / KYC badges */
.mitre-badge {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--red-dim);
  border: 1px solid var(--red-brd);
  color: var(--red);
  display: inline-block;
}

.control-badge {
  background: var(--green-dim);
  border: 1px solid var(--green-brd);
  color: var(--green);
}

.kyc-badge {
  background: var(--kyc-dim);
  border: 1px solid var(--kyc-brd);
  color: var(--kyc);
}

/* Small pulsing status dots */
.hc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; animation: pulse 2s infinite; }
.hc-dot--g { background: #22c55e; box-shadow: 0 0 8px 2px rgba(34, 197, 94, 0.9); }
.hc-dot--b { background: #3b82f6; box-shadow: 0 0 8px 2px rgba(59, 130, 246, 0.9); }
.hc-dot--y { background: var(--medium); box-shadow: 0 0 8px 2px rgba(200, 176, 32, 0.9); }

/* Gradient-highlighted key phrase for headings on light backgrounds (solid, no text-clip) */
.on-light em {
  font-style: normal;
  color: var(--violet-deep);
}
