/**
 * iPath Solutions - Single Portfolio / Case Study Template Styles
 * Modern Bento-Grid, Responsive Architecture, Aligned with iPath New Theme.
 */

:root {
  --pf-primary: #1B3A5C;
  --pf-primary-dark: #14213D;
  --pf-blue: #0B63AE;
  --pf-blue-hover: #08518F;
  --pf-blue-vibrant: #2563EB;
  --pf-blue-vibrant-hover: #1D4ED8;
  --pf-blue-soft: #EEF4FF;
  --pf-blue-soft-border: #D5E2FF;
  --pf-blue-light: #F5F8FF;
  --pf-accent: #005590;
  --pf-text-dark: #14213D;
  --pf-text: #33415C;
  --pf-muted: #55627A;
  --pf-subtle: #64748B;
  --pf-border: #E6EBF3;
  --pf-border-light: #EDF1F7;
  --pf-card-bg: #FFFFFF;
  --pf-bg-alt: #F6F9FE;
  --pf-card-soft-bg: #F8FAFE;
  --pf-card-chip-bg: #F4F7FC;
  --pf-radius-xl: 24px;
  --pf-radius-lg: 20px;
  --pf-radius-md: 16px;
  --pf-radius-sm: 12px;
  --pf-radius-pill: 999px;
  --pf-radius-btn: 10px;
  --pf-shadow-soft: 0 10px 30px rgba(27, 58, 92, 0.04);
  --pf-shadow-hover: 0 20px 50px rgba(11, 99, 174, 0.12);
  --pf-shadow-btn: 0 8px 20px rgba(59, 130, 246, 0.25);
  --pf-shadow-mockup: 0 30px 80px rgba(37, 99, 235, 0.16);
  --pf-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   Base & Resets for Portfolio Wrapper
   ========================================================================== */
.portfolio-single-wrapper {
  font-family: var(--pf-font);
  color: var(--pf-text-dark);
  background: #FFFFFF;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  position: relative;
}

.portfolio-single-wrapper * {
  box-sizing: border-box;
}

.pf-container {
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 3vw, 32px);
  padding-right: clamp(16px, 3vw, 32px);
}

/* Typography Helpers */
.pf-h1 {
  font-family: var(--pf-font);
  font-size: clamp(2.5rem, 5.5vw, 4.75rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--pf-text-dark);
  margin: 0;
}

.pf-h2 {
  font-family: var(--pf-font);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pf-text-dark);
  margin: 0;
}

.pf-h3 {
  font-family: var(--pf-font);
  font-size: clamp(1.2rem, 2vw, 1.375rem);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--pf-text-dark);
  margin: 0;
}

.pf-hl {
  color: var(--pf-blue);
  background: linear-gradient(135deg, var(--pf-blue) 0%, var(--pf-blue-vibrant) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.pf-lead {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--pf-muted);
  margin: 0;
}

.pf-lead-strong {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--pf-text-dark);
  font-weight: 600;
  margin: 0;
}

/* Pills & Badges */
.pf-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--pf-radius-pill);
  background: var(--pf-blue-soft);
  border: 1px solid var(--pf-blue-soft-border);
  color: var(--pf-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
  width: fit-content;
}

.pf-pill i,
.pf-pill .pf-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pf-blue);
  display: inline-block;
  box-shadow: 0 0 6px rgba(11, 99, 174, 0.4);
}

.pf-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--pf-radius-pill);
  background: var(--pf-card-chip-bg);
  border: 1px solid #E3E9F3;
  color: var(--pf-text);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 20px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.pf-chip:hover {
  background: var(--pf-blue-soft);
  border-color: var(--pf-blue-soft-border);
  color: var(--pf-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 99, 174, 0.12);
}

.pf-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--pf-radius-pill);
  background: #FFFFFF;
  border: 1px solid #DDE5F2;
  color: var(--pf-text-dark);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 18px;
  box-shadow: 0 2px 6px rgba(20, 33, 61, 0.03);
  transition: all 0.2s ease;
}

.pf-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pf-blue);
  display: inline-block;
}

.pf-badge-strike {
  color: var(--pf-subtle) !important;
  text-decoration: line-through;
  background: #F8FAFD;
  border-color: #E2E8F0;
}

.pf-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pf-blue);
  display: block;
}

.pf-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--pf-blue);
  letter-spacing: 0.04em;
}

.pf-h2-sm {
  font-size: clamp(2rem, 3.5vw, 2.65rem);
}

/* Anchor targets clear the sticky header */
.portfolio-single-wrapper section[id],
#portfolio-contact {
  scroll-margin-top: calc(var(--header-height, 90px) + 16px);
}

/* Cards */
/* Cards (matches home page .service-card) */
.pf-card {
  background: var(--pf-card-bg);
  border: 1px solid rgba(11, 99, 174, 0.08);
  border-radius: var(--pf-radius-xl);
  box-sizing: border-box;
  box-shadow: var(--pf-shadow-soft);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s ease;
}

.pf-card.soft:hover,
.pf-bento-12 > .pf-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--pf-shadow-hover);
  border-color: rgba(11, 99, 174, 0.15);
}

.pf-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Card titles pick up the brand blue on hover, as on the home service cards */
.pf-card .pf-h3 {
  transition: color 0.3s ease;
}

/* Cursor spotlight (Capabilities + Challenges); --mx/--my set by inline script */
.pf-spotlight {
  --mx: 50%;
  --my: 0%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.pf-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(59, 130, 246, 0.1), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Glowing border that follows the cursor */
.pf-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx) var(--my), rgba(59, 130, 246, 0.85), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.pf-spotlight:hover::before,
.pf-spotlight:hover::after {
  opacity: 1;
}

/* Icons */
.pf-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--pf-blue-soft);
  color: var(--pf-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.pf-card:hover .pf-ico {
  background: var(--pf-blue);
  color: #FFFFFF;
  transform: scale(1.05);
}

.pf-ico svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.pf-ico.sm {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.pf-ico.sm svg {
  width: 18px;
  height: 18px;
}

/* Buttons (matches home page .btn-start-project / .btn-modern-discover) */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 16px 36px;
  border-radius: var(--pf-radius-btn);
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #FFFFFF !important;
  font-family: var(--pf-font);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: var(--pf-shadow-btn);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  border: none;
}

.pf-btn:hover,
.pf-btn:focus-visible {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.35);
  color: #FFFFFF !important;
}

.pf-btn svg,
.pf-btn i {
  transition: transform 0.25s ease;
}

.pf-btn:hover svg,
.pf-btn:hover i {
  transform: translateX(4px);
}

/* Secondary button (matches home page .btn-case-studies) */
.pf-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 15px 32px;
  border-radius: var(--pf-radius-btn);
  background: #FFFFFF;
  border: 1px solid rgba(27, 58, 92, 0.15);
  color: var(--pf-primary) !important;
  font-family: var(--pf-font);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  white-space: nowrap;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(27, 58, 92, 0.04);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pf-btn-secondary i,
