/* Layout */

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--content-width);
}

.section {
  padding-block: var(--space-24);
}

.section--hero {
  padding-block: var(--space-32) var(--space-24);
}

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

/* 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;
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal var(--duration-slow) var(--ease-out) forwards;
}

.reveal:nth-child(2) { animation-delay: 80ms; }
.reveal:nth-child(3) { animation-delay: 160ms; }
.reveal:nth-child(4) { animation-delay: 240ms; }
.reveal:nth-child(5) { animation-delay: 320ms; }
.reveal:nth-child(6) { animation-delay: 400ms; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Tablet and below */
@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .section--hero {
    padding-block: var(--space-20) var(--space-16);
  }

  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }
}

/* Mobile */
@media (max-width: 480px) {
  h1 {
    font-size: var(--text-3xl);
  }
}
