/* ============================================================
   Provenience — pillars.css (v2 — rewrite)
   CSS for the pillar pages. Loaded by functions.php only on
   pages assigned the Pillar Page template.

   Consumes design tokens from design-system.css.
   ============================================================ */

/* Global link defence — prevent browser :visited purple anywhere on pillar
   pages, but NEVER touch buttons (they set their own text colour). */
.pillar-page a:not(.btn),
.pillar-page a:not(.btn):visited { color: inherit; }
.pillar-page a:not(.btn):hover { color: var(--color-gold); }

/* Inline prose links — discoverable without hover. Scoped to the prose
   containers only (hero sub, framework body, analysis block body, implications
   card body) so card / sub-nav / footer links are unaffected. The link sits in
   the surrounding text colour (color:inherit, above) and is signalled by an
   underline in that same colour; hover shifts to gold. Applies to cluster and
   standalone pages (both carry .pillar-page). */
.pillar-page .hero-sub a:not(.btn),
.pillar-page .philosophy-right-text a:not(.btn),
.pillar-page .capability-body a:not(.btn),
.pillar-page .trigger-card a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.pillar-page .hero-sub a:not(.btn):hover,
.pillar-page .philosophy-right-text a:not(.btn):hover,
.pillar-page .capability-body a:not(.btn):hover,
.pillar-page .trigger-card a:not(.btn):hover {
  color: var(--color-gold);
}

/* ============================================================
   PILLAR HERO — single-column (the big "01" number block was
   removed; pillars are architectural components, not stages)
   ============================================================ */
.pillar-hero {
  position: relative;
  padding: 120px 0 100px;
  background: var(--color-bg);
  overflow: hidden;
}
.pillar-hero-bg {
  position: absolute; inset: 0;
  opacity: 0.55;
  pointer-events: none;
}
.pillar-hero .hero-content { max-width: 820px; }
.pillar-hero .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--color-text-tertiary);
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  margin-bottom: 24px;
}
.pillar-hero .hero-eyebrow::before {
  content: ""; display: inline-block; width: 1px; height: 18px;
  background: var(--color-gold);
}
.pillar-hero h1 {
  font-family: var(--font-display);
  font-size: 56px; line-height: 64px; font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.015em;
  margin-bottom: 24px;
  max-width: 820px;
}
.pillar-hero .hero-tagline {
  font-family: var(--font-display); font-style: italic;
  font-size: 24px; line-height: 34px; font-weight: 400;
  color: var(--color-gold);
  max-width: 720px;
  margin-bottom: 24px;
}
.pillar-hero .hero-sub {
  font-size: 18px; line-height: 28px;
  color: var(--color-text-secondary);
  max-width: 720px;
  margin-bottom: 40px;
}
.pillar-hero .hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   PILLAR STICKY SUB-NAV — Per-Page Section TOC
   Visible by default and sticks below the main navbar. (Earlier
   it depended on JS adding .is-visible, which was a single point
   of failure — now it's pure CSS. JS only drives the progress bar
   and active-section highlight.)
   ============================================================ */
.pillar-nav {
  position: sticky; top: 76px; z-index: 90;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.pillar-nav-inner { display: flex; flex-direction: column; padding-top: 9px; }
.pillar-nav-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pillar-nav-label {
  font-size: 11px; color: var(--color-text-tertiary);
  text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;
  white-space: nowrap;
}
.pillar-nav-links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pillar-nav-link {
  font-size: 13px; color: var(--color-text-secondary);
  padding: 6px 12px; border-radius: 4px; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: color 150ms, background 150ms;
  border: 1px solid transparent;
}
.pillar-nav-link:hover { color: var(--color-gold); background: var(--color-bg); }
.pillar-nav-link.active {
  color: var(--color-gold); background: var(--color-bg);
  border-color: var(--color-border); font-weight: 600;
}

/* Scroll-progress bar — fills as user scrolls through the page */
.scroll-progress {
  height: 2px; background: var(--color-border);
  margin-top: 8px;
  border-radius: 1px; overflow: hidden;
}
.scroll-progress-fill {
  height: 100%; width: 0%;
  background: var(--color-gold);
  transition: width 100ms linear;
}

/* ============================================================
   SECTION 2 — PHILOSOPHY (50/50 columns)
   ============================================================ */
.sec-philosophy { padding: 96px 0; }
.philosophy-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
}
.philosophy-left .eyebrow { margin-bottom: 16px; }
.philosophy-left h2 {
  font-size: 36px; line-height: 44px; font-weight: 600;
  color: var(--color-text-primary); letter-spacing: -0.01em;
  margin: 0;
}
.philosophy-right p {
  font-size: 18px; line-height: 28px;
  color: var(--color-text-secondary);
  max-width: 100%;
}

