/* Waqar Ahmed | GHL & n8n Automation
   Colours, fonts and logo rules come from the Brand Book (Version 1).
   --teal-ink is a darker shade of Signal teal, used only where teal must be
   readable as text on a light background (Signal teal there is 2.4:1). */

:root {
  --navy: #10243c;        /* Deep navy: text, nav, dark sections (15.3:1 on soft white) */
  --teal: #12b8a6;        /* Signal teal: accents, button fill, highlights on navy */
  --teal-ink: #0b7a6e;    /* Teal as text on light grounds (5.1:1) */
  --amber: #f5ad59;       /* Warm amber: status and attention, never text on light */
  --white: #fbfcfd;       /* Soft white: page background */
  --slate: #607187;       /* Body copy and supporting detail (4.9:1) */
  --band: #f4f7fa;        /* Alternate light band (slate 4.6:1, navy 14.6:1) */
  --tag: #eaf7f5;         /* Tag background, navy text */
  --line: #dbe3eb;        /* Borders and dividers */
  --on-navy: #fbfcfd;
  --on-navy-muted: #b8c4d2; /* 8.9:1 on navy */

  --font-head: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 14px;
  --radius-lg: 20px;
  --max: 1120px;
  --gutter: 16px;
  --section: 64px;
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --section: 96px; }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: inherit;
}
h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }

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

a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--navy :focus-visible, .site-footer :focus-visible { outline-color: var(--amber); }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  background: var(--navy);
  color: var(--on-navy);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-navy); }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header and navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 253, 0.96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(251, 252, 253, 0.88); backdrop-filter: blur(8px); }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
  padding: 4px 0;
}
.brand img { width: 40px; height: 40px; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.125rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.8125rem; color: var(--slate); letter-spacing: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
}
.site-nav a:not(.btn):hover { color: var(--teal-ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--teal-ink); }

/* JS adds .js to <html>; without JS the full nav stays visible and wraps. */
@media (max-width: 899px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; width: 100%; padding: 8px 0 16px; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .js .site-nav a:not(.btn) { padding: 0 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .js .site-nav .btn { margin-top: 12px; width: 100%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn--primary { background: var(--teal); color: var(--navy); border-color: var(--teal); } /* 6.3:1 */
.btn--primary:hover { background: #0fa393; border-color: #0fa393; color: var(--navy); }
.btn--secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--on-navy); }
.section--navy .btn--secondary { color: var(--on-navy); border-color: var(--on-navy); }
.section--navy .btn--secondary:hover { background: var(--on-navy); color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.ext::after { content: "\2197"; font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section--band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.section--navy p, .section--navy li { color: var(--on-navy-muted); }
.section--navy a:not(.btn) { color: var(--teal); }
.section--navy a:not(.btn):hover { color: var(--on-navy); }

.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-ink);
}
.section--navy .eyebrow { color: var(--teal); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { margin-top: 16px; font-size: 1.125rem; color: var(--slate); }
.section--navy .section-head p { color: var(--on-navy-muted); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 var(--section); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.4fr 1fr; gap: 56px; } }
.hero h1 { max-width: 12ch; }
.hero-lead { margin: 24px 0 32px; font-size: 1.1875rem; color: var(--slate); max-width: 560px; }
.hero-meta {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-meta li {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.result-card {
  background: var(--navy);
  color: var(--on-navy);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.result-card h2 { font-size: 1.375rem; margin: 12px 0 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; }
.stat dt { font-size: 0.9375rem; color: var(--on-navy-muted); }
.stat dd { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 2.75rem; line-height: 1; color: var(--teal); }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; }
.result-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(251, 252, 253, 0.2);
  font-size: 0.9375rem;
  color: var(--on-navy-muted);
}
.result-note strong { color: var(--on-navy); }
.result-card a { color: var(--teal); }
.result-card a:hover { color: var(--on-navy); }

/* ---------- Tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
  background: var(--tag);
  color: var(--navy);
  border: 1px solid #c9ebe6;
}
.tag--training { background: #fff3e4; border-color: #f7d3a6; }
.tag--estimate { background: #fff; border-color: var(--line); }
.tag--tested::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-ink); }
.tag--training::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }

/* ---------- Tool strip ---------- */
.tool-strip { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tool-strip .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 28px; padding-top: 20px; padding-bottom: 20px;
}
.tool-strip p { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--slate); }
.tool-strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; }
.tool-strip li { font-family: var(--font-head); font-weight: 700; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 999px) { .card-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card p { color: var(--slate); }
.card-num { font-family: var(--font-head); font-weight: 800; font-size: 0.9375rem; color: var(--teal-ink); }
.card ul.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.card ul.ticks li { position: relative; padding-left: 22px; }
.card ul.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.6em;
  width: 10px; height: 6px; border-left: 2px solid var(--teal-ink); border-bottom: 2px solid var(--teal-ink);
  transform: rotate(-45deg) translateY(-3px);
}
.icon { width: 32px; height: 32px; color: var(--teal-ink); }

.section--navy .card { background: #183152; border-color: #24426a; }
.section--navy .card p { color: var(--on-navy-muted); }
.section--navy .card h3 { color: var(--on-navy); }

/* ---------- Projects ---------- */
.disclosure {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0 0 32px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #183152;
  border: 1px solid #24426a;
  border-left: 4px solid var(--amber);
  color: var(--on-navy);
  max-width: 860px;
}
.section--navy .disclosure p { color: var(--on-navy); }

.flagship {
  display: grid;
  gap: 28px;
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
@media (min-width: 900px) { .flagship { grid-template-columns: 1.3fr 1fr; padding: 36px; } }
.flagship p, .flagship li { color: var(--slate); }
.flagship h3 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--navy); }
.flagship a:not(.btn) { color: var(--teal-ink); }
.flagship .btn--secondary { color: var(--navy); border-color: var(--navy); }
.flagship .btn--secondary:hover { color: var(--on-navy); }
.flagship-body { display: flex; flex-direction: column; gap: 16px; }
.flagship-evidence {
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.evidence-list { margin: 0; display: grid; gap: 14px; }
.evidence-list div { display: grid; gap: 2px; }
.evidence-list dt { font-weight: 700; color: var(--navy); }
.evidence-list dd { margin: 0; color: var(--slate); font-size: 0.9375rem; }
.small { font-size: 0.875rem; }

/* ---------- Flow diagram ---------- */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  counter-reset: step;
}
.flow li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.flow li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: var(--on-navy);
  font-family: var(--font-head); font-weight: 800; font-size: 0.875rem;
}
.flow strong { display: block; color: var(--navy); }
.flow span { font-size: 0.9375rem; color: var(--slate); }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { border-top: 3px solid var(--teal); padding-top: 16px; }
.steps h3 { font-size: 1.125rem; margin-bottom: 6px; }
.steps p { color: var(--slate); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 320px 1fr; gap: 64px; } }
.about-mark {
  width: min(60%, 320px);
  aspect-ratio: 1;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  padding: 18%;
}
@media (min-width: 900px) { .about-mark { width: 100%; } }
.about-body p { font-size: 1.0625rem; color: var(--slate); }
.facts { list-style: none; margin: 24px 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 520px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }
.facts span:first-child { font-weight: 700; color: var(--navy); }
.facts span:last-child { color: var(--slate); }

