/* ════════════════════════════════════════════════════════════════
   InquiSight Design System — site.css
   Shared foundation for every page. New pages should link this
   file and compose from these primitives instead of writing
   page-local CSS.
   ════════════════════════════════════════════════════════════════ */

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

:root {
  /* Color tokens */
  --ink: #14151a;
  --ink-deep: #0e1020;          /* dark sections */
  --paper: #fbfaf7;
  --surface: #f4f2ec;
  --card: #ffffff;
  --accent: #1e2a5c;
  --accent-light: #3d4fa1;
  --accent-wash: rgba(30,42,92,0.06);
  --muted: #63666e;
  --faint: #9a9da6;
  --border: #e6e3d9;
  --border-strong: #d5d2c6;
  --on-dark: #f4f2ec;
  --on-dark-muted: rgba(244,242,236,0.55);
  --on-dark-faint: rgba(244,242,236,0.28);

  /* Type */
  --font-display: 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  /* Shape */
  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 100px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(20,21,26,0.05);
  --shadow-md: 0 2px 6px rgba(20,21,26,0.04), 0 12px 32px rgba(20,21,26,0.07);
  --shadow-lg: 0 4px 12px rgba(20,21,26,0.05), 0 32px 80px rgba(20,21,26,0.12);

  /* Layout */
  --page-max: 1200px;
  --gutter: 48px;
}

html { scroll-behavior: smooth; }

/* Anchor targets clear the fixed nav */
[id] { scroll-margin-top: 84px; }

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── Type primitives ────────────────────────────────────────────── */

.display {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.section-title em {
  font-style: normal;
  font-weight: 650;
  color: var(--accent);
}

.lede {
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 400;
}

/* ── Buttons ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: 0.005em;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
              transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn svg { transition: transform 0.2s ease; }
.btn:hover svg { transform: translateX(3px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(30,42,92,0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--ink); }

.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; transform: translateY(-1px); }

.btn-outline-light {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(244,242,236,0.24);
}
.btn-outline-light:hover { border-color: rgba(244,242,236,0.6); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s ease;
}
.link-arrow:hover { gap: 11px; }

/* ── Nav ────────────────────────────────────────────────────────── */

nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  background: rgba(251,250,247,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
nav.site-nav.scrolled {
  border-color: var(--border);
  background: rgba(251,250,247,0.92);
}

.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 28px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 550 !important;
  transition: background 0.2s ease !important;
}
.nav-cta:hover { background: var(--accent) !important; color: #fff !important; }

/* Nav dropdown */
.nav-drop { position: relative; }
.nav-drop > a {
  display: inline-flex; align-items: center; gap: 5px;
  cursor: pointer;
}
.nav-drop > a::after {
  content: '';
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}
.nav-drop:hover > a::after, .nav-drop:focus-within > a::after {
  transform: rotate(225deg) translateY(-1px);
}
.nav-drop-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(6px);
  padding-top: 14px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 110;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-drop-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  min-width: 230px;
}
.nav-drop-inner a {
  display: block;
  padding: 9px 14px !important;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}
.nav-drop-inner a:hover { background: var(--accent-wash); color: var(--ink); }
.nav-drop-inner a small {
  display: block;
  font-size: 0.7rem; font-weight: 400;
  color: var(--faint);
  margin-top: 1px;
}

/* Hamburger + mobile menu */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 200;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 61px; left: 0; right: 0;
  background: rgba(251,250,247,0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 24px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu .nav-cta {
  margin-top: 10px;
  text-align: center;
  border-bottom: none !important;
}

/* ── Sections ───────────────────────────────────────────────────── */

section { padding: 110px var(--gutter); }
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head .section-title { margin-top: 16px; }
.section-head .lede { margin-top: 18px; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.centered .eyebrow { justify-content: center; }
.section-head.centered .eyebrow::before { display: none; }

/* ── Cards ──────────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Footer ─────────────────────────────────────────────────────── */

footer.site-footer {
  background: var(--ink-deep);
  color: var(--on-dark);
  padding: 80px var(--gutter) 40px;
}
.footer-grid {
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(244,242,236,0.1);
}
.footer-brand img { height: 26px; width: auto; filter: brightness(0) invert(1); }
.footer-brand p {
  margin-top: 18px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--on-dark-muted);
  max-width: 280px;
}
.footer-col h4 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
  margin-bottom: 18px;
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--on-dark-muted);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--on-dark); }
.footer-bottom {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom span { font-size: 0.75rem; color: var(--on-dark-faint); }

/* ── Motion ─────────────────────────────────────────────────────── */

/* Entrance on page load (heroes) */
@keyframes riseUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { opacity: 0; animation: riseUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.r1 { animation-delay: 0.05s; }
.r2 { animation-delay: 0.15s; }
.r3 { animation-delay: 0.25s; }
.r4 { animation-delay: 0.38s; }
.r5 { animation-delay: 0.5s; }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Responsive base ────────────────────────────────────────────── */

@media (max-width: 900px) {
  :root { --gutter: 24px; }
  nav.site-nav { padding: 14px var(--gutter); }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  section { padding: 72px var(--gutter); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
