/* ============================================================================
   common.css: Invisionary Ventures
   Shared baseline used by every page. Page-specific styles live in each
   HTML file's inline <style> block, which loads AFTER this file and can
   override anything below. Tokens match the Invisionary Consulting and
   Invisionary Solutions sites.
   ========================================================================== */

/* ---- Custom properties ---- */
:root {
  /* Brand navy scale */
  --navy-900: #0A1B33;
  --navy-800: #0E2442; /* canonical brand */
  --navy-700: #16335B;
  --navy-600: #214B82;
  --navy-500: #3F6FB0;
  --navy-200: #B8C8DC;
  --navy-100: #DCE5EF;
  --navy-050: #EFF3F8;

  /* Ink (neutral) scale */
  --ink-900: #0E1620;
  --ink-800: #1F2A37;
  --ink-700: #364152;
  --ink-600: #4B5868;
  --ink-500: #6B7686;
  --ink-400: #98A1AE;
  --ink-300: #C7CDD6;
  --ink-200: #E3E7ED;
  --ink-100: #F1F3F6;
  --ink-050: #F8F9FB;
  --white: #FFFFFF;

  /* Translucent rules used on dark surfaces */
  --rule-on-dark: rgba(255, 255, 255, 0.16);
  --muted-on-dark: rgba(255, 255, 255, 0.78);

  /* Layout */
  --container-max: 1200px;
  --nav-h: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;

  /* Type: Figtree is primary, Source Serif 4 is for long-form narrative */
  --font-sans: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Motion */
  --t-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px base */
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--navy-800); /* navy fills any space on tall screens */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--nav-h); /* offset for fixed nav */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; } /* keeps the footer at the bottom on short pages */

section { scroll-margin-top: var(--nav-h); }

img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--navy-800); color: white; }

/* Hidden visually but still read by screen readers and search engines */
.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;
}

.section-inner { max-width: var(--container-max); margin: 0 auto; }

/* ---- Eyebrow utility (small uppercase label with a rule) ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-600);
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: currentColor;
}

/* ---- Text link with arrow ---- */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-800);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), color var(--t-base);
}
.text-link:hover { color: var(--navy-900); border-color: var(--navy-800); }
.text-link .arrow { transition: transform var(--t-base); }
.text-link:hover .arrow { transform: translateX(2px); }
.text-link.text-link-light { color: white; }
.text-link.text-link-light:hover { border-color: white; }

/* ---- Header / Nav (fixed, navy): logo left, one link right ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--navy-800);
  border-bottom: 1px solid var(--rule-on-dark);
  padding: 0 32px;
}
.header-inner {
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-left: auto;
}
.nav a {
  color: var(--muted-on-dark);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.005em;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  transition: color var(--t-base);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-slow);
}
.nav a:hover { color: var(--white); }
.nav a:hover::after { transform: scaleX(1); }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-900);
  color: var(--navy-100);
  padding: 64px 32px 32px;
}
.footer-inner { max-width: var(--container-max); margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo img {
  height: 56px;
  margin-bottom: 24px;
}
.footer-brand p {
  font-size: 0.9375rem;
  color: var(--navy-200);
  line-height: 1.55;
  max-width: 36ch;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 18px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 0.9375rem;
  color: var(--navy-200);
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--t-base);
  line-height: 1.5;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 32px;
  font-size: 0.8125rem;
  color: var(--navy-200);
  opacity: 0.7;
}
.footer-legal { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-legal a {
  color: var(--navy-200);
  text-decoration: none;
  transition: color var(--t-base);
}
.footer-legal a:hover { color: white; }

/* ---- Responsive: header/footer breakpoints ---- */
@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .site-header { padding: 0 20px; }
  .site-footer { padding-left: 20px; padding-right: 20px; }
  .footer-top { grid-template-columns: 1fr; padding-bottom: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .logo img { height: 40px; }
}

/* ---- Motion preference ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