.pf-btn-secondary svg {
  color: #3b82f6;
}

.pf-btn-secondary:hover,
.pf-btn-secondary:focus-visible {
  background: #f8fafc;
  border-color: #3b82f6;
  color: #1d4ed8 !important;
  transform: translateY(-2px);
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.pf-hero {
  position: relative;
  isolation: isolate;
  background-color: #FFFFFF;
  padding-top: clamp(36px, 5vw, 68px);
  padding-bottom: clamp(48px, 6vw, 80px);
  overflow: hidden;
  border-bottom: 1px solid var(--pf-border);
}

/* Background: two drifting aurora glows over a grid that fades out */
.pf-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.pf-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.pf-aurora--1 {
  width: 560px;
  height: 560px;
  top: -220px;
  right: 6%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.5) 0%, transparent 70%);
  animation: pf-aurora-drift 16s ease-in-out infinite alternate;
}

.pf-aurora--2 {
  width: 460px;
  height: 460px;
  bottom: -240px;
  left: -120px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, transparent 70%);
  animation: pf-aurora-drift 20s ease-in-out infinite alternate-reverse;
}

.pf-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 99, 174, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 99, 174, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 65% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 65% 40%, #000 0%, transparent 75%);
}

@keyframes pf-aurora-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, 40px) scale(1.12); }
}

.pf-hero-row {
  display: flex;
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
}

.pf-hero-copy {
  flex: 0 0 42%;
  max-width: 540px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pf-hero-copy .pf-lead {
  max-width: 520px;
}

.pf-hero-pill {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.pf-hero-pill .pf-pill-dot {
  animation: pf-status-pulse-blue 2s ease-out infinite;
}

@keyframes pf-status-pulse-blue {
  0%   { box-shadow: 0 0 0 0 rgba(11, 99, 174, 0.5); }
  100% { box-shadow: 0 0 0 7px rgba(11, 99, 174, 0); }
}

/* Highlight word: slow shimmering gradient */
.pf-hl-shimmer {
  background: linear-gradient(110deg, #0B63AE 0%, #2563EB 30%, #60A5FA 50%, #2563EB 70%, #0B63AE 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pf-shimmer 6s ease-in-out infinite;
}

@keyframes pf-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.pf-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 4px;
}

/* Glass metrics bar */
.pf-hero-metrics {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin-top: 6px;
  max-width: 520px;
  padding: 18px 6px;
  border-radius: var(--pf-radius-lg);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(11, 99, 174, 0.1);
  box-shadow: var(--pf-shadow-soft);
}

.pf-hero-metric {
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--pf-blue-soft-border);
}

.pf-hero-metric:first-child {
  border-left: none;
}

.pf-hero-metric-val {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #14213D 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pf-hero-metric-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-muted);
  text-transform: capitalize;
}

/* Migration path: legacy → modern */
.pf-migration {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pf-migration-lbl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pf-subtle);
}

.pf-migration-side {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pf-migration-side s,
.pf-migration-side span {
  padding: 4px 10px;
  border-radius: 8px;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.pf-migration-side.is-legacy s {
  background: #FFF7E8;
  border: 1px solid #FCD9A0;
  color: #9A4A08;
  text-decoration-color: rgba(154, 74, 8, 0.6);
}

.pf-migration-side.is-modern span {
  background: #EEF4FF;
  border: 1px solid var(--pf-blue-soft-border);
  color: var(--pf-blue);
  font-weight: 600;
}

.pf-migration-arrow {
  display: inline-flex;
  color: #3b82f6;
  animation: pf-nudge 1.8s ease-in-out infinite;
}

@keyframes pf-nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

/* Hero Visual */
.pf-hero-visual {
  width: auto;
  height: auto;
  position: relative;
}

.pf-hero-image-visual {
  flex: 1 1 58%;
  width: 100%;
  max-width: 860px;
  height: auto;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  perspective: 1400px;
}

/* Stage tilts toward the pointer; --rx/--ry set by inline script */
.pf-hero-stage {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  width: 100%;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Soft glow behind the product image */
.pf-hero-stage::before {
  content: "";
  position: absolute;
  inset: 12% 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
  filter: blur(40px);
}

.pf-hero-img-wrap {
  width: 100%;
  border-radius: var(--pf-radius-xl);
  overflow: visible;
  position: relative;
}

.pf-hero-product-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--pf-radius-xl);
  filter: drop-shadow(0 24px 50px rgba(11, 99, 174, 0.18));
}

/* Floating glass chips */
.pf-hero-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(20, 33, 61, 0.14);
  transform: translateZ(60px);
  animation: pf-float 6s ease-in-out infinite;
}

.pf-hero-chip--top {
  top: 4%;
  left: -2%;
}

.pf-hero-chip--bottom {
  right: 2%;
  bottom: 2%;
  animation-delay: -3s;
}

.pf-hero-chip-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.pf-hero-chip-ico svg {
  width: 18px;
  height: 18px;
}

.pf-hero-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.pf-hero-chip-text strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--pf-text-dark);
}

.pf-hero-chip-text small {
  font-size: 12px;
  font-weight: 600;
  color: var(--pf-muted);
}

.pf-hero-chip code {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pf-primary);
  background: none;
  padding: 0;
}

.pf-hero-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

/* Platform snapshot: hero visual used when a case study has no screenshot */
.pf-snapshot {
  position: relative;
  margin: 28px 4% 28px 8%;
  border-radius: var(--pf-radius-xl);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(11, 99, 174, 0.12);
  box-shadow: 0 30px 80px rgba(37, 99, 235, 0.16);
  overflow: hidden;
}

.pf-snapshot-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--pf-border);
  background: linear-gradient(180deg, #F8FAFE 0%, #FFFFFF 100%);
}

.pf-snapshot-head .pf-arch-dots {
  padding: 0;
  border: none;
  background: none;
}

.pf-snapshot-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--pf-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-snapshot-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--pf-radius-pill);
  background: #ECFDF3;
  color: #15803D;
  font-size: 11.5px;
  font-weight: 700;
}

.pf-snapshot-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  animation: pf-status-pulse-green 2s ease-out infinite;
}

@keyframes pf-status-pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
}

.pf-snapshot-list {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-snapshot-list li {
  position: relative;
  margin: 0;
  padding: 12px 14px 16px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  border-radius: 14px;
  transition: background 0.3s ease;
}

.pf-snapshot-list li:hover {
  background: #F5F8FF;
}

.pf-snapshot-list li.pf-snapshot-more {
  display: block;
  padding: 8px 14px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-blue);
}

.pf-snapshot-list li.pf-snapshot-more:hover {
  background: none;
}

.pf-snapshot-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pf-blue);
  background: linear-gradient(135deg, #EEF4FF 0%, #DBE8FF 100%);
}

.pf-snapshot-ico svg {
  width: 18px;
  height: 18px;
}

.pf-snapshot-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--pf-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-snapshot-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--pf-blue);
  font-variant-numeric: tabular-nums;
}

