/* ==========================================================================
   Utilities — Helpers and accessibility
   ========================================================================== */

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Progressive-enhancement scroll reveal — fade + rise.
   Default state for [data-reveal] / .fade-in is VISIBLE so any failure mode
   (no JS, slow IntersectionObserver, screenshot tools) shows content correctly.
   The JS in scroll-animations.js sets `html.has-reveal-js` on init, which is
   what activates the hidden-then-reveal behavior, and assigns --reveal-delay
   to the direct children of any [data-reveal-group] so card rows cascade. */
.has-reveal-js [data-reveal],
.has-reveal-js .fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-entrance) var(--ease-out-expo),
              transform var(--dur-entrance) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.has-reveal-js [data-reveal].is-visible,
.has-reveal-js .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion: snap to final state, no transition. */
@media (prefers-reduced-motion: reduce) {
  .has-reveal-js [data-reveal],
  .has-reveal-js .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text color helpers */
.text-white { color: var(--color-white); }
.text-muted { color: var(--color-gray); }
.text-brand { color: var(--color-brand-primary); }

/* Spacing helpers */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* Max-width prose container */
.prose {
  max-width: 65ch;
}

.prose p + p {
  margin-top: var(--space-4);
}

