/* DMA Case Studies — loaded only on the five case study pages by the DMA Case Studies plugin. */
figure > a { display: block; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* DMA case study preview — design tokens sampled from digitalmarketingagency.com.pk */

:root {
  --bg: #080f0b;
  --card: #101c16;
  --raised: #1a2520;
  --accent: #01a650;
  --accent-soft: rgba(1, 166, 80, 0.12);
  --text: #f5f5f4;
  --body: #dde5df;
  --muted: #9aada0;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --radius: 20px;
  --radius-img: 16px;
  --container: 1200px;
  --font: "Plus Jakarta Sans", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #04140a; }

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}
.nowrap { white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 15, 11, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding-block: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-icon { height: 42px; width: auto; display: block; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent);
  color: #04140a;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.brand-text small { font-size: 10px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 3px; }
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 13px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}
.nav a:hover, .nav a:focus-visible { color: #fff; }
.nav a.active { color: #fff; }
.nav a.active::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--accent);
  margin-top: 4px;
  border-radius: 2px;
}

/* ---------- Type ---------- */
.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
h1, h2, h3 { color: #fff; font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; }
h1 {
  font-size: clamp(36px, 4.8vw, 58px);
  line-height: 1.05;
  margin: 18px 0 20px;
}
h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.12;
  margin: 0 0 18px;
}
h3 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 34px 0 10px;
}
p { margin: 0 0 18px; }
strong { color: #fff; font-weight: 700; }

/* ---------- Hero ---------- */
.case-hero { padding: 44px 0 36px; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 30px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: #5f6f66; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 56px;
  align-items: start;
}
.standfirst {
  font-size: 19px;
  line-height: 1.68;
  color: #c9d3cc;
  max-width: 700px;
}
.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip {
  border: 1px solid var(--line);
  background: rgba(16, 28, 22, 0.7);
  border-radius: 100px;
  padding: 7px 13px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.chip b { color: #fff; font-weight: 600; }

.glance {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.glance::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(1, 166, 80, 0.18), transparent 68%);
  pointer-events: none;
}
.glance h2 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
  font-weight: 700;
}
.glance dl { margin: 0; display: grid; gap: 15px; }
.glance dt {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.glance dd { margin: 3px 0 0; font-size: 14px; line-height: 1.45; color: #fff; }
.status {
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.status b { color: #f5c56b; font-weight: 600; }

.hero-figure { margin: 38px 0 0; display: flex; flex-direction: column; align-items: center; }
.hero-figure img {
  width: auto;
  max-width: 100%;
  max-height: 640px;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-img);
}
.hero-figure img.hero-crop {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: top center;
}
.hero-figure figcaption { width: 100%; }
figcaption {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 10px;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: #bff747;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 1px 5px;
  word-break: break-word;
}
figcaption b { color: #c9d3cc; font-weight: 600; }

/* ---------- Body ---------- */
.case-body { padding: 24px 0 88px; }
.case-body .container { max-width: 1040px; }
.case-section { padding: 38px 0 8px; border-top: 1px solid var(--line); }
.case-section:first-child { border-top: 0; }
.case-section p, .case-section li { color: var(--body); }
.case-section p, .case-section ul, .case-section ol { max-width: 780px; }
.case-section ul, .case-section ol { padding-left: 22px; margin: 0 0 20px; }
.case-section li { margin-bottom: 9px; }
.case-section li::marker { color: var(--accent); }

.lead { font-size: 19px; line-height: 1.7; color: #e7eee9; }

/* ---------- Metrics ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 30px;
}
.metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
}
.metric .num {
  display: block;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.metric .label {
  display: block;
  margin-top: 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}
.metric.alt .num { color: #fff; }

/* ---------- Callouts ---------- */
.callout {
  background: linear-gradient(135deg, rgba(1, 166, 80, 0.1), rgba(16, 28, 22, 0.55));
  border: 1px solid rgba(1, 166, 80, 0.32);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 28px 0;
  max-width: 900px;
}
.callout h3 { margin: 0 0 8px; font-size: 17px; }
.callout p { margin: 0; max-width: none; color: #d7e4db; font-size: 15px; }
.callout.warn {
  background: rgba(245, 197, 107, 0.06);
  border-color: rgba(245, 197, 107, 0.3);
  border-left-color: #f5c56b;
}
.callout.warn h3 { color: #ffe0a3; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 22px 0 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th {
  text-align: left;
  padding: 12px 16px;
  background: #0b1711;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--body);
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.table-wrap th[scope="row"] {
  width: 32%;
  background: transparent;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  border-right: 1px solid var(--line);
}
.case-section p a, .case-section li a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.case-section p a:hover, .case-section li a:hover { color: #4ee08d; }
td .pos { color: var(--accent); font-weight: 700; }
.table-note { font-size: 12px; color: var(--muted); margin: -18px 0 30px; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0 30px;
}
.gallery figure {
  margin: 0;
  align-self: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.gallery img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: top center;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.gallery img.contain { object-fit: contain; padding: 10px; }
.gallery img.tall { height: 460px; }
.gallery figcaption { padding: 13px 15px; margin: 0; font-size: 11.5px; line-height: 1.55; }
.gallery .full { grid-column: 1 / -1; }
.gallery .full img { height: auto; max-height: 620px; object-fit: contain; padding: 10px; }

.profile-evidence {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin: 24px 0 34px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.profile-evidence img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.profile-evidence h3 { margin: 0 0 10px; }
.profile-evidence p { font-size: 14.5px; color: var(--muted); margin-bottom: 12px; max-width: 560px; }
.profile-evidence figcaption { margin: 0; font-size: 11px; }

.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 10px; }
.ba-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.ba-card .ba-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 15px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.ba-card .ba-label b { color: var(--accent); font-size: 12px; letter-spacing: 0.04em; }
.ba-card img { width: 100%; height: 300px; object-fit: contain; background: #fff; padding: 8px; }
.ba-card figcaption { padding: 11px 15px; margin: 0; font-size: 11px; }

/* ---------- FAQ ---------- */
.faq { margin-top: 8px; border-top: 1px solid var(--line); max-width: 860px; }
details { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-size: 16.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.5;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  flex: 0 0 auto;
  margin-top: 1px;
}
details[open] summary::after { content: "−"; }
details p {
  margin: 0 0 20px;
  font-size: 15.5px;
  color: var(--muted);
  max-width: 760px;
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 46px 48px;
  margin-top: 44px;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 12%, rgba(1, 166, 80, 0.2), transparent 52%);
  pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 12px; }
.cta p { max-width: 620px; color: #c9d3cc; margin-bottom: 26px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 4px;
  background: var(--accent);
  color: #04140a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: transform 160ms ease, background 160ms ease;
}
.btn:hover { background: #02bd5b; transform: translateY(-1px); }
.btn.secondary { background: transparent; border-color: var(--line-strong); color: #fff; }
.btn.secondary:hover { border-color: var(--accent); background: rgba(1, 166, 80, 0.08); }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(1, 166, 80, 0.5);
  padding-bottom: 3px;
}
.btn-link span { color: var(--accent); transition: transform 160ms ease; }
.btn-link:hover span { transform: translateX(4px); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 24px; }
.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.footer-grid strong { display: block; color: #fff; font-size: 13px; margin-bottom: 4px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-note { max-width: 380px; line-height: 1.6; }

/* ---------- Hub ---------- */
.hub-hero { padding: 64px 0 34px; }
.hub-hero h1 { max-width: 900px; }
.hub-hero .standfirst { max-width: 720px; }
.hub-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.hub-stats span {
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 13px;
  font-size: 12px;
  color: var(--muted);
}
.hub-stats b { color: var(--accent); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 34px 0 16px;
}
.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 180ms ease, transform 180ms ease;
}
.case-card:hover { border-color: rgba(1, 166, 80, 0.5); transform: translateY(-4px); }
.case-card .thumb { overflow: hidden; border-bottom: 1px solid var(--line); background: #fff; }
.case-card .thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  transition: transform 400ms ease;
}
.case-card .thumb img.fit { object-fit: contain; }
.case-card:hover .thumb img { transform: scale(1.02); }
.case-card .content { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.case-card .tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.case-card h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.3; }
.case-card h3 a { text-decoration: none; }
.case-card h3 a::after { content: ""; position: absolute; inset: 0; }
.case-card .result { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 20px; }
.case-card .metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.case-card .metrics b { display: block; font-size: 18px; font-weight: 800; color: var(--accent); line-height: 1.1; letter-spacing: -0.02em; }
.case-card .metrics small { display: block; margin-top: 5px; font-size: 9px; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.case-card .read {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.case-card .read span { color: var(--accent); }

.method { padding: 56px 0 8px; border-top: 1px solid var(--line); margin-top: 46px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.method-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.method-card .step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}
.method-card h3 { font-size: 17px; margin: 0 0 6px; }
.method-card p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Page nav between cases ---------- */
.case-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.case-nav a { font-size: 13px; color: var(--muted); text-decoration: none; }
.case-nav a:hover { color: var(--accent); }
.case-nav b { display: block; color: #fff; font-size: 15px; margin-top: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .glance { max-width: 560px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { gap: 18px; }
  .brand-text strong { font-size: 13px; }
}
@media (max-width: 860px) {
  .profile-evidence { grid-template-columns: 240px minmax(0, 1fr); gap: 22px; }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 10px; padding-block: 12px; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .nav a.active::after { display: none; }
  .case-hero { padding-top: 30px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: 280px; }
  .case-card .metrics b { font-size: 16px; }
  .method-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .container { width: calc(100% - 36px); }
  body { font-size: 16px; }
  .table-wrap::before {
    content: "Swipe to see the full table →";
    display: block;
    padding: 8px 12px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  .brand-icon { height: 36px; }
  .hero-grid { gap: 26px; }
  .standfirst { font-size: 17px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric .num { font-size: 25px; }
  .ba-grid { grid-template-columns: 1fr; }
  .ba-card img { height: 280px; }
  .profile-evidence { grid-template-columns: 1fr; }
  .profile-evidence img { max-width: 260px; }
  .card-grid { grid-template-columns: 1fr; }
  .case-card h3 { font-size: 19px; }
  .case-card .metrics b { font-size: 18px; }
  .cta { padding: 30px 24px; }
  .cta-actions .btn { width: 100%; }
  .gallery img.tall { height: 420px; }
  table { font-size: 13px; }
  th, td { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .case-card:hover { transform: none; }
}

/* WordPress safety: the published pages are wrapped in #dma-case.
   Only the hero H1 needs a higher-specificity rule; component headings keep their class styles. */
#dma-case h1 { color: #fff; font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; font-size: clamp(36px, 4.8vw, 58px); line-height: 1.05; margin: 18px 0 20px; }
.method h2 { color: #fff; font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; margin: 0 0 18px; }