/* Capability bar, scaled to the largest feature area; grows in on load */
.pf-snapshot-bar {
  position: absolute;
  left: 64px;
  right: 14px;
  bottom: 8px;
  height: 4px;
  border-radius: 4px;
  background: #EEF2F9;
  overflow: hidden;
}

.pf-snapshot-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, #60A5FA 0%, #1d4ed8 100%);
  transform-origin: left;
  animation: pf-bar-grow 1.1s cubic-bezier(0.165, 0.84, 0.44, 1) both;
  animation-delay: calc(0.25s + var(--i) * 0.08s);
}

@keyframes pf-bar-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes pf-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}

.pf-mockup-window {
  position: absolute;
  left: 24px;
  top: 24px;
  right: 24px;
  bottom: 24px;
  padding: 0;
  display: flex;
  overflow: hidden;
  border-radius: var(--pf-radius-xl);
  box-shadow: var(--pf-shadow-mockup);
  background: #FFFFFF;
  border: 1px solid var(--pf-border);
}

.pf-mockup-sidebar {
  width: 175px;
  background: #F8FAFE;
  border-right: 1px solid var(--pf-border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.pf-window-dots {
  display: flex;
  gap: 6px;
  padding: 0 8px 16px;
}

.pf-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.pf-dot.red { background: #F87171; }
.pf-dot.yellow { background: #FBBF24; }
.pf-dot.green { background: #34D399; }

.pf-mockup-nav-item {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pf-muted);
  padding: 7px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-mockup-nav-item.active {
  color: var(--pf-blue);
  background: var(--pf-blue-soft);
  font-weight: 700;
}

.pf-mockup-main {
  flex: 1 1 0;
  min-width: 0;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #FFFFFF;
}

.pf-skeleton-bar-sm {
  height: 12px;
  width: 110px;
  border-radius: 6px;
  background: #DCE6FA;
}

.pf-skeleton-bar-xs {
  height: 8px;
  width: 160px;
  border-radius: 4px;
  background: #EDF1F8;
}

.pf-mockup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
}

.pf-mockup-card-block {
  height: 64px;
  border-radius: var(--pf-radius-sm);
  background: var(--pf-blue-soft);
  border: 1px solid var(--pf-blue-soft-border);
}

.pf-mockup-card-block.alt {
  background: #F4F7FC;
  border-color: #E3E9F3;
}

.pf-mockup-chart {
  flex-grow: 1;
  border-radius: var(--pf-radius-md);
  border: 1px solid var(--pf-border);
  padding: 16px 14px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: #FAFCFF;
}

.pf-chart-col {
  flex: 1 1 0;
  border-radius: 6px 6px 0 0;
  background: #DCE6FA;
  transition: height 0.4s ease;
}

.pf-chart-col.active {
  background: var(--pf-blue);
  box-shadow: 0 4px 12px rgba(11, 99, 174, 0.25);
}

.pf-chart-col.accent {
  background: #BCD0F7;
}

/* Floating Badges */
.pf-float-top {
  position: absolute;
  left: -10px;
  top: -10px;
  width: 250px;
  padding: 16px 18px;
  border-radius: var(--pf-radius-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 2;
  box-shadow: var(--pf-shadow-soft);
  border: 1px solid rgba(220, 228, 235, 0.9);
}

.pf-float-bottom {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 320px;
  padding: 18px 20px;
  border-radius: var(--pf-radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 2;
  box-shadow: var(--pf-shadow-soft);
  border: 1px solid rgba(220, 228, 235, 0.9);
}

.pf-arch-flow-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  flex-wrap: wrap;
}

.pf-arch-tag-active {
  background: var(--pf-blue);
  color: #FFFFFF;
  border-radius: var(--pf-radius-pill);
  padding: 5px 12px;
}

.pf-arch-tag-sub {
  background: var(--pf-blue-soft);
  color: var(--pf-blue);
  border-radius: var(--pf-radius-pill);
  padding: 5px 12px;
}

.pf-arch-arrow {
  color: #9DB9F5;
  font-weight: bold;
}

/* Optional Custom Image within Mockup */
.pf-mockup-custom-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   2. OVERVIEW SECTION (BENTO GRID)
   ========================================================================== */
.pf-overview {
  padding-top: clamp(80px, 8vw, 120px);
  padding-bottom: clamp(70px, 7vw, 110px);
  background: #FFFFFF;
}

.pf-section-head-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: clamp(32px, 5vw, 64px);
  margin-bottom: clamp(40px, 5vw, 56px);
}

.pf-section-head-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 auto;
}

.pf-section-head-right {
  width: 560px;
  max-width: 100%;
  flex-shrink: 0;
}

.pf-bento-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.pf-bento-col-7 {
  grid-column: span 7;
}

.pf-bento-col-5 {
  grid-column: span 5;
}

.pf-bento-col-4 {
  grid-column: span 4;
}

.pf-bento-col-12 {
  grid-column: span 12;
}

.pf-bento-card-body {
  padding: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;
}

.pf-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Overview card header: label + count pill */
.pf-ov-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pf-ov-count {
  padding: 5px 12px;
  border-radius: var(--pf-radius-pill);
  background: #F4F7FC;
  border: 1px solid #E6EDF7;
  color: var(--pf-muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pf-ov-count strong {
  color: var(--pf-text-dark);
  font-weight: 800;
}

.pf-coverage-card:hover .pf-feature-ico {
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: transparent;
  transform: rotate(-6deg) scale(1.05);
}

/* Module map: coverage areas as tiles, with an "online" wave rippling across */
.pf-module-map {
  --pf-wave-step: 0.16s;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.pf-module-map li {
  position: relative;
  margin: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  background: #F6F9FE;
  border: 1px solid #E6EDF7;
  transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: pf-module-wave calc(var(--n) * var(--pf-wave-step) + 2.4s) ease-in-out infinite;
  animation-delay: calc(var(--i) * var(--pf-wave-step));
}

.pf-module-map li:hover {
  transform: translateY(-2px);
  background-color: #FFFFFF;
  border-color: var(--pf-blue-soft-border);
  box-shadow: 0 8px 20px rgba(11, 99, 174, 0.1);
}

.pf-module-idx {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: #93B8F5;
  flex-shrink: 0;
}

.pf-module-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pf-text-dark);
}

.pf-module-map li i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

@keyframes pf-module-wave {
  0%, 100% { background-color: #F6F9FE; border-color: #E6EDF7; }
  4%       { background-color: #EEF4FF; border-color: #93B8F5; }
  12%      { background-color: #F6F9FE; border-color: #E6EDF7; }
}

/* Ecosystem: core hub with connected apps */
.pf-eco {
  position: relative;
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 0.85fr) minmax(0, 1fr);
  grid-template-areas:
    "n1 .   n2"
    ".  hub ."
    "n3 .   n4";
  align-items: center;
  gap: 10px;
}

/* Three nodes: two above the hub, the third centred below it */
.pf-eco.is-three {
  grid-template-areas:
    "n1 .   n2"
    ".  hub ."
    ".  n3  .";
}

.pf-eco-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.pf-eco-lines line {
  stroke: #93B8F5;
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
  animation: pf-eco-flow 1.1s linear infinite;
}

@keyframes pf-eco-flow {
  to { stroke-dashoffset: -9; }
}

.pf-eco-node--1 { grid-area: n1; }
.pf-eco-node--2 { grid-area: n2; }
.pf-eco-node--3 { grid-area: n3; }
.pf-eco-node--4 { grid-area: n4; }

.pf-eco-node {
  position: relative;
  z-index: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(11, 99, 174, 0.1);
  box-shadow: var(--pf-shadow-soft);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s ease, box-shadow 0.4s ease;
}

.pf-eco-node:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--pf-shadow-hover);
}

.pf-eco-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pf-blue);
  background: linear-gradient(135deg, #EEF4FF 0%, #DBE8FF 100%);
  transition: background 0.3s ease, color 0.3s ease;
}

.pf-eco-ico svg {
  width: 18px;
  height: 18px;
}

.pf-eco-node:hover .pf-eco-ico {
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.pf-eco-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--pf-text-dark);
}

.pf-eco-hub {
  grid-area: hub;
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
}

.pf-eco-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed #93B8F5;
  animation: pf-spin 18s linear infinite;
}

.pf-eco-core {
  width: 80px;
  height: 80px;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  animation: pf-hub-pulse 2.8s ease-in-out infinite;
}

.pf-eco-core small {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

.pf-eco-core strong {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

@keyframes pf-hub-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.12), 0 12px 28px rgba(59, 130, 246, 0.3); }
  50%      { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0.06), 0 12px 28px rgba(59, 130, 246, 0.3); }
}

