/* Shared usability layer for the homepage and Services hub.
   Loaded last so it can consolidate legacy one-off values without rewriting templates. */
:root {
  --ux-font-display: "Plus Jakarta Sans", Sora, Inter, "Helvetica Neue", Arial, sans-serif;
  --ux-font-body: Inter, "Helvetica Neue", Arial, sans-serif;
  --ux-type-xs: 0.75rem;
  --ux-type-sm: 0.875rem;
  --ux-type-control: 0.9375rem;
  --ux-type-body: 1rem;
  --ux-type-lead: 1.125rem;
  --ux-type-h3: 1.25rem;
  --ux-type-h2: clamp(2rem, 4vw, 3.5rem);
  --ux-type-h1: clamp(2.75rem, 6vw, 5.5rem);
  --ux-text: #343741;
  --ux-muted: #626671;
  --ux-on-dark: #ffffff;
  --ux-muted-on-dark: rgba(255, 255, 255, 0.76);
  --ux-accent: #e44a4b;
  --ux-accent-dark: #b9272d;
  --ux-border: rgba(29, 23, 46, 0.15);
  --ux-radius-sm: 0.5rem;
  --ux-radius-md: 0.75rem;
  --ux-radius-lg: 1.25rem;
  --ux-radius-pill: 999px;
  --ux-focus: #ff8c8d;
}

.home-page,
.services-page {
  color: var(--ux-text);
  font-family: var(--ux-font-body);
  font-size: var(--ux-type-body);
  line-height: 1.6;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  border-radius: var(--ux-radius-sm);
  background: #fff;
  color: #120d1f;
  font-weight: 800;
  box-shadow: 0 8px 28px rgba(18, 13, 31, 0.24);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

#main-content:focus {
  outline: none;
}

.home-page :where(a, button, input, select, textarea):focus-visible,
.services-page :where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--ux-focus) !important;
  outline-offset: 3px !important;
}

/* One shared type scale and one readable text palette. */
.home-page :where(h1, h2, h3),
.services-page :where(h1, h2, h3) {
  font-family: var(--ux-font-display);
}

.home-page .home-slide-title,
.services-page .page-hero h1 {
  font-size: var(--ux-type-h1);
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.home-page .section-head h2,
.home-page .enquiry-copy h2,
.services-page .section-head h2,
.services-page .cta-inner h2 {
  font-size: var(--ux-type-h2);
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

.home-page main :where(.lead, .section-head > p, .enquiry-copy > p),
.services-page main :where(.page-hero p, .section-head > p, .cta-inner p) {
  font-size: var(--ux-type-body);
  line-height: 1.7;
}

.home-page .lead {
  font-size: var(--ux-type-lead) !important;
}

.home-page :where(.kicker, .eyebrow, .service-fit, .ledger-heading > span),
.services-page :where(.kicker, .service-number, .service-hub-panel > span) {
  font-size: 0.8125rem !important;
}

.home-page .dashboard-kpis span {
  font-size: var(--ux-type-xs) !important;
  line-height: 1.35;
}

.home-page .service-fit {
  color: var(--ux-accent-dark);
  letter-spacing: 0.045em;
}

.home-page .ledger-heading > span {
  color: #ff8c8d;
}

.home-page .quick-enquiry-submit p {
  max-width: 34ch;
  color: var(--ux-muted);
  font-size: var(--ux-type-sm) !important;
  line-height: 1.55;
}

.home-page .quick-enquiry-submit p a {
  color: var(--ux-accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* Three component radii and two CTA variants replace one-off button/card shapes. */
.home-page :where(.audience-card, .service-card, .value-card, .quote-card, .insight-card, .assurance-ledger, .quick-enquiry-form),
.services-page :where(.service-hub-panel, .service-index-card, .insight-card, .method-card) {
  border-radius: var(--ux-radius-lg) !important;
}

.home-page .button,
.services-page .button {
  border-radius: var(--ux-radius-md) !important;
}

.home-page .button,
.services-page .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.78rem 1.05rem;
  border: 1px solid transparent;
  font-size: var(--ux-type-control);
  font-weight: 800;
  line-height: 1.2;
}

.home-page .button.primary,
.services-page .button.primary {
  border-color: var(--ux-accent);
  background: var(--ux-accent);
  color: #fff;
}

.home-page .button.secondary,
.services-page .button.secondary {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(18, 13, 31, 0.18);
  color: #fff;
}

.home-page .button:hover,
.services-page .button:hover {
  transform: translateY(-2px);
}

/* Homepage card affordance: hover, keyboard focus and explicit action move together. */
.home-page .audience-card {
  border: 1px solid var(--ux-border);
  box-shadow: 0 12px 30px rgba(29, 23, 46, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-page .audience-card:hover,
.home-page .audience-card:focus-visible {
  border-color: rgba(228, 74, 75, 0.42);
  box-shadow: 0 20px 44px rgba(29, 23, 46, 0.14);
  transform: translateY(-5px);
}

.home-page .audience-card strong {
  color: var(--ux-accent-dark);
  font-size: var(--ux-type-control);
  text-decoration: underline;
  text-decoration-color: rgba(185, 39, 45, 0.35);
  text-underline-offset: 0.22em;
}

/* Finance insights: a compact editorial card system instead of an ungrouped text list. */
.home-page .insights-preview-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 0 50%, rgba(228, 74, 75, 0.1), transparent 28rem),
    linear-gradient(180deg, #fffaf6 0%, #fff7f1 100%);
}

.home-page .insights-preview-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: linear-gradient(rgba(29, 23, 46, 0.035) 1px, transparent 1px);
  background-size: 100% 5.5rem;
  mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
}

.home-page .insights-preview-section .container {
  position: relative;
  z-index: 1;
}

.home-page .insights-preview-section .section-head {
  margin-bottom: clamp(1.75rem, 4vw, 3.25rem);
  padding-bottom: clamp(1.4rem, 3vw, 2.25rem);
  border-bottom: 1px solid rgba(29, 23, 46, 0.14);
}

.home-page .insights-preview-section .section-head h2 {
  max-width: 15ch;
}

.home-page .insights-preview-section .section-head > p {
  max-width: 38rem;
}

.home-page .insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.55rem);
  align-items: stretch;
}

.home-page .insight-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 25rem;
  flex-direction: column;
  padding: clamp(1.35rem, 2.4vw, 2rem);
  overflow: hidden;
  border: 1px solid rgba(29, 23, 46, 0.13);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 247, 0.96));
  box-shadow: 0 18px 45px rgba(29, 23, 46, 0.08);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), border-color 220ms ease, box-shadow 220ms ease;
}

