/* ==========================================================================
   Chronos Invest - Institutional Quantitative Systems Lab
   Styled with Quant Solvings Color Scheme (quantsolvings.com)
   Deep Midnight Navy + Warm Golden Amber + Crisp Editorial White
   100% Hostinger Shared Hosting Compatible (Pure CSS + Vanilla JS)
   ========================================================================== */

:root {
  --primary: #09101D;
  --primary-rgb: 9, 16, 29;
  --secondary: #C59132;
  --secondary-rgb: 197, 145, 50;
  --accent: #E5A93C;
  --accent-rgb: 229, 169, 60;
  --accent-hover: #F0B84D;
  --dark-navy: #0B1322;
  --dark-black: #060B14;
  --dark-card: #0F1829;
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --border: #E2E8F0;
  --border-light: #ECEEF2;
  --text-main: #0F172A;
  --text-muted: #64748B;
}

/* Typography styles */
.font-serif-editorial {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-sans-editorial {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.font-mono-numbers {
  font-family: 'JetBrains Mono', monospace;
  font-feature-settings: 'tnum' on, 'zero' on;
}

/* Custom smooth scrolling */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: #0F172A;
  background-color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: rgba(229, 169, 60, 0.25);
  color: #09101D;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #F7F7F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Hero Canvas Container */
.hero-canvas-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

#hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Subtle Shimmer & Pulse */
@keyframes subtle-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.95); }
}

.animate-subtle-pulse {
  animation: subtle-pulse 2.5s infinite ease-in-out;
}

/* Hairline borders */
.border-subtle {
  border-color: #E2E8F0;
}

/* Clean Card Shadows */
.card-shadow {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-shadow:hover {
  box-shadow: 0 8px 24px -4px rgba(9, 16, 29, 0.08), 0 4px 8px -2px rgba(9, 16, 29, 0.04);
}

/* Interactive Team Row */
.team-row {
  border-top: 1px solid #E2E8F0;
  padding: 1.5rem 0;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.team-row:hover {
  border-color: #C59132;
}

/* FAQ Accordion Styling */
.faq-trigger svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.active .faq-trigger svg {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.active .faq-content {
  max-height: 450px;
  opacity: 1;
}

/* Modal Transitions & Hardened Safety */
.modal-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.hidden,
.modal-backdrop[style*="display: none"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

.modal-backdrop.active,
.modal-backdrop:not(.hidden):not([style*="display: none"]) {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 999 !important;
}

.modal-container {
  transform: scale(0.97) translateY(12px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.modal-backdrop.active .modal-container,
.modal-backdrop:not(.hidden) .modal-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   INFINITE CONTINUOUS HORIZONTAL SCROLL TICKERS (Matching tirmann.com)
   ========================================================================== */
@keyframes marquee-scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.animate-marquee-left {
  display: flex;
  width: max-content;
  animation: marquee-scroll-left 36s linear infinite;
  will-change: transform;
}

.animate-marquee-right {
  display: flex;
  width: max-content;
  animation: marquee-scroll-right 36s linear infinite;
  will-change: transform;
}

.marquee-wrapper:hover .animate-marquee-left,
.marquee-wrapper:hover .animate-marquee-right {
  animation-play-state: paused;
}

/* ==========================================================================
   SCROLL-TRIGGERED REVEAL ANIMATIONS (IntersectionObserver)
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Slide Right-to-Left on Scroll */
.reveal-slide-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-slide-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-fade {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.reveal-fade.revealed {
  opacity: 1;
}

/* Reading Progress Bar */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #C59132 0%, #E5A93C 50%, #F0B84D 100%);
  z-index: 99999;
  width: 0%;
  transition: width 0.05s linear;
  pointer-events: none;
}

/* Horizontal Scroll Container for Process/Capabilities */
.horizontal-scroll-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 #F7F7F9;
}

.horizontal-scroll-track::-webkit-scrollbar {
  height: 6px;
}

.horizontal-scroll-track::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 999px;
}

.horizontal-scroll-track::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}

.horizontal-scroll-track::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.horizontal-scroll-item {
  scroll-snap-align: start;
}

/* Chart Canvas Crispness */
#equity-canvas {
  display: block;
  width: 100%;
  height: 380px;
  cursor: crosshair;
}

@media (max-width: 640px) {
  #equity-canvas {
    height: 280px;
  }
}