/* Delivery Approach: light "pipeline" panel */
.pf-delivery-card {
  --pf-track-gap: 20px;
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.5vw, 40px);
  border-color: #DCE6FA;
  background-color: #F5F8FF;
  background-image:
    radial-gradient(rgba(11, 99, 174, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 92% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(11, 99, 174, 0.08) 0%, transparent 50%);
  background-size: 22px 22px, auto, auto;
}

.pf-delivery-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.pf-delivery-info {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* "Repeated for every module" cycle badge */
.pf-delivery-loop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--pf-radius-pill);
  border: 1px dashed rgba(59, 130, 246, 0.5);
  background: #FFFFFF;
  color: var(--pf-blue);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.pf-delivery-loop svg {
  animation: pf-spin 6s linear infinite;
}

/* Steps */
.pf-delivery-track {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pf-track-gap);
}

/* Glowing track joining node centres, with a light pulse travelling along it */
.pf-delivery-track::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 55px;
  height: 2px;
  left: calc((100% - 2 * var(--pf-track-gap)) / 6);
  right: calc((100% - 2 * var(--pf-track-gap)) / 6);
  background-color: #BCD0F7;
  background-image: linear-gradient(90deg, transparent 0%, #3b82f6 50%, transparent 100%);
  background-size: 30% 100%;
  background-repeat: no-repeat;
  animation: pf-track-pulse 3.2s ease-in-out infinite;
}

.pf-delivery-step {
  position: relative;
  margin: 0;
  padding: 28px 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  border-radius: var(--pf-radius-lg);
  background: #FFFFFF;
  border: 1px solid rgba(11, 99, 174, 0.08);
  box-shadow: var(--pf-shadow-soft);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.pf-delivery-step:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--pf-shadow-hover);
}

.pf-delivery-node {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #FFFFFF;
  border: 2px solid #93B8F5;
  color: var(--pf-blue);
  box-shadow: 0 0 0 6px var(--pf-blue-soft);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.pf-delivery-node svg {
  width: 24px;
  height: 24px;
}

.pf-delivery-step:hover .pf-delivery-node {
  transform: scale(1.06);
  border-color: #3b82f6;
  box-shadow: 0 0 0 8px #DBE8FF, 0 8px 20px rgba(59, 130, 246, 0.25);
}

.pf-delivery-step-num {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pf-blue);
}

.pf-delivery-step-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--pf-text-dark);
}

/* Final step reads as the outcome */
.pf-delivery-step.is-outcome {
  background: linear-gradient(160deg, #FFFFFF 0%, #EEF4FF 100%);
  border-color: var(--pf-blue-soft-border);
}

.pf-delivery-step.is-outcome .pf-delivery-node {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 0 0 6px #DBE8FF, 0 10px 24px rgba(59, 130, 246, 0.3);
}

@keyframes pf-track-pulse {
  0%   { background-position: -45% 0; }
  100% { background-position: 145% 0; }
}

@keyframes pf-track-pulse-y {
  0%   { background-position: 0 -45%; }
  100% { background-position: 0 145%; }
}

@keyframes pf-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   3. CHALLENGES SECTION (EDITORIAL LIST)
   ========================================================================== */
.pf-challenges {
  padding-top: clamp(80px, 8vw, 112px);
  padding-bottom: clamp(80px, 8vw, 112px);
  background: var(--pf-bg-alt);
}

.pf-challenges-row {
  display: flex;
  gap: clamp(36px, 6vw, 80px);
  align-items: flex-start;
}

.pf-challenges-sidebar {
  width: 420px;
  max-width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: calc(var(--header-height, 90px) + 20px);
}

.pf-challenges-summary {
  margin: 0;
  font-size: 15px;
  color: var(--pf-muted);
}

.pf-challenges-summary strong {
  color: var(--pf-text-dark);
  font-weight: 800;
}

/* Legacy stack status panel */
.pf-legacy-panel {
  margin-top: 4px;
  padding: 20px 22px;
  border-radius: var(--pf-radius-lg);
  background: #FFFFFF;
  border: 1px solid rgba(11, 99, 174, 0.08);
  box-shadow: var(--pf-shadow-soft);
}

.pf-legacy-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
}

.pf-legacy-panel-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pf-subtle);
}

.pf-legacy-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: var(--pf-radius-pill);
  background: #FFF7E8;
  border: 1px solid #FCD9A0;
  color: #9A4A08;
  font-size: 12px;
  font-weight: 600;
}

.pf-legacy-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F59E0B;
  animation: pf-status-pulse 2s ease-out infinite;
}

.pf-legacy-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pf-legacy-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px dashed var(--pf-border);
}

.pf-legacy-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #F4F7FC;
  color: var(--pf-subtle);
}

.pf-legacy-ico svg {
  width: 16px;
  height: 16px;
}

.pf-legacy-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--pf-subtle);
  text-decoration-color: rgba(194, 98, 10, 0.55);
  text-decoration-thickness: 1.5px;
}

.pf-legacy-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #B7791F;
}

.pf-legacy-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--pf-border);
  color: var(--pf-blue) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}

.pf-legacy-link svg {
  transition: transform 0.25s ease;
}

.pf-legacy-link:hover svg {
  transform: translateX(4px);
}

