/* ============================================
   LIVING ON PURPOSE — BASE STYLES
   Modern reset, typography, link defaults.
   ============================================ */

/* ---------- MODERN RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: 400;
  min-height: 100vh;
}

/* Block-level defaults */
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure {
  margin: 0;
}

ul, ol {
  padding-left: 1.25em;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lop-orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- TYPOGRAPHY ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-heading);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

/* HEADING SCALE — strict hierarchy.
   Every heading uses these sizes via tag, not inline overrides. */

h1 {
  /* Hero title — biggest type on the page */
  font-size: var(--text-5xl);
}

h2 {
  /* Section headers — bigger than default to feel editorial */
  font-size: var(--text-3xl);
}

h3 {
  /* Card titles, inline subheads */
  font-size: var(--text-xl);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

h4 {
  /* Tertiary headers, advisory statement, footer labels */
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-heading);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

h5 {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--color-heading);
  line-height: var(--leading-snug);
}

h6 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-heading);
  line-height: var(--leading-snug);
}

p {
  line-height: var(--leading-relaxed);
}

p + p {
  margin-top: var(--space-4);
}

/* Lead paragraph helper */
.lead {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

/* The italic emphasis treatment is a brand signature.
   Use <em> in copy to opt in to Optima italic in body text. */
em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
}

/* In headings, em is already in Optima — just italic-style it */
h1 em, h2 em, .hero em {
  font-style: italic;
  font-weight: 400;
}

/* ---------- UTILITY CLASSES ---------- */

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

/* Eyebrow text — small uppercase label above headlines */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

/* Visually hidden (for accessibility labels) */
.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;
}

/* Skip link — first focusable element on every page for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--lop-forest);
  color: var(--lop-cream);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
}
.skip-link:focus {
  top: 0;
  color: var(--lop-cream);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
