/* ============================================================
   TERAVENT — Methodology Framework Page Stylesheet
   Load order: style.css → pathways.css → methodology.css

   style.css   — variables, reset, nav, footer, buttons, typography
   pathways.css — page-hero, filter-bar, .pathway-tag-sm, .tag-*,
                  .toggle-icon, .mrv-bars, .mrv-bar-*, .pathways-cta,
                  .hero-stat-row/.box, .page-title, .page-subtitle,
                  .page-breadcrumb, .breadcrumb-sep, .page-hero-*
   This file  — only the mf-* components and modifiers unique
                to methodology.html (overview strip, accordion cards,
                metrics grid, criteria list, process steps).
   ============================================================ */

/* ─── HERO CHIPS ─── */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  animation: fadeUp 0.8s 0.6s ease both;
}
.hero-chip {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 222, 206, 0.65);
  border: 1px solid rgba(200, 222, 206, 0.18);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
}

/* ─── OVERVIEW STRIP ─── */
.mf-overview {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}
.mf-overview-inner {
  display: flex;
  align-items: stretch;
  max-width: 100%;
}
.mf-overview-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.8rem 2.4rem;
  flex: 1;
  min-width: 0;
}
.mf-overview-divider {
  width: 1px;
  background: var(--border-light);
  flex-shrink: 0;
  align-self: stretch;
}
.mf-overview-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.mf-overview-body {
  min-width: 0;
}
.mf-overview-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.3rem;
}
.mf-overview-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ─── METHODOLOGY LISTING SECTION ─── */
.mf-listing {
  background: var(--surface-base);
  padding: 3rem 7rem 6rem;
}

/* ─── METHODOLOGY ITEM (accordion card) ─── */
.mf-item {
  background: var(--white);
  border: 1px solid var(--border-light);
  margin-bottom: 2px;
  transition: border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.mf-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.3s;
}
.mf-item.active {
  border-color: var(--border-mid);
}

/* Category accent colours on active left border */
.mf-item[data-category="marine"].active::before    { background: var(--sky); }
.mf-item[data-category="terrestrial"].active::before { background: var(--forest); }
.mf-item[data-category="engineered"].active::before { background: var(--gold-mid); }
.mf-item[data-category="geochemical"].active::before { background: #8a6a2e; }

.mf-item.filtered-out {
  display: none;
}

/* ─── ACCORDION HEADER ─── */
.mf-header {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: 0;
  align-items: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
  user-select: none;
}
.mf-header:hover {
  background: rgba(232, 242, 235, 0.4);
}

/* Number column */
.mf-num-col {
  padding: 2rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--border-light);
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mf-num-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Title column */
.mf-title-col {
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.mf-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.mf-header:hover .mf-icon-wrap {
  transform: scale(1.06);
}
.mf-icon-wrap.marine      { background: rgba(46, 107, 126, 0.12); }
.mf-icon-wrap.terrestrial { background: rgba(45,  94,  58, 0.12); }
.mf-icon-wrap.engineered  { background: rgba(176, 142, 68, 0.12); }
.mf-icon-wrap.geochemical { background: rgba(138, 106, 46, 0.12); }

.mf-title-text h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.mf-title-text p {
  font-size: 0.81rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Meta column */
.mf-meta-col {
  padding: 2rem 2rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 240px;
}
.mf-version-badge {
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  background: var(--surface-dark);
  color: rgba(200, 222, 206, 0.7);
  border: 1px solid rgba(200, 222, 206, 0.15);
  white-space: nowrap;
}

/* Toggle column */
.mf-toggle-col {
  padding: 2rem 2rem;
  border-left: 1px solid var(--border-light);
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reuse .toggle-icon from pathways.css — active state driven by .mf-item.active */
.mf-item.active .toggle-icon {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--white);
  transform: rotate(180deg);
}

/* ─── ACCORDION PANEL ─── */
.mf-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.mf-item.active .mf-panel {
  max-height: 1200px; /* tall enough for any content */
}
.mf-panel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  background: var(--border-light);
  border-top: 1px solid var(--border-light);
}
.mf-panel-section {
  background: var(--white);
  padding: 2.5rem 2.5rem 2.8rem;
  display: flex;
  flex-direction: column;
}
.mf-panel-section + .mf-panel-section {
  border-left: 1px solid var(--border-light);
}

/* Panel label (gold mono heading) */
.mf-panel-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-mid);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mf-panel-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-gold);
  opacity: 0.5;
}

