/* Reset and typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

p {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  padding-left: var(--space-lg);
  margin-top: 0;
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-xs);
}

strong {
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-2xl) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-xl);
}

th,
td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* 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-width: 0;
}

@media (max-width: 768px) {
  h1 {
    font-size: var(--text-4xl);
  }
  h2 {
    font-size: var(--text-3xl);
  }
  h3 {
    font-size: var(--text-xl);
  }
}

/* WordPress block editor width overrides */
.wp-block-post-content > *,
.entry-content > *,
.wp-site-blocks > * {
  max-width: none;
}

.is-layout-constrained > * {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure ACF blocks render full-width within content */
[class*="wp-block-acf-"] {
  max-width: none;
  width: 100%;
}
