/* ============================================================
   PGX Framework — Philosophy & Narrative Styles
   Landing Narrative · Philosophy Page · Shape Sorter · Open Core
   ============================================================ */

/* ===== NARRATIVE SECTION (Landing) ===== */
.narrative-section {
  padding: 80px 0;
}

.narrative-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.narrative-block + .narrative-block {
  margin-top: 80px;
}

.narrative-lead {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--fw-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.narrative-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.narrative-body {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}

/* Breathable text: key phrases as separate visual blocks */
.narrative-body .highlight-line {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.narrative-body .model-line {
  display: block;
  margin-top: 16px;
  margin-bottom: 4px;
}

.narrative-body .model-emphasis {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Steps 1-2-3 --- */
.narrative-steps {
  display: flex;
  gap: 24px;
  margin-top: 28px;
  position: relative;
}

.narrative-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  position: relative;
}

/* Connector lines between steps */
.narrative-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  right: -14px;
  width: 28px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--fw-primary), var(--fw-secondary));
  opacity: 0.35;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fw-gradient);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.step-text strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 3px;
  font-size: 0.9rem;
}

/* --- Narrative Divider --- */
.narrative-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fw-primary), var(--fw-secondary), transparent);
  max-width: 400px;
  margin: 80px auto;
  opacity: 0.4;
}

/* ===== SHAPE SORTER SVG ===== */
.shape-sorter-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shape-sorter-svg {
  width: 100%;
  max-width: 420px;
  filter: drop-shadow(0 0 40px rgba(127, 0, 255, 0.08));
}

/* Shapes start floating above the box */
.shape-sorter-svg .shape-circle,
.shape-sorter-svg .shape-square,
.shape-sorter-svg .shape-triangle {
  opacity: 0.9;
  transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease, filter 0.3s ease;
  cursor: default;
}

/* Hover: slight elevation */
.shape-sorter-svg .shape-circle:hover,
.shape-sorter-svg .shape-square:hover,
.shape-sorter-svg .shape-triangle:hover {
  filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.15));
}

/* Before animation: shapes float above */
.shape-sorter-svg .shape-circle   { transform: translateY(-30px); }
.shape-sorter-svg .shape-square   { transform: translateY(-40px); }
.shape-sorter-svg .shape-triangle { transform: translateY(-50px); }

/* After animation: shapes drop into slots */
.shape-sorter-svg.animate .shape-circle {
  animation: shapeDrop 0.8s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.shape-sorter-svg.animate .shape-square {
  animation: shapeDrop 0.8s 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.shape-sorter-svg.animate .shape-triangle {
  animation: shapeDrop 0.8s 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes shapeDrop {
  0%   { transform: translateY(-60px); opacity: 0.3; }
  60%  { transform: translateY(5px); opacity: 1; }
  80%  { transform: translateY(-2px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Shape labels */
.shape-sorter-svg .shape-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  fill: var(--text-secondary);
}

.shape-sorter-svg .box-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  fill: var(--text-muted);
}

/* ===== OPEN CORE BLOCK ===== */
.opensource-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  margin-bottom: 20px;
  animation: opensourceGlow 3s ease-in-out infinite;
}

@keyframes opensourceGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(46, 204, 113, 0.15); }
  50% { box-shadow: 0 0 28px rgba(46, 204, 113, 0.35); }
}

/* Open Core sub-line under badge */
.opencore-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 24px;
  font-weight: 500;
}

.opencore-sub a {
  color: var(--fw-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.opencore-sub a:hover {
  color: var(--text-primary);
}

.opensource-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.opensource-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.opensource-card:hover {
  transform: translateY(-3px);
  border-color: rgba(46, 204, 113, 0.3);
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.1);
}

.opensource-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(46, 204, 113, 0.04));
  border: 1px solid rgba(46, 204, 113, 0.25);
  box-shadow: 0 0 16px rgba(46, 204, 113, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}
.opensource-card:hover .opensource-card-icon {
  box-shadow: 0 0 24px rgba(46, 204, 113, 0.18);
  transform: scale(1.08);
}

.opensource-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.opensource-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Narrative CTAs --- */
.narrative-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 48px;
}

/* ===== PHILOSOPHY PAGE ===== */

/* Hero (smaller than landing hero) */
.philosophy-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.philosophy-hero .hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, color-mix(in srgb, var(--fw-primary) 12%, transparent) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 30% 70%, color-mix(in srgb, var(--fw-secondary) 8%, transparent) 0%, transparent 60%);
  z-index: 0;
}

.philosophy-hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 750px;
}

.philosophy-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
}

.philosophy-hero .hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Problem Cards --- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.problem-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.problem-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-pink);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent-pink) 12%, transparent);
}

