/**
 * CF Value Cards — five-mode framework per CF_MODULE_GUIDE §8.
 *
 * Modes (chosen for the corporate-security executive lens — Ontic,
 * Dragonfly, Seerist, ASIS, Control Risks, International SOS):
 *
 *   .cf-value-cards--light-sky    Briefing-grade default (calm, credible)
 *   .cf-value-cards--light-slate  Analytical / operational
 *   .cf-value-cards--light-paper  Editorial / long-form (white bg, navy ink)
 *   .cf-value-cards--light-mint   Positive outcome (use sparingly)
 *   .cf-value-cards--dark-navy    Brand authority (one anchor per page)
 *   .cf-value-cards--dark-ops     GSOC / command center (amber accent)
 *
 * Each mode defines its own palette via CSS custom properties; the rest
 * of the styles read from those properties so the same markup serves
 * all five.
 *
 * Default values pulled from cf_core/brand. The lifted-navy card-bg and
 * white card-bg in light modes are module-local.
 *
 * Icon SVGs should use stroke="currentColor" / fill="currentColor" — the
 * .cf-value-cards__icon container's `color` is set to --cfvc-icon, so
 * the icon adopts that color automatically.
 */

.cf-value-cards {
  /* Base defaults = light_sky. Mode classes below override. */
  --cfvc-section-bg: var(--cf-sky-light);
  --cfvc-card-bg: #FFFFFF;
  --cfvc-border: rgba(0, 0, 103, 0.08);
  --cfvc-heading: var(--cf-navy);
  --cfvc-body: var(--cf-blue-gray);
  --cfvc-icon: var(--cf-sky-mid);
  --cfvc-shadow: color-mix(in srgb, var(--cf-navy) 8%, transparent);

  background: var(--cfvc-section-bg);
  color: var(--cfvc-body);
  padding: 120px 0;
  font-family: var(--cf-font-stack);
  box-sizing: border-box;
}

/* ── Light: Sky (briefing-grade default) ────────────────────────────── */
.cf-value-cards--light-sky {
  --cfvc-section-bg: var(--cf-sky-light);
  --cfvc-card-bg: #FFFFFF;
  --cfvc-border: rgba(0, 0, 103, 0.08);
  --cfvc-heading: var(--cf-navy);
  --cfvc-body: var(--cf-blue-gray);
  --cfvc-icon: var(--cf-sky-mid);
  --cfvc-shadow: color-mix(in srgb, var(--cf-navy) 8%, transparent);
}

/* ── Light: Slate (analytical / operational) ────────────────────────── */
.cf-value-cards--light-slate {
  --cfvc-section-bg: var(--cf-blue-gray-lightest);
  --cfvc-card-bg: #FFFFFF;
  --cfvc-border: rgba(0, 0, 103, 0.08);
  --cfvc-heading: var(--cf-navy);
  --cfvc-body: var(--cf-blue-gray);
  --cfvc-icon: var(--cf-navy);
  --cfvc-shadow: color-mix(in srgb, var(--cf-navy) 8%, transparent);
}

/* ── Light: Paper (editorial / long-form) ───────────────────────────── */
.cf-value-cards--light-paper {
  --cfvc-section-bg: var(--cf-white);
  --cfvc-card-bg: var(--cf-white);
  --cfvc-border: var(--cf-blue-gray-tint);
  --cfvc-heading: var(--cf-navy);
  --cfvc-body: var(--cf-blue-gray);
  --cfvc-icon: var(--cf-navy);
  --cfvc-shadow: color-mix(in srgb, var(--cf-navy) 8%, transparent);
}

/* ── Light: Mint (positive outcome / growth) ────────────────────────── */
.cf-value-cards--light-mint {
  --cfvc-section-bg: var(--cf-apple-pale);
  --cfvc-card-bg: #FFFFFF;
  --cfvc-border: rgba(0, 0, 103, 0.08);
  --cfvc-heading: var(--cf-navy);
  --cfvc-body: var(--cf-blue-gray);
  --cfvc-icon: var(--cf-leaf);
  --cfvc-shadow: color-mix(in srgb, var(--cf-navy) 8%, transparent);
}

/* ── Dark: Navy (brand authority) ───────────────────────────────────── */
.cf-value-cards--dark-navy {
  --cfvc-section-bg: var(--cf-navy);
  --cfvc-card-bg: var(--cf-navy-lifted);
  --cfvc-border: rgba(255, 255, 255, 0.10);
  --cfvc-heading: var(--cf-navy-lightest);
  --cfvc-body: color-mix(in srgb, var(--cf-navy-lightest) 75%, transparent);
  --cfvc-icon: var(--cf-sky);
  --cfvc-shadow: rgba(0, 0, 0, 0.4);
}

