/* The Digital Services Group - site styles */
:root {
  --ink: #0b1220;
  --ink-2: #16213a;
  --slate: #4b5563;
  --line: #e5e7eb;
  --paper: #ffffff;
  --white: #ffffff;
  --accent: #1d4ed8;
  --accent-dark: #1e40af;
  --sky: #1d4ed8;
  --radius: 14px;
  --max: 1180px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand: "Raleway", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.6em; overflow-wrap: break-word; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.25rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .9rem; display: inline-block; }
.lead { font-size: 1.2rem; color: var(--slate); max-width: 62ch; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 74px; padding: .5rem 0; gap: .75rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); font-family: var(--font-brand); font-weight: 700; }
.brand-mark { flex: none; min-width: 44px; height: 38px; padding: 0 .45rem; border-radius: 10px; letter-spacing: .02em; background: var(--accent); display: grid; place-items: center; color: #fff; font-family: var(--font-brand); font-weight: 800; font-size: .95rem; }
.nav .brand { min-width: 0; line-height: 1.2; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--slate); letter-spacing: .06em; text-transform: uppercase; }
.brand-dot { color: var(--accent); font-weight: 800; }
.nav-links { display: flex; gap: 1.8rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: .97rem; }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a.btn-primary { color: #fff; }
.nav-toggle { flex: none; display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .55rem; line-height: 0; color: var(--ink); cursor: pointer; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; transition: transform .15s ease, background .15s ease; font-size: .98rem; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-small { padding: .55rem 1.05rem; font-size: .9rem; }

/* Hero */
.hero { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -180px; top: -120px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(29,78,216,.10), transparent 65%); pointer-events: none; }
.hero h1 { max-width: 17ch; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.6rem; padding: 0; list-style: none; }
.badges li { font-size: .82rem; font-weight: 600; padding: .4rem .8rem; border-radius: 999px; background: #eff4ff; border: 1px solid #dbe6ff; color: #1e3a8a; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; position: relative; z-index: 1; }

/* Inner page heroes */
.page-hero { padding: clamp(2.25rem, 4.5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); max-width: 30ch; }
.page-hero .lead { max-width: 70ch; }
.page-hero-flush { border-bottom: 0; padding-bottom: 1.5rem; }
.breadcrumb { font-size: .85rem; color: var(--slate); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--slate); }

/* Sections */
section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-flush-top { padding-top: 0; }
.section-dark { background: var(--ink); color: #e9edf2; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lead { color: #a8b3c7; }
.section-white { background: #f5f8ff; }
.section-head { max-width: 720px; margin-bottom: 2.8rem; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .lead { margin-inline: auto; }

/* Layout */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.grid > *, .split > *, .footer-grid > *, .svc > *, .hero-grid > * { min-width: 0; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.card h3 { margin-bottom: .5em; }
.card p:last-child { margin-bottom: 0; }
.card .num { font-family: var(--font-head); color: var(--accent); font-size: 1rem; font-weight: 600; display: block; margin-bottom: .8rem; }
.section-dark .card { background: var(--ink-2); border-color: #26324d; color: #d4dce6; }
.card-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s ease, transform .15s ease; }
.card-link:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.card-link .more { font-weight: 600; color: var(--accent); font-size: .92rem; }

.tags { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; padding: 0; margin: 0; }
.tags li { padding: .45rem .9rem; border-radius: 999px; border: 1px solid #26324d; font-size: .9rem; color: #d4dce6; }

.principles { counter-reset: p; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.principles li { counter-increment: p; padding: 1.2rem 1.2rem 1.2rem 3.6rem; position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.principles li::before { content: counter(p, decimal-leading-zero); position: absolute; left: 1.2rem; top: 1.2rem; font-family: var(--font-head); color: var(--accent); font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat { border-left: 3px solid var(--accent); padding-left: 1rem; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--ink); }
.section-dark .stat strong { color: #fff; }
.stat span { font-size: .9rem; color: var(--slate); }
.section-dark .stat span { color: #a8b3c7; }

/* Icons */
.icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #eff4ff; color: var(--accent); margin-bottom: 1rem; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 64px; height: 64px; border-radius: 16px; }
.icon-lg svg { width: 32px; height: 32px; }
.icon-sm { width: 34px; height: 34px; border-radius: 9px; margin: 0; }
.icon-sm svg { width: 18px; height: 18px; }
.section-dark .icon { background: rgba(91,140,255,.14); color: #8fb0ff; }

/* Photos */
.photo { margin: 2rem 0 0; position: relative; border-radius: 18px; overflow: hidden; background: #e8eefb; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo figcaption { position: absolute; right: .6rem; bottom: .6rem; font-size: .7rem; background: rgba(13,27,42,.6); color: #fff; padding: .2rem .55rem; border-radius: 999px; }
.photo figcaption a { color: #fff; }
.hero-photo { margin: 0; box-shadow: 0 30px 60px -25px rgba(13,27,42,.45); }
.photo-wide { margin-top: 2.5rem; }

/* Data table for identifiers */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.data-table th, .data-table td { text-align: left; padding: .95rem 1.2rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .97rem; }
.data-table th { width: 34%; font-weight: 600; color: var(--ink-2); background: #f8faff; }
.data-table td { overflow-wrap: anywhere; }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }
.data-table code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92rem; }

/* FAQ */
.faq-wide { max-width: 880px; margin: 0 auto; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin-bottom: .8rem; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .9rem 0 0; color: var(--slate); }

/* CTA band */
.cta-band { background: var(--accent); color: #fff; border-radius: 22px; padding: clamp(2.2rem, 5vw, 3.6rem); display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta-band > div { flex: 1 1 18rem; min-width: 0; }
.cta-band h2 { color: #fff; margin: 0 0 .3em; }
.cta-band p { margin: 0; color: #dbe6ff; max-width: 54ch; }
.cta-band .btn { background: #fff; color: var(--accent-dark); }

/* Service detail blocks */
.service-block { display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; padding: 2.6rem 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.service-block:first-of-type { border-top: 0; }
.service-block h2 { font-size: 1.75rem; }
.service-block ul { padding-left: 1.2rem; margin: 0; }
.service-block li { margin-bottom: .4rem; }

/* Services page */
.svc-jump-wrap { padding: 2.5rem 0 0; }
.svc-jump { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.jump { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; background: #fff; transition: border-color .15s ease, transform .15s ease; }
.jump:hover { border-color: var(--accent); transform: translateY(-1px); color: var(--ink); }
.svc-list { padding-top: 2.5rem; }
.svc { display: grid; grid-template-columns: 340px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); padding: clamp(1.8rem, 4vw, 2.8rem); border: 1px solid var(--line); border-radius: 20px; background: #fff; margin-bottom: 1.4rem; scroll-margin-top: 96px; }
.svc:nth-child(even) { background: #f5f8ff; border-color: #dbe6ff; }
.svc-head { position: relative; }
.svc-num { position: absolute; top: 0; right: 0; font-family: var(--font-head); font-size: 3.2rem; line-height: 1; color: #dbe6ff; }
.svc:nth-child(even) .svc-num { color: #c7d7fe; }
.svc-head h2 { font-size: 1.7rem; margin-bottom: .4rem; }
.svc-tag { color: var(--slate); margin: 0; }
.svc-body > p { font-size: 1.07rem; }
.svc-body h3 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 1.4rem 0 .9rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1.5rem; }
.checks li { display: flex; gap: .65rem; align-items: flex-start; font-size: .97rem; line-height: 1.5; }
.checks svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--accent); color: #fff; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }

/* Clickable affiliation cards */
.aff-card { display: flex; flex-direction: column; justify-content: space-between; gap: 1.2rem; text-decoration: none; color: var(--ink); transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.aff-card h3 { margin: 0; }
.aff-link { font-size: .9rem; font-weight: 600; color: var(--accent); transition: color .2s ease; }
.aff-card:hover, .aff-card:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-3px); }
.aff-card:hover .aff-link, .aff-card:focus-visible .aff-link { color: #fff; }
.aff-logo { display: flex; align-items: center; height: 96px; padding: 0 10px; margin: -6px -10px 0; border-radius: 10px; background: #fff; }
.aff-logo img { width: auto; max-width: 100%; }

/* Insights */
.container.narrow { max-width: 760px; }
.topic-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.topic-filter button { font: inherit; font-size: .9rem; font-weight: 600; padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.topic-filter button:hover { border-color: var(--accent); }
.topic-filter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.post-grid { align-items: stretch; }
.post-card { display: flex; flex-direction: column; gap: .7rem; text-decoration: none; color: var(--ink); transition: border-color .2s ease, transform .2s ease; }
.post-card[hidden] { display: none; }
.post-card:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--ink); }
.post-card h3 { margin: 0; font-size: 1.3rem; }
.post-card p { color: var(--slate); margin: 0; font-size: .98rem; }
.post-card .aff-link { margin-top: auto; padding-top: .4rem; }
.post-meta { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.article-hero h1 { max-width: none; }
.post-byline { color: var(--slate); font-size: .95rem; margin: 0; }
.article-wrap { padding-top: 2.5rem; }
.prose { font-size: 1.1rem; line-height: 1.75; }
.prose h2 { font-size: 1.6rem; margin: 2.2rem 0 .7rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose a { color: var(--accent); }
.sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--slate); }
.sources h2 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin: 0 0 .8rem; }
.sources li { margin-bottom: .45rem; }
.sources a { color: var(--slate); }
/* "View all articles" link on article pages: match the "Read article" links */
.section-head a[href="/insights/"] { font-size: .9rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.section-head a[href="/insights/"]:hover { text-decoration: underline; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
.contact-list strong { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.contact-list a, .contact-list span { font-size: 1.15rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.contact-form label { display: block; font-weight: 600; font-size: .92rem; margin: 1rem 0 .35rem; }
.contact-form .opt { font-weight: 400; color: var(--slate); }
.contact-form input, .contact-form textarea { width: 100%; font: inherit; padding: .75rem .9rem; border: 1px solid #c9d1db; border-radius: 10px; background: #fff; color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); outline: 2px solid rgba(29,78,216,.25); }
.contact-form button { margin-top: 1.4rem; cursor: pointer; }
.contact-form button[disabled] { opacity: .6; cursor: wait; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-status { margin: 1rem 0 0; font-weight: 600; }
.form-status.ok { color: #2e7d4f; }
.form-status.err { color: var(--accent-dark); }

/* Footer */
.site-footer { background: var(--ink); color: #a8b3c7; padding: 4rem 0 2rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h3 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer a { color: #d4dce6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-dot { color: #8fb0ff; }
.footer-bottom { border-top: 1px solid #26324d; margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }

/* Responsive */
@media (max-width: 1080px) {
  .nav { flex-wrap: nowrap; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 1.2rem 1.25rem 1.6rem; border-bottom: 1px solid var(--line); gap: 1rem; }
  .nav-links.open { display: flex; }
}
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .split, .service-block { grid-template-columns: 1fr; gap: 1.5rem; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { aspect-ratio: 3/2 !important; }
  .svc { grid-template-columns: 1fr; }
  .svc-jump { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav .brand { gap: .55rem; font-size: 1.05rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .data-table th { width: 42%; }
}
@media (max-width: 600px) {
  section { padding: 3rem 0; }
  .page-hero h1 { font-size: clamp(1.9rem, 8.5vw, 2.4rem); }
  .card, .svc { padding: 1.4rem; }
  .checks, .svc-jump { grid-template-columns: 1fr; }
  .cta-band { padding: 1.8rem 1.4rem; border-radius: 18px; }
  .cta-band h2 { font-size: clamp(1.45rem, 7vw, 1.9rem); }
  .btn { padding: .75rem 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table th { border-bottom: 0; padding: .75rem .9rem .15rem; background: transparent; color: var(--slate); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
  .data-table td { padding: 0 .9rem .75rem; font-size: .95rem; }
  .data-table code { white-space: normal; }
}
@media (max-width: 480px) {
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
