/* ==========================================================================
   GROWWISE RESEARCH - LIGHTWEIGHT PERFORMANCE ANIMATIONS
   GPU-accelerated, zero-jank micro-animations
   ========================================================================== */

/* Scroll-triggered Reveal Animations */
.reveal-item {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger delay helpers */
.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 160ms; }
.delay-3 { transition-delay: 240ms; }
.delay-4 { transition-delay: 320ms; }

/* Subtle Pop Effect for Highlight Data Points */
.data-pop {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.data-pop:hover {
  transform: scale(1.08);
  color: var(--color-brand-teal);
}

/* SVG Line Draw Animation */
@keyframes dash-draw {
  from {
    stroke-dashoffset: 1200;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.svg-animated-path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  animation: dash-draw 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Sparkline Draw */
@keyframes sparkline-draw {
  from {
    stroke-dashoffset: 200;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.sparkline-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 0;
  animation: sparkline-draw 1.2s ease-out forwards;
}

/* Dedicated Print Watermark: Hidden on screen, active only on print */
.print-watermark {
  display: none;
}

/* Print/Physical Paper Optimizations - Bulletproof PDF Output */
@media print {
  @page {
    size: auto;
    margin: 15mm 15mm 15mm 15mm;
  }

  /* Force all animations and transitions to static end state */
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  /* Force all dynamically revealed content to be visible */
  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  .sparkline-path,
  .svg-animated-path {
    stroke-dashoffset: 0 !important;
  }

  /* Reset document flow and prevent overflow clipping */
  html, body {
    background: #FFFFFF !important;
    color: #111111 !important;
    font-size: 10.5pt !important;
    line-height: 1.55 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    position: static !important;
  }

  .page-wrapper {
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Hide screen-only interactive utilities */
  .top-nav-bar,
  .floating-actions,
  .reading-progress-track,
  .timeline-scrubber-box,
  .chart-tabs,
  .sim-controls-panel,
  .toast,
  .chart-tooltip {
    display: none !important;
  }

  /* Kill any legacy pseudo-element watermark text */
  body::after,
  body::before {
    display: none !important;
    content: none !important;
  }

  /* Fixed Logo Watermark: Uses exact bounded dimensions (no 100vw/100vh) to avoid pagination overflow */
  .print-watermark {
    display: block !important;
    position: fixed !important;
    top: 32% !important;
    left: 25% !important;
    width: 50% !important;
    max-width: 320px !important;
    height: auto !important;
    pointer-events: none !important;
    z-index: -100 !important;
  }

  .print-watermark-img {
    width: 100% !important;
    max-width: 320px !important;
    height: auto !important;
    opacity: 0.045 !important;
    display: block !important;
    margin: 0 auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Structural page breaks for executive report cards */
  .article-masthead {
    border-bottom: 1px solid #CCCCCC !important;
    padding-bottom: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  .chart-card,
  .channels-matrix-card,
  .sim-results-panel,
  .action-matrix-grid {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    border: 1px solid #DDDDDD !important;
    background: #FAFAFA !important;
    margin-bottom: 1.5rem !important;
  }

  .kpi-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    border: 1px solid #E5E5E5 !important;
    background: #FFFFFF !important;
  }

  .simulator-layout {
    display: block !important;
  }

  .sim-results-panel {
    width: 100% !important;
  }
}
