/* Typography & Global Styles */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3 {
  color: var(--color-title);
  font-weight: var(--font-weight-semibold);
}

h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-lg);
  }

  h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
  }

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

p {
  margin-bottom: var(--space-md);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--color-link);
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--color-link-hover);
}

strong {
  font-weight: var(--font-weight-semibold);
}

/* Brand wordmark */
.brand-wordmark {
  font-family: var(--font-brand);
  color: var(--color-title);
  letter-spacing: 0.05em;
}

/* Tagline */
.brand-tagline {
  font-family: var(--font-tagline);
  color: var(--color-text);
  font-style: italic;
}

/* Focus visible styles for accessibility */
:focus-visible {
  outline: 2px solid var(--color-noodles);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--color-rosewood);
  color: var(--color-noodles);
}

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

/* Utility: text alignment */
.text-center {
  text-align: center;
}

/* Utility: subdued intro text */
.text-subdued {
  max-width: var(--container-text);
  margin-inline: auto;
  opacity: 0.85;
}

/* Utility: cover image */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Scroll-reveal animations ── */
.reveal {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Modifiers */
.reveal--slide-up {
  transform: translateY(30px);
}

.reveal--slide-right {
  transform: translateX(-30px);
}

.reveal--slide-left {
  transform: translateX(30px);
}

/* Stagger children inside grids */
.grid > .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid > .reveal:nth-child(3) { transition-delay: 0.2s; }
.grid > .reveal:nth-child(4) { transition-delay: 0.3s; }
.grid > .reveal:nth-child(5) { transition-delay: 0.4s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}
