/* ========================================================
   The Fund Page Redesign Style overrides
   Covers glass mountain background stage, structural organization
   grids, and premium data-sheet tables.
   ======================================================= */

/* ---------- Philosophy · interactive principle index ----------
   One principle is open at a time in a fixed-height slot (--fp-open, set by
   fund.js to the tallest description). Because the open slot is always the
   same height and exactly one is ever open, the section height never changes
   on hover — so nothing reflows and the mountain stays perfectly still. */
.fund-principles {
  margin-top: 44px;
  max-width: 560px;
  position: relative;
  z-index: 3;
}
.fp {
  position: relative;
  padding: 20px 0 20px 30px;
  border-top: 1px solid var(--line-soft);
  outline: none;
}
.fp:last-child { border-bottom: 1px solid var(--line-soft); }

/* left accent rail that draws in on the active principle */
.fp::before {
  content: "";
  position: absolute; left: 0; top: -1px; bottom: -1px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-tint));
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.55s var(--ease);
}
.fp.is-active::before { transform: scaleY(1); }

.fp-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  cursor: pointer;
  transition: transform 0.45s var(--ease);
}
.fp.is-active .fp-head { transform: translateX(6px); }

.fp-num {
  flex: none;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  padding-top: 0.4em;
  transition: color 0.4s var(--ease);
}
.fp.is-active .fp-num { color: var(--accent); }

.fp-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  transition: color 0.4s var(--ease);
}
.fp.is-active .fp-title { color: var(--ink); }
.fp-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-faint);
  transition: color 0.4s var(--ease);
}
.fp.is-active .fp-sub { color: var(--accent-deep); }

/* the description — fixed open height keeps the layout (and mountain) fixed */
.fp-body {
  height: 0;
  margin-top: 0;
  padding-left: 44px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: height 0.55s var(--ease), opacity 0.5s var(--ease),
              transform 0.55s var(--ease), margin-top 0.55s var(--ease);
}
.fp.is-active .fp-body {
  height: var(--fp-open, 7.5em);
  margin-top: 14px;
  opacity: 1;
  transform: none;
}
.fp-body p {
  margin: 0;
  max-width: 46ch;
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--ink-soft);
}

/* no-JS / touch fallback: reveal every description at natural height */
@media (hover: none) {
  .fp-body { height: auto; opacity: 1; transform: none; margin-top: 14px; }
}
@media (max-width: 700px) {
  .fund-principles { max-width: none; }
  .fp-body { padding-left: 0; }
  .fp-body p { max-width: none; }
}

/* keep the mountain to the right of the principle text on narrower screens */
@media (max-width: 1240px) {
  body.fund #philosophy .philosophy-mountain { width: min(50%, 640px); }
}
@media (max-width: 980px) {
  body.fund #philosophy .philosophy-mountain { width: min(72%, 600px); opacity: 0.4; }
}

/* Fixed WebGL Background canvas container (similar to home.stage) */
html.fx3d .fund-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(120% 92% at 74% 8%, #fbf5ec 0%, #f4ecdc 45%, #eee2cf 100%);
}

/* Override glass section wrappers on fund page for WebGL transparency */
html.fx3d body.fund .sec-glass {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: none;
  box-shadow: none;
}

/* ---------- Fund Structure Diagram & Connections ---------- */
.structure-diagram-container {
  position: relative;
  width: 100%;
  margin-top: 36px;
  padding: 20px 0;
}

.structure-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

@media(max-width: 980px) {
  .structure-connections {
    display: none;
  }
}

.structure-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 32px;
  align-items: center;
}

@media(max-width: 980px) {
  .structure-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.struct-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.struct-col-center {
  gap: 48px;
  align-items: center;
}

.struct-card {
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(40, 28, 16, 0.08);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  box-shadow: 0 4px 18px -12px rgba(60, 48, 36, 0.14);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

html.fx3d .struct-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(40, 28, 16, 0.08);
}

.struct-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(210, 80, 0, 0.28);
  box-shadow: 0 14px 32px -16px rgba(60, 48, 36, 0.2);
}

html.fx3d .struct-card:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(210, 80, 0, 0.28);
  box-shadow: 0 14px 32px -16px rgba(60, 48, 36, 0.2);
}

/* the hub — the single accent focal point */
.struct-card.struct-hub {
  background: rgba(252, 105, 0, 0.045);
  border-color: rgba(210, 80, 0, 0.22);
  box-shadow: 0 8px 30px -16px rgba(210, 80, 0, 0.22);
  text-align: center;
  padding: 26px;
}

html.fx3d .struct-card.struct-hub {
  background: rgba(252, 105, 0, 0.045);
  border-color: rgba(210, 80, 0, 0.22);
}

.struct-card.struct-hub:hover {
  border-color: rgba(210, 80, 0, 0.45);
  box-shadow: 0 12px 36px -16px rgba(210, 80, 0, 0.3);
}

html.fx3d .struct-card.struct-hub:hover {
  border-color: rgba(210, 80, 0, 0.45);
}

.struct-card strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 5px;
  display: block;
}

html.fx3d .struct-card strong {
  color: var(--ink);
}

.struct-card span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
  font-weight: 600;
}

html.fx3d .struct-card span {
  color: var(--ink-faint);
}

.struct-card.struct-hub span {
  color: var(--accent-deep);
}

html.fx3d .struct-card.struct-hub span {
  color: var(--accent-deep);
}

/* ---------- Connections — thin, warm hairlines with a soft travelling pulse ---------- */
.connection-path {
  fill: none;
  stroke: rgba(60, 48, 36, 0.09);
  stroke-width: 1;
  stroke-linejoin: round;
  stroke-linecap: round;
}

html.fx3d .connection-path {
  stroke: rgba(60, 48, 36, 0.09);
}

.connection-pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.65;
}

html.fx3d .connection-pulse {
  stroke: var(--accent);
}

/* ---------- Fund at a glance Table ---------- */
.glance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.glance-table tr {
  border-bottom: 1px solid rgba(18, 25, 63, 0.08);
}

html.fx3d .glance-table tr {
  border-bottom-color: rgba(34, 20, 10, 0.10);
}

.glance-table tr:last-child {
  border-bottom: none;
}

.glance-table td {
  padding: 16px 12px;
  font-size: 13.5px;
  vertical-align: middle;
}

@media(max-width: 600px) {
  .glance-table td {
    padding: 12px 6px;
    font-size: 12.5px;
  }
}

.glance-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  width: 32%;
}

html.fx3d .glance-table td:first-child {
  color: var(--ink);
}

.glance-table td:last-child {
  color: var(--ink-soft);
  line-height: 1.45;
}

html.fx3d .glance-table td:last-child {
  color: var(--ink-soft);
}

/* ---------- Ethos & Mission Centered Alignment ---------- */
.ethos-mission-center {
  text-align: center;
}
.ethos-mission-center h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.ethos-mission-center p {
  max-width: 52ch;
  margin: 0 auto;
}

/* ---------- Combined Agency Box ---------- */
.struct-agency-combined {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
}
.agency-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(40, 28, 16, 0.07);
}
.agency-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.agency-item strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
  line-height: 1.3;
}
.agency-item span {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  font-weight: 600;
}

