/* ═══════════════════════════════════════════════════════════════════
   COI DASH — Shared design system for sub-pages (see /DESIGN.md)
   Extracted from index.html: tokens, reset, typography, buttons,
   navbar + mobile menu, footer, reveal, responsive nav/footer.
   Serif briefings on navy + paper. One violet. Flat 1px hairlines.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --iris: #6360d8;
  --iris-light: #a3a1f2;
  --vault: #060b25;
  --ink: #000000;
  --paper: #ffffff;
  --slate: #383c51;
  --mist: #dad9ed;

  --font-serif: "Source Serif 4", "Tiempos Headline", Georgia, serif;
  --font-sans: "Inter", "Matter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --max-w: 1200px;
  --gutter: 40px;
  --rail: 1120px;
  --section-pad: 110px;

  /* compat aliases for shared/injected markup */
  --primary: var(--iris);
  --primary-fg: var(--paper);
  --foreground: var(--ink);
  --radius: 4px;
  --space-xs: 8px;
  --space-md: 16px;
}

/* ── Skip Link ── */
.skip-link { position: absolute; top: -100px; left: 16px; padding: 8px 16px; background: var(--iris); color: var(--paper); border-radius: 4px; font-size: 14px; font-weight: 500; z-index: 9999; transition: top 0.2s; }
.skip-link:focus { top: 16px; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
html { scroll-behavior: smooth; }
/* anchor targets scroll clear of the fixed floating navbar */
[id] { scroll-margin-top: 104px; }

body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.18px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

.footer-top, .footer-copyright {
  width: min(var(--rail), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

/* ── Typography ── */
h1, h2, h3, .heading-1, .heading-2, .heading-3, .heading-large {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.heading-1 { font-size: clamp(46px, 6vw, 80px); line-height: 1.02; }
.heading-2, .heading-large { font-size: clamp(34px, 4vw, 52px); line-height: 1.06; }
.heading-3 { font-size: 26px; line-height: 1.2; }
.accent { color: var(--iris); }

.label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--iris);
  display: block;
  margin-bottom: 20px;
}

.subtitle, .lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--slate);
}

/* ── Buttons ── */
.btn, .btn-primary, .btn-secondary, .btn-ghost, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.16px;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.btn-primary, .btn-secondary {
  background: var(--iris);
  color: var(--paper);
  border: 1px solid var(--iris);
}
.btn-primary:hover, .btn-secondary:hover { background: #4f4cc4; border-color: #4f4cc4; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-outline {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.85);
}
.btn-outline:hover { background: var(--mist); color: var(--vault); border-color: var(--mist); }

/* ── Navbar (injected by components.js, floating card) ── */
.navbar {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: min(var(--rail), calc(100% - 2 * var(--gutter)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 14px 12px 22px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 10px;
  z-index: 100;
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-brand img { height: 32px; width: auto; max-width: none; object-fit: contain; }
.navbar-brand span { font-weight: 600; font-size: 17px; letter-spacing: -0.2px; color: var(--ink); white-space: nowrap; }
.navbar-actions { display: flex; align-items: center; gap: 24px; }
.navbar-links { display: flex; align-items: center; gap: 26px; }
.navbar-links a {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.16px;
  transition: color 0.15s ease;
}
.navbar-links a:hover, .navbar-links a.nav-current { color: var(--iris); }
.nav-demo-btn {
  background: var(--iris);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color 160ms ease;
}
.nav-demo-btn:hover { background: #4f4cc4; }
.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; }

.mobile-menu {
  display: none;
  position: fixed;
  top: 88px; left: 50%;
  transform: translateX(-50%);
  width: min(var(--rail), calc(100% - 2 * var(--gutter)));
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 12px 22px;
  z-index: 99;
  flex-direction: column;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  padding: 13px 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ── Footer (injected by components.js) ── */
.footer {
  background: var(--vault);
  color: var(--paper);
  padding: 64px 0 40px;
  margin-top: 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(140px, 1fr));
  align-items: start;
  gap: 48px;
}
.footer-info { display: flex; flex-direction: column; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 26px; width: auto; max-width: none; }
.footer-brand span { font-size: 15px; font-weight: 600; letter-spacing: -0.16px; color: var(--paper); }
.footer-tagline { max-width: 320px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.6); }
.footer-contact { font-style: normal; display: flex; flex-direction: column; gap: 10px; }
.footer-contact-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-contact-item svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--iris-light); }
.footer-contact-item a:hover { color: var(--paper); }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links-title {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.3;
  color: var(--paper);
  margin-bottom: 6px;
}
.footer-links a { font-size: 14.5px; color: rgba(255,255,255,0.65); transition: color 0.15s ease; }
.footer-links a:hover, .footer-links a.nav-current { color: var(--paper); }
.footer-copyright {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Responsive (shared pieces) ── */
@media (max-width: 860px) {
  :root { --gutter: 24px; --section-pad: 72px; }
  .navbar-links { display: none; }
  .nav-toggle { display: flex; }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .footer-info { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .nav-demo-btn { display: none; }
}
