/* =====================================================================
   CRUX Financial Services — Modern Shared Stylesheet
   Reusable styling for the Financial Services hub + all sub-service pages.
   Loaded LAST so it modernises the existing markup without touching the
   hero (service-banner), header, footer or forms.
   Same brand palette as before (CRUX red + neutrals), just modernised.
   ===================================================================== */

:root {
  --fm-red: #ad2324;
  --fm-red-dark: #870708;
  --fm-red-soft: #fff2f2;
  --fm-red-tint: #fcf6f6;
  --fm-red-line: #f1d9d9;
  --fm-ink: #131722;
  --fm-ink-2: #1f2430;
  --fm-body: #4a4d52;
  --fm-muted: #6b7178;
  --fm-line: #e7ebf0;
  --fm-line-soft: #eceff3;
  --fm-bg: #f8f9fb;
  --fm-white: #ffffff;
  --fm-shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.06);
  --fm-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --fm-shadow-lg: 0 22px 48px rgba(15, 23, 42, 0.14);
  --fm-radius: 18px;
  --fm-radius-sm: 12px;
  --fm-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------------------------------------------------------------
   Page shell / section backgrounds
   --------------------------------------------------------------------- */
.services-section,
.financial-main-section {
  position: relative;
  padding: 70px 0 84px;
  background:
    radial-gradient(
      120% 120% at 100% 0%,
      var(--fm-red-tint) 0%,
      transparent 42%
    ),
    linear-gradient(
      180deg,
      var(--fm-bg) 0%,
      var(--fm-white) 45%,
      var(--fm-bg) 100%
    );
}

.services-section .container,
.financial-layout {
  max-width: 1200px !important;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------------------------------------------------------------------
   Restyled intro band (who-we-are) — first thing seen under the hero
   --------------------------------------------------------------------- */
.who-we-are-section {
  position: relative;
  margin: -42px auto 8px;
  max-width: 1160px;
  padding: 0 22px;
  z-index: 3;
  background: transparent !important;
}

.who-we-are-container {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 26px;
  align-items: stretch;
  border: 1px solid var(--fm-line);
  border-radius: var(--fm-radius);
  box-shadow: var(--fm-shadow-lg);
  padding: 34px 34px;
  background: #ffffff !important;
}

.who-we-are-left {
  position: relative;
  padding-left: 20px;
}

.who-we-are-left::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 5px;
  border-radius: 6px;
  background: linear-gradient(
    180deg,
    var(--fm-red) 0%,
    var(--fm-red-dark) 100%
  );
}

.who-we-are-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
  color: var(--fm-ink);
  letter-spacing: -0.01em;
}

.who-we-are-subtitle,
.who-we-are-description {
  margin: 12px 0 0;
  color: var(--fm-body);
  font-size: 17px;
  line-height: 1.75;
}

.who-we-are-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--fm-line);
  padding-left: 26px;
}

.who-we-are-heading {
  margin: 0 0 8px;
  color: var(--fm-ink-2);
  font-size: 20px;
}

/* ---------------------------------------------------------------------
   Eyebrow + headings
   --------------------------------------------------------------------- */
.section-heading,
.services-intro h2 {
  position: relative;
  margin: 48px 0 14px;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.18;
  color: var(--fm-ink);
  letter-spacing: -0.01em;
  padding-top: 14px;
}

.section-heading::before,
.services-intro h2::before {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  border-radius: 4px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--fm-red) 0%, var(--fm-red-dark) 100%);
}

.section-lead,
.service-intro p {
  margin: 0 0 22px;
  max-width: 980px;
  color: var(--fm-body);
  font-size: 17px;
  line-height: 1.78;
}

.service-intro {
  margin-bottom: 8px;
}

.service-intro p {
  position: relative;
  padding: 18px 22px;
  border-radius: var(--fm-radius-sm);
  border: 1px solid var(--fm-red-line);
  border-left: 5px solid var(--fm-red);
  background: linear-gradient(
    122deg,
    var(--fm-white) 0%,
    var(--fm-red-soft) 120%
  );
  box-shadow: var(--fm-shadow-sm);
  color: var(--fm-ink-2);
  font-size: 18px;
}

/* Main hub page hero copy (kept, just modernised) */
.financial-hero {
  margin-bottom: 26px;
}

.financial-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.08;
  color: var(--fm-ink);
  letter-spacing: -0.015em;
}