/* Challenges on a vertical progress rail */
.pf-challenges-list {
  --pf-node: 48px;
  --pf-node-top: 14px;
  --pf-rail-gap: 16px;
  flex: 1 1 0;
  min-width: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--pf-rail-gap);
}

.pf-challenge-item {
  position: relative;
  margin: 0;
  display: grid;
  grid-template-columns: var(--pf-node) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  view-timeline-name: --pf-chal;
}

/* Rail segment from this node's centre down to the next node's centre */
.pf-challenge-item:not(:last-child)::before,
.pf-challenge-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--pf-node) / 2 - 1px);
  top: calc(var(--pf-node-top) + var(--pf-node) / 2);
  bottom: calc(-1 * (var(--pf-rail-gap) + var(--pf-node-top) + var(--pf-node) / 2));
  width: 2px;
}

.pf-challenge-item::before {
  background: #D5E2FF;
}

/* Blue fill: only shown where scroll-driven animations are supported (see @supports below) */
.pf-challenge-item::after {
  display: none;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  transform-origin: top;
}

.pf-challenge-node {
  position: relative;
  z-index: 1;
  width: var(--pf-node);
  height: var(--pf-node);
  margin-top: var(--pf-node-top);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 2px solid #BCD0F7;
  color: var(--pf-blue);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 0 6px var(--pf-bg-alt);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.pf-challenge-item:hover .pf-challenge-node {
  background-color: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
  transform: scale(1.08);
}

.pf-challenge-card {
  padding: clamp(20px, 2.5vw, 26px) clamp(22px, 3vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: var(--pf-radius-lg);
}

.pf-challenge-item:hover .pf-challenge-card {
  transform: translateX(6px);
  box-shadow: var(--pf-shadow-hover);
}

.pf-challenge-eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pf-blue);
}

.pf-challenge-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--pf-text);
  margin: 0;
}

@keyframes pf-status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

/* Rail fills and nodes light up as the list scrolls into view */
@supports (animation-timeline: view()) {
  .pf-challenge-item::after {
    display: block;
    animation: pf-rail-fill linear both;
    animation-timeline: --pf-chal;
    animation-range: cover 35% cover 75%;
  }

  .pf-challenge-node {
    animation: pf-node-on linear both;
    animation-timeline: --pf-chal;
    animation-range: entry 80% cover 40%;
  }

  @keyframes pf-rail-fill {
    from { transform: scaleY(0); }
    to   { transform: scaleY(1); }
  }

  @keyframes pf-node-on {
    from { background-color: #FFFFFF; border-color: #BCD0F7; color: #0B63AE; }
    to   { background-color: #2563EB; border-color: #2563EB; color: #FFFFFF; }
  }
}

/* ==========================================================================
   4. KEY FEATURES SECTION (BENTO GRID)
   ========================================================================== */
.pf-features {
  padding-top: clamp(80px, 8vw, 112px);
  padding-bottom: clamp(80px, 8vw, 112px);
  background: #FFFFFF;
}

.pf-features-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 56px);
}

.pf-features-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  font-size: 15px;
  color: var(--pf-muted);
}

.pf-features-meta strong {
  color: var(--pf-text-dark);
  font-weight: 800;
}

.pf-features-meta i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #BCD0F7;
}

/* Bento layout: flagship tile, small tiles, mid tiles, wide banner */
.pf-features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 20px;
}

/* Works for any card count: flagship 2x2, four small tiles beside it, later cards pair up, last card is a full-width banner.
   8 cards → [01 01 02 03][01 01 04 05][06 06 07 07][08 08 08 08]; 6 cards → [01 01 02 03][01 01 04 05][06 06 06 06] */
.pf-feature-card.is-hero {
  grid-column: span 2;
  grid-row: span 2;
}

.pf-feature-card:nth-child(n+6):not(.is-wide) {
  grid-column: span 2;
}

.pf-feature-card.is-wide {
  grid-column: 1 / -1;
}

.pf-feature-card {
  margin: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  border-radius: var(--pf-radius-xl);
}

.pf-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pf-shadow-hover);
}

/* Outlined index number */
.pf-feature-watermark {
  position: absolute;
  z-index: -1;
  top: 6px;
  right: 18px;
  font-size: 92px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(11, 99, 174, 0.12);
  pointer-events: none;
  user-select: none;
  transition: -webkit-text-stroke-color 0.4s ease, transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pf-feature-card:hover .pf-feature-watermark {
  -webkit-text-stroke-color: rgba(59, 130, 246, 0.35);
  transform: translateY(4px);
}

.pf-feature-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pf-feature-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-feature-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--pf-blue);
  background: linear-gradient(135deg, #EEF4FF 0%, #DBE8FF 100%);
  border: 1px solid var(--pf-blue-soft-border);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), background 0.3s ease, color 0.3s ease;
}

.pf-feature-ico svg {
  width: 24px;
  height: 24px;
}

.pf-feature-card:hover .pf-feature-ico {
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: transparent;
  transform: rotate(-6deg) scale(1.05);
}

.pf-feature-count {
  padding: 4px 10px;
  border-radius: var(--pf-radius-pill);
  background: var(--pf-card-chip-bg);
  color: var(--pf-subtle);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pf-feature-title {
  font-size: 1.25rem;
  transition: color 0.3s ease;
}

.pf-feature-card:hover .pf-feature-title {
  color: var(--pf-blue);
}

.pf-feature-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-feature-tags li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 12px 6px 10px;
  border-radius: var(--pf-radius-pill);
  background: #F6F9FE;
  border: 1px solid #E6EDF7;
  color: var(--pf-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.pf-feature-tags li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #93B8F5;
  flex-shrink: 0;
}

.pf-feature-card:hover .pf-feature-tags li {
  background: #FFFFFF;
  border-color: var(--pf-blue-soft-border);
}

/* Flagship tile */
.pf-feature-card.is-hero {
  padding: clamp(28px, 3vw, 40px);
  border-color: var(--pf-blue-soft-border);
  background:
    repeating-radial-gradient(circle at 100% 100%, transparent 0 46px, rgba(11, 99, 174, 0.06) 46px 47px),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.14) 0%, transparent 55%),
    linear-gradient(160deg, #F5F8FF 0%, #FFFFFF 65%);
}

.pf-feature-card.is-hero .pf-feature-watermark {
  font-size: 180px;
  top: -6px;
}

.pf-feature-card.is-hero .pf-feature-ico {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.3);
}

.pf-feature-card.is-hero .pf-feature-ico svg {
  width: 30px;
  height: 30px;
}

.pf-feature-card.is-hero .pf-feature-count {
  background: #FFFFFF;
  color: var(--pf-blue);
  border: 1px solid var(--pf-blue-soft-border);
}

.pf-feature-card.is-hero .pf-feature-title {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  letter-spacing: -0.02em;
}

/* Flagship tags read as a checklist */
.pf-feature-card.is-hero .pf-feature-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
}

