/* ============================================================
   PaceMetrics — design tokens
   Palette: ink navy (#12172B), paper (#F7F6F2), brand indigo
   (#321DBA — carried over from the real PaceMetrics brand),
   warm ledger amber (#D98F3B), slate secondary text (#5B6472).
   Type: Fraunces (display) / IBM Plex Sans (body) / IBM Plex Mono (ledger labels).
   Signature: hairline "ledger" dividers with small mono eyebrow tags —
   a nod to the audit/lineage language used throughout the real content.
   ============================================================ */

:root {
  --ink: #12172B;
  --paper: #F7F6F2;
  --paper-alt: #F1EFE8;
  --indigo: #321DBA;
  --indigo-dark: #241590;
  --amber: #D98F3B;
  --slate: #5B6472;
  --hairline: #DEDCD3;
  --white: #FFFFFF;

  --font-display: "Fraunces", serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
h4 { font-family: var(--font-body); font-weight: 500; color: var(--slate); font-size: 1.05rem; margin-top: -0.4em; }
p { margin: 0 0 1em; color: #333; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
address { font-style: normal; color: var(--slate); }
ul { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
img { max-width: 100%; display: block; }

.ledger-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-header { background: var(--white); border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 30px; }
.main-nav > ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.main-nav > ul > li { position: relative; }
.main-nav a, .nav-parent {
  font-size: 0.92rem; font-weight: 500; color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.nav-parent i { font-size: 0.6rem; color: var(--slate); }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--white); border: 1px solid var(--hairline);
  min-width: 280px; padding: 10px 0;
  box-shadow: 0 12px 24px rgba(18,23,43,0.08);
  list-style: none; margin: 6px 0 0;
}
.dropdown li a { display: block; padding: 9px 20px; font-weight: 400; white-space: nowrap; }
.dropdown li a:hover { background: var(--paper-alt); text-decoration: none; }
.has-children:hover .dropdown { display: block; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

.pm-row.has-bg { background: var(--paper-alt); }
.pm-row-inner { padding: 40px 0; }
.pm-grid { display: grid; gap: 40px; }
.col-1-1 { grid-template-columns: 1fr; }
.col-1-2 { grid-template-columns: repeat(2, 1fr); }
.col-1-3 { grid-template-columns: repeat(3, 1fr); }
.col-1-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .col-1-2, .col-1-3, .col-1-4 { grid-template-columns: 1fr; }
}
.wp-text p:last-child { margin-bottom: 0; }
.wp-image { border-radius: 3px; }
.video-embed { position: relative; padding-top: 56.25%; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.parallax-band { height: 220px; background-size: cover; background-position: center; position: relative; }
.parallax-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,23,43,0.55), rgba(18,23,43,0.15));
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--indigo); color: var(--white) !important;
  padding: 12px 26px; font-weight: 500; font-size: 0.92rem;
  border-radius: 3px; text-decoration: none !important;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--indigo-dark); }
.btn-lg { padding: 15px 32px; font-size: 1rem; }

.icon-feature {
  width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  background: var(--paper-alt); color: var(--indigo); border-radius: 50%;
  font-size: 1.6rem; margin: 0 auto 18px;
}
.icon-circle {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--hairline); color: var(--ink) !important; margin-right: 8px;
}
.icon-circle:hover { background: var(--ink); color: var(--white) !important; }

.client-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; align-items: center; }
.client-logo { filter: grayscale(1) opacity(0.7); transition: filter 0.15s ease; text-align: center; }
.client-logo:hover { filter: grayscale(0) opacity(1); }
.client-logo img { max-height: 46px; width: auto; margin: 0 auto; }
@media (max-width: 700px) { .client-grid { grid-template-columns: repeat(2, 1fr); } }

.hero-carousel { position: relative; height: 74vh; min-height: 460px; max-height: 640px; overflow: hidden; background: var(--ink); }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(18,23,43,0.82) 0%, rgba(18,23,43,0.45) 65%);
}
.hero-copy {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center;
  color: var(--white); padding: 0 24px; margin: 0 auto; max-width: var(--wrap);
}
.hero-copy h1 { color: var(--white); max-width: 640px; }
.hero-copy .ledger-tag { color: var(--amber); margin-bottom: 18px; }
.hero-copy p { color: #D9D9E0; max-width: 560px; }

.page-hero-image { width: 100%; max-height: 420px; object-fit: cover; }

.site-footer { background: var(--ink); color: #C7C9D6; padding: 60px 0 0; margin-top: 60px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand img { height: 24px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-brand p { color: #9EA2B5; max-width: 320px; }
.footer-col h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-col p { margin-bottom: 8px; font-size: 0.92rem; }
.footer-col a { color: #C7C9D6; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center; color: var(--white) !important;
}
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 26px; font-size: 0.8rem; color: #8C8FA3; }
.footer-bottom .ledger-tag { color: var(--amber); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--hairline); }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; padding: 10px 24px 20px; }
  .dropdown { position: static; border: 0; box-shadow: none; padding-left: 12px; }
  .has-children .dropdown { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
