/* ─── Base / Global ─── */

html {
  font-size: 16px;
}

body {
  font-family: var(--font-text);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  line-height: 1.6;
}

/* ─── Typography ─── */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-hero); line-height: 1.06; }
h2 { font-size: var(--text-3xl); line-height: 1.1; }
h3 { font-size: var(--text-2xl); line-height: 1.15; }
h4 { font-size: var(--text-xl);  line-height: 1.2; letter-spacing: -0.01em; }
h5 { font-size: var(--text-lg);  line-height: 1.25; letter-spacing: 0; }

p {
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.body-large {
  font-size: var(--text-lg);
  line-height: 1.5;
}

.caption {
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--color-text-muted);
}

.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

/* ─── Layout ─── */

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

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

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

.section--dark {
  background: var(--color-black);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5 {
  color: var(--color-white);
}

.section--dark p {
  color: var(--color-gray-400);
}

.section--gray {
  background: var(--color-bg-secondary);
}

/* ─── Scroll Reveal Animations ─── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--transition-slow),
    transform var(--transition-slow);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Accessibility ─── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: calc(var(--z-nav) + 10);
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

.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;
}

/* ─── Focus styles ─── */

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─── Image placeholders ─── */

.img-placeholder {
  background: linear-gradient(135deg, var(--color-gray-200), var(--color-gray-400));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-600);
  font-size: var(--text-sm);
  font-weight: 500;
}

.img-placeholder--16-9 {
  aspect-ratio: 16 / 9;
}

.img-placeholder--4-3 {
  aspect-ratio: 4 / 3;
}

.img-placeholder--square {
  aspect-ratio: 1;
}