/* ── Dark: Ops (GSOC / command center) ──────────────────────────────── */
.cf-value-cards--dark-ops {
  --cfvc-section-bg: var(--cf-slate-section);
  --cfvc-card-bg: var(--cf-slate-card);
  --cfvc-border: rgba(255, 255, 255, 0.08);
  --cfvc-heading: var(--cf-blue-gray-tint);
  --cfvc-body: var(--cf-blue-gray-soft);
  --cfvc-icon: var(--cf-golden-orange);
  --cfvc-shadow: rgba(0, 0, 0, 0.5);
}

.cf-value-cards *,
.cf-value-cards *::before,
.cf-value-cards *::after {
  box-sizing: inherit;
}

.cf-value-cards--fullbleed {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.cf-value-cards__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.cf-value-cards__header {
  text-align: center;
  margin-bottom: 72px;
}

.cf-value-cards__eyebrow {
  color: var(--cfvc-icon);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
}

.cf-value-cards__heading {
  color: var(--cfvc-heading);
  font-size: clamp(36px, 4vw, 52px);
  margin: 0 0 16px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cf-value-cards__intro {
  color: var(--cfvc-body);
  font-size: 17px;
  line-height: 1.55;
  max-width: 600px;
  margin: 0 auto;
}

.cf-value-cards__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

@media (max-width: 1000px) {
  .cf-value-cards__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 560px) {
  .cf-value-cards__grid { grid-template-columns: 1fr; }
}

.cf-value-cards__card {
  display: block;
  background: var(--cfvc-card-bg);
  padding: 40px 28px;
  text-align: center;
  border: 1px solid var(--cfvc-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cf-value-cards__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--cfvc-shadow);
}

.cf-value-cards__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  color: var(--cfvc-icon);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-value-cards__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cf-value-cards__card-heading {
  color: var(--cfvc-heading);
  font-size: 20px;
  margin: 0 0 12px;
  line-height: 1.3;
  font-weight: 600;
}

.cf-value-cards__card-desc {
  color: var(--cfvc-body);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

/* ── Phone layout: horizontal feature-row pattern ───────────────────────
   Below 560px the 4-up grid collapses to 1 column. The desktop
   "centered card with big icon on top" treatment then reads as four
   ceremonious tiles — slow to scan and icon-dominant. Restructure
   each card into a row: icon left (44px), heading + description
   right, left-aligned. Drop the per-card border / rounded box and
   use hairline rules between rows instead (matches cf_services_strip
   mobile treatment — once content is in row layout, card boxes feel
   redundant and dividers read cleaner). Tighten section + header
   padding so the whole block doesn't waste vertical real estate on
   phones; bump description size to 15px so it stays readable in dim
   conditions (airline cabins, evening commutes — the conditions in
   which a CSO actually reads on a phone). Desktop is untouched.    */
@media (max-width: 560px) {
  .cf-value-cards {
    padding: 64px 0;
  }
  .cf-value-cards__header {
    text-align: left;
    margin-bottom: 40px;
  }
  .cf-value-cards__intro {
    margin: 0;                    /* override the centered 0 auto */
  }

  /* Grid → vertical row stack with dividers, no gap (rows share a rule). */
  .cf-value-cards__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cf-value-cards__card {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 20px;
    row-gap: 4px;
    align-items: start;
    text-align: left;
    padding: 20px 0;
    background: transparent;       /* drop the boxed look */
    border: none;
    border-top: 1px solid var(--cfvc-border);
    border-radius: 0;
    /* Hover lift made no sense in row layout — neutralize. */
    transform: none !important;
    box-shadow: none !important;
  }
  /* Pin the icon to col 1 spanning both rows (so heading + desc can
     share col 2 cleanly). Without this, grid auto-placement drops the
     description into col 1 — which is only 44px wide and produces
     one-word-per-line wrapping. */
  .cf-value-cards__icon {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
  .cf-value-cards__card-heading,
  .cf-value-cards__card-desc {
    grid-column: 2;
  }
  .cf-value-cards__card:first-child {
    border-top: none;              /* the section header rule below
                                      handles the top edge naturally */
  }
  .cf-value-cards__card:hover {
    transform: none;
    box-shadow: none;
  }

  .cf-value-cards__icon {
    width: 44px;
    height: 44px;
    margin: 4px 0 0;               /* nudge down to align with cap-line of heading */
  }

  .cf-value-cards__card-heading {
    font-size: 17px;
    margin: 0 0 6px;
    line-height: 1.3;
  }

  .cf-value-cards__card-desc {
    font-size: 15px;
    line-height: 1.5;
  }
}
