/* sincllm-system.css — unified warm-editorial design system for sincllm.com
   Multi-layer: L0 tokens / L1 primitives / L2 components / content+article layer / A3 craft texture.
   Source of truth derived from the home-page warm-editorial system, with WCAG AA corrections
   (contrast witness 2026-06-22). Drop a single <link> into any content/article/legacy page and
   apply the .sl-* classes. Decorative texture honors prefers-reduced-motion and is aria-hidden. */

/* ---------- L0 — FOUNDATIONS / TOKENS ---------- */
:root {
  /* DARK monochrome system matching the logo (black field, white glyph), 2026-06-22 */
  --bg: var(--t-0); --ink: var(--t-9); --card: var(--t-1);
  --prose: var(--t-7);                /* body copy on black, ~13:1 */
  --muted: var(--t-5);                /* decorative / large only */
  --muted-strong: var(--t-6);         /* small label text on black, AA */
  --border: var(--t-3); --tag-bg: var(--t-2); --highlight: #181816;
  --accent: var(--t-9);               /* white glyph color: fills, borders, eyebrows, links */
  --accent-text: var(--t-9);          /* links: white + underline */
  --accent2: var(--t-9);              /* white quote-mark / mono display */
  --glow: var(--t-9);                 /* light accents on dark */
  --dark: var(--t-0);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --measure: 70ch;
  --step: clamp(56px, 9vw, 96px);   /* vertical section rhythm */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---------- BASE ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.7;
  font-feature-settings: "kern" 1, "liga" 1; text-rendering: optimizeLegibility;
  position: relative; min-height: 100vh;
}
/* A3 — paper grain (human tactile layer), subtle, fixed, decorative */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; mix-blend-mode: normal; display: none; /* grain off: flat bg matches other pages */
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > *:not(.sl-nav):not(.sl-skip-link) { position: relative; z-index: 1; }

/* skip link (WCAG 2.4.1) */
.sl-skip-link { position: absolute; left: -9999px; top: 0; }
.sl-skip-link:focus { left: 0; top: 0; z-index: 200; padding: 10px 18px; background: var(--accent); color: var(--bg); font-family: var(--mono); font-size: 13px; }

/* ---------- L1 — PRIMITIVES ---------- */
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
code, .mono { font-family: var(--mono); }
code {
  background: var(--tag-bg); color: var(--t-7); padding: 2px 6px;
  border-radius: 4px; font-size: 0.88em;
}
.sl-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px;
}
.sl-tag {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--prose);
}
.sl-btn {
  display: inline-block; font-family: var(--sans); font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  padding: 14px 30px; border-radius: 2px; transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}
.sl-btn:hover { text-decoration: none; transform: translateY(-2px); }
.sl-btn-primary { background: var(--accent); color: var(--bg); }
.sl-btn-primary:hover { background: var(--t-9); color: var(--bg); }
.sl-btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.sl-btn-outline:hover { background: var(--ink); color: var(--bg); }

/* ---------- LAYOUT ---------- */
.sl-wrap { max-width: 820px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.sl-shell { width: 100%; }
.sl-section { padding: var(--step) 0; }

/* ---------- L2 — COMPONENTS ---------- */
/* nav */
.sl-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 48px);
  background: rgba(var(--t-0-rgb),0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.sl-nav .sl-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.sl-nav .sl-logo:hover { text-decoration: none; }
.sl-nav .sl-logo img { width: 30px; height: 30px; display: block; border-radius: 5px; }
.sl-wordmark { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: var(--ink); font-weight: 500; }
.sl-footer-logo { width: 38px; height: 38px; display: block; margin: 0 auto 16px; border-radius: 6px; }
.sl-navlinks { display: flex; gap: 28px; align-items: center; }
.sl-navlinks a { font-size: 13px; font-weight: 500; color: var(--muted-strong); letter-spacing: 0.03em; }
.sl-navlinks a:hover { color: var(--ink); text-decoration: none; }
.sl-nav-cta { background: var(--ink); color: var(--bg) !important; padding: 8px 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
.sl-nav-cta:hover { background: var(--t-9); }

/* page header */
.sl-pagehead { padding: 120px 0 40px; }
.sl-pagehead h1 {
  font-family: var(--serif); font-weight: 700; color: var(--ink);
  font-size: clamp(38px, 6vw, 64px); line-height: 1.02; letter-spacing: -0.02em;
}
.sl-pagehead .sl-dek { font-size: clamp(17px, 2vw, 20px); color: var(--prose); margin-top: 18px; max-width: 60ch; }

/* article / prose typography */
.sl-prose { max-width: var(--measure); }
.sl-prose h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; color: var(--ink); margin: 56px 0 18px; letter-spacing: -0.01em; }
.sl-prose h3 { font-family: var(--sans); font-weight: 600; font-size: 20px; color: var(--ink); margin: 36px 0 12px; }
.sl-prose p { color: var(--prose); margin-bottom: 20px; }
.sl-prose p > strong { color: var(--ink); }
.sl-prose ul, .sl-prose ol { color: var(--prose); margin: 0 0 20px 1.2em; }
.sl-prose li { margin-bottom: 8px; }
.sl-prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
/* editorial pull-quote (craft) */
.sl-pullquote {
  font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3vw, 28px);
  line-height: 1.35; color: var(--ink); border-left: 3px solid var(--accent);
  padding: 6px 0 6px 26px; margin: 40px 0;
}
.sl-pullquote::before { content: "\201C"; color: var(--accent2); font-size: 1.4em; line-height: 0; vertical-align: -0.35em; margin-right: 4px; }

