/* ============================================================
   CARN Polish — polish.css
   Animations, micro-interactions, final refinements
   ============================================================ */

/* Hero headings */
.hero-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

/* Fade-in on scroll */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(12px);
  animation: staggerIn 0.4s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.10s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.20s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.30s; }

@keyframes staggerIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Pulse dot (live indicators) */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--accent-green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}

/* Spinner */
.spinner-modern {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary-600);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Smooth expand / collapse */
.collapse-smooth {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
}

/* Tooltip arrow refinement */
.tooltip-modern {
  position: relative;
}

.tooltip-modern::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.375rem 0.75rem;
  background: var(--gray-900);
  color: white;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.tooltip-modern:hover::after {
  opacity: 1;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: rgba(99,102,241,.2);
  color: var(--gray-900);
}

/* Smooth page transitions */
.content-wrapper {
  animation: pageIn 0.3s ease;
}

@keyframes pageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