.pf-feature-card.is-hero .pf-feature-tags li {
  padding: 0;
  gap: 10px;
  background: none;
  border: none;
  color: var(--pf-text-dark);
  font-size: 14.5px;
  font-weight: 600;
}

.pf-feature-card.is-hero .pf-feature-tags li::before {
  width: 20px;
  height: 20px;
  background: #DBE8FF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B63AE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Wide banner tile */
.pf-feature-card.is-wide {
  flex-direction: row;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.pf-feature-card.is-wide .pf-feature-main {
  flex: 0 0 300px;
}

.pf-feature-card.is-wide .pf-feature-tags {
  flex: 1 1 0;
  justify-content: flex-end;
}

.pf-feature-card.is-wide .pf-feature-watermark {
  top: 0;
  bottom: 0;
  right: auto;
  left: 40%;
  display: flex;
  align-items: center;
}

/* ==========================================================================
   5. TECH STACK SECTION
   ========================================================================== */
.pf-tech-stack {
  padding-top: clamp(80px, 8vw, 112px);
  padding-bottom: clamp(80px, 8vw, 112px);
  background: var(--pf-bg-alt);
}

/* Architecture blueprint card */
.pf-arch-card {
  padding: clamp(24px, 3.5vw, 40px);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.5vw, 40px);
  border-color: #DCE6FA;
  background-color: #FFFFFF;
  background-image:
    radial-gradient(rgba(11, 99, 174, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  background-size: 22px 22px, auto;
}

.pf-arch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.pf-arch-head-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pf-arch-head-left > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Window dots give the card a "system diagram" feel */
.pf-arch-dots {
  display: inline-flex;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F4F7FC;
  border: 1px solid #E6EDF7;
}

.pf-arch-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #F87171;
}

.pf-arch-dots i:nth-child(2) { background: #FBBF24; }
.pf-arch-dots i:nth-child(3) { background: #34D399; }

.pf-arch-flow-code {
  padding: 8px 14px;
  border-radius: 10px;
  background: #14213D;
  color: #BFDBFE;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Flow: Frontend → [ Router → Service → Repository ] → Database */
.pf-arch-diagram {
  display: flex;
  align-items: center;
}

.pf-arch-node {
  flex: 1 1 0;
  min-width: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: var(--pf-radius-md);
  background: #FFFFFF;
  border: 1px solid rgba(11, 99, 174, 0.1);
  box-shadow: var(--pf-shadow-soft);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.pf-arch-node:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: var(--pf-shadow-hover);
}

.pf-arch-ico {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pf-blue);
  background: linear-gradient(135deg, #EEF4FF 0%, #DBE8FF 100%);
  transition: background 0.3s ease, color 0.3s ease;
}

.pf-arch-ico svg {
  width: 20px;
  height: 20px;
}

.pf-arch-node:hover .pf-arch-ico {
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.pf-arch-lbl {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pf-subtle);
}

.pf-arch-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--pf-text-dark);
  overflow-wrap: anywhere;
}

/* Dashed boundary grouping the backend layers */
.pf-arch-boundary {
  position: relative;
  flex: 3.4 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 30px 16px 16px;
  border-radius: var(--pf-radius-lg);
  border: 1.5px dashed #93B8F5;
  background: linear-gradient(180deg, rgba(238, 244, 255, 0.9) 0%, rgba(245, 248, 255, 0.7) 100%);
}

.pf-arch-boundary-lbl {
  position: absolute;
  top: -12px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px;
  border-radius: var(--pf-radius-pill);
  background: #FFFFFF;
  border: 1px solid var(--pf-blue-soft-border);
  color: var(--pf-blue);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pf-arch-boundary-lbl i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* Pipe with data packets travelling along it */
.pf-arch-pipe {
  position: relative;
  flex: 0 0 40px;
  height: 2px;
  background: #BCD0F7;
}

.pf-arch-boundary .pf-arch-pipe {
  flex-basis: 28px;
}

.pf-arch-pipe::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid #93B8F5;
  border-right: 2px solid #93B8F5;
  transform: translateY(-50%) rotate(45deg);
}

.pf-arch-pipe i {
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
  opacity: 0;
  animation: pf-packet 2.4s linear infinite;
}

.pf-arch-pipe i:nth-child(2) {
  animation-delay: 1.2s;
}

@keyframes pf-packet {
  0%   { left: 0; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}

@keyframes pf-packet-y {
  0%   { top: 0; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: calc(100% - 6px); opacity: 0; }
}

/* Stack matrix */
.pf-stack-matrix {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pf-stack-summary {
  padding: clamp(22px, 3vw, 30px) clamp(22px, 3.5vw, 36px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "text bar"
    "text legend";
  column-gap: clamp(24px, 4vw, 56px);
  row-gap: 14px;
  align-items: center;
  box-shadow: var(--pf-shadow-soft);
}

.pf-stack-summary-text {
  grid-area: text;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 300px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--pf-muted);
}

.pf-stack-summary-text strong {
  color: var(--pf-text-dark);
}

.pf-stack-total {
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pf-stack-bar {
  grid-area: bar;
  display: flex;
  gap: 4px;
  height: 14px;
}

.pf-stack-seg {
  flex-basis: 0;
  min-width: 10px;
  border-radius: 999px;
  background: var(--c);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pf-stack-legend {
  grid-area: legend;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.pf-stack-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-text);
}

.pf-stack-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--c);
}

.pf-stack-legend b {
  color: var(--pf-text-dark);
  font-weight: 800;
}

.pf-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pf-stack-grid.is-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pf-stack-tile {
  margin: 0;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: var(--pf-radius-lg);
  /* Category colour stripe along the top edge */
  background:
    linear-gradient(var(--c), var(--c)) top / 100% 3px no-repeat,
    #FFFFFF;
}

.pf-stack-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--pf-shadow-hover);
}

.pf-stack-tile-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pf-stack-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 10%, #FFFFFF);
  transition: background 0.3s ease, color 0.3s ease, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pf-stack-ico svg {
  width: 20px;
  height: 20px;
}

.pf-stack-tile:hover .pf-stack-ico {
  color: #FFFFFF;
  background: var(--c);
  transform: rotate(-6deg) scale(1.05);
}

.pf-stack-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
}

.pf-stack-count {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F4F7FC;
  color: var(--pf-text-dark);
  font-size: 13px;
  font-weight: 800;
}

.pf-stack-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pf-stack-items li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 11px 6px 9px;
  border-radius: 8px;
  background: #F6F9FE;
  border: 1px solid #E6EDF7;
  color: var(--pf-text-dark);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.pf-stack-items li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--c);
  flex-shrink: 0;
}

