/* PivotAML — specialist AML provider migration consulting.
   Static stylesheet, no JavaScript, no web fonts, no tracking.
   Palette and tone follow design/design-brief.md: restrained, high-contrast,
   content-led, deep-teal accent used sparingly. */

:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #4f5d57;
  --line: #d8ded6;
  --line-soft: #e6ebe3;
  --paper: #fbfcf8;
  --panel: #eef3ed;
  --panel-deep: #0e2b25;
  --accent: #0f6b57;
  --accent-dark: #0a493f;
  --copper: #98461a;
  --blue: #2d567f;
  --white: #ffffff;
  --container: 1180px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(14, 43, 37, 0.05);
  --shadow-md: 0 12px 32px -18px rgba(14, 43, 37, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

/* ---------- Layout primitives ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 56px);
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
}

.section--tight {
  padding-block: clamp(40px, 6vw, 72px);
}

.section--panel {
  background: var(--panel);
}

.section--paper {
  background: var(--paper);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head p.lead {
  margin-bottom: 0;
}

.section-head.flush {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--copper);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  max-width: 64ch;
}

h1 {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

p {
  margin-bottom: 16px;
}

p:last-child {
  margin-bottom: 0;
}

/* ---------- Accessibility helpers ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  background: var(--accent-dark);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 650;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

:where(a, button):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 650;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button.primary {
  background: var(--accent);
  color: var(--white);
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--white);
  color: var(--accent-dark);
}

.button.secondary:hover {
  border-color: var(--accent);
}

.button.ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.button.ghost-light:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.button.on-dark {
  background: var(--white);
  color: var(--panel-deep);
}

.button.on-dark:hover {
  background: var(--panel);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  text-decoration: none;
  color: var(--accent-dark);
}

.text-link::after {
  content: "→";
  transition: transform 0.15s ease;
}

.text-link:hover::after {
  transform: translateX(3px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 248, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding-block: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--white);
  font-weight: 800;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  font-size: 0.96rem;
}

.primary-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 550;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}

.primary-nav a:hover {
  color: var(--ink);
}

.primary-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.primary-nav .nav-action {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 16px;
  color: var(--accent-dark);
  font-weight: 650;
}

.primary-nav .nav-action:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.primary-nav .nav-action[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(56px, 8vw, 100px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.hero h1 {
  font-size: clamp(2.5rem, 4.8vw, 4.4rem);
}

.signal-panel {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.signal-panel > div {
  background: var(--white);
  padding: 24px 26px;
}

.signal-panel .metric {
  display: block;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.signal-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.signal-panel p {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0;
}

/* ---------- Page intro (sub-pages) ---------- */

.page-intro {
  padding-block: clamp(48px, 6vw, 84px);
  border-bottom: 1px solid var(--line);
}

.page-intro .lead {
  font-size: clamp(1.12rem, 1.6vw, 1.4rem);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}

.breadcrumb a {
  text-decoration: none;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--ink);
}

.breadcrumb span[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Card grids ---------- */

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card p {
  color: var(--muted);
}

.card .card-index {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.card .text-link {
  margin-top: auto;
  padding-top: 16px;
}

.card-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.96rem;
}

.card-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- Split feature ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.split.reverse {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

/* ---------- Numbered process steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 24px 0 24px 64px;
  border-top: 1px solid var(--line);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 22px;
  font-weight: 800;
  color: var(--accent);
  font-size: 1.1rem;
}

.steps h3 {
  margin-bottom: 6px;
}

.steps p {
  color: var(--muted);
  margin: 0;
}

/* ---------- Definition / detail lists ---------- */

.detail-list {
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-list > div {
  background: var(--paper);
  padding: 18px 20px;
}

.detail-list dt {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
}

/* ---------- Inline note / disclaimer ---------- */

.note {
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
}

.note.spaced {
  margin-top: 30px;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--panel-deep);
  color: var(--white);
}

.cta-band .container {
  padding-block: clamp(48px, 7vw, 88px);
}

.cta-band .eyebrow {
  color: #7fd3bf;
}

.cta-band h2 {
  color: var(--white);
  max-width: 18ch;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 56ch;
}

.cta-band a.email {
  color: var(--white);
  font-weight: 700;
}

/* ---------- Legal / long-form pages ---------- */

.legal-page {
  padding-block: clamp(48px, 7vw, 88px);
}

.legal-content {
  max-width: 720px;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  max-width: 68ch;
}

.legal-content ul {
  padding-left: 20px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-date {
  margin-top: 44px;
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
}

.legal-content .detail-list {
  margin: 20px 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(40px, 5vw, 64px);
}

.footer-brand .footer-tagline {
  color: var(--muted);
  max-width: 36ch;
  margin-top: 14px;
}

.footer-brand .email {
  display: inline-block;
  margin-top: 8px;
  font-weight: 650;
  text-decoration: none;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.footer-cols h4 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.footer-cols a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.96rem;
}

.footer-cols a:hover {
  color: var(--accent-dark);
}

.footer-legal {
  border-top: 1px solid var(--line);
  padding-block: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  align-items: baseline;
}

.footer-disclosure {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 70ch;
  line-height: 1.5;
}

.footer-legal small {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .split.reverse,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .card-grid.cols-3,
  .card-grid.cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .primary-nav {
    flex-wrap: wrap;
    gap: 10px 18px;
  }
}

@media (max-width: 560px) {
  .card-grid.cols-2,
  .card-grid.cols-3,
  .card-grid.cols-4 {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .button-row {
    flex-direction: column;
  }

  .footer-cols {
    grid-template-columns: 1fr;
  }

  .footer-legal {
    flex-direction: column;
  }
}
