/*
 * Site chrome — canonical styles for the main ecosystem nav bar,
 * the product-level sub-nav, and the footer. Linked by every
 * marketing page via <link rel="stylesheet" href="/css/site-chrome.css">.
 *
 * Goal: a single source of truth for header/footer styling so the
 * 16 marketing pages can't drift visually. Per-page <style> blocks
 * may define additional component CSS but should not redefine these
 * selectors. The standardize-chrome.js verifier enforces structural
 * coherence; visual coherence relies on this file being authoritative.
 *
 * Two-tier header layout:
 *   .hq-nav        — fixed, 52 px, ecosystem-level links
 *   .hq-sub-nav    — inline, ALETHEIA product-level links + CTA
 *
 * Footer is a 3-column grid that collapses to a single column on
 * narrow viewports.
 */

/* ---------- main ecosystem nav (top bar) ---------- */
.hq-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e1e2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.hq-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #e8e8f0;
  font-size: 0.9rem;
  font-weight: 500;
}
.hq-logo-mark {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #ff6b35, #ffd700);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
  color: #000;
}
.hq-nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.hq-nav-links a {
  text-decoration: none;
  color: #64748b;
  font-size: 0.85rem;
  transition: color 0.15s;
}
.hq-nav-links a:hover { color: #e8e8f0; }
.hq-nav-links a.active { color: #3a9fbf; font-weight: 500; }
@media (max-width: 640px) {
  .hq-nav-links { display: none; }
}

/* ---------- product sub-nav (fixed, below main bar) ---------- */
/* Both nav bars are locked to the top of the viewport. The main bar
   sits at top:0 with a translucent + blurred background; the sub-nav
   sits directly below at top:52px with an opaque background so
   content scrolling under it doesn't bleed through. Pages must add
   body { padding-top: 104px; } to clear both. */
.hq-sub-nav {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.85rem 1.5rem;
  background: #0e0e15;
  border-bottom: 1px solid #1e1e2a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 0.85rem;
}
.hq-sub-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.hq-sub-nav-label {
  color: #3a9fbf;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-right: 0.5rem;
}
.hq-sub-nav a {
  text-decoration: none;
  color: #c5c9d6;
  transition: color 0.15s;
}
.hq-sub-nav a:hover { color: #e8e8f0; }
.hq-sub-nav a.active {
  color: #3a9fbf;
  font-weight: 500;
}
.hq-sub-nav a.cta-link {
  margin-left: auto;
  background: #3a9fbf;
  color: #0a0a0f;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.15s;
}
.hq-sub-nav a.cta-link:hover { background: #4aafcf; color: #0a0a0f; }
@media (max-width: 640px) {
  .hq-sub-nav { gap: 0.85rem; padding: 0.7rem 1rem; font-size: 0.8rem; }
  .hq-sub-nav-label { display: none; }
  .hq-sub-nav a.cta-link { margin-left: 0; }
}

/* ---------- canonical footer ---------- */
.hq-footer {
  margin-top: 5rem;
  padding: 2.5rem 1.5rem 2rem;
  border-top: 1px solid #1e1e2a;
  color: #64748b;
  font-size: 0.9rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.hq-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.hq-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.hq-footer-col h4 {
  color: #e8e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
}
.hq-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hq-footer-col li {
  padding: 0;
  margin: 0 0 0.5rem;
  position: static;
}
/* Per-page styles often set li:before { content: "→"; position: absolute }
   on generic <li> for in-content bullet replacement. That selector
   matches the footer's column links too and overlays the arrow on
   the first letter. Explicitly suppress it inside the footer. */
.hq-footer-col li:before { content: none !important; }
.hq-footer-col a {
  color: #c5c9d6;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}
.hq-footer-col a:hover { color: #3a9fbf; }
.hq-footer-brand p {
  margin: 0 0 0.6rem;
  color: #c5c9d6;
  font-size: 0.88rem;
  line-height: 1.55;
}
.hq-footer-brand .tagline {
  color: #64748b;
  font-size: 0.82rem;
}
.hq-footer-bottom {
  border-top: 1px solid #1e1e2a;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.82rem;
  color: #64748b;
  align-items: center;
}
.hq-footer-bottom a { color: #64748b; text-decoration: none; }
.hq-footer-bottom a:hover { color: #c5c9d6; }
.hq-footer-bottom .spacer { flex: 1; }
@media (max-width: 800px) {
  .hq-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .hq-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ============================================================
   Looking Glass — recurring motifs that thread the methodology
   through the site. .lg-equation appears on /, /about, /pricing,
   /why-aletheia. .lg-matrix appears on / and /about (6-card
   compound × context grid). DRY'd to this shared sheet in v=3.
   ============================================================ */

.lg-equation {
  margin: 2rem auto 2.5rem;
  max-width: 900px;
  padding: 1.3rem 1.6rem 1.4rem;
  background: rgba(58, 159, 191, 0.06);
  border: 1px solid rgba(58, 159, 191, 0.3);
  border-radius: 8px;
}
.lg-equation-hero {
  margin: 2rem 0 2.5rem;
  border-left: 3px solid #3a9fbf;
}
.lg-equation-eyebrow {
  font-size: 0.7rem;
  color: #64748b;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.lg-equation-form-a {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 1.05rem;
  color: #e8e8f0;
  line-height: 1.6;
  word-break: break-word;
}
.lg-equation-fn  { color: #ff6b35; font-weight: 700; }
.lg-equation-var { color: #3a9fbf; font-style: italic; }
.lg-equation-eq  { color: #64748b; padding: 0 0.4rem; }
.lg-equation-out { color: #c5c9d6; }
.lg-equation-form-b {
  margin-top: 0.7rem;
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.88rem;
  color: #94a3b8;
}

.lg-matrix-block {
  margin: 1.75rem 0 2.5rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: rgba(58, 159, 191, 0.05);
  border: 1px solid rgba(58, 159, 191, 0.28);
  border-left: 3px solid #3a9fbf;
  border-radius: 6px;
}
.lg-matrix-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  color: #3a9fbf;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.lg-matrix-intro {
  font-size: 0.94rem;
  color: #c5c9d6;
  margin-bottom: 1.2rem;
  line-height: 1.55;
}
.lg-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
@media (max-width: 760px) { .lg-matrix-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .lg-matrix-grid { grid-template-columns: 1fr; } }
.lg-matrix-card {
  display: block;
  background: #12121a;
  border: 1px solid #1e1e2a;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lg-matrix-card:hover {
  border-color: #3a9fbf;
  transform: translateY(-2px);
}
.lg-matrix-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #1e1e2a;
  background: #0a0a0f;
  aspect-ratio: 1 / 1;
}
.lg-matrix-card-meta { padding: 0.55rem 0.75rem 0.7rem; }
.lg-matrix-card-compound {
  font-size: 0.92rem;
  font-weight: 500;
  color: #e8e8f0;
}
.lg-matrix-card-context {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 0.1rem;
  font-family: 'Menlo', 'Monaco', monospace;
}
.lg-matrix-readout {
  margin-top: 1.2rem;
  font-size: 0.88rem;
  color: #c5c9d6;
  line-height: 1.6;
}

/* ---------- shared form primitives (.hq-form) ----------
 * Canonical form chrome for /contact, /demo, and (later, retro-fit)
 * the lead-magnet pages under /resources. Uses real <label for=...>
 * pairings, aria-invalid on validation failure, and a status line
 * with role="status" aria-live="polite" so screen readers announce
 * success/error. Honeypot is positioned off-screen (not display:none,
 * which some bots detect).
 */
.hq-form {
  display: grid;
  gap: 18px;
  max-width: 640px;
}
.hq-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hq-form-row.hq-form-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) {
  .hq-form-row.hq-form-row-inline { grid-template-columns: 1fr; }
}
.hq-form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #c5c9d6;
}
.hq-form-req {
  color: #ff6b6b;
  margin-left: 2px;
}
.hq-form-help {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: -2px;
}
.hq-form-input,
.hq-form-select,
.hq-form-textarea {
  width: 100%;
  background: #11151c;
  color: #e8e8f0;
  border: 1px solid #2a3340;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hq-form-input::placeholder,
.hq-form-textarea::placeholder {
  color: #4a5366;
}
.hq-form-input:hover,
.hq-form-select:hover,
.hq-form-textarea:hover {
  border-color: #3a4453;
}
.hq-form-input:focus,
.hq-form-select:focus,
.hq-form-textarea:focus {
  outline: none;
  border-color: #3a9fbf;
  box-shadow: 0 0 0 3px rgba(58, 159, 191, 0.18);
}
.hq-form-input[aria-invalid="true"],
.hq-form-select[aria-invalid="true"],
.hq-form-textarea[aria-invalid="true"] {
  border-color: #ff6b6b;
}
.hq-form-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}
.hq-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.hq-form-submit {
  background: linear-gradient(135deg, #ff6b35, #ffd700);
  color: #0a0a0f;
  border: none;
  border-radius: 6px;
  padding: 11px 22px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.hq-form-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 107, 53, 0.28);
}
.hq-form-submit:focus-visible {
  outline: 2px solid #3a9fbf;
  outline-offset: 2px;
}
.hq-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.hq-form-status {
  min-height: 1.4em;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #c5c9d6;
}
.hq-form-status.ok { color: #4ade80; }
.hq-form-status.err { color: #ff6b6b; }
.hq-form-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.lg-matrix-readout strong { color: #e8e8f0; }

/* Skip-to-content link — off-screen until keyboard focus, then pinned
   top-left as the first interactive element. WCAG 2.4.1 bypass-blocks.
   Source: 2026-05-14-business-readiness-extension.md §2. */
.hq-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 0.7rem 1.15rem;
  background: #3a9fbf;
  color: #0a0a0f;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 0;
}
.hq-skip-link:focus {
  left: 0;
  outline: 2px solid #e8e8f0;
  outline-offset: -2px;
}