.pf-stack-tile:hover .pf-stack-items li {
  background: #FFFFFF;
  border-color: color-mix(in srgb, var(--c) 30%, #FFFFFF);
}

/* Hovering a tile spotlights its slice of the composition bar */
.pf-stack-matrix:has(.pf-stack-tile:hover) .pf-stack-seg {
  opacity: 0.25;
}

.pf-stack-matrix:has(.pf-stack-tile--frontend:hover) .pf-stack-seg--frontend,
.pf-stack-matrix:has(.pf-stack-tile--backend:hover) .pf-stack-seg--backend,
.pf-stack-matrix:has(.pf-stack-tile--database:hover) .pf-stack-seg--database,
.pf-stack-matrix:has(.pf-stack-tile--desktop:hover) .pf-stack-seg--desktop,
.pf-stack-matrix:has(.pf-stack-tile--cloud:hover) .pf-stack-seg--cloud,
.pf-stack-matrix:has(.pf-stack-tile--engineering:hover) .pf-stack-seg--engineering {
  opacity: 1;
  transform: scaleY(1.35);
}

/* ==========================================================================
   6. OUTCOME & CONCLUSION SECTION (BENTO GRID)
   ========================================================================== */
.pf-conclusion {
  padding-top: clamp(80px, 8vw, 112px);
  padding-bottom: clamp(80px, 8vw, 112px);
  background: #FFFFFF;
}

.pf-outcome {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Impact strip */
.pf-outcome-impact {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.5vw, 40px) clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 28px);
  border-color: var(--pf-blue-soft-border);
  background:
    repeating-radial-gradient(circle at 100% 50%, transparent 0 46px, rgba(11, 99, 174, 0.05) 46px 47px),
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, #F5F8FF 0%, #FFFFFF 70%);
}

.pf-outcome-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

.pf-outcome-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "ico num"
    "ico lbl";
  column-gap: 18px;
  align-items: center;
  padding: 4px clamp(16px, 3vw, 36px);
  border-left: 1px solid var(--pf-blue-soft-border);
}

.pf-outcome-stat:first-child {
  padding-left: 0;
  border-left: none;
}

.pf-outcome-stat-ico {
  grid-area: ico;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.28);
}

.pf-outcome-stat-ico svg {
  width: 24px;
  height: 24px;
}

.pf-outcome-stat-num {
  grid-area: num;
  font-size: clamp(2.75rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pf-outcome-stat-lbl {
  grid-area: lbl;
  padding-top: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--pf-text);
  text-transform: capitalize;
}

/* Insight cards */
.pf-outcome-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px;
}

.pf-outcome-grid.is-single {
  grid-template-columns: 1fr;
}

.pf-outcome-card {
  margin: 0;
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pf-outcome-card.is-tint {
  background: var(--pf-card-soft-bg);
}

.pf-outcome-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pf-shadow-hover);
}

.pf-outcome-card:hover .pf-feature-ico {
  color: #FFFFFF;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: transparent;
  transform: rotate(-6deg) scale(1.05);
}

.pf-outcome-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pf-outcome-card-text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--pf-text);
}

/* Closing CTA: gradient border that sweeps around the card */
@property --pf-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.pf-outcome-cta {
  --pf-angle: 0deg;
  padding: 2px;
  border-radius: var(--pf-radius-xl);
  background: conic-gradient(from var(--pf-angle), #DBE8FF 0deg, #3b82f6 70deg, #1d4ed8 110deg, #DBE8FF 180deg, #DBE8FF 360deg);
  box-shadow: 0 20px 50px rgba(59, 130, 246, 0.14);
  animation: pf-border-spin 6s linear infinite;
}

.pf-outcome-cta-inner {
  padding: clamp(24px, 3.5vw, 40px) clamp(24px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
  border-radius: calc(var(--pf-radius-xl) - 2px);
  background:
    radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.1) 0%, transparent 45%),
    #FFFFFF;
}

.pf-outcome-cta-text {
  flex: 1 1 0;
  margin: 0;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 600;
  line-height: 1.65;
  color: var(--pf-text-dark);
}

.pf-outcome-cta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

@keyframes pf-border-spin {
  to { --pf-angle: 360deg; }
}

/* Backend Edit Button Bar */
.pf-admin-edit-bar {
  margin-top: 32px;
  text-align: center;
}

.pf-admin-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: #1B3A5C;
  color: #FFFFFF !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--pf-radius-btn);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(27, 58, 92, 0.2);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pf-admin-edit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
}

.pf-hero .pf-container {
  max-width: 1400px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
  .pf-hero-row {
    gap: 36px;
  }
}

