/* ==========================================================================
   Peak Momentum — Base: fonts, reset, typography, layout primitives
   ========================================================================== */

/* --- Raleway (self-hosted, SIL OFL 1.1) --- */
@font-face {
  font-family: 'Raleway'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/Raleway-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Raleway'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/Raleway-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Raleway'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/Raleway-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'Raleway'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../fonts/Raleway-Bold.ttf') format('truetype');
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; }

/* --- Body --- */
body {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--text-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Headings --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--color-text-primary);
  text-wrap: balance;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
p  { max-width: 68ch; }

@media (min-width: 48rem) {
  h1 { font-size: var(--text-5xl); }
}

/* --- Links in prose --- */
.prose a, a.link {
  color: var(--color-text-primary);
  border-bottom: 2px solid var(--color-accent);
  transition: color var(--transition), border-color var(--transition);
}
.prose a:hover, a.link:hover { color: var(--color-accent-deep); }

/* --- Layout primitives --- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--lg { max-width: var(--container-lg); }
.container--md { max-width: var(--container-md); }
.container--sm { max-width: var(--container-sm); }

.section { padding-block: var(--section-padding-y); }
@media (min-width: 48rem) { .section { padding-block: var(--section-padding-y-lg); } }
.section--alt  { background: var(--color-surface-alt); }
.section--dark { background: var(--color-surface-dark); color: var(--color-text-on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

/* --- Eyebrow (small-caps label) --- */
.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-accent-deep);
  margin-bottom: var(--space-3);
}
.section--dark .eyebrow { color: var(--teal); }

/* --- Teal accent rule (brand's native divider) --- */
.rule-teal {
  width: 56px; height: 4px; border: 0;
  background: var(--color-accent);
  margin: var(--space-4) 0 var(--space-5);
}
.rule-teal--center { margin-inline: auto; }

/* --- Utility --- */
.lead { font-size: var(--text-lg); color: var(--color-text-secondary); }
.muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.stack > * + * { margin-top: var(--space-4); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 2px; }
.skip-link {
  position: absolute; left: var(--space-4); top: -3rem;
  background: var(--graphite); color: #fff; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm); z-index: 100; transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); }