.home-page .insight-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0.28rem;
  background: linear-gradient(90deg, var(--ux-accent), #ff8c8d 58%, rgba(255, 140, 141, 0.08));
  transform: scaleX(0.32);
  transform-origin: left;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-page .insight-card:hover,
.home-page .insight-card:focus-within {
  border-color: rgba(228, 74, 75, 0.38);
  box-shadow: 0 26px 60px rgba(29, 23, 46, 0.14);
  transform: translateY(-0.45rem);
}

.home-page .insight-card:hover::before,
.home-page .insight-card:focus-within::before {
  transform: scaleX(1);
}

.home-page .insight-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(1.6rem, 3vw, 2.35rem);
}

.home-page .insight-card-top > span:first-child {
  color: rgba(29, 23, 46, 0.48);
  font-family: var(--ux-font-display);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.home-page .insight-card-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(228, 74, 75, 0.16);
  border-radius: var(--ux-radius-md);
  background: rgba(228, 74, 75, 0.09);
  color: var(--ux-accent-dark);
}

.home-page .insight-card-icon svg {
  width: 1.3rem;
  height: 1.3rem;
  stroke-width: 2;
}

.home-page .insight-card .kicker {
  margin-bottom: 0.7rem;
  color: var(--ux-accent-dark);
}

.home-page .insight-card h3 {
  max-width: 18ch;
  margin: 0;
  color: #181225;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.home-page .insight-card p {
  margin: 1rem 0 1.5rem;
  color: var(--ux-muted);
  font-size: var(--ux-type-body);
  line-height: 1.65;
}

.home-page .insight-card a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(29, 23, 46, 0.11);
  color: var(--ux-accent-dark);
  font-size: var(--ux-type-control);
  font-weight: 800;
}

.home-page .insight-card a svg {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 180ms ease;
}

.home-page .insight-card:hover a svg,
.home-page .insight-card a:focus-visible svg {
  transform: translate(0.2rem, -0.2rem);
}

/* Hero tabs are grouped with the content and use a 44px+ target with a strong state. */
.home-page .home-slider-controls {
  gap: 0.45rem;
  width: min(100%, 700px);
  margin: 0.25rem auto 0;
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--ux-radius-md);
  background: rgba(18, 13, 31, 0.62);
  box-shadow: 0 12px 28px rgba(18, 13, 31, 0.2);
  backdrop-filter: blur(12px);
}

.home-page .home-slide-tabs {
  gap: 0.3rem;
}

