/* ====================================
   Reg D Fund — Investor Dashboard
   Dark/gold brand aesthetic
   ==================================== */

:root {
  --navy:    #0d1b2a;
  --navy-2:  #1a2e45;
  --navy-3:  #243b55;
  --navy-4:  #2e4a66;
  --gold:    #b8935a;
  --gold-lt: #d4b07a;
  --gold-dk: #96754a;
  --ivory:   #f8f4ef;
  --paper:   #f0ebe2;
  --muted:   #6a7f96;
  --white:   #ffffff;
  --green:   #4caf50;
  --red:     #e57373;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

/* ─── Page Layout ─── */
.fund-page {
  min-height: 100vh;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ─── Section commons ─── */
.section-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 300;
  color: var(--ivory);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* ─── Header Hero ─── */
.fund-hero {
  padding: 4rem 4rem 0;
  background: var(--navy);
  border-bottom: 1px solid rgba(184, 147, 90, 0.15);
}
.fund-hero__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding-bottom: 3.5rem;
}
.fund-hero__badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(184, 147, 90, 0.1);
  border: 1px solid rgba(184, 147, 90, 0.25);
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.75rem;
}
.fund-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300;
  color: var(--ivory);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.fund-hero p {
  font-size: 1rem;
  color: rgba(248, 244, 239, 0.55);
  max-width: 55ch;
  line-height: 1.75;
  margin-bottom: 3rem;
}

/* ─── AUM Stats Row ─── */
.fund-aum {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border: 1px solid rgba(184, 147, 90, 0.15);
  background: rgba(184, 147, 90, 0.04);
}
.aum-card {
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(184, 147, 90, 0.1);
  position: relative;
}
.aum-card:last-child { border-right: none; }
.aum-card__label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(184, 147, 90, 0.6);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.aum-card__value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}
.aum-card__sub {
  font-size: 0.7rem;
  color: rgba(248, 244, 239, 0.35);
  letter-spacing: 0.03em;
}
.aum-card__tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

/* ─── Dashboard Grid ─── */
.fund-dashboard {
  padding: 3.5rem 4rem;
  max-width: 1300px;
  margin: 0 auto;
}
.fund-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2px;
  margin-bottom: 2px;
}

/* ─── Panel Base ─── */
.fund-panel {
  background: var(--navy-2);
  padding: 2.25rem;
}
.fund-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(248, 244, 239, 0.06);
}
.fund-panel__header-left {}
.fund-panel__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ivory);
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}
.fund-panel__sub {
  font-size: 0.78rem;
  color: rgba(248, 244, 239, 0.35);
}

/* ─── Performance Chart ─── */
.perf-chart-wrap {
  margin-bottom: 1.5rem;
}
.perf-chart-svg { width: 100%; overflow: visible; }

/* ─── Metric row in perf panel ─── */
.perf-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(248, 244, 239, 0.06);
}
.perf-metric {
  padding: 1.25rem 1rem;
  border-right: 1px solid rgba(248, 244, 239, 0.06);
}
.perf-metric:last-child { border-right: none; }
.perf-metric__label {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(248, 244, 239, 0.35);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.perf-metric__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ivory);
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}
.perf-metric__delta {
  font-size: 0.72rem;
  font-weight: 500;
}
.delta-pos { color: var(--green); }
.delta-neg { color: var(--red); }

/* ─── Holdings Table ─── */
.holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.holdings-table th {
  padding: 0.7rem 0.75rem;
  text-align: left;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 244, 239, 0.3);
  font-weight: 500;
  border-bottom: 1px solid rgba(248, 244, 239, 0.06);
}
.holdings-table td {
  padding: 0.9rem 0.75rem;
  color: rgba(248, 244, 239, 0.7);
  border-bottom: 1px solid rgba(248, 244, 239, 0.04);
  vertical-align: middle;
}
.holdings-table tbody tr:last-child td { border-bottom: none; }
.holdings-table tbody tr:hover td { background: rgba(248, 244, 239, 0.02); }
.ticker {
  font-weight: 500;
  color: var(--ivory);
  letter-spacing: 0.04em;
}
.allocation-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.alloc-bar {
  height: 4px;
  background: rgba(184, 147, 90, 0.2);
  border-radius: 2px;
  flex-shrink: 0;
}
.pnl-pos { color: var(--green); }
.pnl-neg { color: var(--red); }

/* ─── Right sidebar panels ─── */
.fund-sidebar {}
.fund-panel--fee {
  margin-bottom: 2px;
}
.fee-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(248, 244, 239, 0.05);
}
.fee-tier:last-child { border-bottom: none; }
.fee-tier__name {
  font-size: 0.82rem;
  color: rgba(248, 244, 239, 0.65);
}
.fee-tier__rate {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 400;
}
.fee-tier__note {
  font-size: 0.7rem;
  color: rgba(248, 244, 239, 0.3);
  display: block;
  margin-top: 0.2rem;
  text-align: right;
}

/* ─── Performance Attribution ─── */
.attr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(248, 244, 239, 0.05);
}
.attr-row:last-child { border-bottom: none; }
.attr-row__label {
  font-size: 0.8rem;
  color: rgba(248, 244, 239, 0.55);
}
.attr-row__value {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ivory);
}

/* ─── Risk Metrics ─── */
.risk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(248, 244, 239, 0.06);
  border: 1px solid rgba(248, 244, 239, 0.06);
}
.risk-item {
  background: var(--navy-2);
  padding: 1.25rem;
}
.risk-item__label {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(248, 244, 239, 0.3);
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.risk-item__value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ivory);
  line-height: 1;
  letter-spacing: -0.01em;
}
.risk-item__note {
  font-size: 0.7rem;
  color: rgba(248, 244, 239, 0.3);
  margin-top: 0.35rem;
}

/* ─── CTA Strip ─── */
.fund-cta {
  background: rgba(184, 147, 90, 0.07);
  border: 1px solid rgba(184, 147, 90, 0.2);
  padding: 2.5rem;
  margin: 0 4rem 3rem;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.fund-cta__text {}
.fund-cta__headline {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.fund-cta__sub {
  font-size: 0.85rem;
  color: rgba(248, 244, 239, 0.45);
  max-width: 55ch;
  line-height: 1.6;
}
.fund-cta__actions { display: flex; gap: 1rem; flex-shrink: 0; }

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-lt); }
.btn--outline {
  border: 1px solid rgba(248, 244, 239, 0.3);
  color: rgba(248, 244, 239, 0.75);
}
.btn--outline:hover { border-color: var(--ivory); color: var(--ivory); background: rgba(248, 244, 239, 0.05); }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .fund-aum { grid-template-columns: repeat(3, 1fr); }
  .aum-card:nth-child(3) { border-right: none; }
  .fund-grid { grid-template-columns: 1fr; }
  .fund-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
}
@media (max-width: 768px) {
  .fund-hero { padding: 3rem 2rem 0; }
  .fund-aum { grid-template-columns: repeat(2, 1fr); }
  .aum-card:nth-child(2n) { border-right: none; }
  .fund-dashboard { padding: 2.5rem 2rem; }
  .fund-sidebar { grid-template-columns: 1fr; }
  .fund-cta { margin: 0 2rem 2.5rem; flex-direction: column; align-items: flex-start; }
  .perf-metrics { grid-template-columns: 1fr; }
  .perf-metric { border-right: none; border-bottom: 1px solid rgba(248, 244, 239, 0.06); }
  .perf-metric:last-child { border-bottom: none; }
}