/* Enfinity Solutions — Direction A: Technical Grid
   Shared design tokens + base styles */

:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --ink: #0a0e1a;
  --ink-2: #1f2937;
  --muted: #475569;
  --muted-2: #6b7280;
  --line: #e6e8ec;
  --line-2: #d1d5db;
  --brand: #0872BA;
  --brand-soft: #e6f1f9;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;

  --maxw: 1280px;
  --pad-x: 48px;

  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Type scale */
  --text-micro: 11px;  /* micro labels, stack rows, fine print */
  --text-xs:   11px;  /* mono labels, eyebrows, captions */
  --text-sm:   13px;  /* small body, links, footer */
  --text-base: 14px;  /* card body, dense paragraphs */
  --text-md:   15px;  /* default body */
  --text-lg:   17px;  /* featured intros */
  --text-xl:   18px;  /* lede */
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Offset in-page anchor jumps by the sticky-nav height so targets aren't hidden under it. */
html { scroll-padding-top: 140px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: var(--font-mono); }

/* Layout */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad-x); width: 100%; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  height: 80px; width: auto; display: block;
}
.brand-mark {
  width: 24px; height: 24px; border-radius: 5px; background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: -0.5px;
}
.brand-name { font-weight: 600; letter-spacing: -0.2px; font-size: 15px; }
.brand-sub { font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); margin-left: 4px; letter-spacing: 0.5px; }

.nav-links { display: flex; gap: 28px; font-size: 13px; color: var(--muted); }
.nav-links a { transition: color 120ms; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 120ms, background 120ms, border-color 120ms;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1f2937; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: #0a5f9c; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 12px 20px; font-size: 14px; border-radius: 7px; }

/* Eyebrow */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.5px;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; }
.eyebrow.brand { color: var(--brand); }

/* Section */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

.h-display {
  font-size: 64px; line-height: 1.05; letter-spacing: -2px; font-weight: 600; margin: 0;
  text-wrap: balance;
}
.h-1 { font-size: 40px; line-height: 1.08; letter-spacing: -1.2px; font-weight: 600; margin: 0; text-wrap: balance; }
.h-2 { font-size: 28px; line-height: 1.15; letter-spacing: -0.6px; font-weight: 600; margin: 0; }
.h-3 { font-size: 18px; line-height: 1.3; letter-spacing: -0.2px; font-weight: 600; margin: 0; }
.lede { font-size: var(--text-xl); line-height: 1.55; color: var(--muted); margin: 16px 0 0; max-width: 640px; }
.muted { color: var(--muted); }
.subtle { color: var(--muted-2); font-size: var(--text-sm); }

/* Body size utilities (use alongside .muted for color) */
.body-xs   { font-size: var(--text-xs); }
.body-sm   { font-size: var(--text-sm); }
.body-base { font-size: var(--text-base); }
.body-md   { font-size: var(--text-md); }
.body-lg   { font-size: var(--text-lg); }

/* Stat display numbers */
.stat-num {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -1.2px;
  line-height: 1;
}
.stat-num-sub {
  font-size: 24px;
  color: var(--muted-2);
}
.stat-num-md {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}

/* Pull-quote (used in dark and light bands) */
.quote {
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.6px;
  font-weight: 500;
  margin: 0;
}

/* Cells / cards */
.grid-cells {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.grid-cells > * { background: var(--surface); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 7px;
  border-radius: 3px;
}

.divider { border-top: 1px solid var(--line); }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 56px var(--pad-x) 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 40px; border-bottom: 1px solid var(--line);
}
.footer-grid h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.5px;
  color: var(--muted-2); margin: 0 0 14px; font-weight: 500;
}
.footer-grid a { display: block; font-size: 13px; color: var(--ink-2); padding: 5px 0; }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom {
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2);
  letter-spacing: 0.3px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
}
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }

/* Page header (non-home) */
.page-header { padding: 72px 0 32px; }
.page-header .crumbs {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); margin-bottom: 16px;
}

