/* ============================================================
   Procreate Men's Health Center — Base Styles
   Reset · Typography scale · Global elements
   ============================================================ */

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-muted);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

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

a:hover {
  color: var(--teal-deep);
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
}

/* --- Typography scale --- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
}

h1 {
  font-size: var(--text-display);
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.005em;
}

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

/* Headings on dark backgrounds inherit white from parent context class */
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

.section--dark p,
.section--dark li {
  color: rgba(255, 255, 255, 0.82);
}

/* Label / eyebrow text */
.label {
  font-family: var(--font-body);
  font-size: var(--text-caption);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.label--teal {
  color: var(--teal);
}

.label--teal-bright {
  color: var(--teal-bright);
}

/* Body text utilities */
p + p {
  margin-top: 1em;
}

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

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

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

/* --- Skip navigation (accessibility) --- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s;
}

.skip-nav:focus {
  top: 0;
}

/* --- 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: 0;
}

/* --- Divider line --- */
.divider {
  width: 48px;
  height: 3px;
  background: var(--teal);
  margin: var(--space-md) 0;
  border: none;
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* --- Image placeholder --- */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-tint);
  border: 2px dashed var(--teal);
  border-radius: var(--radius-md);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: var(--text-caption);
  text-align: center;
  padding: var(--space-sm);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