/* Panel typography */
.mf-panel-section h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.8rem;
  line-height: 1.25;
}
.mf-panel-section p {
  font-size: 0.84rem;
  line-height: 1.72;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}
.mf-panel-section p:last-child {
  margin-bottom: 0;
}

/* ─── METRICS GRID ─── */
.mf-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-light);
  margin-top: 1.5rem;
}
.mf-metric {
  background: var(--surface-tinted);
  padding: 0.9rem 1rem;
}
.mf-metric-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--forest);
  line-height: 1;
}
.mf-metric-lbl {
  font-family: 'DM Mono', monospace;
  font-size: 0.53rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ─── CRITERIA LIST (additionality section) ─── */
.mf-criteria-list {
  list-style: none;
  margin: 0.5rem 0 1.2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mf-criteria-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.mf-criteria-list li:last-child {
  border-bottom: none;
}
.mf-crit-icon {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  margin-top: 0.1rem;
}
.mf-crit-icon.pass { color: var(--forest); }
.mf-crit-icon.warn { color: var(--gold-mid); }
.mf-crit-icon.fail { color: #c0392b; }

/* ─── PATHWAY DETAIL LINK ─── */
.mf-detail-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
  transition: gap 0.2s;
  text-decoration: none;
}
.mf-detail-link:hover {
  gap: 0.75rem;
}

/* ─── MRV BAR ANIMATION on panel open ─── */
/* mrv-bars, mrv-bar-row, mrv-bar-label, mrv-bar-track are in pathways.css.
   Only the animation trigger needs repointing from .pathway-item.active
   to .mf-item.active */
.mf-panel .mrv-bar-fill {
  width: 0;
  transition: width 0.8s ease 0.2s;
}
.mf-item.active .mf-panel .mrv-bar-fill {
  width: attr(data-width); /* JS sets inline style; CSS fallback */
}

/* ─── DEVELOPMENT PROCESS SECTION ─── */
.mf-process {
  background: var(--cream);
  padding: 7rem 7rem 8rem;
  border-top: 4px solid var(--forest);
}
.mf-process-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.mf-process-header {
  max-width: 600px;
  margin-bottom: 5rem;
}
.mf-process-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 0.9rem;
}
.mf-process-title em {
  font-style: italic;
  color: var(--forest);
}
.mf-process-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin: 0;
}

/* Five-step horizontal timeline */
.mf-process-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.mf-step {
  flex: 1;
  min-width: 0;
}
.mf-step-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--border-mid);
  line-height: 1;
  margin-bottom: 1rem;
}
.mf-step-body h4 {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.mf-step-body p {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}
.mf-step-connector {
  width: 2.5rem;
  height: 1px;
  background: var(--border-mid);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1.4rem; /* vertically align with step number midpoint */
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
  .mf-listing { padding: 3rem 4rem 5rem; }
  .mf-process  { padding: 5rem 4rem 6rem; }
  .mf-overview-item { padding: 1.5rem 1.6rem; }
  .mf-panel-inner { grid-template-columns: 1fr 1fr; }
  .mf-panel-section:last-child { grid-column: span 2; }
}

@media (max-width: 900px) {
  .mf-listing { padding: 2.5rem 2rem 4rem; }
  .mf-process  { padding: 4rem 2.5rem 5rem; }

  .mf-overview-inner { flex-wrap: wrap; }
  .mf-overview-item  { flex: 1 1 48%; }
  .mf-overview-divider { display: none; }

  .mf-header { grid-template-columns: 70px 1fr auto; }
  .mf-meta-col { display: none; } /* hidden on mobile, tags visible inside panel */

  .mf-panel-inner {
    grid-template-columns: 1fr;
  }
  .mf-panel-section:last-child { grid-column: auto; }
  .mf-panel-section + .mf-panel-section { border-left: none; border-top: 1px solid var(--border-light); }

  .mf-process-steps {
    flex-direction: column;
    gap: 2rem;
  }
  .mf-step-connector {
    display: none;
  }
}

@media (max-width: 600px) {
  .mf-overview-item { flex: 1 1 100%; }
  .mf-num-col { display: none; }
  .mf-header  { grid-template-columns: 1fr auto; }
  .mf-title-col { padding: 1.4rem 1.2rem; }
  .mf-toggle-col { padding: 1.4rem 1rem; }
}