.problem-card .problem-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.12), rgba(233, 69, 96, 0.04));
  border: 1px solid rgba(233, 69, 96, 0.25);
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}
.problem-card:hover .problem-icon {
  box-shadow: 0 0 28px rgba(233, 69, 96, 0.18);
  transform: scale(1.08);
}

.problem-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.problem-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Solution / Two Paths --- */
.solution-quote {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-secondary);
  border-left: 3px solid;
  border-image: var(--fw-gradient) 1;
  padding-left: 24px;
  margin-bottom: 48px;
  max-width: 700px;
}

.workflow-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 48px 0;
}

.workflow-step {
  text-align: center;
  position: relative;
}

.workflow-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--fw-gradient);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 16px;
}

.workflow-step h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.workflow-step p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Connector arrows between workflow steps */
.workflow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  right: -18px;
  width: 36px;
  height: 2px;
  background: var(--fw-gradient);
  opacity: 0.4;
}

.two-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 48px;
}

.path-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.path-card:hover {
  transform: translateY(-4px);
  border-color: var(--fw-secondary);
}

.path-card .path-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.12), rgba(127, 0, 255, 0.04));
  border: 1px solid rgba(0, 188, 212, 0.25);
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}
.path-card:hover .path-icon {
  box-shadow: 0 0 28px rgba(0, 188, 212, 0.18);
  transform: scale(1.08);
}

.path-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.path-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.path-card .path-result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fw-secondary);
}

/* --- Audience Cards --- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.audience-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.audience-card:hover {
  transform: translateY(-4px);
  border-color: var(--fw-secondary);
  box-shadow: 0 0 24px color-mix(in srgb, var(--fw-secondary) 12%, transparent);
}

.audience-card .audience-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.12), rgba(127, 0, 255, 0.04));
  border: 1px solid rgba(0, 188, 212, 0.25);
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}
.audience-card:hover .audience-icon {
  box-shadow: 0 0 28px rgba(0, 188, 212, 0.18);
  transform: scale(1.08);
}

.audience-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.audience-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.audience-card ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 16px;
  position: relative;
}

.audience-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fw-secondary);
}

/* --- Promise Cards --- */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.promise-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(46, 204, 113, 0.15);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.promise-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 204, 113, 0.4);
  box-shadow: 0 0 24px rgba(46, 204, 113, 0.1);
}

.promise-card .promise-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(46, 204, 113, 0.04));
  border: 1px solid rgba(46, 204, 113, 0.25);
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
}
.promise-card:hover .promise-icon {
  box-shadow: 0 0 28px rgba(46, 204, 113, 0.18);
  transform: scale(1.08);
}

.promise-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.promise-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Large Open Core Badge (Philosophy page) --- */
.opensource-badge-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 99px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  margin-bottom: 32px;
  animation: opensourceGlow 3s ease-in-out infinite;
}

/* --- Built in Public Stats (Philosophy page) --- */
.built-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.built-stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.built-stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--fw-secondary);
}

.built-stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: var(--fw-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.built-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Philosophy page final CTA --- */
.philosophy-final-cta {
  text-align: center;
  padding: 40px 0;
}

.philosophy-final-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 24px;
}

.philosophy-final-cta .cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== INLINE SVG ICONS — Base ===== */
.icon-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: inherit;
}

/* ===== SVG SIZING PER CONTEXT ===== */

/* Problem icons (philosophy page) */
.problem-card .problem-icon .icon-svg {
  width: 24px;
  height: 24px;
  color: var(--accent-pink);
}

/* Path / workflow icons */
.path-card .path-icon .icon-svg {
  width: 26px;
  height: 26px;
  color: var(--fw-secondary);
}

/* Audience icons */
.audience-card .audience-icon .icon-svg {
  width: 24px;
  height: 24px;
  color: var(--fw-secondary);
}

/* Promise icons */
.promise-card .promise-icon .icon-svg {
  width: 24px;
  height: 24px;
  color: #2ecc71;
}

/* Open Source card icons */
.opensource-card-icon .icon-svg,
.opensource-card .icon-svg {
  width: 22px;
  height: 22px;
  color: #2ecc71;
}

/* Landing page philosophy/BIP cards */
.philosophy-card .icon .icon-svg {
  width: 24px;
  height: 24px;
  color: var(--fw-secondary);
}

/* Compact problem cards (landing page — no wrapper span) */
.problem-compact-card .icon-svg {
  width: 32px;
  height: 32px;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.12), rgba(233, 69, 96, 0.04));
  border: 1px solid rgba(233, 69, 96, 0.2);
  color: var(--accent-pink);
  margin-bottom: 12px;
  box-sizing: content-box;
}

