/* ============================================================
   MFC Design System — "Circuit" v2
   mfc.psyrcuit.com · Psyrcuit LLC · June 2026
   All color pairings AA-verified per MFC_Website_Redesign_Spec §2.3
   ============================================================ */

/* ---------- Fonts (self-hosted, variable, latin) ---------- */
@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/outfit-var-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-var-latin.woff2') format('woff2');
  font-weight: 100 800; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --bg-0: #0A0A11;
  --bg-1: #13131C;
  --bg-2: #1C1C28;
  /* Ink (contrast on --bg-0/1: 16.9 / 9.6 / 5.4) */
  --ink-1: #F2F2F7;
  --ink-2: #B8B8C7;
  --ink-3: #8A8A9D;
  /* Brand */
  --brand: #AF01FF;        /* graphics, borders, fills only — not body text */
  --brand-text: #C95DFF;   /* links/labels as text on dark (5.9:1) */
  --brand-deep: #8B00CC;
  --brand-dim: rgba(175, 1, 255, 0.12);
  --brand-glow: rgba(175, 1, 255, 0.35);
  --accent: #00E5F5;       /* data accents (10.8:1) */
  --accent-dim: rgba(0, 229, 245, 0.10);
  --focus: #FFD166;
  /* Lines */
  --line-1: rgba(175, 1, 255, 0.22);
  --line-0: rgba(255, 255, 255, 0.08);
  /* Type */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  /* Scale (1.25) */
  --t-sm: 0.833rem;   /* 13.3 */
  --t-base: 1rem;     /* 16 */
  --t-md: 1.25rem;    /* 20 */
  --t-lg: 1.563rem;   /* 25 */
  --t-xl: 1.953rem;   /* 31 */
  --t-2xl: 2.441rem;  /* 39 */
  --t-3xl: 3.052rem;  /* 49 */
  /* Layout */
  --container: 1200px;
  --measure: 760px;
  --radius: 16px;
  --radius-sm: 10px;
  --sect: clamp(56px, 9vw, 128px);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.65;
  background: var(--bg-0);
  color: var(--ink-2);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-1); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5.4vw, var(--t-3xl)); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, var(--t-2xl)); font-weight: 700; }
h3 { font-size: var(--t-md); font-weight: 600; }
p  { max-width: var(--measure); }
a  { color: var(--brand-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink-1); }
img, svg, video { max-width: 100%; height: auto; display: block; }
code, .mono { font-family: var(--font-mono); }
::selection { background: var(--brand-deep); color: #fff; }

/* Focus — visible everywhere (WCAG 2.4.7 / 2.4.11) */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link (WCAG 2.4.1) */
.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 1000;
  background: var(--bg-2); color: var(--ink-1); font-weight: 600;
  padding: 12px 20px; border-radius: 0 0 10px 10px; text-decoration: none;
  border: 1px solid var(--line-1); transition: top 0.15s ease-out;
}
.skip-link:focus { top: 0; }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--sect) 0; position: relative; }
.section-head { max-width: var(--measure); margin-bottom: clamp(32px, 5vw, 56px); }
.kicker {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--brand-text); margin-bottom: 12px; display: block;
}
.section-head p { color: var(--ink-2); font-size: var(--t-md); font-weight: 350; margin-top: 14px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.split  { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split.media-first > .split-media { order: -1; }
}
@media (max-width: 580px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 10, 17, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-0);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink-1); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
  color: var(--ink-2); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  padding: 8px 14px; border-radius: 8px;
}
.nav-links a:hover { color: var(--ink-1); background: var(--bg-2); }
.nav-links a[aria-current="page"] { color: var(--ink-1); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-0); border-radius: 8px;
  width: 44px; height: 44px; cursor: pointer; color: var(--ink-1);
  align-items: center; justify-content: center;
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-1); border-bottom: 1px solid var(--line-0); padding: 16px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; font-size: 1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  padding: 13px 26px; min-height: 48px; border-radius: 10px; cursor: pointer;
  text-decoration: none; border: 1px solid transparent;
  transition: transform 0.15s ease-out, box-shadow 0.2s ease-out, background 0.15s;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px var(--brand-glow); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-1); border-color: var(--line-1); }
.btn-ghost:hover { background: var(--brand-dim); border-color: var(--brand); }
.btn-lg { padding: 16px 32px; font-size: 1.08rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-1); border: 1px solid var(--line-0);
  border-radius: var(--radius); padding: 28px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.95rem; color: var(--ink-2); }