/* Forms */
input, textarea, select {
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-2); border-radius: 6px;
  padding: 10px 12px; width: 100%;
  transition: border-color 120ms, box-shadow 120ms;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(8,114,186,0.15);
}
label { font-size: 12px; color: var(--muted); font-weight: 500; display: block; margin-bottom: 6px; font-family: var(--font-mono); letter-spacing: 0.3px; text-transform: uppercase; }
.field { margin-bottom: 16px; }

/* Utility */
.row { display: flex; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.stack-sm > * + * { margin-top: 8px; }
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 32px; }

/* ================================================================
   MOBILE NAV TOGGLE — visible on small screens, hidden on desktop
   ================================================================ */
.nav-toggle {
  display: none;
  width: 40px; height: 40px; padding: 0; margin: 0;
  background: transparent; border: 1px solid var(--line);
  border-radius: 6px; align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav.is-open .nav-toggle .icon-open { display: none; }
.nav.is-open .nav-toggle .icon-close { display: block; }

/* ================================================================
   TABLET — ≤960px
   ================================================================ */
@media (max-width: 960px) {
  :root { --pad-x: 28px; }
  .h-display { font-size: 48px; letter-spacing: -1.2px; }
  .h-1 { font-size: 32px; letter-spacing: -0.8px; }
  .section { padding: 56px 0; }
  .section-tight { padding: 36px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

/* ================================================================
   HERO with visual
   ================================================================ */
.hero .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero .hero-copy { min-width: 0; }
.hero .hero-copy .h-display { max-width: 620px; }
.hero .hero-visual {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  margin-left: auto;
}
.hero .hero-visual svg { width: 100%; height: 100%; display: block; }
@media (max-width: 1024px) {
  .hero .hero-grid { gap: 40px; }
}
@media (max-width: 860px) {
  .hero .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero .hero-visual { max-width: 420px; margin: 0 auto; }
}

/* ================================================================
   PHONE — ≤640px
   ================================================================ */
@media (max-width: 640px) {
  :root { --pad-x: 20px; }
  body { font-size: 15px; }
  html { scroll-padding-top: 96px; }   /* mobile nav is shorter */

  /* ── Nav: collapse to hamburger ─────────────────────────────── */
  .nav-inner { padding: 14px var(--pad-x); }
  .brand-logo { height: 52px; }
  .nav-toggle { display: inline-flex; }
  .nav-inner > .btn { display: none; }                 /* "Request a meeting" → moves into the menu */
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 0;
    box-shadow: 0 12px 24px -12px rgba(10,14,26,0.12);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a {
    padding: 14px var(--pad-x);
    font-size: 15px;
    border-top: 1px solid var(--line);
  }
  .nav-links a:first-child { border-top: none; }
  .nav-links .btn-mobile-cta {
    margin: 12px var(--pad-x) 6px;
    padding: 12px 16px;
    background: var(--ink); color: #fff;
    border-radius: 6px;
    text-align: center;
    border-top: none;
  }

  /* ── Typography ─────────────────────────────────────────────── */
  .h-display { font-size: 36px; line-height: 1.08; letter-spacing: -1px; }
  .h-1 { font-size: 28px; letter-spacing: -0.6px; }
  .h-2 { font-size: 22px; letter-spacing: -0.4px; }
  .lede { font-size: 16px; line-height: 1.5; }
  .stat-num { font-size: 30px; letter-spacing: -0.8px; }
  .stat-num-sub { font-size: 18px; }
  .stat-num-md { font-size: 22px; letter-spacing: -0.6px; }
  .quote { font-size: 20px; line-height: 1.4; letter-spacing: -0.3px; }

  /* ── Section spacing ────────────────────────────────────────── */
  .section { padding: 44px 0; }
  .section-tight { padding: 28px 0; }
  .page-header { padding: 44px 0 16px; }

  /* ── Buttons ────────────────────────────────────────────────── */
  .btn { padding: 11px 14px; font-size: 14px; }
  .btn-lg { padding: 13px 18px; font-size: 14px; }

  /* ── Cards & forms ──────────────────────────────────────────── */
  .card { padding: 20px; border-radius: 6px; }
  input, textarea, select { font-size: 16px; }   /* prevents iOS zoom on focus */

  /* ── Footer: stack to a single column ───────────────────────── */
  .footer-inner { padding: 40px var(--pad-x) 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}