/* Inversion arrows */
.inversion-arrow .icon-svg {
  width: 28px;
  height: 28px;
  opacity: 0.5;
}

/* ===== DECLARATION BLOCK (Landing) ===== */
.declaration-block {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 72px;
}

.declaration-text {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

.declaration-text strong {
  color: var(--text-primary);
  font-weight: 700;
}

.declaration-text em {
  font-style: normal;
  font-weight: 700;
  background: var(--fw-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== COMPACT PROBLEM CARDS (Landing) ===== */
.problem-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.problem-compact-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.problem-compact-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-pink);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent-pink) 10%, transparent);
}

.problem-compact-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.problem-compact-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== INVERSION FLOW VISUALIZATION ===== */
.inversion-block {
  margin-top: 80px;
  text-align: center;
}

.inversion-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  max-width: 920px;
  margin: 48px auto 0;
}

.inversion-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.inversion-card.problem {
  border-color: rgba(233, 69, 96, 0.4);
  box-shadow: 0 0 20px rgba(233, 69, 96, 0.08);
}

.inversion-card.pgx {
  border-color: rgba(127, 0, 255, 0.4);
  background: linear-gradient(135deg, rgba(127, 0, 255, 0.08), rgba(0, 188, 212, 0.05));
  box-shadow: 0 0 24px rgba(127, 0, 255, 0.1);
}

.inversion-card.result {
  border-color: rgba(46, 204, 113, 0.4);
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.08);
}

.inversion-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.inversion-card.problem .inversion-label { color: var(--accent-pink); }
.inversion-card.pgx .inversion-label { color: var(--accent-purple); }
.inversion-card.result .inversion-label { color: #2ecc71; }

.inversion-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.inversion-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.inversion-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--text-muted);
}

/* ===== PLATFORM HIERARCHY VISUAL ===== */
.platform-visual {
  max-width: 860px;
  margin: 48px auto 0;
}

.platform-visual svg {
  width: 100%;
  height: auto;
}

/* ===== FRAMEWORK SECTION: CORE vs SATELLITES ===== */
.fw-core-section {
  max-width: 720px;
  margin: 48px auto 0;
}

.fw-core-label,
.fw-satellites-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.fw-satellites-label {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--border-glass);
}

.fw-card.core-featured {
  border: 2px solid rgba(127, 0, 255, 0.4);
  background: linear-gradient(135deg, rgba(127, 0, 255, 0.06), rgba(0, 188, 212, 0.04));
  box-shadow: 0 0 40px rgba(127, 0, 255, 0.1);
}

.fw-card.core-featured:hover {
  border-color: rgba(127, 0, 255, 0.6);
  box-shadow: 0 0 50px rgba(127, 0, 255, 0.18);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .narrative-block {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .narrative-block .shape-sorter-wrap {
    order: -1;
  }

  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .problem-compact-grid { grid-template-columns: repeat(2, 1fr); }
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
  .promise-grid { grid-template-columns: repeat(2, 1fr); }
  .built-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .narrative-section { padding: 60px 0; }
  .narrative-block + .narrative-block { margin-top: 60px; }
  .narrative-steps {
    flex-direction: column;
    gap: 16px;
  }
  .narrative-step:not(:last-child)::after { display: none; }
  .opensource-cards { grid-template-columns: 1fr 1fr; }

  .problem-grid { grid-template-columns: 1fr; }
  .problem-compact-grid { grid-template-columns: 1fr 1fr; }
  .workflow-visual { grid-template-columns: 1fr; gap: 24px; }
  .workflow-step:not(:last-child)::after { display: none; }
  .two-paths { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: 1fr; }
  .promise-grid { grid-template-columns: 1fr; }
  .built-stats-grid { grid-template-columns: repeat(2, 1fr); }

  .inversion-flow {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 400px;
  }
  .inversion-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }
}

@media (max-width: 480px) {
  .narrative-title { font-size: 1.5rem; }
  .narrative-divider { margin: 48px auto; }
  .opensource-cards { grid-template-columns: 1fr; }
  .narrative-ctas { flex-direction: column; align-items: center; }
  .built-stats-grid { grid-template-columns: 1fr; }
  .philosophy-final-cta .cta-buttons { flex-direction: column; align-items: center; }
  .problem-compact-grid { grid-template-columns: 1fr; }
  .declaration-text { font-size: 1.2rem; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .shape-sorter-svg .shape-circle,
  .shape-sorter-svg .shape-square,
  .shape-sorter-svg .shape-triangle {
    transform: none !important;
    animation: none !important;
    opacity: 1 !important;
  }
  .opensource-badge,
  .opensource-badge-large {
    animation: none !important;
  }
}
