/*
Theme Name: FD Capital Group
Theme URI: https://www.fdcapitalgroup.co.uk/
Author: FD Capital Group
Description: Lightweight theme for FD Capital Group. Light, editorial look with per-brand colours for FD Capital, Exec Capital, NED Capital, Accountancy Capital and SMF Capital.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: fd-capital-group
*/

:root {
  --cg-navy: #071C3C;
  --cg-ink: #071C3C;
  --cg-text: #2B3A52;
  --cg-muted: #4A5A73;
  --cg-rule: #C9D3E3;
  --cg-pale: #F0F3F8;
  --cg-white: #FFFFFF;
  --cg-blue: #0094F4;
  --cg-blue-dark: #0077C8;

  --cg-fd-dark: #071C3C;
  --cg-fd: #0094F4;
  --cg-exec-dark: #102864;
  --cg-exec: #0A94F2;
  --cg-ned-dark: #0F2044;
  --cg-ned: #F59E0B;
  --cg-acc-dark: #0F5386;
  --cg-acc: #DE3131;
  --cg-smf-dark: #071C3C;
  --cg-smf: #0094F4;

  --cg-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --cg-wrap: 1200px;
  --cg-radius: 4px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cg-white);
  color: var(--cg-text);
  font-family: var(--cg-font);
  font-size: 17px;
  line-height: 1.7;
}

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

a { color: var(--cg-blue-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cg-navy); }

h1, h2, h3, h4 { color: var(--cg-ink); font-family: var(--cg-font); line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 4.5vw, 48px); font-weight: 800; margin: 0 0 20px; }
h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; margin: 0 0 18px; }
h3 { font-size: 21px; font-weight: 700; margin: 28px 0 10px; }
p { margin: 0 0 18px; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin-bottom: 6px; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto;
  background: var(--cg-white); color: var(--cg-navy); padding: 10px 16px; font-weight: 700;
}

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

.cg-header { background: var(--cg-white); border-bottom: 1px solid var(--cg-rule); position: relative; z-index: 10; }
.cg-header::before { content: ""; display: block; height: 6px; background: var(--cg-navy); box-shadow: inset 0 -2px 0 var(--cg-blue); }
.cg-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }

.cg-logo { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--cg-navy); }
.cg-logo:hover { color: var(--cg-navy); }
.cg-logo__bar { width: 40px; height: 4px; background: var(--cg-blue); }
.cg-logo { flex-direction: row; align-items: center; gap: 12px; }
.cg-logo__bar { width: 5px; height: 40px; }
.cg-logo__text { display: flex; flex-direction: column; line-height: 1; }
.cg-logo__name { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; color: var(--cg-navy); }
.cg-logo__name span { color: var(--cg-blue); }
.cg-logo__group { font-size: 11px; font-weight: 800; letter-spacing: 5.5px; text-transform: uppercase; color: var(--cg-muted); margin-top: 6px; }
.custom-logo { max-height: 56px; width: auto; }

.cg-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 26px; }
.cg-nav li { margin: 0; }
.cg-nav a { color: var(--cg-navy); font-weight: 600; font-size: 15px; text-decoration: none; padding: 10px 0; display: inline-block; }
.cg-nav a:hover, .cg-nav .current-menu-item > a { color: var(--cg-blue-dark); box-shadow: inset 0 -2px 0 var(--cg-blue); }
.cg-nav .cg-nav__cta a, .cg-nav .menu-item-cta a {
  background: var(--cg-navy); color: var(--cg-white); padding: 11px 20px; border-radius: var(--cg-radius); box-shadow: none;
}
.cg-nav .cg-nav__cta a:hover, .cg-nav .menu-item-cta a:hover { background: var(--cg-blue-dark); color: var(--cg-white); box-shadow: none; }

.cg-main { display: block; }
.cg-entry > *:first-child { margin-top: 0; }
.cg-default { padding: 56px 0 72px; }

