/*
 * Typography defaults — applied to semantic HTML so Gutenberg blocks,
 * classic content, and raw the_content() render consistently.
 *
 * Loads after tokens.css. Ported from
 * design/madeira-trail-up-design-1/project/css/colors_and_type.css.
 */

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-text-md);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--surface);
  font-weight: var(--fw-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }

/* Headings */
h1, h2, h3, h4, h5, h6,
.mtu-h1, .mtu-h2, .mtu-h3, .mtu-h4, .mtu-h5, .mtu-h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  margin: 0;
  color: var(--text-primary);
}

h1, .mtu-h1 { font-size: var(--font-display-2xl); font-weight: var(--fw-black); line-height: var(--lh-tight); }
h2, .mtu-h2 { font-size: var(--font-display-xl);  font-weight: var(--fw-black); line-height: var(--lh-tight); }
h3, .mtu-h3 { font-size: var(--font-display-lg); }
h4, .mtu-h4 { font-size: var(--font-display-md); }
h5, .mtu-h5 { font-size: var(--font-display-sm); }
h6, .mtu-h6 { font-size: var(--font-display-xs); }

/* Paragraph */
p, .mtu-body {
  font-family: var(--font-body);
  font-size: var(--font-text-md);
  line-height: var(--lh-body);
  color: var(--text-primary);
  margin: 0;
}

/* Lead paragraph */
.mtu-lead,
.has-lead-text {
  font-family: var(--font-body);
  font-size: var(--font-text-xl);
  line-height: var(--lh-snug);
  color: var(--text-secondary);
}

/* Eyebrow — uppercase tag with yellow bar prefix */
.mtu-eyebrow,
.is-style-eyebrow {
  font-family: var(--font-heading);
  font-size: var(--font-eyebrow);
  font-weight: var(--fw-heading);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mtu-eyebrow::before,
.is-style-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--mtu-yellow);
}

/* Caption */
.mtu-caption {
  font-family: var(--font-body);
  font-size: var(--font-text-xs);
  line-height: 1.33;
  color: var(--text-secondary);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
}

.mtu-mono {
  font-family: var(--font-mono);
  font-size: var(--font-text-sm);
}

/* Yellow underline highlight */
.mtu-highlight,
.has-mtu-highlight {
  background: linear-gradient(to top, var(--mtu-yellow) 0 30%, transparent 30% 100%);
  padding: 0 2px;
}

/* Yellow accent span inside display titles ("<span class='y'>NORTH</span>") */
h1 .y, h2 .y, h3 .y,
.mtu-h1 .y, .mtu-h2 .y, .mtu-h3 .y {
  color: var(--mtu-yellow);
}

/* Links */
a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--accent-fill-hover);
}

small {
  font-size: var(--font-text-sm);
}

::placeholder {
  color: var(--field-placeholder);
}

:focus-visible {
  outline: var(--bw-strong) solid var(--mtu-yellow);
  outline-offset: var(--space-xs);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
