/* ============================================================
   UTILITIES
   ============================================================ */

/* Skip to content link (WCAG 2.1 AA) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Display */
.hidden   { display: none !important; }
.block    { display: block; }
.relative { position: relative; }

/* Spacing */
.mt-auto { margin-top: auto; }
.mx-auto { margin-inline: auto; }

/* Width */
.w-full  { width: 100%; }
.max-w-prose { max-width: 65ch; }

/* Overflow */
.overflow-hidden { overflow: hidden; }

/* Aspect ratios */
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1; }

/* Visually hidden (accessible) */
.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;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease both;
}

/* Stagger helpers */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

/* Observed elements (for IntersectionObserver) */
.observe {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.observe.visible {
  opacity: 1;
  transform: translateY(0);
}

.observe.delay-1 { transition-delay: 100ms; }
.observe.delay-2 { transition-delay: 200ms; }
.observe.delay-3 { transition-delay: 300ms; }
.observe.delay-4 { transition-delay: 400ms; }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-8);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.badge-primary {
  background: rgba(47, 46, 44, 0.08); /* --color-primary graphite */
  color: var(--color-primary);
}

.badge-accent {
  background: rgba(46, 155, 95, 0.10); /* --color-secondary green */
  color: var(--color-secondary);
}