.cg-btn {
  display: inline-block; font-family: var(--cg-font); font-weight: 700; font-size: 15px; text-decoration: none;
  padding: 14px 24px; border-radius: var(--cg-radius); border: 2px solid var(--cg-navy); line-height: 1.2;
  min-height: 48px;
}
.cg-btn--primary { background: var(--cg-navy); color: var(--cg-white); }
.cg-btn--primary:hover { background: var(--cg-blue-dark); border-color: var(--cg-blue-dark); color: var(--cg-white); }
.cg-btn--ghost { background: transparent; color: var(--cg-navy); }
.cg-btn--ghost:hover { background: var(--cg-navy); color: var(--cg-white); }
.cg-btn--light { background: var(--cg-white); border-color: var(--cg-white); color: var(--cg-navy); }
.cg-btn--light:hover { background: var(--cg-blue); border-color: var(--cg-blue); color: var(--cg-white); }
.cg-btn--outline-light { background: transparent; border-color: rgba(255,255,255,0.6); color: var(--cg-white); }
.cg-btn--outline-light:hover { border-color: var(--cg-white); background: rgba(255,255,255,0.08); color: var(--cg-white); }
.cg-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.cg-eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--cg-blue-dark); margin-bottom: 12px; }
.cg-eyebrow::before { content: ""; display: block; width: 40px; height: 4px; background: var(--cg-blue); margin-bottom: 14px; }
.cg-center { text-align: center; }
.cg-center .cg-eyebrow::before { margin-left: auto; margin-right: auto; }
.cg-lede { font-size: 20px; line-height: 1.6; color: var(--cg-muted); max-width: 760px; }
.cg-center .cg-lede { margin-left: auto; margin-right: auto; }

.cg-hero { position: relative; background: var(--cg-pale); overflow: hidden; padding: 72px 0 0; border-bottom: 1px solid var(--cg-rule); }
.cg-hero::before {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 70%;
  background: var(--cg-white); clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
}
.cg-hero > .cg-wrap { position: relative; }
.cg-hero h1 { max-width: 900px; }
.cg-hero--page { padding-bottom: 56px; }
.cg-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--cg-blue); }
.cg-hero__brands { margin-top: 56px; }

.cg-brand-strip {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--cg-rule);
  background: transparent;
}
.cg-brand-strip__item {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 22px; text-decoration: none;
  border-top: 4px solid var(--b, var(--cg-blue)); border-left: 1px solid var(--cg-rule); color: var(--bd, var(--cg-navy));
}
.cg-brand-strip__item:first-child { border-left: 0; }
.cg-brand-strip__item:hover { background: rgba(255,255,255,0.7); color: var(--bd, var(--cg-navy)); }
.cg-brand-strip__name { font-size: 22px; font-weight: 800; line-height: 1.1; }
.cg-brand-strip__name span { color: var(--b); }
.cg-brand-strip__tag { font-size: 12px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--cg-muted); }

.cg-brand-strip > p, .cg-brand-strip > br,
.cg-grid > p:empty, .cg-grid > br,
.cg-split > p:empty, .cg-split > br,
.cg-actions > br, .cg-actions > p:empty,
.cg-hero > br, .cg-section > br { display: none; }
.cg-actions > p { margin: 0; display: contents; }

.cg-fd { --b: var(--cg-fd); --bd: var(--cg-fd-dark); }
.cg-exec { --b: var(--cg-exec); --bd: var(--cg-exec-dark); }
.cg-ned { --b: var(--cg-ned); --bd: var(--cg-ned-dark); }
.cg-acc { --b: var(--cg-acc); --bd: var(--cg-acc-dark); }
.cg-smf { --b: var(--cg-smf); --bd: var(--cg-smf-dark); }

.cg-section { padding: 80px 0; }
.cg-section--pale { background: var(--cg-pale); }
.cg-section--tight { padding: 56px 0; }
.cg-section + .cg-section:not(.cg-section--pale) { border-top: 1px solid var(--cg-rule); }

.cg-grid { display: grid; gap: 24px; }
.cg-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cg-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cg-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }

.cg-brand-card {
  background: var(--cg-white); border: 1px solid var(--cg-rule); border-top: 4px solid var(--b, var(--cg-blue));
  padding: 28px 28px 24px; display: flex; flex-direction: column;
}
.cg-brand-card__name { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--bd); margin: 0 0 6px; }
.cg-brand-card__name span { color: var(--b); }
.cg-brand-card__tag { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cg-muted); margin: 0 0 16px; }
.cg-brand-card p { font-size: 16px; }
.cg-brand-card ul { font-size: 15px; color: var(--cg-text); padding-left: 18px; }
.cg-brand-card__link { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--cg-rule); font-weight: 700; font-size: 15px; }
.cg-brand-card__link a { color: var(--bd); text-decoration: none; }
.cg-brand-card__link a:hover { color: var(--cg-blue-dark); text-decoration: underline; }