/* visually-hidden, screen-reader-only */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* formula / mono display box */
.sl-formula {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 4px; padding: 22px 26px; margin: 28px 0; text-align: center;
  font-family: var(--mono); font-size: clamp(14px, 1.6vw, 17px); color: var(--accent2);
}

/* stats */
.sl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2px; background: var(--border); margin: 40px 0; }
.sl-stat { background: var(--card); padding: 26px 20px; text-align: center; transition: background 0.2s; }
.sl-stat:hover { background: var(--highlight); }
.sl-stat .n { font-family: var(--serif); font-size: clamp(30px, 4vw, 40px); font-weight: 700; color: var(--accent); line-height: 1; }
.sl-stat .l { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-strong); margin-top: 10px; }

/* table */
.sl-table { width: 100%; border-collapse: collapse; margin: 28px 0; background: var(--card); border: 1px solid var(--border); }
.sl-table th, .sl-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 15px; vertical-align: top; }
.sl-table thead th, .sl-table th[scope="col"] { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--prose); background: var(--tag-bg); font-weight: 500; }
.sl-table td { color: var(--prose); }
.sl-table td:first-child, .sl-table th[scope="row"] { color: var(--ink); font-weight: 500; text-align: left; font-family: var(--sans); font-size: 15px; letter-spacing: normal; text-transform: none; background: none; }
.sl-table tr:last-child td { border-bottom: none; }

/* callout */
.sl-callout { background: var(--highlight); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 4px 4px 0; padding: 22px 26px; margin: 28px 0; color: var(--prose); }

/* CTA block */
.sl-cta { background: var(--card); border: 1px solid var(--border); color: var(--ink); border-radius: 6px; padding: 44px 36px; margin: var(--step) 0; text-align: center; }
.sl-cta p { color: rgba(var(--t-9-rgb),0.82); margin-bottom: 18px; font-size: 16px; }
.sl-cta .sl-eyebrow { color: var(--glow); }
.sl-cta .sl-cta-head { font-family: var(--serif); font-size: clamp(24px, 3.6vw, 32px); color: var(--ink); margin: 4px 0 10px; line-height: 1.15; }
.sl-cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.sl-cta .sl-btn-primary { background: var(--accent); color: var(--bg); }
.sl-btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.sl-btn-ghost:hover { background: var(--ink); color: var(--bg); }
.sl-cta .sl-btn-ghost { color: var(--ink); border: 1px solid rgba(255,255,255,0.4); }
.sl-cta .sl-btn-ghost:hover { border-color: var(--glow); color: var(--glow); background: transparent; }
.sl-cta .sl-btn-primary:hover { background: var(--t-9); color: var(--bg); }

/* portrait (editorial human anchor) */
.sl-portrait { float: right; width: 220px; margin: 4px 0 24px 32px; border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(15,14,12,0.08); background: var(--card); }
.sl-portrait img { width: 100%; height: auto; display: block; filter: contrast(1.02) saturate(0.96); }
.sl-portrait figcaption { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--prose); padding: 8px 10px; border-top: 1px solid var(--border); }

/* mono divider (interior rhythm) */
.sl-divider { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-text); border-top: 1px solid var(--border); padding-top: 22px; margin-top: 48px; }

/* footer */
.sl-footer { background: var(--t-0); border-top: 1px solid var(--border); color: rgba(var(--t-9-rgb),0.7); padding: 48px clamp(20px,5vw,48px); text-align: center; font-size: 14px; margin-top: var(--step); }
.sl-footer p { margin: 6px 0; }
.sl-footer a { color: var(--glow); text-decoration: underline; text-underline-offset: 3px; }
.sl-footer .sl-sitemap { margin-top: 14px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }

/* callout internal spacing + link contract (system-managed, no inline styles) */
.sl-callout p { margin: 0 0 6px; }
.sl-callout p:last-child { margin: 0; }
.sl-callout a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .sl-navlinks { gap: 16px; }
  .sl-navlinks a:not(.sl-nav-cta) { display: none; }   /* nav links hidden; footer sitemap provides the mobile path */
  .sl-pagehead { padding: 92px 0 28px; }
  .sl-portrait { float: none; width: 100%; max-width: 320px; margin: 0 auto 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