.card-accent { border-color: var(--line-1); }
.icon-chip {
  width: 44px; height: 44px; border-radius: 11px; margin-bottom: 18px;
  background: var(--brand-dim); border: 1px solid var(--line-1);
  display: flex; align-items: center; justify-content: center; color: var(--brand-text);
}

/* ---------- Stat band ---------- */
.stat-band { display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 64px); }
.stat .stat-num {
  font-family: var(--font-display); font-weight: 800; font-size: var(--t-xl);
  color: var(--ink-1); display: block; line-height: 1.1;
}
.stat .stat-num em { font-style: normal; color: var(--brand-text); }
.stat .stat-label { font-size: 0.85rem; color: var(--ink-3); }

/* ---------- Screenshot / placeholder frames ---------- */
.shot {
  background: var(--bg-1); border: 1px solid var(--line-1); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 24px 80px rgba(175, 1, 255, 0.10);
}
.shot-bar {
  display: flex; align-items: center; gap: 6px; padding: 11px 14px;
  border-bottom: 1px solid var(--line-0); background: var(--bg-2);
}
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-1); }
.shot-bar span { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-3); margin-left: 8px; }
.shot-body { position: relative; }
/* Placeholder treatment — replaced by real captures (see redesign spec §2.8 prerequisites) */
.shot-placeholder {
  aspect-ratio: 16 / 10; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; text-align: center; padding: 24px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255,255,255,0.015) 14px 28px),
    radial-gradient(ellipse at 50% 0%, var(--brand-dim), transparent 70%);
}
.shot-placeholder strong { color: var(--ink-2); font-family: var(--font-display); font-weight: 600; }
.shot-placeholder span { font-size: 0.8rem; color: var(--ink-3); max-width: 360px; }

/* ---------- Quote / testimonial ---------- */
.quote-card { background: var(--bg-1); border: 1px solid var(--line-0); border-radius: var(--radius); padding: 30px; }
.quote-card blockquote { font-size: 1.02rem; color: var(--ink-1); font-weight: 450; }
.quote-card figcaption { margin-top: 16px; font-size: 0.85rem; color: var(--ink-3); }
.quote-card.placeholder blockquote { color: var(--ink-3); font-style: italic; font-weight: 400; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; }
.checklist li { position: relative; padding: 7px 0 7px 32px; color: var(--ink-2); }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 12px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent-dim); border: 1px solid rgba(0, 229, 245, 0.4);
}
.checklist li::after {
  content: ''; position: absolute; left: 5px; top: 16px; width: 8px; height: 5px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Trust / badge strip ---------- */
.badge-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-2);
  background: var(--bg-1); border: 1px solid var(--line-0);
  border-radius: 999px; padding: 8px 16px;
}
.badge svg { color: var(--accent); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-1); border-radius: 20px;
  padding: clamp(36px, 6vw, 64px); text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% -20%, var(--brand-dim), transparent 60%);
}
.cta-band > * { position: relative; }
.cta-band p { margin: 12px auto 28px; color: var(--ink-2); }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-0); padding: 56px 0 28px; margin-top: var(--sect); }
.footer-grid { display: flex; gap: 48px; flex-wrap: wrap; margin-bottom: 36px; }
.footer-brand { flex: 1; min-width: 220px; }
.footer-brand p { color: var(--ink-3); font-size: 0.84rem; margin-top: 10px; max-width: 300px; }
.footer-col { min-width: 150px; }
.footer-col h2 {
  font-size: 0.72rem; font-family: var(--font-mono); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 14px;
}
.footer-col a { display: block; color: var(--ink-2); text-decoration: none; font-size: 0.88rem; padding: 4px 0; }
.footer-col a:hover { color: var(--ink-1); }
.footer-bottom {
  border-top: 1px solid var(--line-0); padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.8rem; color: var(--ink-3);
}
.footer-bottom a { color: var(--ink-2); }

/* ---------- Decorative circuit motif (aria-hidden) ---------- */
.trace { position: absolute; pointer-events: none; color: var(--line-1); }

/* ---------- Reveal-on-scroll (motion-safe only) ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Utilities ---------- */
.measure { max-width: var(--measure); }
.center { text-align: center; }
.mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
