/* Scenario 77 — How We Work page. Extends home.css + practice-area.css. */

/* ============== Nav current-page indicator ============== */
.nav-links a.is-current {
  color: var(--text-primary);
  position: relative;
}
.nav-links a.is-current::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -22px; height: 2px;
  background: var(--red);
}

/* ============== Hero ============== */
.hww-hero {
  position: relative;
  background:
    radial-gradient(rgba(245,245,245, calc(var(--grid-opacity) + 0.03)) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size),
    linear-gradient(135deg, #0E0E11 0%, #14141A 100%);
  border-bottom: 1px solid var(--border);
  padding: 96px 0 var(--section-py);
  overflow: hidden;
}
.hww-hero .corner-mark {
  position: absolute; top: 28px; right: var(--gutter);
  display: flex; align-items: center; gap: 10px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.hww-hero .corner-mark .dot { width: 6px; height: 6px; background: var(--red); }

.hww-hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 80px; align-items: end;
}
.hww-hero-main .eyebrow { margin-bottom: 32px; }
.hww-hero-main h1 { margin-bottom: 28px; max-width: 900px; }
.hww-hero-main .lede { max-width: 700px; margin-bottom: 40px; }
.hww-hero-main .lede strong { color: var(--text-primary); font-weight: 600; }
.hww-hero-main .cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* Methodology diagram in hero */
.method-diagram {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 4px;
}
.method-diagram .head {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 14px; margin-bottom: 6px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
}
.method-diagram .head .marker { display: flex; align-items: center; gap: 8px; }
.method-diagram .head .marker .dot { width: 6px; height: 6px; background: var(--red); }
.method-diagram .stages {
  display: flex; flex-direction: column;
  position: relative;
}
.method-diagram .stages::before {
  content: "";
  position: absolute; left: 24px; top: 36px; bottom: 36px;
  width: 1px; background: linear-gradient(180deg, var(--red), var(--divider) 80%);
  z-index: 0;
}
.method-diagram .stage {
  display: grid; grid-template-columns: 48px 1fr; gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
  position: relative; z-index: 1;
}
.method-diagram .stage:last-child { border-bottom: none; }
.method-diagram .stage .num {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 18px; color: var(--red);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--red);
  display: flex; align-items: center; justify-content: center;
}
.method-diagram .stage .info { display: flex; flex-direction: column; gap: 4px; }
.method-diagram .stage .info .title {
  font-family: var(--font-heading); font-weight: 700; font-size: 16px;
  color: var(--text-primary); letter-spacing: -0.005em;
}
.method-diagram .stage .info .prevents {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.method-diagram .foot-note {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--divider);
  display: flex; justify-content: space-between;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* ============== Backward from outcome ============== */
.backward {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 96px; align-items: start;
}
.backward .lead h2 { max-width: 460px; }
.backward .body-stack { display: flex; flex-direction: column; gap: 18px; max-width: 680px; }
.backward .body-stack p { max-width: 640px; }

.pull-quote {
  margin-top: 32px;
  padding: 28px 32px;
  background: var(--surface);
  border-left: 3px solid var(--red);
  border-radius: 0 12px 12px 0;
  display: grid; grid-template-columns: 32px 1fr; gap: 18px;
  align-items: start;
}
[data-rhythm="alt"] .section.surface .pull-quote { background: var(--bg); }
.pull-quote .pq-mark {
  font-family: var(--font-heading); font-weight: 800; font-size: 48px;
  color: var(--red); line-height: 0.6; padding-top: 12px;
}
.pull-quote .pq-body {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 22px; line-height: 1.35; letter-spacing: -0.008em;
  color: var(--text-primary);
}
.pull-quote .pq-attr {
  grid-column: 2;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-top: 14px;
}

/* ============== Four stages — deep dive ============== */
.stages-deep {
  display: flex; flex-direction: column;
}
.stage-card {
  padding: 56px 0;
  border-top: 1px solid var(--divider);
}
.stage-card:first-child { border-top: none; padding-top: 16px; }
.stage-card .sc-head {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 32px;
  align-items: center;
  margin-bottom: 28px;
}
.stage-card .sc-num {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 72px; line-height: 1; letter-spacing: -0.02em;
  color: var(--red);
}
.stage-card .sc-title-block h3 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 38px; line-height: 1.1; letter-spacing: -0.016em;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.stage-card .sc-prevents {
  display: flex; align-items: baseline; gap: 14px;
}
.stage-card .sc-prevents .ind {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.stage-card .sc-prevents .what {
  font-family: var(--font-heading); font-weight: 600; font-size: 14px;
  color: var(--text-secondary); letter-spacing: -0.005em;
}
.stage-card .sc-tag {
  font-family: var(--font-heading); font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.stage-card .sc-body {
  display: grid; grid-template-columns: 96px 1fr; gap: 32px;
}
.stage-card .sc-body > p {
  grid-column: 2;
  font-size: 17px; line-height: 1.7; color: var(--text-primary);
  max-width: 720px;
  margin-bottom: 12px;
}
.stage-card .sc-body > p.muted { color: var(--text-secondary); }
.stage-card .sc-body > p:last-of-type { margin-bottom: 0; }
.stage-card .sc-body > p strong { color: var(--text-primary); font-weight: 700; }
.stage-card .sc-body > p em { font-style: italic; color: var(--text-secondary); }

.sc-inputs {
  grid-column: 2;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 24px;
  max-width: 720px;
}
.sc-inputs .ii {
  border: 1px solid var(--divider);
  border-left: 2px solid var(--red);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg);
}
[data-rhythm="alt"] .section.surface .sc-inputs .ii { background: var(--surface); }
.sc-inputs .ii .ii-label {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.sc-inputs .ii .ii-text {
  font-size: 13px; line-height: 1.5; color: var(--text-primary);
}

.sc-practices {
  grid-column: 2;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 24px;
  max-width: 720px;
}
.sc-practices .pp {
  display: grid; grid-template-columns: 12px 1fr; gap: 14px;
  align-items: start;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 150ms ease, transform 150ms ease;
  text-decoration: none; color: inherit;
}
[data-rhythm="alt"] .section.surface .sc-practices .pp { background: var(--surface); }
.sc-practices .pp .pp-dot {
  width: 10px; height: 10px; margin-top: 6px;
}
.sc-practices .pp[data-pa="csd"] .pp-dot { background: var(--red); }
.sc-practices .pp[data-pa="sm"]  .pp-dot { background: var(--steel); }
.sc-practices .pp[data-pa="aia"] .pp-dot { background: var(--jade); }
.sc-practices .pp[data-pa="csd"]:hover { border-color: var(--red); }
.sc-practices .pp[data-pa="sm"]:hover  { border-color: var(--steel); }
.sc-practices .pp[data-pa="aia"]:hover { border-color: var(--jade); }
.sc-practices .pp:hover { transform: translateY(-2px); }
.sc-practices .pp .pp-label {
  font-family: var(--font-heading); font-weight: 700; font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.sc-practices .pp .pp-sub {
  font-size: 13px; line-height: 1.45; color: var(--text-secondary);
}

/* ============== Fractional Team deep ============== */
.frac-deep .lead { max-width: 880px; margin-bottom: 64px; }
.frac-deep .lead h2 { margin-bottom: 24px; }
.frac-deep .lead .lede { margin-bottom: 16px; }
.frac-deep .lead .lede strong { color: var(--text-primary); font-weight: 600; }
.frac-deep .lead .body { margin-bottom: 0; }

.frac-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  border-radius: 14px;
  overflow: hidden;
}
.frac-grid .fc {
  background: var(--surface);
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
[data-rhythm="alt"] .section.surface .frac-grid .fc { background: var(--bg); }
.frac-grid .fc .fc-num {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px; color: var(--red);
  letter-spacing: 0.14em; text-transform: uppercase;
}
.frac-grid .fc .fc-label {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px; color: var(--text-muted);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.frac-grid .fc h4 {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 22px; line-height: 1.25; letter-spacing: -0.008em;
  color: var(--text-primary);
}
.frac-grid .fc p {
  font-size: 14px; line-height: 1.65; color: var(--text-secondary);
}

/* ============== Cost math section ============== */
.costs {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 96px; align-items: start;
}
.costs-lead h2 { font-size: clamp(40px, 7vw, 64px); }
.costs-body .lede { margin-bottom: 18px; }
.costs-body .body { margin-bottom: 0; max-width: 640px; }
.costs-body .body em { font-style: italic; color: var(--text-primary); }

.cost-math {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  background: var(--bg);
  display: flex; flex-direction: column; gap: 18px;
}
[data-rhythm="alt"] .section.surface .cost-math { background: var(--surface); }
.cost-math .cm-label {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.14em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}
.cost-math .cm-equation { display: flex; flex-direction: column; gap: 14px; }
.cost-math .cm-row {
  display: grid; grid-template-columns: 1fr 32px 1fr;
  align-items: center; gap: 16px;
}
.cost-math .cm-cell {
  padding: 14px 18px;
  font-family: var(--font-heading); font-weight: 600;
  font-size: 14px; letter-spacing: -0.005em;
  border-radius: 8px;
  text-align: center;
}
.cost-math .cm-cell.ghost {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-secondary);
}
.cost-math .cm-cell.solid {
  background: rgba(208, 20, 15, 0.10);
  border: 1px solid var(--red);
  color: var(--text-primary);
}
.cost-math .cm-op {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 22px; color: var(--red);
  text-align: center;
}
.cost-math .cm-note {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
  text-align: right;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
}

/* ============== When not the right call ============== */
.not-fit {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: start;
}
.not-fit-lead h2 { max-width: 520px; margin-bottom: 24px; }
.not-fit-lead .lede { margin-bottom: 18px; max-width: 540px; }
.not-fit-lead .body { max-width: 540px; }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: 0 0 14px 14px;
  padding: 36px;
  display: flex; flex-direction: column; gap: 18px;
}
[data-rhythm="alt"] .section.surface .callout { background: var(--bg); }
.callout .co-eyebrow {
  font-family: var(--font-heading); font-size: 11px; font-weight: 700;
  color: var(--red); text-transform: uppercase; letter-spacing: 0.16em;
}
.callout h3 {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 22px; line-height: 1.3; letter-spacing: -0.008em;
}
.callout p {
  font-size: 15px; line-height: 1.6; color: var(--text-secondary);
}
.callout .btn { align-self: flex-start; margin-top: 8px; }

/* ============== Responsive ============== */
@media (max-width: 980px) {
  .hww-hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .backward { grid-template-columns: 1fr; gap: 32px; }
  .stage-card .sc-head { grid-template-columns: 64px 1fr; gap: 18px; }
  .stage-card .sc-num { font-size: 48px; }
  .stage-card .sc-tag { grid-column: 1 / -1; align-self: flex-start; }
  .stage-card .sc-body { grid-template-columns: 1fr; gap: 12px; }
  .stage-card .sc-body > p, .sc-inputs, .sc-practices { grid-column: 1; }
  .sc-inputs, .sc-practices { grid-template-columns: 1fr; }
  .frac-grid { grid-template-columns: 1fr; }
  .costs { grid-template-columns: 1fr; gap: 32px; }
  .cost-math .cm-row { grid-template-columns: 1fr; }
  .cost-math .cm-op { text-align: left; }
  .not-fit { grid-template-columns: 1fr; gap: 32px; }
  .nav-links a.is-current::after { display: none; }
}