.home-page .home-slide-tab {
  min-height: 48px;
  padding: 0.6rem 0.8rem;
  border: 1px solid transparent;
  border-radius: var(--ux-radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--ux-type-control);
}

.home-page .home-slide-tab:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.home-page .home-slide-tab.is-active,
.home-page .home-slide-tab[aria-selected="true"] {
  border-color: rgba(255, 140, 141, 0.58);
  background: var(--ux-accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(185, 39, 45, 0.28);
}

.home-page .home-slide-arrow {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--ux-radius-sm);
}

/* Keep the native select while reserving room for its arrow. */
.home-page #quick-service {
  width: 100%;
  min-width: 0;
  padding-right: 3rem !important;
  text-overflow: ellipsis;
}

/* Keep all seven service cards in a continuous grid at tablet widths. */
@media (min-width: 1181px) {
  .home-page .home-services-section .cards-grid,
  .services-page .service-index-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  }

  .home-page .home-services-section .service-card,
  .services-page .service-index-card {
    grid-column: span 3;
  }

  .home-page .home-services-section .service-card:nth-child(n + 5),
  .services-page .service-index-card:nth-child(n + 5) {
    grid-column: span 4;
  }
}

@media (min-width: 701px) and (max-width: 1180px) {
  .home-page .home-services-section .cards-grid,
  .services-page .service-index-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-page .home-services-section .service-card:last-child,
  .services-page .service-index-card:last-child {
    grid-column: 1 / -1;
    width: auto;
    justify-self: stretch;
  }
}

@media (min-width: 701px) and (max-width: 980px) {
  .home-page .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .insight-card:last-child {
    grid-column: 1 / -1;
    width: min(100%, calc(50% - 0.5rem));
    justify-self: center;
  }
}

.services-page .service-index-card {
  border: 1px solid var(--ux-border);
  box-shadow: 0 12px 30px rgba(29, 23, 46, 0.07);
}

.services-page .service-index-card:hover,
.services-page .service-index-card:focus-visible {
  border-color: rgba(228, 74, 75, 0.42);
  box-shadow: 0 20px 44px rgba(29, 23, 46, 0.14);
  transform: translateY(-5px);
}

.services-page .service-index-card em {
  color: var(--ux-accent-dark);
  font-size: var(--ux-type-control);
  font-style: normal;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(185, 39, 45, 0.35);
  text-underline-offset: 0.22em;
}

.services-page .service-hub-panel > span {
  color: rgba(255, 255, 255, 0.82);
}

.services-page .services-cta-inner {
  grid-template-columns: minmax(0, 36rem) auto !important;
  justify-content: start;
  column-gap: clamp(1.5rem, 4vw, 3rem) !important;
}

.services-page .services-cta-inner .button {
  justify-self: start;
}

@media (max-width: 700px) {
  .home-page .home-slider-controls {
    margin-top: 0.15rem;
    padding: 0.3rem;
  }

  .home-page .home-slide-tab {
    min-height: 52px;
    padding-inline: 0.45rem;
    text-align: center;
  }

  .home-page .home-services-section .cards-grid,
  .home-page .insight-grid,
  .services-page .service-index-grid,
  .services-page .services-cta-inner {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .home-page .home-services-section .service-card:last-child,
  .services-page .service-index-card:last-child {
    width: 100%;
  }

  .home-page .insight-card {
    min-height: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page *,
  .home-page *::before,
  .home-page *::after,
  .services-page *,
  .services-page *::before,
  .services-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
/* Analytics consent controls shared by the audited home and services pages. */
.cookie-consent p a {
  display: inline;
  margin: 0;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.cookie-settings-link {
  margin-top: 0.7rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.cookie-settings-link:hover,
.cookie-settings-link:focus-visible {
  color: #fff;
}

.cookie-settings-link:focus-visible {
  outline: 3px solid #ff8588;
  outline-offset: 3px;
}
/* Keep the complete brief available when direct form delivery is unavailable. */
.form-delivery-note { margin:.75rem 0 0; color:inherit; font-size:.875rem; line-height:1.6; }
.form-status.is-ready { border:1px solid #94a3b8; background:#f1f5f9; color:#1e293b; }
.form-delivery-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.65rem; margin-top:1rem; }
.form-delivery-actions a, .form-delivery-actions button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:.6rem .85rem; border:1px solid currentColor; border-radius:8px; background:transparent; color:inherit; font:inherit; font-weight:700; text-decoration:none; cursor:pointer; }
.form-delivery-actions a:hover, .form-delivery-actions button:hover { text-decoration:underline; }
.form-delivery-actions :focus-visible { outline:2px solid currentColor; outline-offset:3px; }