@media (max-width: 1024px) {
  .pf-hero-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .pf-hero-copy {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .pf-hero-visual,
  .pf-hero-image-visual {
    width: 100%;
    max-width: 760px;
    height: auto;
    margin: 24px auto 0;
  }

  .pf-section-head-split {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .pf-section-head-right {
    width: 100%;
  }

  .pf-bento-col-7,
  .pf-bento-col-5 {
    grid-column: span 12;
  }

  .pf-delivery-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .pf-challenges-row {
    flex-direction: column;
    gap: 36px;
  }

  .pf-challenges-sidebar {
    width: 100%;
    position: static;
  }

  .pf-legacy-panel {
    max-width: 520px;
  }

  .pf-features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pf-feature-card.is-hero {
    grid-row: auto;
  }

  .pf-feature-card:nth-child(n+6):not(.is-wide) {
    grid-column: span 1;
  }

  .pf-feature-card.is-wide {
    flex-direction: column;
    align-items: stretch;
  }

  .pf-feature-card.is-wide .pf-feature-main {
    flex: none;
  }

  .pf-feature-card.is-wide .pf-feature-tags {
    justify-content: flex-start;
  }

  .pf-feature-card.is-wide .pf-feature-watermark {
    top: 6px;
    bottom: auto;
    right: 18px;
    left: auto;
    display: block;
  }

  .pf-stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pf-stack-summary {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "bar"
      "legend";
  }

  .pf-stack-summary-text {
    max-width: none;
  }

  .pf-arch-node {
    padding: 14px;
  }

  .pf-arch-title {
    font-size: 15px;
  }

  .pf-outcome-grid {
    grid-template-columns: 1fr;
  }

  .pf-outcome-cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .pf-hero {
    padding-top: 40px;
    padding-bottom: 50px;
  }

  /* Stacked full-width buttons, same as home page hero on mobile */
  .pf-hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }

  .pf-btn,
  .pf-btn-secondary {
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
    font-size: 13.5px;
  }

  /* Outcome stats stack, dividers turn horizontal */
  .pf-outcome-stats {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }

  .pf-outcome-stat {
    padding: 18px 0;
    border-left: none;
    border-top: 1px solid var(--pf-blue-soft-border);
  }

  .pf-outcome-stat:first-child {
    padding-top: 0;
    border-top: none;
  }

  .pf-outcome-cta-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .pf-hero-metrics {
    max-width: none;
    padding: 14px 2px;
  }

  .pf-hero-metric {
    padding: 0 12px;
  }

  .pf-hero-metric-lbl {
    font-size: 12px;
  }

  .pf-hero-chip {
    padding: 8px 10px;
  }

  .pf-hero-chip-ico {
    width: 30px;
    height: 30px;
  }

  .pf-aurora--1 {
    width: 360px;
    height: 360px;
  }

  .pf-hero-visual,
  .pf-hero-image-visual {
    height: auto;
    min-height: auto;
  }

  .pf-mockup-window {
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: 10px;
  }

  .pf-mockup-sidebar {
    width: 120px;
    padding: 14px 8px;
  }

  .pf-mockup-nav-item {
    font-size: 11px;
    padding: 5px 6px;
  }

  .pf-float-top {
    width: 200px;
    padding: 12px 14px;
    left: 0;
    top: -5px;
  }

  .pf-float-bottom {
    width: 230px;
    padding: 12px 14px;
    right: 0;
    bottom: -5px;
  }

  .pf-module-map {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }

  .pf-challenges-list {
    --pf-node: 40px;
    --pf-node-top: 16px;
    --pf-rail-gap: 12px;
  }

  .pf-challenge-item {
    gap: 14px;
  }

  .pf-challenge-node {
    font-size: 13px;
  }

  .pf-challenge-item:hover .pf-challenge-card {
    transform: none;
  }

  .pf-challenge-text {
    font-size: 15px;
  }

  /* Delivery steps stack into a vertical timeline */
  .pf-delivery-track {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pf-delivery-track::before {
    top: 46px;
    bottom: 46px;
    left: 45px;
    right: auto;
    width: 2px;
    height: auto;
    background-image: linear-gradient(180deg, transparent 0%, #3b82f6 50%, transparent 100%);
    background-size: 100% 30%;
    animation-name: pf-track-pulse-y;
  }

  .pf-delivery-step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 2px;
    align-items: center;
    padding: 18px;
    text-align: left;
  }

  .pf-delivery-node {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .pf-delivery-step-num {
    align-self: end;
  }

  .pf-delivery-step-title {
    align-self: start;
    font-size: 15.5px;
  }

  .pf-delivery-loop {
    white-space: normal;
  }

  .pf-features-grid {
    grid-template-columns: 1fr;
  }

  .pf-feature-card,
  .pf-feature-card.is-hero,
  .pf-feature-card.is-wide,
  .pf-feature-card:nth-child(n+6):not(.is-wide) {
    grid-column: auto;
    grid-row: auto;
    padding: 24px;
  }

  .pf-feature-card.is-hero .pf-feature-tags {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pf-feature-card.is-hero .pf-feature-watermark {
    font-size: 120px;
  }

  .pf-feature-watermark {
    font-size: 72px;
  }

  .pf-bento-col-4 {
    grid-column: span 12;
  }

  /* Blueprint stacks vertically; packets travel downward */
  .pf-arch-diagram,
  .pf-arch-boundary {
    flex-direction: column;
    align-items: stretch;
  }

  .pf-arch-boundary {
    flex: none;
    padding: 28px 14px 14px;
  }

  .pf-arch-node {
    flex: none;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 2px;
    align-items: center;
  }

  .pf-arch-ico {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .pf-arch-lbl {
    align-self: end;
  }

  .pf-arch-title {
    align-self: start;
    font-size: 16px;
  }

  .pf-arch-pipe,
  .pf-arch-boundary .pf-arch-pipe {
    flex: 0 0 28px;
    width: 2px;
    height: 28px;
    margin: 0 auto;
  }

  .pf-arch-pipe::after {
    right: auto;
    top: auto;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }

  .pf-arch-pipe i {
    top: 0;
    left: 50%;
    margin-top: 0;
    margin-left: -3px;
    animation-name: pf-packet-y;
  }

  .pf-arch-flow-code {
    white-space: normal;
  }

  .pf-stack-grid,
  .pf-stack-grid.is-pair {
    grid-template-columns: 1fr;
  }

  .pf-stack-tile {
    padding: 22px;
  }
}

@media (max-width: 580px) {
  .pf-hero-image-visual {
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .pf-float-top,
  .pf-float-bottom {
    position: static;
    width: 100%;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }

  /* Floating chips would cover the product image on phones */
  .pf-hero-chip {
    display: none;
  }

  /* Ecosystem: hub on top, apps in a 2x2 grid, no connector lines */
  .pf-eco {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "hub hub"
      "n1  n2"
      "n3  n4";
  }

  .pf-eco.is-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "hub hub"
      "n1  n2"
      "n3  n3";
  }

  .pf-eco-lines {
    display: none;
  }
}

/* Respect users who turn off motion */
@media (prefers-reduced-motion: reduce) {
  .portfolio-single-wrapper *,
  .portfolio-single-wrapper *::before,
  .portfolio-single-wrapper *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .portfolio-single-wrapper .pf-card:hover,
  .portfolio-single-wrapper .pf-btn:hover,
  .portfolio-single-wrapper .pf-btn-secondary:hover,
  .portfolio-single-wrapper .pf-chip:hover,
  .portfolio-single-wrapper .pf-hero-product-img:hover,
  .portfolio-single-wrapper .pf-delivery-step:hover,
  .portfolio-single-wrapper .pf-delivery-step:hover .pf-delivery-node,
  .portfolio-single-wrapper .pf-feature-card:hover .pf-feature-ico,
  .portfolio-single-wrapper .pf-feature-card:hover .pf-feature-watermark,
  .portfolio-single-wrapper .pf-challenge-item:hover .pf-challenge-card,
  .portfolio-single-wrapper .pf-challenge-item:hover .pf-challenge-node,
  .portfolio-single-wrapper .pf-coverage-card:hover .pf-feature-ico,
  .portfolio-single-wrapper .pf-module-map li:hover,
  .portfolio-single-wrapper .pf-eco-node:hover {
    transform: none;
  }

  .pf-hero-stage {
    transform: none !important;
  }

  /* Hero + Overview: static backgrounds, chips, map and hub */
  .pf-snapshot-bar::after,
  .pf-snapshot-live i,
  .pf-aurora,
  .pf-hl-shimmer,
  .pf-hero-pill .pf-pill-dot,
  .pf-migration-arrow,
  .pf-hero-chip,
  .pf-module-map li,
  .pf-eco-lines line,
  .pf-eco-ring,
  .pf-eco-core {
    animation: none !important;
  }

  .portfolio-single-wrapper .pf-arch-node:hover,
  .portfolio-single-wrapper .pf-stack-tile:hover,
  .portfolio-single-wrapper .pf-stack-tile:hover .pf-stack-ico,
  .portfolio-single-wrapper .pf-stack-seg,
  .portfolio-single-wrapper .pf-outcome-card:hover,
  .portfolio-single-wrapper .pf-outcome-card:hover .pf-feature-ico {
    transform: none !important;
  }

  .pf-outcome-cta {
    animation: none !important;
  }

  /* Rail shows fully filled instead of animating; packets are hidden */
  .pf-challenge-item::after,
  .pf-challenge-node,
  .pf-legacy-status i,
  .pf-arch-pipe i {
    animation: none !important;
  }

  .pf-delivery-track::before,
  .pf-delivery-loop svg {
    animation: none !important;
  }
}
