/* ==========================================================================
   UTILITIES
   Small, composable helpers. Keep this file short — if a pattern repeats
   more than a couple of times, promote it to components.css instead.
   ========================================================================== */

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.text-center { text-align: center; }

/* Reveal-on-load fade. Pure CSS, no JS dependency at all — this was
   previously an IntersectionObserver + JS-gated opacity toggle, but that
   meant content could stay invisible if JS failed to run or any file got
   out of sync. A CSS animation with animation-fill-mode:both can't get
   stuck hidden: it always finishes at opacity:1 on its own, JS or not. */
.reveal {
  animation: reveal-in 0.7s var(--ease-standard) both;
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; }
}
