/* ==========================================================================
   PAGE STYLES — pages.css
   ========================================================================== */

/* ═══════════════ HERO ═══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

/* Clean background: faint grid + thin accent lines */
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}
.hero__bg-line {
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: 0.5;
}
.hero__bg-vline {
  position: absolute; top: 0; bottom: 0; left: 15%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.03), transparent);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}

.hero__name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 0.95;
  color: var(--text-primary);
  margin-bottom: 28px;
}
.hero__name .char {
  display: inline-block;
  opacity: 0;
}

.hero__divider {
  width: 60px; height: 1px;
  background: var(--accent);
  margin-bottom: 28px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}

.hero__subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 40px;
  opacity: 0;
}

.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__ctas .btn { opacity: 0; transform: translateY(16px); }

.hero__scroll {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  opacity: 0;
}
.hero__scroll-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.hero__scroll-line {
  width: 1px; height: 40px;
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute; top: -100%; left: 0;
  width: 1px; height: 100%;
  background: var(--accent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 0% { top: -100%; } 100% { top: 100%; } }

/* ═══════════════ PAGE HEADERS (About, Society, Equity) ════════════════ */
.page-header {
  padding: var(--space-24) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}
.page-header__bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 80% at 30% 50%, black 10%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 30% 50%, black 10%, transparent 60%);
}
.page-header__title {
  font-size: var(--text-3xl);
  max-width: 650px;
  margin-bottom: var(--space-6);
  position: relative;
}
.text-accent { color: var(--accent); }

/* ═══════════════ ABOUT ═════════════════════════════════════════════════ */
.mission-statement {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
  border-left: 2px solid var(--accent);
  padding-left: var(--space-6);
  position: relative;
}

.timeline { position: relative; padding-left: var(--space-8); }
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline__item { position: relative; padding-bottom: var(--space-10); }
.timeline__dot {
  position: absolute;
  left: calc(-1 * var(--space-8) - 4px);
  top: 6px;
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 1px;
  border: 2px solid var(--bg-primary);
}
.timeline__year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.timeline__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.timeline__desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.65; }

/* ═══════════════ SOCIETY ═══════════════════════════════════════════════ */
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}
.filter-tab {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 7px 16px;
  background: transparent;
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}
.filter-tab:hover { border-color: var(--accent-line); color: var(--accent); }
.filter-tab--active {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.society-card__header {
  display: flex; align-items: center;
  gap: var(--space-4); margin-bottom: var(--space-4);
}
.society-card__icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.society-card__role {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ═══════════════ EQUITY RESEARCH ═══════════════════════════════════════ */
.research-card { border-left: 2px solid var(--accent); }
.research-card__ticker {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
}
.research-card__thesis {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-2);
  line-height: 1.65;
}
.research-card__meta {
  display: flex; gap: var(--space-4);
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

/* ═══════════════ PORTFOLIO TRACKER ═════════════════════════════════════ */
.portfolio {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.portfolio__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}
.portfolio__live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  margin-right: var(--space-2);
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.portfolio__updated {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.portfolio__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-8);
}
.summary-card {
  background: var(--bg-tertiary);
  padding: var(--space-4) var(--space-6);
}
.summary-card__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}
.summary-card__value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}
.positive { color: var(--success); }
.negative { color: var(--danger); }

/* Holdings Table */
.holdings-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.holdings-table thead { border-bottom: 1px solid var(--border); }
.holdings-table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.holdings-table td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.holdings-table tr:last-child td { border-bottom: none; }
.holdings-table__symbol { font-weight: 700; color: var(--text-primary); }

/* Allocation Donut */
.allocation-chart {
  display: flex; align-items: center;
  gap: var(--space-8); margin-top: var(--space-8);
  flex-wrap: wrap;
}
.allocation-chart__donut {
  width: 140px; height: 140px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.allocation-chart__donut::after {
  content: '';
  position: absolute; inset: 28px;
  background: var(--bg-secondary);
  border-radius: 50%;
}
.allocation-chart__legend { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.allocation-chart__legend-item {
  display: flex; align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.allocation-chart__legend-dot {
  width: 8px; height: 8px;
  border-radius: 1px;
  flex-shrink: 0;
}

/* Performance Chart */
.performance-chart {
  margin-top: var(--space-8);
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: var(--space-6);
  min-height: 280px;
}
.performance-chart canvas { width: 100% !important; height: 260px !important; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { min-height: auto; padding: 100px 0 72px; }
  .hero__content { padding: 0 20px; }
  .hero__scroll { display: none; }
  .page-header { padding: var(--space-16) 0 var(--space-10); }
  .portfolio { padding: var(--space-4); }
  .holdings-table .hide-mobile { display: none; }
}
/* ═══════════════ CAROUSEL ══════════════════════════════════════════════ */
.carousel {
  position: relative;
  margin-top: 48px;
}
.carousel__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: var(--space-4);
}
.carousel__track::-webkit-scrollbar { display: none; }

.carousel__slide {
  flex: 0 0 340px;
  scroll-snap-align: start;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s var(--ease);
  position: relative;
}
.carousel__slide::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.carousel__slide:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.carousel__slide:hover::before { opacity: 1; }

.carousel__thumbnail {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.carousel__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.carousel__slide:hover .carousel__thumbnail img {
  transform: scale(1.03);
}
.carousel__thumbnail-placeholder {
  font-size: 2rem;
  opacity: 0.3;
}
.carousel__body {
  padding: 20px;
}
.carousel__body .card__title {
  font-size: 1rem;
  margin-bottom: 6px;
}
.carousel__body .card__desc {
  font-size: var(--text-xs);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Navigation arrows */
.carousel__nav {
  display: flex;
  gap: 8px;
  margin-top: var(--space-6);
}
.carousel__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.carousel__btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Scroll progress bar */
.carousel__progress {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin-top: var(--space-4);
  overflow: hidden;
}
.carousel__progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  width: 0%;
  transition: width 0.15s ease;
}
/* ═══════════════ CARD THUMBNAILS (Research page) ══════════════════════ */
.research-card__thumbnail {
  width: 100%;
  height: 180px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.research-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.card:hover .research-card__thumbnail img {
  transform: scale(1.03);
}
.research-card__thumbnail-empty {
  font-size: 2.5rem;
  opacity: 0.15;
}

@media (max-width: 768px) {
  .carousel__slide { flex: 0 0 280px; }
  .carousel__thumbnail { height: 160px; }
}