.financial-hero p {
  margin: 0;
  max-width: 960px;
  color: var(--fm-body);
  font-size: 18px;
  line-height: 1.75;
}

.prominent-message {
  margin: 26px 0 40px;
  padding: 24px 26px;
  border-radius: var(--fm-radius);
  border: 1px solid var(--fm-red-line);
  border-left: 6px solid var(--fm-red);
  background: linear-gradient(
    122deg,
    var(--fm-white) 0%,
    var(--fm-red-soft) 100%
  );
  box-shadow: var(--fm-shadow);
}

.prominent-message p {
  margin: 0;
  font-size: 19px;
  line-height: 1.65;
  color: var(--fm-ink-2);
}

.services-intro {
  margin-bottom: 18px;
}

/* ---------------------------------------------------------------------
   Visualization strip (pill chips)
   --------------------------------------------------------------------- */
.visualization-strip {
  margin: 22px 0 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.viz-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 999px;
  border: 1px solid var(--fm-line);
  background: var(--fm-white);
  padding: 11px 18px;
  box-shadow: var(--fm-shadow-sm);
  transition:
    transform 0.25s var(--fm-ease),
    box-shadow 0.25s var(--fm-ease);
}

.viz-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--fm-shadow);
}

.viz-icon,
.viz-item .icon-wrap {
  width: 34px;
  height: 34px;
  min-width: 34px;
  margin: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fm-red-soft);
  color: var(--fm-red);
  border: 1px solid var(--fm-red-line);
}

.viz-icon svg,
.viz-item .icon-wrap svg {
  width: 18px;
  height: 18px;
}

.viz-item span {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fm-ink-2);
}

/* ---------------------------------------------------------------------
   Insight cards ("When This Service Helps")
   --------------------------------------------------------------------- */
.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 6px;
}

.insight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--fm-line);
  border-radius: var(--fm-radius);
  padding: 26px 24px;
  background: linear-gradient(
    160deg,
    var(--fm-white) 0%,
    var(--fm-red-tint) 140%
  );
  box-shadow: var(--fm-shadow-sm);
  overflow: hidden;
  transition:
    transform 0.28s var(--fm-ease),
    box-shadow 0.28s var(--fm-ease),
    border-color 0.28s var(--fm-ease);
}

.insight-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--fm-red) 0%, var(--fm-red-dark) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--fm-ease);
}

.insight-card:hover {
  transform: translateY(-6px);
  border-color: var(--fm-red-line);
  box-shadow: var(--fm-shadow-lg);
}

.insight-card:hover::after {
  transform: scaleX(1);
}

.insight-card h4 {
  margin: 4px 0 10px;
  font-size: 18px;
  line-height: 1.35;
  color: var(--fm-ink-2);
}

.insight-card p {
  margin: 0;
  color: var(--fm-body);
  line-height: 1.72;
}

.icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fm-white);
  color: var(--fm-red);
  border: 1px solid var(--fm-red-line);
  margin-bottom: 16px;
  box-shadow: 0 6px 14px rgba(173, 35, 36, 0.12);
}

.icon-wrap svg {
  width: 24px;
  height: 24px;
}

.section-divider {
  margin: 44px 0 8px;
  border: 0;
  border-top: 1px solid var(--fm-line);
}

/* ---------------------------------------------------------------------
   Accordion ("How CRUX Helps" — tabs that open & close)
   --------------------------------------------------------------------- */
.fm-accordion {
  margin-top: 8px;
  border: 1px solid var(--fm-line);
  border-radius: var(--fm-radius);
  background: var(--fm-white);
  box-shadow: var(--fm-shadow);
  overflow: hidden;
}

.fm-accordion-item + .fm-accordion-item {
  border-top: 1px solid var(--fm-line);
}

.fm-accordion-item.is-open {
  background: linear-gradient(
    180deg,
    var(--fm-red-soft) 0%,
    var(--fm-white) 70%
  );
}

.fm-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--fm-ink-2);
  transition:
    background 0.25s var(--fm-ease),
    color 0.25s var(--fm-ease);
}

.fm-accordion-trigger:hover {
  background: var(--fm-red-tint);
}

.fm-accordion-item.is-open .fm-accordion-trigger {
  color: var(--fm-red);
}

.fm-accordion-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--fm-red-soft);
  color: var(--fm-red);
  border: 1px solid var(--fm-red-line);
  transition: transform 0.3s var(--fm-ease);
}