/* ============================================================
   SECTION 3 — CAPABILITIES + CLUSTERS (merged)
   ============================================================ */
.sec-capabilities { padding: 96px 0; }
.capabilities-header { margin-bottom: 64px; max-width: 720px; }
.capabilities-header h2 {
  font-size: 36px; line-height: 44px; font-weight: 600;
  color: var(--color-text-primary); letter-spacing: -0.01em;
  margin: 8px 0 0;
}
.capabilities-list { display: flex; flex-direction: column; gap: 0; }
.capability-row {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 32px; align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-divider);
}
.capability-row:last-child { border-bottom: 0; }
.capability-num {
  font-family: var(--font-display);
  font-size: 22px; color: var(--color-gold);
  letter-spacing: 0.02em; font-weight: 500;
}
.capability-title {
  font-family: var(--font-body); font-size: 22px; line-height: 30px;
  font-weight: 600; color: var(--color-text-primary);
  margin: 0 0 8px;
}
.capability-body p {
  color: var(--color-text-secondary);
  font-size: 16px; line-height: 26px;
  max-width: 680px; margin: 0;
}

/* --- Clusters band, inside the capabilities section --- */
.clusters-band {
  margin-top: 80px; padding-top: 64px;
  border-top: 1px solid var(--color-divider);
}
.clusters-header { margin-bottom: 48px; max-width: 720px; }
.clusters-heading {
  font-size: 28px; line-height: 36px; font-weight: 500;
  color: var(--color-text-primary);
  margin: 8px 0 12px;
}
.clusters-intro {
  color: var(--color-text-secondary);
  font-size: 16px; line-height: 26px; margin: 0;
}
.cluster-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cluster-card {
  display: flex; flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 28px;
  min-height: 200px;
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.cluster-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.cluster-card h4 {
  font-family: var(--font-body);
  font-size: 18px; line-height: 26px; font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 12px;
}
.cluster-card:hover h4 { color: var(--color-gold); }
.cluster-card p {
  font-size: 14px; line-height: 22px;
  color: var(--color-text-secondary);
  margin: 0 0 16px;
  flex: 1;
}
.cluster-card-arrow {
  color: var(--color-gold);
  font-weight: 600; font-size: 16px;
  align-self: flex-start;
}

/* ============================================================
   SECTION 4 — TRIGGERS (3 cards)
   ============================================================ */
.sec-triggers { padding: 96px 0; background: var(--color-bg-highlight); }
.triggers-header { margin-bottom: 48px; max-width: 720px; }
.triggers-header h2 {
  font-size: 36px; line-height: 44px; font-weight: 600;
  color: var(--color-text-primary); letter-spacing: -0.01em;
  margin: 8px 0 16px;
}
.triggers-header p { color: var(--color-text-secondary); }
.triggers-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.trigger-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 32px;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.trigger-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.trigger-num {
  font-family: var(--font-display); font-style: italic;
  font-size: 13px; color: var(--color-gold);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.trigger-card h4 {
  font-size: 20px; line-height: 28px; font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 12px;
}
.trigger-card p {
  font-size: 14px; line-height: 22px;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ============================================================
   SECTION 5 — ADVISORY ENTRY (50/50)
   ============================================================ */
.sec-advisory { padding: 96px 0; }
.advisory-entry {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
}
.advisory-left .eyebrow { margin-bottom: 16px; }
.advisory-left h2 {
  font-size: 36px; line-height: 44px; font-weight: 600;
  color: var(--color-text-primary); letter-spacing: -0.01em;
  margin: 0;
}
.advisory-right p {
  font-size: 18px; line-height: 28px;
  color: var(--color-text-secondary);
  margin: 0 0 24px;
}

/* ============================================================
   SECTION 6 — INSIGHTS (3 cards)
   ============================================================ */
.sec-insights { padding: 96px 0; background: var(--color-bg-alt); }
.insights-header { margin-bottom: 48px; max-width: 720px; }
.insights-header h2 {
  font-size: 36px; line-height: 44px; font-weight: 600;
  color: var(--color-text-primary); letter-spacing: -0.01em;
  margin: 8px 0 0;
}
.insights-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.insight-card {
  display: flex; flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.insight-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.insight-category {
  font-size: 11px; font-weight: 600;
  color: var(--color-text-tertiary);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 16px;
}
.insight-title {
  font-family: var(--font-display);
  font-size: 20px; line-height: 28px; font-weight: 500;
  color: var(--color-text-primary);
  margin: 0 0 12px;
  transition: color 150ms;
}
.insight-card:hover .insight-title { color: var(--color-gold); }
.insight-summary {
  color: var(--color-text-secondary);
  font-size: 14px; line-height: 22px;
  margin: 0 0 16px;
  flex: 1;
}
.insight-arrow {
  color: var(--color-gold); font-weight: 600;
  align-self: flex-start;
}

/* ============================================================
   SECTION 7 — CLOSING CTA (dark)
   ============================================================ */
.pillar-footer-cta { padding: 96px 0; }
.pillar-footer-cta .closing-cta-inner { max-width: 720px; }
.pillar-footer-cta h2 {
  font-size: 36px; line-height: 44px; font-weight: 600;
  color: var(--color-text-on-dark);
  margin: 0 0 16px;
}
.pillar-footer-cta .body-large {
  color: var(--color-text-on-dark-2);
  margin-bottom: 32px;
}
.pillar-footer-cta .btn-accent {
  background: var(--color-gold); color: var(--color-navy);
  border: 1px solid var(--color-gold);
}
.pillar-footer-cta .btn-accent:hover {
  background: var(--color-gold-hover); border-color: var(--color-gold-hover);
  color: var(--color-navy);
}
.pillar-footer-cta .contact-strip {
  margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center;
  color: var(--color-text-on-dark-2); font-size: 14px;
}
.pillar-footer-cta .contact-strip a { color: var(--color-text-on-dark); text-decoration: none; }
.pillar-footer-cta .contact-strip a:hover { color: var(--color-gold); }
.pillar-footer-cta .contact-strip .divider { color: var(--color-text-on-dark-2); }

/* ============================================================
   STUB PAGES (Pillars 2/3/4)
   ============================================================ */
.pillar-page--stub .pillar-hero { padding: 100px 0 80px; }

/* ============================================================
   MOBILE RESPONSIVENESS
   ============================================================ */
@media (max-width: 900px) {
  .pillar-hero { padding: 64px 0 48px; }
  .pillar-hero h1 { font-size: 32px; line-height: 1.2; }
  .pillar-hero .hero-tagline { font-size: 18px; line-height: 26px; }
  .pillar-hero .hero-sub { font-size: 16px; line-height: 24px; }
  .pillar-hero .hero-ctas { flex-direction: column; align-items: stretch; }
  .pillar-hero .hero-ctas .btn { width: 100%; text-align: center; }

  .philosophy-grid,
  .advisory-entry,
  .cluster-grid,
  .triggers-grid,
  .insights-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .capability-row { grid-template-columns: 56px 1fr; gap: 16px; }

  .sec-philosophy,
  .sec-capabilities,
  .sec-triggers,
  .sec-advisory,
  .sec-insights,
  .pillar-footer-cta { padding: 56px 0; }

  .philosophy-left h2,
  .capabilities-header h2,
  .triggers-header h2,
  .advisory-left h2,
  .insights-header h2,
  .pillar-footer-cta h2 { font-size: 26px; line-height: 32px; }

  .pillar-nav-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pillar-nav-link { font-size: 12px; padding: 4px 8px; }
}