.cg-card { background: var(--cg-white); border: 1px solid var(--cg-rule); padding: 28px; }
.cg-card h3 { margin-top: 0; }
.cg-card--rule { border-top: 4px solid var(--cg-blue); }

.cg-steps { counter-reset: cgstep; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.cg-steps li { counter-increment: cgstep; position: relative; padding: 0 0 26px 64px; margin: 0; }
.cg-steps li::before {
  content: counter(cgstep, decimal-leading-zero); position: absolute; left: 0; top: 0;
  font-weight: 800; font-size: 15px; color: var(--cg-blue-dark); border-top: 3px solid var(--cg-blue); padding-top: 6px; width: 40px;
}
.cg-steps strong { display: block; color: var(--cg-ink); font-size: 18px; margin-bottom: 4px; }

.cg-founder {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 28px; align-items: start;
  background: var(--cg-white); border: 1px solid var(--cg-rule); border-left: 0; border-top: 4px solid var(--cg-navy); padding: 32px;
}
.cg-founder__mark {
  width: 96px; height: 96px; border-radius: 50%; background: var(--cg-navy); color: var(--cg-white);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 30px; letter-spacing: 1px;
}
.cg-founder__name { font-size: 22px; font-weight: 800; color: var(--cg-ink); margin: 0 0 4px; }
.cg-founder__role { font-size: 14px; font-weight: 600; color: var(--cg-muted); margin: 0 0 14px; letter-spacing: 0.3px; }
.cg-founder p { font-size: 16px; }
.cg-founder__links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 700; font-size: 15px; }

.cg-cta { background: var(--cg-navy); color: #DCE4F0; padding: 56px 0; position: relative; overflow: hidden; }
.cg-cta::before { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 8px; background: var(--cg-blue); }
.cg-cta h2 { color: var(--cg-white); }
.cg-cta p { color: #C6D2E4; max-width: 720px; }
.cg-cta a:not(.cg-btn) { color: var(--cg-white); }

.cg-faq details { border-bottom: 1px solid var(--cg-rule); padding: 4px 0; }
.cg-faq details:first-of-type { border-top: 1px solid var(--cg-rule); }
.cg-faq summary { cursor: pointer; font-weight: 700; color: var(--cg-ink); font-size: 18px; padding: 16px 32px 16px 0; list-style: none; position: relative; min-height: 44px; }
.cg-faq summary::-webkit-details-marker { display: none; }
.cg-faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 24px; font-weight: 600; color: var(--cg-blue-dark); }
.cg-faq details[open] summary::after { content: "\2212"; }
.cg-faq details p { color: var(--cg-text); }

.cg-contact-card { background: var(--cg-white); border: 1px solid var(--cg-rule); border-top: 4px solid var(--b, var(--cg-blue)); padding: 26px; }
.cg-contact-card h3 { margin: 0 0 4px; color: var(--bd, var(--cg-navy)); font-size: 22px; font-weight: 800; }
.cg-contact-card h3 span { color: var(--b); }
.cg-contact-card__tag { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cg-muted); margin: 0 0 14px; }
.cg-contact-card dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 15px; }
.cg-contact-card dt { font-weight: 700; color: var(--cg-ink); }
.cg-contact-card dd { margin: 0; overflow-wrap: anywhere; }

.cg-note { font-size: 15px; color: var(--cg-muted); }

