/* ==========================================================================
   GNC SG — Typography
   ========================================================================== */

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

/* ---- Headings ---- */

h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-secondary);
  margin-bottom: var(--space-4);
}

h1, .h1 {
  font-size: var(--font-size-3xl);
}

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

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

h4, .h4 {
  font-size: var(--font-size-lg);
}

@media (min-width: 1024px) {
  h1, .h1 {
    font-size: var(--font-size-4xl);
  }

  h2, .h2 {
    font-size: var(--font-size-3xl);
  }
}

/* ---- Body text ---- */

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

.text-muted {
  color: var(--color-text-muted);
}

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

.text-xs {
  font-size: var(--font-size-xs);
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Links ---- */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ---- Red underline accent (used on page titles, section headings) ---- */

.heading-accent {
  position: relative;
  padding-bottom: var(--space-3);
}

.heading-accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
}

/* ---- Lists (content context) ---- */

.content-body ul,
.content-body ol {
  margin-bottom: var(--space-4);
}

.content-body li {
  margin-bottom: var(--space-2);
}

/* ---- Blockquote ---- */

blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--color-primary);
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
}

/* ---- Selection ---- */

::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* ---- Ruled heading ----
 * The short red rule under page titles and FAQ group headings.
 *
 * Figma exports this as a zero-height box with a border, which in a browser
 * renders at twice the intended thickness (the stroke is centred there, but
 * CSS borders sit on both edges). It is drawn here as an explicit height
 * instead, so 2px desktop / 3px mobile land as drawn.
 */

.heading-rule::after {
  content: '';
  display: block;
  width: 64px;
  height: 2px;
  margin-top: var(--space-4);
  background-color: var(--color-primary);
}

@media (max-width: 767px) {
  .heading-rule::after {
    width: 48px;
    height: 3px;
  }
}
