/* Super Funnel System case study (/portfolio/super-funnel/). Builds on the pirx-case page shell in blog.css. */
.sf-case .page-hero h1 { max-width: 20ch; }
.sf-case .page-hero__media img { object-position: center top; }
.sf-case > section { margin-block: 0; }
.sf-case h2 { max-width: 22ch; }
.sf-case h3 { margin: 0 0 0.45rem; }

.sf-case__metrics { margin-top: 0; }

/* Snapshot */
.sf-case__snap { display: grid; gap: 1rem; }
.sf-case__snap .eyebrow { margin: 0; }
.sf-case__snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: var(--ui-border);
  border-radius: var(--ui-r-card);
  overflow: hidden;
}
.sf-case__snapshot > div { padding: 0.9rem 1.1rem; background: var(--ui-surface-1); min-width: 0; }
.sf-case__snapshot dt { color: var(--ink-soft); font: 500 0.72rem/1.25 var(--label); letter-spacing: 0.08em; text-transform: uppercase; }
.sf-case__snapshot dd { margin: 0.3rem 0 0; color: var(--ink); overflow-wrap: anywhere; }
.sf-case__snapshot > div:last-child { grid-column: 1 / -1; }

/* Flow */
.sf-case__sub { margin: 0.8rem 0 0; color: var(--ink-soft); max-width: 24rem; }
.sf-case__steps { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--line); border: var(--ui-border); border-radius: var(--ui-r-card); overflow: hidden; }
.sf-case__steps > li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 0.9rem; padding: 1.1rem 1.2rem; background: var(--ui-surface-1); }
.sf-case__steps > li > span { color: var(--accent); font: 600 0.72rem/1.8 var(--label); letter-spacing: 0.12em; }
.sf-case__steps p { margin: 0 0 0.6rem; max-width: 46rem; }
.sf-case__steps p:last-child { margin-bottom: 0; }
.sf-case__doors { margin: 0.4rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.6rem; }
.sf-case__pipeline { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.sf-case__pipeline li { counter-increment: step; padding: 0.3rem 0.65rem; border: var(--ui-border); border-radius: 999px; font: 500 0.78rem/1.3 var(--label); color: var(--ink-soft); background: var(--ui-surface-2, transparent); }
.sf-case__pipeline li::before { content: counter(step) ". "; color: var(--accent); }

/* Films */
.sf-case__films { padding-block: clamp(3rem, 7vw, 6rem); border-top: var(--ui-border); }
.sf-case__films-head { max-width: 40rem; margin-bottom: 2rem; }
.sf-case__films-head h2 { margin: 0.4rem 0 0.7rem; }
.sf-case__films-head p:last-child { margin: 0; color: var(--ink-soft); }
.sf-chapter + .sf-chapter { margin-top: 2.4rem; }
.sf-chapter > h3 { display: flex; align-items: baseline; gap: 0.7rem; margin: 0 0 1rem; padding-bottom: 0.6rem; border-bottom: var(--ui-border); }
.sf-chapter > h3 span { color: var(--accent); font: 600 0.72rem/1 var(--label); letter-spacing: 0.12em; }
.sf-chapter__films { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1.2rem; }
.sf-chapter--single .sf-chapter__films { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.sf-film { margin: 0; min-width: 0; }
.sf-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #050505; border: var(--ui-border); border-radius: var(--ui-r-card); object-fit: contain; }
.sf-film figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.8rem; padding-top: 0.7rem; }
.sf-film figcaption strong { color: var(--ink); }
.sf-film__time { color: var(--ink-soft); font: 500 0.78rem/1.6 var(--label); letter-spacing: 0.06em; }
.sf-film__line { grid-column: 1 / -1; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

/* Inside, Cloudflare */
.sf-case__inside,
.sf-case__cloud,
.sf-case__phone { padding-block: clamp(3rem, 7vw, 6rem); border-top: var(--ui-border); }
.sf-case__inside > h2,
.sf-case__cloud > h2 { margin: 0.45rem 0 1.6rem; }
.sf-case__lede { max-width: 46rem; margin: 0 0 1.6rem; color: var(--ink); font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; }
.sf-case__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.sf-case__grid > li { padding: 1.2rem; background: var(--ui-surface-1); border: var(--ui-border); border-radius: var(--ui-r-card); min-width: 0; }
.sf-case__grid p { margin: 0; color: var(--ink-soft); }
.sf-case__grid ul { margin: 0.4rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); display: grid; gap: 0.35rem; }
.sf-case__wide { grid-column: span 2; }
.sf-case__diagram { margin: 0 0 1.6rem; }
.sf-case__diagram img { display: block; width: 100%; height: auto; border: var(--ui-border); border-radius: var(--ui-r-card); }
.sf-case__diagram figcaption { padding-top: 0.5rem; color: var(--ink-soft); font-size: 0.82rem; }

/* Phone */
.sf-case__phone { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.sf-case__phone h2 { margin-top: 0.4rem; }
.sf-case__ticks { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.7rem; font-size: 1.05rem; }

.sf-case__outcome { padding-block: clamp(3rem, 7vw, 5.5rem); }
.sf-case__outcome .pirx-case__results-copy h2 { max-width: 18ch; }
.sf-case__outcome .pirx-case__results-copy p:not(.eyebrow) { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; }
.sf-case__outcome { display: block; margin-inline: 0; padding-inline: clamp(1.1rem, 4vw, 2.2rem); }

.sf-case__next ul { display: flex; flex-wrap: wrap; gap: 0.65rem 1.25rem; padding-left: 0; list-style: none; }

@media (max-width: 900px) {
  .sf-case__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-case__wide { grid-column: 1 / -1; }
  .sf-case__phone { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sf-case__snapshot { grid-template-columns: 1fr; }
  .sf-case__steps > li { grid-template-columns: 1fr; gap: 0.4rem; }
  .sf-chapter__films { grid-template-columns: 1fr; }
  .sf-case__grid { grid-template-columns: 1fr; }
  .sf-case__outcome { padding-inline: 1rem; }
}