/* ---------- Contact ---------- */
.contact-inner { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .contact-inner { grid-template-columns: 1.5fr 1fr; } }
.contact-inner p { font-size: 1.125rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0b1a2c; color: var(--on-navy-muted); font-size: 0.9375rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; align-items: flex-start; padding-top: 40px; padding-bottom: 40px; }
.site-footer .brand { color: var(--on-navy); }
.site-footer .brand-name small { color: var(--on-navy-muted); }
.site-footer p { margin: 8px 0 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--on-navy); }
.site-footer a:hover { color: var(--teal); }
.tagline { font-family: var(--font-head); font-weight: 700; color: var(--on-navy); }

/* ---------- Case-study page ---------- */
.breadcrumb { font-size: 0.9375rem; margin: 0 0 20px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--slate); }
.breadcrumb [aria-current] { color: var(--slate); }
.page-hero { padding: 48px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); max-width: 20ch; margin-bottom: 16px; }
.page-hero .lead { font-size: 1.1875rem; color: var(--slate); max-width: 680px; margin-bottom: 20px; }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 48px 0 16px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--slate); font-size: 1.0625rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 6px; }
.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #fff3e4;
  border: 1px solid #f7d3a6;
  border-left: 4px solid var(--amber);
}
.callout p { color: var(--navy); margin: 0; }

.table-wrap { overflow-x: auto; margin: 16px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
caption { text-align: left; padding: 12px 16px; font-weight: 700; color: var(--navy); border-bottom: 1px solid var(--line); }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { color: var(--navy); background: var(--band); font-weight: 700; }
td { color: var(--slate); }
tr:last-child td { border-bottom: 0; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound p { color: var(--slate); }

@media print {
  .site-header, .nav-toggle, .skip-link { display: none; }
  .section--navy, .result-card, .site-footer { background: #fff !important; color: #000 !important; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* ---------- Small utilities (no inline styles, so the CSP can block them) ---------- */
.list-reset { list-style: none; margin: 0; padding: 0; }
.subhead { margin: 56px 0 20px; font-size: 1.5rem; }
.eyebrow--tight { margin: 0; }
.ticks--plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ticks--plain li { position: relative; padding-left: 22px; }
.ticks--plain li::before {
  content: ""; position: absolute; left: 2px; top: 0.6em;
  width: 10px; height: 6px; border-left: 2px solid var(--teal-ink); border-bottom: 2px solid var(--teal-ink);
  transform: rotate(-45deg) translateY(-3px);
}
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.btn--block { width: 100%; }
.footer-copy { flex-basis: 100%; margin: 0 !important; }
.btn-row--center { justify-content: center; margin-top: 24px; }
.nocase { text-transform: none; }

/* ---------- Self-hosted brand fonts (SIL Open Font License) ----------
   Files go in /assets/fonts/. Until they are added, system fonts are used. */
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-variable.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* ---------- Process step headings (h4) ---------- */
.steps h4 { font-family: var(--font-head); font-size: 1.125rem; line-height: 1.2; font-weight: 700; margin: 0 0 6px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 16px 52px 16px 20px; min-height: 44px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.0625rem; color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; line-height: 1; color: var(--teal-ink);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 20px 18px; color: var(--slate); margin: 0; }
.faq summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: var(--radius); }

.updated { margin: 14px 0 0; font-size: 0.875rem; color: var(--slate); }
