/* HyperStream — Custom CSS (complements Tailwind CDN) */

/* ─── Typography ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.animate-fade-up {
  animation: fadeUp 0.7s ease-out both;
}
.animate-fade-in {
  animation: fadeIn 0.7s ease-out both 0.2s;
}

/* Intersection Observer-based scroll animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 200ms; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 300ms; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 400ms; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 500ms; opacity: 1; transform: none; }

/* ─── Alpine.js x-collapse helper ───────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ─── Form Inputs ────────────────────────────────────────────────────────── */
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #06b6d4; }

/* ─── Text Clamping ─────────────────────────────────────────────────────── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ─── Counter Animation ─────────────────────────────────────────────────── */
.stat-counter {
  display: inline-block;
  transition: all 0.3s ease;
}

/* ─── Page Transition ───────────────────────────────────────────────────── */
.page-transition {
  animation: fadeIn 0.3s ease-out both;
}