.fm-accordion-item.is-open .fm-accordion-icon {
  transform: scale(1.04);
}

.fm-accordion-icon svg {
  width: 22px;
  height: 22px;
}

.fm-accordion-title {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.fm-accordion-chevron {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fm-red);
  background: var(--fm-red-soft);
  transition:
    transform 0.35s var(--fm-ease),
    background 0.25s var(--fm-ease);
}

.fm-accordion-item.is-open .fm-accordion-chevron {
  transform: rotate(180deg);
  background: var(--fm-red);
  color: var(--fm-white);
}

.fm-accordion-chevron svg {
  width: 16px;
  height: 16px;
}

.fm-accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.38s var(--fm-ease);
}

.fm-accordion-item.is-open .fm-accordion-panel {
  grid-template-rows: 1fr;
}

.fm-accordion-panel-inner {
  overflow: hidden;
}

.fm-accordion-panel-inner > * {
  margin: 0 24px 22px 86px;
  color: var(--fm-body);
  line-height: 1.78;
  font-size: 16px;
}

/* ---------------------------------------------------------------------
   Service slider/carousel + grid (main hub page)
   --------------------------------------------------------------------- */
.fm-slider {
  position: relative;
  margin: 6px 0 14px;
}

.fm-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.fm-slider-head .fm-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fm-red);
}

.fm-slider-nav {
  display: flex;
  gap: 10px;
}

.fm-slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--fm-red-line);
  background: var(--fm-white);
  color: var(--fm-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--fm-shadow-sm);
  transition:
    background 0.25s var(--fm-ease),
    color 0.25s var(--fm-ease),
    transform 0.2s var(--fm-ease),
    opacity 0.2s;
}

.fm-slider-btn:hover {
  background: var(--fm-red);
  color: var(--fm-white);
  transform: translateY(-2px);
}

.fm-slider-btn svg {
  width: 20px;
  height: 20px;
}

.fm-slider-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 4px 18px;
  margin: 0 -4px;
  scrollbar-width: none;
}

.fm-slider-track::-webkit-scrollbar {
  display: none;
}

.fm-slider-track > .service-card {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 280px;
  margin: 0;
}

.fm-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.fm-slider-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--fm-red-line);
  cursor: pointer;
  transition:
    width 0.3s var(--fm-ease),
    background 0.3s var(--fm-ease);
}

.fm-slider-dot.is-active {
  width: 26px;
  border-radius: 6px;
  background: var(--fm-red);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 8px;
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 24px;
  border-radius: var(--fm-radius);
  border: 1px solid var(--fm-line);
  background: linear-gradient(
    160deg,
    var(--fm-white) 0%,
    var(--fm-red-tint) 150%
  );
  box-shadow: var(--fm-shadow-sm);
  transition:
    transform 0.28s var(--fm-ease),
    box-shadow 0.28s var(--fm-ease),
    border-color 0.28s var(--fm-ease);
}

.service-card:hover {
  transform: translateY(-7px);
  border-color: var(--fm-red-line);
  box-shadow: var(--fm-shadow-lg);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fm-red-line);
  background: var(--fm-white);
  color: var(--fm-red);
  box-shadow: 0 6px 14px rgba(173, 35, 36, 0.12);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--fm-ink-2);
}

.service-card h4 {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--fm-radius-sm);
  border: 1px solid var(--fm-red-line);
  background: linear-gradient(
    145deg,
    var(--fm-white) 0%,
    var(--fm-red-soft) 100%
  );
  font-size: 15px;
  line-height: 1.32;
  color: var(--fm-ink);
  font-weight: 600;
}

.service-card p {
  margin: 0 0 16px;
  color: var(--fm-body);
  line-height: 1.72;
}

.learn-more-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fm-red);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.learn-more-link img {
  width: 18px;
  height: 18px;
  transition: transform 0.25s var(--fm-ease);
}

.learn-more-link:hover {
  color: var(--fm-red-dark);
}

.learn-more-link:hover img {
  transform: translateX(4px);
}

/* ---------------------------------------------------------------------
   "How CRUX Helps" intro block (hub page) + CTA
   --------------------------------------------------------------------- */
.how-crux-helps {
  margin-top: 50px;
  padding: 30px 30px;
  border-radius: var(--fm-radius);
  border: 1px solid var(--fm-line);
  background: var(--fm-white);
  box-shadow: var(--fm-shadow-sm);
}

