/* ============================================================
   IALF CPI™ — Flagship Service Section: "Why CPI?"
   SpatialChat 4-Row Alternating Architecture
   100% TEXT-FREE, Live Animated UK Institutional Visual Stages
   High-Precision SVG & CSS Geometric Motion Systems
   ============================================================ */

@layer sections {

  /* ------------------------------------------------------------
     1. SECTION CONTAINER & WRAPPER
     ------------------------------------------------------------ */
  .cpi-spatial {
    position: relative;
    background: #ffffff;
    padding-block: clamp(72px, 8vw, 128px);
    overflow: hidden;
  }

  .cpi-spatial .shell {
    position: relative;
    z-index: 2;
    max-width: 1220px;
  }

  /* Section Top Header */
  .cpi-spatial__header {
    text-align: center;
    margin-bottom: clamp(56px, 7vw, 96px);
  }

  .cpi-spatial__title {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 700;
    font-family: var(--font-sans-tight);
    letter-spacing: -0.035em;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.1;
  }

  .cpi-spatial__title em {
    font-family: var(--font-display);
    font-style: italic;
    color: #5727e7;
    font-weight: 400;
  }

  .cpi-spatial__subtitle {
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    color: #6b7280;
    line-height: 1.5;
    max-width: 60ch;
    margin-inline: auto;
  }

  /* ------------------------------------------------------------
     2. ALTERNATING 4-ROW ARCHITECTURE (Z-PATTERN)
     ------------------------------------------------------------ */
  .cpi-row-group {
    display: flex;
    flex-direction: column;
    gap: clamp(72px, 9vw, 128px);
  }

  .cpi-row {
    display: grid;
    gap: clamp(36px, 5vw, 68px);
    align-items: center;
    grid-template-columns: 1fr;
  }

  @media (min-width: 980px) {
    .cpi-row {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    }
    .cpi-row--reverse {
      grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    }
    .cpi-row--reverse .cpi-col--content {
      order: 2;
    }
    .cpi-row--reverse .cpi-col--visual {
      order: 1;
    }
  }

  /* ------------------------------------------------------------
     3. CONTENT COLUMN STYLES
     ------------------------------------------------------------ */
  .cpi-col--content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  /* Pill Badge (SpatialChat purple border pill) */
  .cpi-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    border-radius: 9999px;
    background: #fbf9ff;
    border: 1.5px solid #7c3aed;
    color: #6d28d9;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 20px;
    text-transform: capitalize;
  }

  .cpi-col__head {
    font-size: clamp(1.85rem, 2.6vw, 2.45rem);
    font-weight: 700;
    font-family: var(--font-sans-tight);
    letter-spacing: -0.03em;
    color: #111827;
    line-height: 1.18;
    margin-bottom: 10px;
  }

  .cpi-col__head em {
    font-family: var(--font-display);
    font-style: italic;
    color: #5727e7;
    font-weight: 400;
  }

  .cpi-col__sub {
    font-size: 1.05rem;
    color: #4b5563;
    line-height: 1.55;
    margin-bottom: 26px;
  }

  /* Diamond Bullet List */
  .cpi-bullets {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    width: 100%;
  }

  .cpi-bullet {
    display: flex;
    align-items: flex-start;
    gap: 14px;
  }

  .cpi-bullet__diamond {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    margin-top: 5px;
    color: #6d28d9;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cpi-bullet__diamond svg {
    width: 12px;
    height: 12px;
  }

  .cpi-bullet__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .cpi-bullet__title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
  }

  .cpi-bullet__text {
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.5;
  }

  /* 3-Stat Metric Cards Row */
  .cpi-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    margin-bottom: 28px;
  }

  .cpi-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease;
  }
  .cpi-stat-card:hover {
    border-color: #c4b5fd;
  }

  .cpi-stat-card__val {
    font-size: clamp(1.35rem, 1.9vw, 1.75rem);
    font-weight: 800;
    font-family: var(--font-sans-tight);
    color: #111827;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
  }

  .cpi-stat-card__lbl {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.35;
    font-weight: 500;
  }

  /* Purple CTA Button */
  .cpi-btn-purple {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #5727e7;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(87, 39, 231, 0.28);
    transition: all 0.25s ease;
    text-decoration: none;
  }
  .cpi-btn-purple:hover {
    background: #491ecb;
    box-shadow: 0 6px 20px rgba(87, 39, 231, 0.4);
    transform: translateY(-1px);
  }
  .cpi-btn-purple svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
  }
  .cpi-btn-purple:hover svg {
    transform: translateX(3px);
  }

  /* ------------------------------------------------------------
     4. LOTTIE ANIMATED VISUAL PRESENTATION CARDS
     Using the 4 user-selected professional Lottie animations:
     1. IALF CPI™ Live Studio: Coworkers working on business project
     2. Real Practice Impact: Collaboration & teamwork (gears)
     3. The Action Framework: Business global handshake & gears
     4. The Paradigm Shift: About us team & executive review
     ------------------------------------------------------------ */
  .cpi-col--visual {
    width: 100%;
  }

  .cpi-vcard {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: clamp(440px, 35vw, 540px);
    min-height: 440px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    contain: paint;
  }

  .cpi-vcard--lottie {
    background: linear-gradient(155deg, #ffffff 0%, #f8faff 40%, #eff4fe 100%);
    border: 1.5px solid rgba(87, 39, 231, 0.16);
    box-shadow: 0 24px 60px -12px rgba(12, 23, 84, 0.12), 0 4px 16px rgba(87, 39, 231, 0.04);
    padding: clamp(20px, 2.5vw, 28px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease;
  }

  .cpi-vcard--lottie:hover {
    transform: translateY(-5px);
    border-color: rgba(87, 39, 231, 0.32);
    box-shadow: 0 30px 70px -16px rgba(87, 39, 231, 0.2), 0 8px 24px rgba(12, 23, 84, 0.08);
  }

  /* Executive top telemetry rail */
  .cpi-vcard__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(87, 39, 231, 0.1);
    position: relative;
    z-index: 2;
  }

  .cpi-vcard__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 20px;
    background: rgba(87, 39, 231, 0.08);
    border: 1px solid rgba(87, 39, 231, 0.2);
    font-family: var(--font-sans-tight);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #5727e7;
    text-transform: uppercase;
  }

  .cpi-vcard__beacon {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-beacon 1.8s infinite;
  }

  .cpi-vcard__meta {
    font-family: var(--font-sans-tight);
    font-size: 11.5px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  /* Subtle ambient backlight orb */
  .cpi-vcard--lottie::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(87, 39, 231, 0.1) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }

  /* Secondary ambient glow on opposite corner */
  .cpi-vcard--lottie::after {
    content: "";
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }

  /* Lottie Stage Wrapper */
  .cpi-lottie-container {
    position: relative;
    z-index: 1;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    pointer-events: none;
  }

  .cpi-lottie-container svg {
    width: 100% !important;
    height: 100% !important;
    max-width: 480px;
    max-height: 420px;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(12, 23, 84, 0.09));
    transition: transform 0.3s ease;
  }

  .cpi-vcard--lottie:hover .cpi-lottie-container svg {
    transform: scale(1.03);
  }

  /* ------------------------------------------------------------
     5. RESPONSIVE & ACCESSIBILITY
     ------------------------------------------------------------ */
  @media (max-width: 640px) {
    .cpi-stats {
      grid-template-columns: 1fr;
    }
    .cpi-vcard {
      height: 360px;
      min-height: 360px;
      padding: 18px 16px;
    }
    .cpi-lottie-container svg {
      max-width: 320px;
      max-height: 280px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .cpi-vcard--lottie {
      transition: none !important;
      transform: none !important;
    }
  }

} /* End @layer sections */