.cg-footer { background: var(--cg-navy); color: #C6D2E4; padding: 64px 0 28px; font-size: 15px; }
.cg-footer a { color: var(--cg-white); text-decoration: none; }
.cg-footer a:hover { text-decoration: underline; }
.cg-footer__top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 3fr); gap: 48px; }
.cg-footer__group { display: flex; flex-direction: column; gap: 10px; }
.cg-footer__wordmark { display: flex; flex-direction: column; line-height: 1; color: var(--cg-white); }
.cg-footer__wordmark strong { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; }
.cg-footer__wordmark strong span { color: var(--cg-blue); }
.cg-footer__wordmark small { font-size: 11px; font-weight: 800; letter-spacing: 5.5px; text-transform: uppercase; color: #9FB0C8; margin-top: 6px; }
.cg-footer__wordmark::before { content: ""; display: block; width: 40px; height: 4px; background: var(--cg-blue); margin-bottom: 12px; }
.cg-footer__brands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.cg-footer__brand { border-top: 3px solid var(--b); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.cg-footer__brand strong { color: var(--cg-white); font-size: 17px; }
.cg-footer__brand span { font-size: 13px; color: #9FB0C8; }
.cg-footer__bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: #9FB0C8; }
.cg-footer .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }

.cg-404 { padding: 96px 0; }

.cg-post-card { background: var(--cg-white); border: 1px solid var(--cg-rule); border-top: 4px solid var(--cg-blue); display: flex; flex-direction: column; }
.cg-post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--cg-pale); }
.cg-post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.cg-post-card:hover .cg-post-card__media img { transform: scale(1.03); }
.cg-post-card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--cg-pale) 0 55%, var(--cg-white) 55% 100%); }
.cg-post-card__body { padding: 22px 24px 20px; display: flex; flex-direction: column; flex: 1; }
.cg-post-card__meta { font-size: 13px; font-weight: 600; letter-spacing: 0.4px; color: var(--cg-muted); margin: 0 0 8px; }
.cg-post-card__title { font-size: 20px; font-weight: 800; line-height: 1.3; margin: 0 0 10px; }
.cg-post-card__title a { color: var(--cg-ink); text-decoration: none; }
.cg-post-card__title a:hover { color: var(--cg-blue-dark); text-decoration: underline; }
.cg-post-card__excerpt { font-size: 15px; color: var(--cg-text); }
.cg-post-card__more { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--cg-rule); font-weight: 700; font-size: 15px; }
.cg-post-card__more a { text-decoration: none; }
.cg-pagination { margin-top: 48px; }
.cg-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.cg-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--cg-rule); text-decoration: none; font-weight: 700; color: var(--cg-navy); }
.cg-pagination .page-numbers.current { background: var(--cg-navy); border-color: var(--cg-navy); color: var(--cg-white); }

.cg-post-meta { font-size: 15px; font-weight: 600; color: var(--cg-muted); margin: 0; }
.cg-single { padding: 48px 0 72px; }
.cg-single__image { margin: 0 0 36px; }
.cg-single__image img { width: 100%; height: auto; display: block; }
.cg-single__image figcaption { font-size: 14px; color: var(--cg-muted); margin-top: 8px; }
.cg-prose img, .cg-entry .wp-block-image img { height: auto; }
.cg-prose figure { margin: 28px 0; }
.cg-prose .alignleft { float: left; margin: 6px 24px 16px 0; }
.cg-prose .alignright { float: right; margin: 6px 0 16px 24px; }
.cg-prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.cg-prose .wp-caption { max-width: 100%; }
.cg-prose .wp-caption-text, .cg-prose figcaption { font-size: 14px; color: var(--cg-muted); }
.cg-prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; display: block; overflow-x: auto; }
.cg-prose th, .cg-prose td { border: 1px solid var(--cg-rule); padding: 10px 12px; text-align: left; }
.cg-prose th { background: var(--cg-pale); color: var(--cg-ink); }
.cg-prose blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--cg-blue); color: var(--cg-ink); font-size: 19px; }
.post-navigation { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--cg-rule); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; font-weight: 700; }

@media (max-width: 1024px) {
  .cg-brand-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cg-brand-strip__item:nth-child(4) { border-left: 0; }
  .cg-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-footer__top { grid-template-columns: 1fr; }
  .cg-footer__brands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cg-split { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .cg-header__inner { min-height: 72px; }
  .cg-nav ul { gap: 4px 18px; }
  .cg-hero { padding-top: 48px; }
  .cg-hero::before { width: 100%; clip-path: polygon(40% 0, 100% 0, 100% 100%, 20% 100%); opacity: 0.6; }
  .cg-brand-strip { grid-template-columns: 1fr; }
  .cg-brand-strip__item { border-left: 0; }
  .cg-grid--2, .cg-grid--3 { grid-template-columns: 1fr; }
  .cg-section { padding: 56px 0; }
  .cg-founder { grid-template-columns: 1fr; padding: 24px; }
  .cg-footer__brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cg-lede { font-size: 18px; }
}