.how-crux-helps h3 {
  margin: 0 0 12px;
  color: var(--fm-ink);
  font-size: 24px;
}

.how-crux-helps p {
  margin: 0;
  color: var(--fm-body);
  line-height: 1.78;
}

.how-crux-helps p + p {
  margin-top: 10px;
}

.services-cta {
  margin-top: 44px;
  padding: 34px 32px;
  border-radius: var(--fm-radius);
  border: 1px solid var(--fm-red-line);
  background:
    radial-gradient(120% 160% at 0% 0%, var(--fm-red-soft) 0%, transparent 55%),
    linear-gradient(130deg, var(--fm-white) 0%, var(--fm-red-soft) 130%);
  box-shadow: var(--fm-shadow);
}

.services-cta h3 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--fm-ink);
}

.services-cta p {
  margin: 0 0 10px;
  color: var(--fm-body);
  line-height: 1.72;
  max-width: 900px;
}

.services-cta p + p {
  margin-bottom: 18px;
}

.services-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--fm-red) 0%,
    var(--fm-red-dark) 100%
  );
  color: var(--fm-white);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(173, 35, 36, 0.28);
  transition:
    transform 0.22s var(--fm-ease),
    box-shadow 0.22s var(--fm-ease);
}

.services-cta .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(173, 35, 36, 0.34);
}

.services-cta .btn-primary img {
  width: 18px;
  height: 18px;
}

/* ---------------------------------------------------------------------
   Consultation form shell (modernised container only — fields untouched)
   --------------------------------------------------------------------- */
.consultation-form-section {
  margin-top: 30px;
  padding: 34px 30px;
  border-radius: var(--fm-radius);
  border: 1px solid var(--fm-line);
  background: var(--fm-white);
  box-shadow: var(--fm-shadow);
  max-width: 1000px;
  margin-inline: auto;
}

.consultation-form-section h3 {
  margin: 0 0 20px;
  font-size: 24px;
  color: var(--fm-ink);
}

.consultation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.consultation-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consultation-form .form-group.full {
  grid-column: 1 / -1;
}

.consultation-form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fm-ink-2);
}

.consultation-form input,
.consultation-form select,
.consultation-form textarea {
  width: 100%;
  border: 1px solid #d8dde5;
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  color: var(--fm-ink-2);
  background: var(--fm-white);
  transition:
    border-color 0.2s var(--fm-ease),
    box-shadow 0.2s var(--fm-ease);
}

.consultation-form input:focus,
.consultation-form select:focus,
.consultation-form textarea:focus {
  outline: none;
  border-color: var(--fm-red);
  box-shadow: 0 0 0 3px rgba(173, 35, 36, 0.14);
}

.consultation-form textarea {
  min-height: 130px;
  resize: vertical;
}

.consultation-form button {
  border: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: linear-gradient(
    135deg,
    var(--fm-red) 0%,
    var(--fm-red-dark) 100%
  );
  color: #fff;
  border-radius: 12px;
  padding: 14px 26px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(173, 35, 36, 0.26);
  transition:
    transform 0.22s var(--fm-ease),
    box-shadow 0.22s var(--fm-ease);
}

.consultation-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(173, 35, 36, 0.32);
}

.consultation-form button:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.form-response {
  margin-top: 14px;
  font-size: 14px;
}

.form-response.success {
  color: #15803d;
}

.form-response.error {
  color: #b91c1c;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fm-slider-track > .service-card {
    flex-basis: calc((100% - 20px) / 2);
  }
}

@media (max-width: 920px) {
  .who-we-are-container {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 24px;
  }
  .who-we-are-right {
    border-left: 0;
    border-top: 1px solid var(--fm-line);
    padding-left: 0;
    padding-top: 18px;
  }
  .visual-grid,
  .visualization-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .services-section,
  .financial-main-section {
    padding: 52px 0 60px;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .fm-slider-track > .service-card {
    flex-basis: 86%;
    min-width: 86%;
  }
  .consultation-form {
    grid-template-columns: 1fr;
  }
  .fm-accordion-panel-inner > * {
    margin-left: 24px;
  }
  .who-we-are-section {
    margin-top: -28px;
  }
  .services-cta,
  .how-crux-helps,
  .consultation-form-section {
    padding: 24px 22px;
  }
}
