/* ========================================
   HOLDINGS PAGE — APEX QUANT
   ======================================== */

/* ========================================
   NAV
   ======================================== */
.holdings-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 80px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-brand { display: flex; align-items: center; gap: 10px; }
.logo-mark { font-size: 20px; color: var(--accent); }
.logo-text { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 700; color: var(--text); }
.nav-links { display: flex; gap: 24px; }
.nav-link { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--text); }

/* ========================================
   PAGE HEADER
   ======================================== */
.holdings-header {
  position: relative;
  padding: 100px 80px 80px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.header-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}

.header-content { position: relative; z-index: 2; max-width: 760px; }

.page-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.label-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.page-headline {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.08;
}

.page-sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 620px;
  margin-bottom: 32px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.meta-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========================================
   FUND TABLE
   ======================================== */
.fund-table-section {
  padding: 64px 80px;
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.table-legend {
  display: flex;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.legend-dot.add { background: #22c55e; }
.legend-dot.cut { background: #ef4444; }
.legend-dot.hold { background: var(--muted); }

.fund-table-wrap { overflow-x: auto; }

.fund-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.fund-table thead tr {
  border-bottom: 1px solid var(--border);
}

.fund-table th {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 0 16px 16px 0;
  white-space: nowrap;
}

.fund-table th.num { text-align: right; }

.fund-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.fund-table tbody tr:hover { background: var(--surface); }

.fund-table td {
  padding: 20px 16px 20px 0;
  vertical-align: top;
}

.fund-name-cell { min-width: 180px; }
.fund-name { font-weight: 600; color: var(--text); }

.aum-cell {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.exposure-cell { text-align: right; }

.exposure-badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.exposure-badge.high { background: #F7B73122; color: var(--accent); }
.exposure-badge.med  { background: #F7B73111; color: #c4900a; }
.exposure-badge.low  { background: var(--surface2); color: var(--muted); }

.positions-cell { min-width: 380px; }

.positions-list { display: flex; flex-direction: column; gap: 4px; }

.position-row {
  display: grid;
  grid-template-columns: 48px 1fr 48px 40px;
  gap: 0;
  align-items: center;
  font-size: 12px;
}

.pos-ticker {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
}

.pos-name { color: var(--muted); }

.pos-weight {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  padding-right: 6px;
}

.pos-action {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 3px;
  text-align: center;
}

.action-add { background: #22c55e22; color: #22c55e; }
.action-cut { background: #ef444422; color: #ef4444; }
.action-hold { background: var(--surface2); color: var(--muted); }

.adds-cell, .cuts-cell { min-width: 140px; }

.adds-list, .cuts-list { display: flex; flex-wrap: wrap; gap: 4px; }

.ticker-chip {
  font-size: 11px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 3px;
}

.ticker-chip.add { background: #22c55e18; color: #22c55e; }
.ticker-chip.cut { background: #ef444418; color: #ef4444; }

.no-activity { color: var(--border); font-size: 13px; }

.thesis-cell { min-width: 260px; max-width: 320px; }
.thesis-text { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ========================================
   THESES
   ======================================== */
.theses-section {
  padding: 80px;
  border-bottom: 1px solid var(--border);
}

.theses-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 80px;
  align-items: start;
}

.section-eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.theses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.thesis-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  border-top: 3px solid var(--accent);
  transition: transform 0.2s, box-shadow 0.2s;
}

.thesis-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px #00000030;
}

.thesis-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.thesis-icon { color: var(--accent); }

.conviction-badge {
  font-size: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 3px;
}

.conviction-high { background: #F7B73133; color: var(--accent); }
.conviction-medium { background: #F7B73118; color: #c4900a; }

.thesis-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.thesis-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.thesis-funds { display: flex; flex-wrap: wrap; gap: 6px; }

.fund-chip {
  font-size: 11px;
  color: var(--accent);
  background: #F7B73118;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid #F7B73130;
}

/* Sidebar cards */
.theses-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.sidebar-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.sidebar-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.sidebar-sub { font-size: 12px; color: var(--muted); }

/* ========================================
   EMAIL CTA
   ======================================== */
.cta-section {
  padding: 100px 80px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 60% at 50% 0%, #F7B73106 0%, transparent 70%);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

.cta-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.cta-sub { font-size: 16px; color: var(--muted); line-height: 1.65; max-width: 480px; }

.cta-form-wrap { flex-shrink: 0; min-width: 380px; }

.cta-form { display: flex; flex-direction: column; gap: 12px; }

.form-row { display: flex; gap: 8px; }

.email-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.email-input:focus { border-color: var(--accent); }

.cta-btn {
  padding: 12px 24px;
  background: var(--accent);
  color: #0C0F14;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  white-space: nowrap;
}

.cta-btn:hover:not(:disabled) { opacity: 0.85; }
.cta-btn:active:not(:disabled) { transform: scale(0.98); }
.cta-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-note { font-size: 12px; color: var(--muted); }

.form-success {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #22c55e;
  padding: 12px 16px;
  background: #22c55e12;
  border: 1px solid #22c55e30;
  border-radius: 6px;
}

/* ========================================
   FOOTER
   ======================================== */
.holdings-footer {
  padding: 40px 80px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-tagline { font-size: 13px; color: var(--muted); margin-left: 8px; }

.footer-powered {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.powered-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: live-pulse 2s ease-in-out infinite;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1100px) {
  .holdings-nav { padding: 16px 40px; }
  .holdings-header { padding: 80px 40px 60px; }
  .fund-table-section { padding: 48px 40px; }
  .theses-section { padding: 60px 40px; }
  .theses-layout { grid-template-columns: 1fr; }
  .theses-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar-card { flex: 1; min-width: 140px; }
  .cta-section { padding: 80px 40px; }
  .cta-inner { flex-direction: column; gap: 40px; }
  .cta-form-wrap { min-width: 100%; width: 100%; }
  .holdings-footer { padding: 32px 40px; }
}

@media (max-width: 768px) {
  .theses-grid { grid-template-columns: 1fr; }
  .fund-table td, .fund-table th { padding: 12px 12px 12px 0; }
  .position-row { grid-template-columns: 44px 1fr 40px; }
  .pos-weight { display: none; }
  .form-row { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: 16px; align-items: flex-start; }
}

@media (max-width: 640px) {
  .holdings-nav { padding: 12px 24px; }
  .holdings-header { padding: 60px 24px 48px; }
  .fund-table-section { padding: 40px 24px; }
  .theses-section { padding: 48px 24px; }
  .cta-section { padding: 60px 24px; }
  .holdings-footer { padding: 24px; }
  .header-meta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--rule); }